Experiencing "random" no response from modbus sensor. #2446
-
Issue: I have provided code But it is not just a Modbus implementation, i am also using paho mqtt to send my modbus data to a remote broker. I am able to use modbus slave simulator and do not experience this issue, which leads me to believe it is he sensor that is the issue. I am reading the modbus register data from a json file. Code: Specs: pymodbus version. 3.7.4 logs: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 10 replies
-
Your code is large, and not something I look into. If you have a problem then make some simple sample code that shows the problem. I am pretty sure you do not get an exception thrown but a object returned that inherits from ModbusException. You should use the isError() function after the request call to verify you got a correct response. Depending on your setup it is quite normal from time to time to get a bad or no response from your device. |
Beta Was this translation helpful? Give feedback.
-
This exception "AttributeError: 'ModbusIOException' object has no attribute 'registers'" is because you address .registers without having verified the response is ok. |
Beta Was this translation helpful? Give feedback.
And fyi, saying the documentation is poor, is a problem for the project, if you do not understand it, there can be several reasons.
But instead of just calling it poor, submit a pull request to make it better....this is open source where you are expected to participate.