I want to connect my SDM-230 power meter via MODBUS to HA, so I wrote a MODBUS/IP to MODBUS-RTU gateway for my home control units in the cabinet. The gateway works fine when I test it with MODBUS POLL, and I’m getting the requested values from the meter.
Unfortunately I have an issue with HA, which opens the TCP connection but never sends any polling.
In my configuration.yaml:
# MODBUS Power Meter
modbus:
- name: powermeter1
timeout: 2
message_wait_milliseconds: 50
type: tcp
host: 10.1.2.1
port: 502
… and further down in the sensors section:
# Sensoren
sensor:
[...]
- platform: modbus
sensors:
- name: volt_l1
unit_of_measurement: Volts
scan_interval: 5
slave: 1
address: 0
register_type: input
data_type: float32
precision: 2
When I start HA, my gateway debug output shows that HA opens the TCP connection as configured:
2022/08/08 20:35:42 [0200] <- | 08.08.22 20:35:41 01:59:38.25 | TCP server connection request on connection 1 QID 0201
2022/08/08 20:35:42 [0200] <- | 08.08.22 20:35:41 01:59:38.25 | Established as subconnection 1 QID 0201
2022/08/08 20:35:42 [0201] <- | 08.08.22 20:35:41 01:59:38.25 MID:32CC| QNR:001 SUB:0001 OPT:0101 OPT2:0000 ADR:167837963 PORT:43567 FID:0000 FSUB:0 FOPT:0000 FOPT2:0000 FADR:0 FPORT:0 LEN:0
2022/08/08 20:35:42 [0201] <- | 08.08.22 20:35:41 01:59:38.26 | MODBUS IP connection #1 established from 10.1.1.11
But there is no polling at all
I have configured scan_interval to 5 seconds, but nothing happens.
Any ideas?