Integrate Shelly 3EM smart meter into Victron Energies Venus OS
With the scripts in this repo it should be easy possible to install, uninstall, restart a service that connects the Shelly 3EM to the VenusOS and GX devices from Victron. Idea is pasend on @RalfZim project linked below.
This project is my first on GitHub and with the Victron Venus OS, so I took some ideas and approaches from the following projects - many thanks for sharing the knowledge:
As mentioned above the script is inspired by @RalfZim fronius smartmeter implementation. So what is the script doing:
com.victronenergy.grid.http_40
or com.victronenergy.pvinverter.http_40
Thats it 😄
Just grap a copy of the main branche and copy them to /data/dbus-shelly-3em-smartmeter
.
After that call the install.sh script.
The following script should do everything for you:
wget https://github.com/fabian-lauer/dbus-shelly-3em-smartmeter/archive/refs/heads/main.zip
unzip main.zip "dbus-shelly-3em-smartmeter-main/*" -d /data
mv /data/dbus-shelly-3em-smartmeter-main /data/dbus-shelly-3em-smartmeter
chmod a+x /data/dbus-shelly-3em-smartmeter/install.sh
/data/dbus-shelly-3em-smartmeter/install.sh
rm main.zip
⚠️ Check configuration after that - because service is already installed an running and with wrong connection data (host, username, pwd) you will spam the log-file
Within the project there is a file /data/dbus-shelly-3em-smartmeter/config.ini
- just change the values - most important is the host, username and password in section "ONPREMISE". More details below:
Section | Config vlaue | Explanation |
---|---|---|
DEFAULT | AccessType | Fixed value 'OnPremise' |
DEFAULT | SignOfLifeLog | Time in minutes how often a status is added to the log-file current.log with log-level INFO |
DEFAULT | CustomName | Name of your device - usefull if you want to run multiple versions of the script |
DEFAULT | DeviceInstance | DeviceInstanceNumber e.g. 40 |
DEFAULT | Role | use 'GRID' or 'PVINVERTER' to set the type of the shelly 3EM |
DEFAULT | Position | Available Postions: 0 = AC, 1 = AC-Out 1, AC-Out 2 |
DEFAULT | LogLevel | Define the level of logging - lookup: https://docs.python.org/3/library/logging.html#levels |
ONPREMISE | Host | IP or hostname of on-premise Shelly 3EM web-interface |
ONPREMISE | Username | Username for htaccess login - leave blank if no username/password required |
ONPREMISE | Password | Password for htaccess login - leave blank if no username/password required |
ONPREMISE | L1Position | Which input on the Shelly in 3-phase grid is supplying a single Multi |
In a 3-phase grid with a single Multi, Venus OS expects L1 to be supplying the only Multi. This is not always the case. If for example your Multi is supplied by L3 (Input C
on the Shelly) your GX device will show AC Loads as consuming from both L1 and L3. Setting L1Position
to the appropriate Shelly input allows for remapping the phases and showing correct data on the GX device.
If your single Multi is connected to the Input A
on the Shelly you don't need to change this setting. Setting L1Position
to 2
would swap the B
CT & Voltage sensors data on the Shelly with the A
CT & Voltage sensors data on the Shelly. Respectively, setting L1Position
to 3
would swap A
and C
inputs.
This module/repository has been posted on the following threads: