======================================================================
Important Note
Support of SDM630 is continued in thread "Power Meter lib for Modbus-RTU-based meters from ABB, Carlo Gavazzi (Victron) and Eastron", the support of SDM230 is deprecated.
======================================================================
Update history
version 1.2
- Support of legacy meter SDM630v1
meter is only supported, if configured with baudrate >= 9600
version 1.1:
- Support of SDM230
(limited support - requires manual adaptation since device id is not supported on that device type - details see below)
Thanks to Sergio for allowing access to his environment - Addition of supported product ID > shown properly in VRM
======================================================================
Hi All,
I like to share an implementation for support of the Eastron SDM630-Modbus and SDM230-Modbus v2 energy meters.
For any usage a donation to seashepherd.org with an amount of 5 USD/EUR/GBP or equivalent is expected.
Installation
- copy Eastron SDM meters v1.2.zip -file into directory /opt/victronenergy/dbus-modbus-client and unzip it.
- Add following bold-marked line into file /opt/victronenergy/dbus-modbus-client/dbus-modbus-client.py
import carlo_gavazzi
import Eastron_SDM630v2 (in case you use another meter version apply alternatively expression "Eastron_SDM230" or "Eastron_SDM630v1" instead of "Eastron_SDM630v2 ")
import ev_charger
import smappee - rename file /opt/victronenergy/dbus-modbus-client/dbus-modbus-client.pyc into /opt/victronenergy/dbus-modbus-client/dbus-modbus-client.py.orig
- Since that file is not automatically compiled by VenusOS execute following bold marked commands in directory /opt/victronenergy/dbus-modbus-client
python
Python 2.7.18 (default, Apr 15 2021, 10:46:30)
[GCC 9.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import py_compile
>>> py_compile.compile ('dbus-modbus-client.py')
>>> exit() - reboot VenusOS
- SDM230 specific:
Since SDM230 does not support device id, the device must be identified by serial id.
In order to do so:- Read serial ID with holding register FC00 (unsigned int32) from SDM device
result e.g. 20084317 (using a tool like e.g. modbus poll, iobroker or node red) - convert id into hex: 20084317 >> 0132 765D
- take first 2 hex-bytes (0132) and convert it back into int (here 306)
- configure that number in file Eastron_SDM230.py
- in case you use more meters in parallel multiply setting like in this exampe ID "84".
- Read serial ID with holding register FC00 (unsigned int32) from SDM device
- Go to "Settings" > "Modbus TCP devices" and perform a "Scan for Devices" or directy add a device via "Devices" > "Add" using relevant IP and ModBus ID and port. Last option is much quicker and also supports non-default unit-IDs.
A few seconds later the meter should appear in your main menu: - Select in submenu "Setup" the usage as grid, pvinverter or generator meter
Main page screenshot
Device screenshot
Comments:
- Firmware register is not filled by devices (so no modul issue).
- In above screenshots don't be misled by empty phases 2 and 3. In test environment I had only phase 1 connected. Phase config is dependent of device configuration.
As soon as meter is configured with 1 phase support only, driver detects circumstance and excludes remaining phases.
Important: The installation is not resistent for VenusOS updates. After an update to another release installation has to be repeated.
Exclusion of liability: Although the module has been tested in depth, I don't take any liabilty for any potential damage on your installation
Thanks to Victron for their open platform and especially for the support of Matthijs Vader.