Hi,
I’m new to HomeAssistant and still in the beginning of the learning curve. I have my home fully automatized with a self developed home control and in total roughly 300 switched circuits, some dimmers controlled by DMX 512 and many sensors like all the switches in the house. The automation also runs on my CPU device, so the system is fully working by itself.
Access from the outside is done via MODBUS/TCP via the ODRID HMI IOS app where I’ve designed some panels.
All this works fine, but I want to enhance all it by a modern Web GUI and Smartphone App which is independent from a single source product like ODRID HMI. I already had two previous apps which both have been not maintained at some part, so I want a backup (which can become the primary solution ) That’s where HASS should be used for.
I already have created a first test setup with three coils. It’s working well as expected:
# Example configuration.yaml entry for a TCP connection
modbus:
name: hcs
type: tcp
host: 10.1.1.1
port: 502
# Testswitche
switch:
platform: modbus
scan_interval: 3
coils:
- name: DeckeCouch
hub: hcs
slave: 1
coil: 103
- name: Decke Esstisch
hub: hcs
slave: 1
coil: 104
- name: Wandlampe Couch
hub: hcs
slave: 1
coil: 105
I’ve then monitored the communication to my HCS CPU device, and that’s the point where I was shocked:
Normally I’d expect that the software would read as many coils as possible in a single command: Up to 255 consecutive coils are supported in the MODBUS read coil command. That’s also how all the iPhone HMI/SCADA apps are working I had running.
But Wireshark showed me that HASS does three MODBUS pollings, getting only one coil per poll. There is a READ COILS command for address 103 and a number of one(!) coil. Then a READ COILS command for address 104, also asking for only one coil, an finally the same for coil 105.
That’s a massive overhead and a complete show stopper! In my final setup there will be around 200 coils which should be polled every 3 seconds - my CPU is an embedded platform and would be fully flooded by that number of requests, which can easily be done with a single polling.
Did I overlook something? How can I tell HASS to poll dozens of coils with a single READ COIL command?
Sorry in case that’s a noob question and I did not find the proper part in the docs or here … any help is highly appreciated.
Marco