Modbus energy Meter

I have a few Sinotimer 3 phase meters. I have proper modbus setup (They work with tpcrtu) and am able to get responses from the meter.

My problem is - the whole web seems to use SDM meters alongwith ESPhome. So I cannot make this meter work as google search results land me nowhere.

I have proper documentation from the meter - I just need help how to format this in Hass.

Here is the doc -

This meter uses two types of registers, individually addressed. The first is the data register, read-only, using the command code 0x04 to read.

The second category is the parameter register, readable and writable, using the command code 0x03 read, write parameters using 0x10.

The data format

Four type data: Read the internal data within the meter in line with IEEE-754 standard floating-point number, data format is 32-bit 4-byte single-precision floating-point data format.

Here is the example

Issued data (HEX): 01 04 00 00 00 02 71 СВ
01 Slave address
04 Function
00 00 Reading register
00 02 Read length (4 bytes)
71CB Checksum

Received date : (HEX) 01 04 04 43 6B 58 0E 25 D8
01 Slave add
04 Function
04 Returned data length
43 6b 58 0E Rturned value 4 bytes, IEEE754 format floating
25 D8 checksum

As you can see, there is proper documentation, and proper examples but I cannot integrate it in Hass. Modbus scanner gives me precisely the above responses when sent the above packet (yes - my slae address is same, and regsiter I am trying to read is also the same as in above example)

Here is the small part of my config.yaml

  • name: “modbus_meter1”
    type: rtuovertcp
    port: 502
    • name: m1_Freq
      address: 0x4036
      data_type: float32
      swap: word
      slave: 1

PS - Above yaml - I am trying to read register (using 0x04) 00(hi byte) and 36(low byte)- Is 0x4036 correct? (In modbus scan I can enter 0x04 and then regiter 36 to get response as 50 (hz))

I am stumped…

Solved it by enable logging on.
Had to specify type as input so that hass sends 0x04 correctly.