This program lets your Victron system read power and energy data from an SMA Home Manager, or SMA Energy Meter as if it were a Victron ET340 meter.
No extra meter hardware is needed!
Use this at your own risk, I have no association with Victron or SMA and am providing this for anyone who already has these components and wants to play around with this.
Note that the processor is quite slow in the Victron Venus GX; If the portal stops updating while this is running, this is because there aren't enough resources. I run mine on a raspberry pi 4.
- Enable "Superuser" mode: Go to Settings → General and activate Superuser (see Victron docs).
- Set an SSH password and enable SSH on LAN (in the same menu).
- Download the file named
shm-et340from the latest releases
- Use a tool like WinSCP (Windows) or the
scpcommand (Mac/Linux) to copy the file to your Victron device.
- Use Putty (Windows) or a terminal (Mac/Linux) to SSH into your Victron device.
- In the terminal, type:
./shm-et340 - You should see output like this:
Meter update received and published to D-Bus: 484.0 W
- christian1980nrw has created a nice and easy install script, just run the install.sh which should do everything below. This is not immutable, so only run it once, if it fails then follow each command in the script
- Your Victron dashboard will show grid power, voltage, current, and energy values as if you had a real ET340 meter.
- The program will print updates every meter update, which is every second.
- No data or stops after a few minutes? Make sure "IGMP Snooping" is enabled on your network switches/routers. This is needed for the data to reach your Victron device.
- Multiple Meters
If you have multiple meters, you can specify which serial number this should use with the
SMASUSYID=1234567890environment variable. The meter's serial number can be found in the web UI of your inverter under Device Configuration -> Meter on Speedwire -> Serial
You can change some settings by setting environment variables before running the program:
SMA_ENERGY_METER=trueUse this if you have the older SMA Energy Meter 1.0 (most people can ignore this).LOG_LEVEL=debugShows more detailed information for troubleshooting.SMASUSYID=1234567890Ignores meter updates from all meters except ones with this serial
Example:
SMA_ENERGY_METER=true LOG_LEVEL=debug ./shm-et340
If you want to build the program yourself, you'll need Go installed. Run:
go build -o shm-et340 main.go
Or cross-compile for your device. For the ARM processors on victron devices,
GOARCH="arm" GOOS="linux" go build -o shm-et340 main.go
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.