Send Bytes with Modbus TCP (openHAB 3.4)

Hi,

I am trying to send a string via the Modbus TCP binding to a Huawei Inverter.

No.: 143
Signal: [Energy storage]
Name: Time of Use charging and discharging periods
Read/Write: RW
Type: Bytes
Unit: N/A
Gain: 1
Address: 47255
Quantity: 43
Scope: HUAWEI-LUNA2000

Is that even possible with the binding?
I tried a lot but I only get errors which say that this is not the right type of value. Before I am looking for years, maybe someone can validate that.

Thanks a lot in advance!
HFM

Currently binding provides only readouts to specific types. This means it is impossible to get larger chunk of data in raw form. While underlying code has access to complete byte sequence returned by device, it does not expose it through channels.

I’ve had similar case with wago plc and weird data layout (value, gap, status byte) and tried to read largest possible value using mapping to long (8 bytes), but it was insufficient and I would have to create additional items. I ended up ignoring status bytes in the end, and left issue for later.

In your case with 43 bytes you are probably better of making a script using generic purpose tool and calling it through exec binding.

1 Like

Thanks for your answer. I was afraid that this is the way…
HFM