thank you very much for your reply.
At this point, the values are being read correctly, but sometimes (every few hours) the readings get scrambled.
This is an extract from the log :
2022-02-02 21:23:23 DEBUG (SyncWorker_3) [pymodbus.transaction] Running transaction 2
2022-02-02 21:23:23 DEBUG (SyncWorker_3) [pymodbus.transaction] SEND: 0xa 0x3 0x0 0x1b 0x0 0x1 0xf5 0x76
2022-02-02 21:23:23 DEBUG (SyncWorker_3) [pymodbus.client.sync] New Transaction state 'SENDING'
2022-02-02 21:23:23 DEBUG (SyncWorker_3) [pymodbus.transaction] Changing transaction state from 'SENDING' to 'WAITING FOR REPLY'
2022-02-02 21:23:23 DEBUG (SyncWorker_3) [pymodbus.transaction] Changing transaction state from 'WAITING FOR REPLY' to 'PROCESSING REPLY'
2022-02-02 21:23:23 DEBUG (SyncWorker_3) [pymodbus.transaction] RECV: 0x0 0x0 0x0 0xa 0x3 0x2 0x0
2022-02-02 21:23:23 DEBUG (SyncWorker_3) [pymodbus.transaction] Getting transaction 10
2022-02-02 21:23:23 DEBUG (SyncWorker_3) [pymodbus.transaction] Changing transaction state from 'PROCESSING REPLY' to 'TRANSACTION_COMPLETE'
2022-02-02 21:23:23 ERROR (SyncWorker_3) [homeassistant.components.modbus.modbus] Pymodbus: Waveshare: Modbus Error: [Input/Output] No Response received from the remote unit/Unable to decode response
2022-02-02 21:23:24 DEBUG (SyncWorker_1) [pymodbus.client.sync] Connection to Modbus server established. Socket ('192.168.2.250', 40353)
2022-02-02 21:23:24 DEBUG (SyncWorker_1) [pymodbus.transaction] Current transaction state - TRANSACTION_COMPLETE
I am getting very frequent entries of the error āno response or unable to decodeā.
Iāll try adapting my configuration according to yours.
I am still getting lots of errors, with a similar configuration to yours.
The only difference with your setup is that I am using an Ethernet to RS485 adapter, and that I am reading different registers.
I also have sometimes have errors trying to read (or write) modbus registers via another debug tool (AVReporter Modbus Communication Tester). At first I thought it was because of the strange modbus implementation of De Dietrich, where it acts 5s as a master and then 5s as a slave.
But now I am thinking it could be of my Rs485 cabling. I am using a Waveshare Ethernet to Rs485 converter, and am using about 2m of RS485 cable. I did not use an termination resistor.
Do you have any advice? Thanks in advance!
I found a code for ESPhome. Just wondering if some already use it with Innovens MCA boiler? As soon as I will have some free time I will give it a try
Edit: just try it with my MCA25 and it looks good, it offers just read option, but anyway nice to have ! This is using the PC / RS232 port (4 pin RJ9/10).
Hi, I have tried multiple cables, and a config very similar to yours.
Have you checked the logs that you arenāt getting any modbus errors?
My values are getting read, thanks to the multiple retries. But I am getting a lot of these entries (multiple per minute) : ā[Input/Output] No Response received from the remote unit/Unable to decode responseā.
Hi,
What worries me is your statement āBut I am getting a lot of these entries (multiple per minute) : ā[Input/Output] No Response received from the remote unit/Unable to decode responseā.ā Normally the pooling is in sequence so you should not get this kind of multiple error per minutes.
2 meters cables is normally safe whatever the kind of cable. in your case it worth a try to insure that it is a twisted cable, that the shield -if exists- is connected on only one side of the connection and to add a termination resistors if it is not included your convertor. You can also check the setting of your IP/Modbus converter.
To answer your question : Yes, I sometimes have missed readings but the next attempt is successful so the sensor in HA does not go to unavailable. I am reading 33 registers with a scan_interval of 30 seconds.
the many retries help. I usually, eventually get a value.
The logging reveils that the received data gets chopped up. It reads only 7 of the 10 bytes that my device sends back.
Good example from my 3r party debug application :
RECV: 0xa 0x3 0x2 0x0 0xb1 0xdd 0xf1 0x0 0x0 0x0
Good example from HA log :
RECV: 0xa 0x3 0x2 0x0 0xb1 0xdd 0xf1
Error example from HA log :
RECV :0x0 0x0 0x0 0xa 0x3 0x2 0x0
Your log are intersting : In fact on my side Iāve got these extra 0s but always at the end of the frame so it does not interfere. Just have a entry in the logs that i suppressed by the log level on modbus integration.
I looked a little bit deeper and i would advice you to add some bias resistors to polarize the bus. They can be activated maybe in your modbus convertor or you can add them externally. You can find the definition here https://modbus.org/docs/Modbus_over_serial_line_V1.pdf page 28. I did not try it since for me the problem is not visible and i have a very cheap USB/RS485 module without this capacity.
Thank you for helping me. Interesting that you have the same trailing zeroās but that your sync is always okay.
Some more info : for the reading of Modbus-registers, with some retries, I usually get some good readings. However when trying to write a register, I sometimes have failed writes, and afterwards my wife tells me that the heating is not working anymore, or that there was no hot water for the shower. So apparently the bad writes mess up some other registers. I had to go through all the service parameters and try to find out which was changed. Eventually I got there.
Apparently there is no CRC when doing modbus writes, otherwise this canāt happen.
I was also thinking of improving the cable. I know RS485 has termination and bias resistors. But usually for such short cables (1.5m) this is not necessary. Iāve already tried two cables (one twisted pair and one coax), but I get the same results.
But the fact that my TCP Reader application always reads the bytes correctly, means that the ModbusPy implementation does something wrong. I am running out of ideas/options, and I really want to get this working .
About your writing problem, I also have the problem and i solved it by using exclusively the Write Multiple Register function, even to write only one register. It seems to a bug in some controllers. I already assisted someone on this on another forum.
Syntax:
For the 0 read, I checked your documentation and there is no way to polarize the bus from your equipment. The only way is to try with external resistances and an external supply. On my side, I cannot try it for the moment due to other priorities. Sorry.
Finaly works for me for sensors (with some regular unavailabilitiesā¦) with my De Dietrich Boiler.
Who finaly did parameters writing?
I try to create a āclimateā according to documentation but it didāt worksā¦
The register 601 give the external temperature ā¦ but with a specific coding.
Bit 15 give the sign ( 1: for negative value ). Bit 14 to 0 the absolute value of temp.
Therefore I use a template sensor to calculate the real value :