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?