My HA has been in productive use for quite some time and is running 24/7. Modbus so far is purely experimental with all devices – three sensor units and one relay board – on my workbench. Last night on going to bed I turned off the sensor units. This morning they ignored the scan_interval and kept being read as fast and frequently as the bus allows. The relays were not accessible.
That looks as if requests were queued and now all those stored up during the night were executed first before anything new can be done. Not what I want. My plan is to call devices periodically, in practical use once per minute or less, and failed calls should just be thrown out and ignored after the timeout. How can that be achieved?
Another thing. In the developer tools reloading modbus.yaml does nothing, just a permanet blue ring, and restart->quick reload does not work for modbus. Only a full restart works. Is that normal with modbus? I’ll add my full setup.
Danke
Axel
#modbus:
- name: modbus_hub
delay: 3
message_wait_milliseconds: 100
timeout: 2
type: serial
port: /dev/ttyUSB1
method: rtu
baudrate: 9600
bytesize: 8
parity: N
stopbits: 1
switches:
- name: SW001
unique_id: REL1
slave: 1
address: 0
write_type: coil
- name: SW002
unique_id: REL2
slave: 1
address: 1
write_type: coil
- name: SW003
unique_id: REL3
slave: 1
address: 2
write_type: coil
- name: SW004
unique_id: REL4
slave: 1
address: 3
write_type: coil
- name: SW005
unique_id: REL5
slave: 1
address: 4
write_type: coil
- name: SW006
unique_id: REL6
slave: 1
address: 5
write_type: coil
- name: SW007
unique_id: REL7
slave: 1
address: 6
write_type: coil
- name: SW008
unique_id: REL8
slave: 1
address: 7
write_type: coil
sensors:
- name: T01
unique_id: t01t
scan_interval: 15
slave: 201
address: 0
data_type: int16
device_class: temperature
input_type: holding
state_class: measurement
scale: 0.1
offset: 0
precision: 1
unit_of_measurement: "°C"
- name: T03
unique_id: t03t
scan_interval: 15
slave: 203
address: 0
data_type: int16
device_class: temperature
input_type: holding
state_class: measurement
scale: 0.1
offset: 0
precision: 1
unit_of_measurement: "°C"
- name: r0t
unique_id: r0t
scan_interval: 10
slave: 180
address: 11
data_type: uint16
device_class: temperature
input_type: holding
state_class: measurement
scale: 0.1
offset: -100
precision: 1
unit_of_measurement: "°C"
- name: r0dt
unique_id: r0dt
scan_interval: 10
slave: 180
address: 12
data_type: uint16
input_type: holding
state_class: measurement
- name: r0h
unique_id: r0h
scan_interval: 10
slave: 180
address: 13
data_type: uint16
device_class: humidity
input_type: holding
state_class: measurement
scale: 0.1
offset: 0
precision: 1
unit_of_measurement: "%"
- name: r0dh
unique_id: r0dh
scan_interval: 10
slave: 180
address: 14
data_type: uint16
input_type: holding
state_class: measurement
- name: r0tst
unique_id: r0tst
scan_interval: 10
slave: 180
address: 15
data_type: uint16
input_type: holding
state_class: measurement
# define REG_LED 21
# define REG_STMP 22