Modbus write_register fails after 2023.11

I’m really begging for help here, without writing registers my inverter isn’t smart at all… I upgraded from 2023.9 ti 2023.11 yesterday and all seemed fine, modbus sensors are updating fine but today I noticed that my write_register-scripts aren’t working anymore. The scripts never finish either, just says “Cancel” and never seems to run.

config:

modbus:
    
  - type: rtuovertcp
    host: 192.168.1.30
    port: 8888
    name: modbus_500v_tcp

my script looks like this, the “slave: 1” wasnt needed before and does not work now either

service: modbus.write_register
data:
  address: 57860
  slave: 1
  hub: modbus_500v_tcp
  value: 1

I cant find any logs on this either it seems?

Same here.
modus.write_register not working anymore.
Going to create temporary crutch workaround with appdaemon.

Hi @Mattie it seems I’ve found the problem. I have 2 modbus controllers in my network and one was unreachable. As a result for the second (which is reachable) write_register was not writable. After fixing the reachability everything went normal for now.

Hi @AlexMKX,

This post never got sent way back, and I guess it’s because of the reason you just stated, thanks for the info!

“after some more reboots my write_register-scripts suddenly started to work again for some reason, but they felt sluggish somehow. Like there was a bit of noise in the modbus-channel from other errors. I wonder why this started after this update? I guess the code still works then”

Actually, I decided to break the modbus. It simpy doesn’t work. Lot of timeouts and so forth. We’ll going to create the modbus-mqtt gateway with these guys GitHub - eva-ics/eva4: open-source platform for industrial and home IoT and hopefully integrate it into the HA. I’ll keep posted once we succeed :slight_smile:

That’s great news! I got my modbus working as intended but I still look forward to your solution. Modbus feels a bit legacy and not really made fit he amount of data that we wish for

Modbus is widely used by big guys for automation (SCADA systems) at power plants and so forth. It’s de-facto standard there. 115200 Bps is capable to handle, 20 sensors in single daisy-chain which are polled every single second.

That’s very true. Modbus poll-rate from different consumer products just seem to update slow for my taste, once every minute or even 5 minutes is what I’ve seen is recommended on products. I want quicker updates for my sensors. When I try to poll too many sensors at once I get the “unavailable” reply.

I got the feeling that modbus isn’t designed that way, that makes it feel legacy to me. Or maybe it’s cheaper products that only support those slow data rates, or even the modbus integration itself.

Hello Mattias.
Sometime I experience just the same problems. By this moment I suppose this is either GW or device issue. Also there is a termination (like in old bnc-based LANs) requirement if longest wire path is like a 10+ meters from the GW.

Actually my modbus sensors have worked like a charm for these last releases. So currently I have no issues with my templates filtering out the unavailable states thus making the data clean. I’m still curious about your new integration. Any updates? Possible releasedates?

Dear Mattie. I understand eagerness to get the working modbus, because I eager myself for that :), therefore sorry for the long reply. It is almost there. I expect beta to be rolled out by end of February.

Dear @Mattie. Sorry for taking this that long. Finally it is here EvaICS SCADA and HA integration addon/Entering big kids play

Heya!. Its great to see another solution out there. I hope you get your feedback. I will just take it easy with any more changes to my setup. I simply don’t have the time at this point, also my setup is working very well for these last releases so I hope it keeps holding up! :slight_smile: