Hello,
I am using the SDM530 (predecessor of SDM630) with an USB to RS485 dongle and this worked fine for 9 months. The new core2023.10.x gave some trouble with the modbus and now I want to use a TCP unit instead (Protoss HE11). I wrote a C# program and the HE11 works fine. Wrote the program to make sure that everything is connected in the right way.
Power is negative due to the solar panels. So that’s right.
This lines are in my configuration.yaml:
# modbus communication
modbus: #line 49 which gives an error
- name: "sdm530"
close_comm_on_error: true
delay: 5
type: rtuovertcp
host: 192.168.1.145
port: 502
sensors:
- name: sdm530_phase_1_line_to_neutral_volts
slave: 1
address: 0
input_type: input
count: 2
precision: 2
data_type: float
unit_of_measurement: V
device_class: voltage
scan_interval: 30
I get this error:
Invalid config for [modbus]: value must be one of [<DataType.CUSTOM: 'custom'>, <DataType.FLOAT16: 'float16'>, <DataType.FLOAT32: 'float32'>, <DataType.FLOAT64: 'float64'>, <DataType.INT16: 'int16'>, <DataType.INT32: 'int32'>, <DataType.INT64: 'int64'>, <DataType.INT8: 'int8'>, <DataType.STRING: 'string'>, <DataType.UINT16: 'uint16'>, <DataType.UINT32: 'uint32'>, <DataType.UINT64: 'uint64'>, <DataType.UINT8: 'uint8'>] for dictionary value @ data['modbus'][0]['sensors'][0]['data_type']. Got 'float'. (See /config/configuration.yaml, line 49).
when I update float to float32 I still get an error:
Invalid config for [modbus]: sdm630_phase_1_line_to_neutral_volts: `count: 2` cannot be combined with `data_type: float32` @ data['modbus'][0]['sensors'][0]. Got {'name': 'sdm630_phase_1_line_to_neutral_volts', 'slave': 1, 'address': 0, 'input_type': 'input', 'count': 2, 'precision': 2, 'data_type': 'float32', 'unit_of_measurement': 'V', 'device_class': 'voltage', 'scan_interval': 30}. (See /config/configuration.yaml, line 49).
I wrote the C# program and 2 word/short values are equal to 2 * 2 bytes = 4 bytes = 32bits, so a float32 should be fine.
It seems that “float” is not accepted anymore since core2023.10.x. It was still accepted in release 2023.9.3 Why? Did I do something wrong? Do I have to downgrade to core2023.9.3 to make it work again? Or is float still accepted (because of the “modbus:” line error?)? What is wrong?
Thanks for your reply.
Kind regards,
Erik