Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HardwareIO fails to read from OpenPLC #94

Open
mniedermaier opened this issue Feb 4, 2025 · 0 comments
Open

HardwareIO fails to read from OpenPLC #94

mniedermaier opened this issue Feb 4, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@mniedermaier
Copy link
Owner

The hardwareio.py script fails randomly after reading from the OpenPLC sometimes.
This leads to a complete fail state on the real hardware.

Restarting the container on the Raspberry Pi works, but again only for some time:
sudo docker restart cybics-hwio-1

Log output from hardwareio.py script:

20:23:23{/CybICS/./hardwareIO.py:88}: Read from OpenPLC failed - 'ModbusIOException' object has no attribute 'bits' 20:23:23{/CybICS/./hardwareIO.py:88}: Read from OpenPLC failed - 'ModbusIOException' object has no attribute 'bits' 20:23:24{/CybICS/./hardwareIO.py:88}: Read from OpenPLC failed - 'ModbusIOException' object has no attribute 'bits' 20:23:24{/CybICS/./hardwareIO.py:88}: Read from OpenPLC failed - 'ModbusIOException' object has no attribute 'bits' 20:23:25{/CybICS/./hardwareIO.py:88}: Read from OpenPLC failed - 'ModbusIOException' object has no attribute 'bits' 20:23:26{/CybICS/./hardwareIO.py:88}: Read from OpenPLC failed - 'ModbusIOException' object has no attribute 'bits' 20:23:26{/CybICS/./hardwareIO.py:88}: Read from OpenPLC failed - 'ModbusIOException' object has no attribute 'bits' 20:23:27{/CybICS/./hardwareIO.py:88}: Read from OpenPLC failed - 'ModbusIOException' object has no attribute 'bits' 20:23:27{/usr/local/lib/python3.13/site-packages/pymodbus/pdu/decoders.py:112}: Unable to decode frame Modbus Error: [Input/Output] Invalid response b'f\x00\x01\x95g\x00\x00\x00\x06\x01\x10\x04\xb0\x00\x07\x95h\x00\x00\x00\x04\x01\x01\x01\x0e\x95i\x00\x00\x00\x06\x01\x10\x04l\x00\x01\x95j\x00\x00\x00\x06\x01\x10\x04n\x00\x01\x95k\x00\x00\x00\x06\x01\x10\x04d\x00\x01\x95l\x00\x00\x00\x06\x01\x10\x04f\x00\x01\x95m\x00\x00\x00\x06\x01\x10\x04\xb0\x00\x07\x95n\x00\x00\x00\x04\x01\x01\x01\r\x95o\x00\x00\x00\x06\x01\x10\x04l\x00\x01\x95p\x00\x00\x00\x06\x01\x10\x04n\x00\x01\x95q\x00\x00\x00\x06\x01\x10\x04d\x00\x01\x95r\x00\x00\x00\x06\x01\x10\x04f\x00\x01\x95s\x00\x00\x00\x06\x01\x10\x04\xb0\x00\x07\x95t\x00\x00\x00\x04\x01\x01\x01\x0c\x95u\x00\x00\x00\x06\x01\x10\x04l\x00\x01\x95v\x00\x00\x00\x06\x01\x10\x04n\x00\x01\x95w\x00\x00\x00\x06\x01\x10\x04d\x00\x01\x95x\x00\x00\x00\x06\x01\x10\x04f\x00\x01\x95y\x00\x00\x00\x06\x01\x10\x04\xb0\x00\x07\x95z\x00\x00\x00\x04\x01\x01\x01\x0c\x95{\x00\x00\x00\x06\x01\x10\x04l\x00\x01\x95|\x00\x00\x00\x06\x01\x10\x04n\x00\x01\x95}\x00\x00\x00\x06\x01\x10\x04d\x00\x01\x95~\x00\x00\x00\x06\x01\x10\x04f\x00\x01\x95\x7f\x00\x00\x00\x06\x01\x10\x04\xb0\x00\x07\x95\x80\x00\x00\x00\x04\x01\x01\x01\r\x95\x81\x00\x00\x00\x06\x01\x10\x04l\x00\x01\x95\x82\x00\x00\x00\x06\x01\x10\x04n\x00\x01\x95\x83\x00\x00\x00\x06\x01\x10\x04d\x00\x01\x95\x84\x00\x00\x00\x06\x01\x10\x04f\x00\x01\x95\x85\x00\x00\x00\x06\x01\x10\x04\xb0\x00\x07\x95\x86\x00\x00\x00\x04\x01\x01\x01\r\x95\x87\x00\x00\x00\x06\x01\x10\x04l\x00\x01\x95\x88\x00\x00\x00\x06\x01\x10\x04n\x00\x01\x95\x89\x00\x00\x00\x06\x01\x10\x04d\x00\x01\x95\x8a\x00\x00\x00\x06\x01\x10\x04f\x00\x01\x95\x8b\x00\x00\x00\x06\x01\x10\x04\xb0\x00\x07\x95\x8c\x00\x00\x00\x04\x01\x01\x01\x0c\x95\x8d\x00\x00\x00\x06\x01\x10\x04l\x00\x01\x95\x8e\x00\x00\x00\x06\x01\x10\x04n\x00\x01\x95\x8f\x00\x00\x00\x06\x01\x10\x04d\x00\x01\x95\x90\x00\x00\x00\x06\x01\x10\x04f\x00\x01\x95\x91\x00\x00\x00\x06\x01\x10\x04\xb0\x00\x07\x95\x92\x00\x00\x00\x04\x01\x01\x01\r\x95\x93\x00\x00\x00\x06\x01\x10\x04l\x00\x01\x95\x94\x00\x00\x00\x06\x01\x10\x04n\x00\x01\x95\x95\x00\x00\x00\x06\x01\x10\x04d\x00\x01\x95\x96\x00\x00\x00\x06\x01\x10\x04f\x00\x01\x95\x97\x00\x00\x00\x06\x01\x10\x04\xb0\x00\x07\x95\x98\x00\x00\x00\x04\x01\x01\x01\r\x95\x99\x00\x00\x00\x06\x01\x10\x04l\x00\x01\x95\x9a\x00\x00\x00\x06\x01\x10\x04n\x00\x01\x95\x9b\x00\x00\x00\x06\x01\x10\x04d\x00\x01\x95\x9c\x00\x00\x00\x06\x01\x10\x04f\x00\x01\x95\x9d\x00\x00\x00\x06\x01\x10\x04\xb0\x00\x07\x95\x9e\x00\x00\x00\x04\x01\x01\x01\x0c\x95\x9f\x00\x00\x00\x06\x01\x10\x04l\x00\x01\x95\xa0\x00\x00\x00\x06\x01\x10\x04n\x00\x01\x95\xa1\x00\x00\x00\x06\x01\x10\x04d\x00\x01\x95\xa2\x00\x00\x00\x06\x01\x10\x04f\x00\x01\x95\xa3\x00\x00\x00\x06\x01\x10\x04\xb0\x00\x07\x95\xa4\x00\x00\x00\x04\x01\x01\x01\x0c\x95\xa5\x00\x00\x00\x06\x01\x10\x04l\x00\x01\x95\xa6\x00\x00\x00\x06\x01\x10\x04n\x00\x01\x95\xa7\x00\x00\x00\x06\x01\x10\x04d\x00\x01\x95\xa8\x00\x00\x00\x06\x01\x10\x04f\x00\x01\x95\xa9\x00\x00\x00\x06\x01\x10\x04\xb0\x00\x07\x95\xaa\x00\x00\x00\x04\x01\x01\x01\r\x95\xab\x00\x00\x00\x06\x01\x10\x04l\x00\x01\x95\xac\x00\x00\x00\x06\x01\x10\x04n\x00\x01\x95\xad\x00\x00\x00\x06\x01\x10\x04d\x00\x01\x95\xae\x00\x00\x00\x06\x01\x10\x04f\x00\x01\x95\xaf\x00\x00\x00\x06\x01\x10\x04\xb0\x00\x07\x95\xb0\x00\x00\x00\x04\x01\x01\x01\x0c\x95\xb1\x00\x00\x00\x06\x01\x10\x04l\x00\x01\x95\xb2\x00\x00\x00\x06\x01\x10\x04n\x00\x01\x95\xb3\x00\x00\x00\x06\x01\x10\x04d\x00\x01\x95\xb4\x00\x00\x00\x06\x01\x10\x04f\x00\x01\x95\xb5\x00\x00\x00\x06\x01\x10\x04\xb0\x00\x07\x95\xb6\x00\x00\x00\x04\x01\x01\x01\x0c\x95\xb7\x00\x00\x00\x06\x01\x10\x04l\x00\x01\x95\xb8\x00\x00\x00\x06\x01\x10\x04n\x00\x01\x95\xb9\x00\x00\x00\x06\x01\x10\x04d\x00\x01\x95\xba\x00\x00\x00\x06\x01\x10\x04f\x00\x01\x95\xbb\x00\x00\x00\x06\x01\x10\x04\xb0\x00\x07\x95\xbc\x00\x00\x00\x04\x01\x01\x01\r\x95\xbd\x00\x00\x00\x06\x01\x10\x04l\x00\x01\x95\xbe\x00\x00\x00\x06\x01\x10\x04n\x00\x01\x95\xbf\x00\x00\x00\x06\x01\x10\x04d\x00\x01\x95\xc0\x00\x00\x00\x06\x01\x10\x04f\x00\x01\x95\xc1\x00\x00\x00\x06\x01\x10\x04\xb0\x00\x07\x95\xc2\x00\x00\x00\x04\x01\x01\x01\r\x95\xc3\x00\x00\x00\x06\x01\x10\x04l\x00\x01\x95\xc4\x00\x00\x00\x06\x01\x10\x04n\x00\x01\x95\xc5\x00\x00\x00\x06\x01\x10\x04d\x00\x01\x95\xc6\x00\x00\x00\x06\x01\x10\x04f\x00\x01\x95\xc7\x00\x00\x00\x06\x01\x10\x04\xb0\x00\x07\x95\xc8\x00\x00\x00\x04\x01\x01\x01\x0c\x95\xc9\x00\x00\x00\x06\x01\x10\x04l\x00\x01\x95\xca\x00\x00\x00\x06\x01\x10\x04n\x00\x01\x95\xcb\x00\x00\x00\x06\x01\x10\x04d\x00\x01\x95\xcc\x00\x00\x00\x06\x01\x10\x04f\x00\x01\x95\xcd\x00\x00\x00\x06\x01\x10\x04\xb0\x00\x07\x95\xce\x00\x00\x00\x04\x01\x01\x01\r\x95\xcf\x00\x00\x00\x06\x01\x10\x04l\x00\x01\x95\xd0\x00\x00\x00\x06\x01\x10\x04n\x00\x01\x95\xd1\x00\x00\x00\x06\x01\x10\x04d\x00\x01\x95\xd2\x00\x00\x00\x06\x01\x10\x04f\x00\x01\x95\xd3\x00\x00\x00\x06\x01\x10\x04\xb0\x00\x07\x95\xd4\x00\x00\x00\x04\x01\x01\x01\t\x95\xd5\x00\x00\x00\x06\x01\x10\x04l\x00\x01\x95\xd6\x00\x00\x00\x06\x01\x10\x04n\x00\x01\x95\xd7\x00\x00\x00\x06\x01\x10\x04d\x00\x01\x95\xd8\x00\x00\x00\x06\x01\x10\x04f\x00\x01\x95\xd9\x00\x00\x00\x06\x01\x10\x04\xb0\x00\x07\x95\xda\x00\x00\x00\x04\x01\x01\x01\x08\x95\xdb\x00\x00\x00\x06\x01\x10\x04l\x00\x01\x95\xdc\x00\x00\x00\x06\x01\x10\x04n\x00\x01\x95\xdd\x00\x00\x00\x06\x01\x10\x04d\x00\x01\x95\xde\x00\x00\x00\x06\x01\x10\x04f\x00\x01\x95\xdf\x00\x00\x00\x06\x01\x10\x04\xb0\x00\x07\x95\xe0\x00\x00\x00\x04\x01\x01\x01\t\x95\xe1\x00\x00\x00\x06\x01\x10\x04l\x00\x01\x95\xe2\x00\x00\x00\x06\x01\x10\x04n\x00\x01\x95\xe3\x00\x00\x00\x06\x01\x10\x04d\x00\x01\x95\xe4\x00\x00\x00\x06\x01\x10\x04f\x00\x01\x95\xe5\x00\x00\x00\x06\x01\x10\x04\xb0\x00\x07\x95\xe6\x00\x00\x00\x04\x01\x01\x01\t\x95\xe7\x00\x00\x00\x06\x01\x10\x04l\x00\x01\x95\xe8\x00\x00\x00\x06\x01\x10\x04n\x00\x01\x95\xe9\x00\x00\x00\x06\x01\x10\x04d\x00\x01\x95\xea\x00\x00' has byte count of 102 20:23:27{/usr/local/lib/python3.13/site-packages/pymodbus/transaction.py:267}: Modbus IO exception Modbus Error: [Input/Output] Unable to decode request
@mniedermaier mniedermaier added the bug Something isn't working label Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants