Replies: 3 comments 1 reply
-
Yes. It is a complicated problem. The main issue is the lack of capabilities of your modbus tcp bridge and/or too slow end devices. There is no clever solution for this. The problem is that you now have two different connections to the bridge and it does not handle it properly. Trying a different bridge device might solve the problem. Or creating your own. Best solution is to have separate bridge devices so that there is only one connection per modbus network. Does the device hang completely? Does not anwser to either connection? |
Beta Was this translation helpful? Give feedback.
-
Sorry, misread at first. It is surprising it lets you connect to the latter when using a USB adapter. The problem is even more severe when using USB since the COM port only supports one instance. Easier is to use a separate USB adapter. |
Beta Was this translation helpful? Give feedback.
-
Yes, I use USB adapter, this one.
I think, the interested part is this:
It looks for me like the adapter is forced to send new command before is done with receiving response from previously send command Besides Nilan, I have 28 more entities on native integration. When the issue is happening, HA can get maybe 10 values read per update, so is not completely fails. Using different adapters is not a option for me, house is wired with one bus only, and devices are far away. Before I installed Nilan integration, everything was connected with native Modbus integration, (with name nilanhub, therefore it show up in logs), but your integration is far more advanced than this I had wrote down in yaml by myself, so I started using yours. Maybe I should write an enhancement "wish" on HA core Github, so those smart guys can implement some kind of coordinator for pymodbus, when there are coming calls from different integrations on the same physical device, it can be queued somehow.. |
Beta Was this translation helpful? Give feedback.
-
I'm not sure if this is a issue with the integration or with HA DataUpdateCoordinator, so clarifying will be helpful.
I have a one Modbus serial bus, with multiple devices on it. It's connected to HA via USB-RS485 adapter.
There is 2 integrations which using Modbus RTU, one is Nilan, the other is native Modbus Integration built in a HA which reads all other devices on the bus.
Update interval for both is set to 30 sek.
When HA starts and run, both integrations tries to read registers from different devices at the same time. It resulting in communications errors and unavailable sensors.
My workaround for this is to disable Nilan integration manually and observe the led's on usb adapter. When led's stops flashing (native Modbus integration is done with serial bus for now), I'm enabling Nilan after few seconds. In that way I have those 2 integrations shifted in time with theirs readings, and everything working well.... until next HA restart.
Beta Was this translation helpful? Give feedback.
All reactions