Hi,
This is my first how-to on this forum. In this guide, I will explain how to get the SDM630 and Modbus TCP working with your system. I also use this same setup to interface the SDM630 with home assistant. Because it’s a TCP device it can do both at the same time.
Required Hardware:
- SDM630 : Ensure you have the MID version. There are both MID and non-MID versions, but the MID version guarantees accuracy within a certain margin. The price difference is minimal, so the MID version is highly recommended. The SDM630 is manufactured by Eastron. They recently introduced the SDM630-TCP, which I recommend if you want to skip the need for a separate Modbus TCP device. However, I do not have direct experience with this model. The non-TCP version communicates using Modbus.
- Modbus TCP Interface : This device converts RS485/Modbus communication into a network connection. I prefer Ethernet for stability. If I mention Modbus TCP, I mean an Ethernet connection to RS485/Modbus. There are also WiFi versions, but they are less reliable due to possible disruptions and delays. I used the HE11-H in my setup.
Required Software:
- PuTTY : Used to log in to the Cerbo GX. Download PuTTY
- WinSCP : Needed to transfer files to the Cerbo GX. Download WinSCP
Installation Steps:
1. Install the SDM630
Go to your fuse box and install the SDM630. I won’t cover the exact wiring, but ensure that the device is installed correctly for its intended role. The SDM630 is a grid meter and should be placed directly after your main grid meter. If you use it as a PV meter, than place it at the PV system connection.
For the non-TCP version, connect the Modbus terminals A-, B+, and GND from the Modbus TCP device to the SDM630. (This step is not needed for the SDM630-TCP.). Make sure that if you use multiple SDM630 devices on the same Modbus, that all devices have a different slave address.
2. Network Configuration
Make sure your Cerbo GX is connected to your network. I highly recommend using an Ethernet connection instead of WiFi. Then, log in to your router and assign static IP addresses to both the Cerbo GX and the Modbus TCP/SDM630-TCP device.
3. Enable SSH Access on the Cerbo GX
- Open the Remote Console of your MultiPlus system.
- Navigate to Settings > General > Set root password and create a root password. (This is required to log in to the Cerbo GX.)
4. Download the Required Files
-
Go to: Victron Meter Library
-
Click “Code” and select “Download ZIP”. Or download this:
EastronCerboGX.zip (11,7 KB) -
Extract the .py files to a local folder, e.g., C:\Eastron.
-
Create a Backup folder inside this directory (C:\Eastron\Backup).
(Do not use older versions found on the forum, as they may not work with the latest Cerbo GX firmware.)
5. Transfer Files to the Cerbo GX
- Open WinSCP and log in to the Cerbo GX using the static IP address you set earlier.
- Use the root username and the password you created in the Remote Console.
- Navigate to /opt/victronenergy/dbus-modbus-client/ on the right side (Cerbo GX filesystem).
- On the left side (your PC), go to C:\Eastron\Backup.
- Select all files in /opt/victronenergy/dbus-modbus-client/ (on the right) and copy them to your Backup folder (on the left).
- Now, go back to C:\Eastron (on the left) and copy all .py files to /opt/victronenergy/dbus-modbus-client/ (on the right).
6. Modify the Python Script
- In WinSCP, open (double click) /opt/victronenergy/dbus-modbus-client/dbus-modbus-client.py.
- Locate the line: import carlo_gavazzi.
- Insert this line directly below it : import Eastron_SDM630v2
- Save and close the file.
7. Compile and Reboot
- Open PuTTY.
- Connect to the Cerbo GX using SSH (IP, root, and password).
- Run the following commands one by one:
- cd /opt/victronenergy/dbus-modbus-client/
- python
- import py_compile
- py_compile.compile('dbus-modbus-client.py')
- exit()
- reboot
8. Configure the Cerbo GX
- Open the Remote Console.
- Go to Settings > Modbus TCP/UDP devices and enable Automatic Scanning.
- The scan should detect the SDM630. If not:
- Go to Saved Devices and manually add a device:
- Type: TCP
- IP Address : Modbus TCP device IP
- Port: 502 (default)
- Unit: 1 (default slave address)
- If adding a second SDM630 (e.g., for a generator or PV inverter), assign a different slave address.
- Go to Saved Devices and manually add a device:
(For the SDM630-TCP, this step is not needed.)
9. Optimize Communication Speed
By default, Modbus runs at 9600 baud, which is too slow. Increase it to 38400 baud for better performance.
-
Change Baud Rate in the Modbus TCP device :
- Open its web interface (usually http://modbusIP).
- Set baud rate to 38400, 8,1, None.
- Flow control: Half Duplex.
- Protocol: Modbus.
-
Change Baud Rate in the SDM630 :
- On the SDM630, press P and hold to enter the menu.
- Enter the access code: 1000.
- Set baud rate to 38400.
- If using multiple SDM630 devices, ensure each has a unique address.
Confirming the Connection
- Open the Remote Console.
- If successful, the top text screen should display: “Eastron SDM630-Modbus v2”.
Troubleshooting
If a major firmware update (e.g., in January) causes issues, redo the steps from Enable SSH Access on the Cerbo GX, uploading the files, inserting the import line, and running the PuTTY procedure.
Final Notes
- The Cerbo GX constantly polls the SDM630, meaning communication should be as fast and stable as possible.
- If your connection is slow or unstable, double-check the Ethernet connection and baud rate settings.
I hope this guide helps! It would have saved me a lot of time.
Best regards,
Mark
Sources: