I have 55 data points which I read via Modbus TCP. And through automations (Service “Modbus: Write register”), I write about 35 data points. It went well until 2023.9.3, but with the update to 2023.10.3 it became extremely slow. Sometimes it takes more than 10 minutes until the register is written into the PLC. If I downgrade it works again quite quickly.
I had filed a bug report (Modbus write is very slow · Issue #102513 · home-assistant/core · GitHub) but Janiversen indicated that he did not think it was a bug. I just can’t figure out what he means and how I should solve it. Can someone help me on my way?
janiversen stated the following:
No, issues are for bug reports not support, please ask in one of the support forums. Apart from that I do not use automation.
You have probably been lucky before, because the integration was a lot slower.
We decided long time ago not to break a non-serialized write, because users was against it, so now users must ensure that the writes do not happen in parallel.
# MODBUS PRIVA:
- name: hub1
type: tcp
host: 10.0.0.79
port: 502
delay: 0
message_wait_milliseconds: 100
retries: 3
timeout: 5
sensors:
- name: Priva_TT_Buiten
unit_of_measurement: °C
state_class: measurement
scan_interval: 60
slave: 1
address: 11
input_type: input
data_type: int16
scale: 0.1
offset: 0
precision: 1
- name: Priva_TT_Garage
unit_of_measurement: °C
state_class: measurement
scan_interval: 300
slave: 1
address: 12
input_type: input
data_type: int16
scale: 0.1
offset: 0
precision: 1
And this is one of the automations:
alias: MODBUS.900 - Tijdsduur (minuten) naar Priva
description: ""
trigger:
- platform: time_pattern
minutes: /2
condition: []
action:
- service: modbus.write_register
data:
hub: hub1
address: 900
value: "{{ as_timestamp(now()) | timestamp_custom('%M') | int * 1 }}"
mode: queued
max: 3
And another one:
alias: MODBUS.1063 Hue motion toilet 1eV [temperatuur]
description: ""
trigger: []
condition: []
action:
- service: modbus.write_register
data:
hub: hub1
address: 1063
value: "{{ states('sensor.hue_motion_sensor_1_temperature_4') | float * 10 }}"
mode: single
wich is triggered by this automation:
alias: TIMER.MODBUS - Write Hue metingen
description: ""
trigger:
- platform: time_pattern
minutes: /15
condition: []
action:
- service: automation.trigger
data:
skip_condition: true
target:
entity_id:
- automation.modbus_1023_hue_motion_buiten_temperatuur
- automation.modbus_1023_hue_motion_gang_temperatuur
- automation.modbus_1043_hue_motion_toilet_bg_temperatuur
- automation.modbus_1023_hue_motion_trap_temperatuur
- automation.modbus_1063_hue_motion_toilet_1ev_temperatuur
- automation.1073_temp
- automation.1083_temp
mode: single