Closed RoGu777 closed 7 months ago
That sounds like a potential bug, let me have a look, but a bit later.
The issue really belongs in Homeassistant, provided you use the modbus integration....if not I would like to know which integration you use ?
I assume you are aware that if we solve it here, it will NOT be solved in HA, unless the modbus integration decides to upgrade.
yes, I am using the modbus integration of HomeAssistant, which itself uses pymodbus:
https://www.home-assistant.io/integrations/modbus/
Yes, I am aware of the needed upgrade
The problem seems to be your serial line or USB converter:
This is the good one:
SEND: 0xa 0x3 0xaa 0xe6 0x0 0x8 0x85 0x58
RECV: 0xa 0x3 0x10 0x46 0x67 0x54 0x0 0x43 0xa0 0x27 0xae 0x3d 0xcc 0xcc 0xcd 0x40 0x0 0x0 0x0 0x66 0x23
Now you will note a couple of 0xff with the bad frame:
SEND: 0xa 0x3 0xaa 0xe6 0x0 0x8 0x85 0x58
Cleanup recv buffer before send: 0xff
The cleanup means there was a 0xff received after the last frame (valid) and before the send happened.
If you look at the received frame, it is nearly identical to the OK received frame:
RECV: 0xa 0x3 0x10 0x46 0x67 0x54 0x0 0x43 0xa0 0x27
---> this one should probably not be there: 0xff
0xae 0x3d 0xcc 0xcc 0xcd 0x40 0x0 0x0 0x0 0x66
---> Missing the last byte of the CRC
the 0x10 means 16 data bytes, but due to the 0xff, the frame is not correct.
So there are not a pymodbus problem, but a USB or serial line problem, not much we can do about that.
@janiversen thanks a lot for your analysis, I will then look what I can do to fix it
Dear pymodbus community,
I have connected my aqotec district heating device to HomeAssistant which uses pymodbus library. Data is being read out, but not constantly. Some response processing (around 30-40%) fails with the error: Modbus Error: [Input/Output] No Response received from the remote slave/Unable to decode response.
see logs for the complete messages.
Any help is appreciated. Thanks in advance!
Versions
Pymodbus Specific
Code and Logs
Configuration:
Successful read log:
Failed read log: