Eastron SDM230 ModBus integrate in home assistant

I’ve bought an Eastron SDM230 modbus which I am going to connect to my Solax X1 mini through RS485 protocol. At the Eastron I connect a blue and white wire and i connect the cable with blue and white in a RJ45 which I connect to the RS port at the solax.

How can I get the information from the Eastron in HA? I saw some posts but most of them are using usb to a pi. I think it will be yaml but help it appreciated.

you need to buy a rs485/usb adapter and create a yaml to read the registers if you need it I can post it to you it works very well

Hi giangitangi, thanks for your reply . I have the eastron sdm230 directly attached to my inverter. No USB. So maybe I can use your script to get the parts I need for my setup. In your scenario you connect your sdm230 (connect white/blue) and the other end to a rj45 you plug in to the rs485 to usb to your HA?

Or do you mean a device like this? Connect blue/white to the green input and the usb into the pi?

A few weeks later and I am still in talk with Solax support. I noticed that in the web version of Solax you can set the modbuss address and modbus RTU enable. But I received errors because my inverter is running the base versions. I received firmware updates to manually upgrade my inverter so I am able to see the options within the inverter, but also there I receive errors. Friday I will have a phone call with Solax to look into it.

mine was also connected with Growatt inverter with two cables with the code it worked but I kept getting errors in the logs the sensors worked, I then discovered that it was the inverter that responded too for now I deactivated everything here is the code I hope it works with yours
‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’’

  • name: sdm230
    type: serial
    method: rtu
    port: /dev/ttyUSB2
    baudrate: 9600
    stopbits: 1
    bytesize: 8
    parity: N

    sensors:

    • name: SDM230 Tensione
      unit_of_measurement: V
      slave: 1
      address: 0
      input_type: input
      data_type: float32
      precision: 1

    • name: SDM230 Corrente
      unit_of_measurement: A
      slave: 1
      address: 6
      input_type: input
      data_type: float32
      precision: 2

    • name: SDM230 Potenza Attiva
      unit_of_measurement: W
      slave: 1
      address: 12
      input_type: input
      data_type: float32
      precision: 1

    • name: SDM230 Potenza Reattiva
      unit_of_measurement: VAR
      slave: 1
      address: 18
      input_type: input
      data_type: float32
      precision: 1

    • name: SDM230 Potenza Apparente
      unit_of_measurement: VA
      slave: 1
      address: 24
      input_type: input
      data_type: float32
      precision: 1

    • name: SDM230 Fattore di Potenza
      unit_of_measurement: “”
      slave: 1
      address: 30
      input_type: input
      data_type: float32
      precision: 2

    • name: SDM230 Frequenza
      unit_of_measurement: Hz
      slave: 1
      address: 70
      input_type: input
      data_type: float32
      precision: 2

    • name: SDM230 Energia Importata
      unit_of_measurement: kWh
      slave: 1
      address: 72
      input_type: input
      data_type: float32
      scale: 0.01
      precision: 2

    • name: SDM230 Energia Esportata
      unit_of_measurement: kWh
      slave: 1
      address: 74
      input_type: input
      data_type: float32
      scale: 0.01
      precision: 2

    • name: SDM230 Energia Totale
      unit_of_measurement: kWh
      slave: 1
      address: 342
      input_type: input
      data_type: float32
      scale: 0.01
      precision: 2
      ‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’