question

vikt0rm avatar image
vikt0rm asked

Shelly 1PM as PV Inverter in VenusOS

Hi community,

inspired by the dbus-shelly-3em-smartmeter from @fabian-lauer, I created my own dbus-shelly-1pm-pvinverter GitHub project to use a Shelly 1PM in VenusOS as a PV inverter. Maybe some one else find it useful.

Here are some screenshots from my current setup with these three Shelly devices (2x1PM and 3EM):

venus-os-tile-overview.pngvenus-os-remote-console-overview.pngvenus-os-shelly1pm-pvinverter-devicedetails.pngvenus-os-shelly1pm-pvinverter.png

Venus OSEnergy Metermultiple inverters
4 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

renne avatar image renne commented ·

Great work! :)

Does this script support the Shelly Plug S as a backup generator?
0 Likes 0 ·
kurtinge avatar image kurtinge commented ·
@vikt0rm Very nice work. But I intend to use the 1PM for AC input-monitoring. Can I use your implementation for that?
0 Likes 0 ·
marza-bogdan avatar image marza-bogdan kurtinge commented ·

Hi. Do you succeed to use it for AC input monitoring ?

0 Likes 0 ·
kurtinge avatar image kurtinge marza-bogdan commented ·
Did my test today - Seems like there is no contact between the Shelly and the Victron
0 Likes 0 ·
57 Answers
kingsmill avatar image
kingsmill answered ·

I have configured a Shelly Plus 1PM in VenusOS V3.11. Under settings I see the Shelly device and power consumed etc, but on the main pages screen "AC Loads" does not show any data. Why would the device under settings show power but the main screen shows no data in the "AC Loads" box

1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

kurtinge avatar image kurtinge commented ·
Same with my Plus PM Mini
0 Likes 0 ·
kingsmill avatar image
kingsmill answered ·

I spent some time looking at this today. I believe that service type of pvinverter is for power generation. I modified the python script to use a service type of inverter. This adds the AC consumed power to "AC Loads". I have only tested this with a Shelly Plus 1PM. Give it a go and see if it works for you.

To install save then replace the python script /data/dbus-shelly-1pm-pvinverter01/dbus-shelly-1pm-pvinverter.py with the enclosed dbus-shelly-1pm-pvinverter.py python script.

dbus-shelly-1pm-pvinverter.zip


10 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

kurtinge avatar image kurtinge commented ·

Nice.... I will give it a try. I can run a diff, but which changes did you made?

0 Likes 0 ·
kingsmill avatar image kingsmill kurtinge commented ·

There were actually quite a lot of changes. Most of the changes were related to dbus path name changes. Recommend you do a diff to see all the changes. I currently hard code the /Mode dbus path. I need to get this information from the shelly device itself but at least the AC loads are now reported.

0 Likes 0 ·
kurtinge avatar image kurtinge kingsmill commented ·
Tried the pyton-script of yours, but this seems to be made for inverter. My purpose is to monitor the AC Input. Needs more adjustments
0 Likes 0 ·
kingsmill avatar image kingsmill kurtinge commented ·

The changes I made was to add support for AC load monitor. My changes would not work for an AC Input. I just made a quick proof of concept script for an AC Input monitor.

To install, save then replace the python script /data/dbus-shelly-1pm-pvinverter01/dbus-shelly-1pm-pvinverter.py with the enclosed dbus-shelly-1pm-grid.py python script.

dbus-shelly-1pm-grid.zip

0 Likes 0 ·
kurtinge avatar image kurtinge kingsmill commented ·

Great - I'll try the next time when I go to the marina.. season is now at the bitter end, the boat packed and stuffed away. Just 5 months to wait for sailing again. Anyway, I will check it out in a few days :-)

0 Likes 0 ·
b-e-r-n-d avatar image b-e-r-n-d kurtinge commented ·

In my eyes what you need is maybe a generator type of input isn't it?

0 Likes 0 ·
kurtinge avatar image kurtinge b-e-r-n-d commented ·

I only want to monitor the AC input to the batteries when connected to shore power

0 Likes 0 ·
kurtinge avatar image kurtinge kingsmill commented ·

img-0755.png

seems like the AC input is displayed/added as an value in both AC input and AC Loads. When I switch on the TV the value in the AC Loads increase by 40w - added to the 341w (total 381w). This is not correct as the value should only be 40w. The script is adding some miscalculations to the AC Loads. Also the "AC Input" text in the red box is gone.
Maybe it is too much changes needed as this script was originally written for Inverter use


0 Likes 0 ·
img-0755.png (354.6 KiB)
kingsmill avatar image kingsmill kurtinge commented ·
Let me take a look.
1 Like 1 ·
kurtinge avatar image kurtinge kingsmill commented ·
Any idea how to make this good?
0 Likes 0 ·
sebastian-w avatar image
sebastian-w answered ·

Does it also support the Shelly Plus 1, which can be used in 12V systems like boats and motorhomes?

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

mucwendel avatar image
mucwendel answered ·

Was working like charme :-)

I added 5x Shelly 1PM Plus.


I took the script from here and used bitvise ssh client.

https://github.com/Halmand/dbus-shelly-1pm-and-pm1-Plus-pvinverter-multi-instance

Just copy the script and change the name of the PVinverter before installing.


1709381884558.png

Adjust the config.ini e.g. like this

!!! Check the deviceintance is not used by another device

I chose 41,42,...

1709381924726.png


Take care to change position to 1 if connected on the critical load side

1709382099830.png

Also you should change the update Intervall from 250ms to 1000ms. Otherwise you will overload the GX device communication resources.

1709382123382.png


Result :-)


1709381640797.png


1709381798885.png



1709381640797.png (55.0 KiB)
1709381798885.png (38.9 KiB)
1709381884558.png (3.2 KiB)
1709381924726.png (8.0 KiB)
1709382099830.png (13.2 KiB)
1709382123382.png (6.7 KiB)
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

jku avatar image
jku answered ·

Hello, after installing the script there is no additional device in the devicelist. My shelly is a Shelly Plus 1 PM. In the Log i see: no response from Shelly 1 PM - http://192.168.XXX.XXX/status. I tried to type the URL in the Browser and same response...not found. It seems that the "/status" at the end of the URL is the Problem. Maybe the Shelly Plus cannot be used. Need help....

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

goahead avatar image
goahead answered ·

Be sure the IP is correct and also try: httpS://192.168.XXX.XXX/status

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

mvader (Victron Energy) avatar image
mvader (Victron Energy) answered ·

Hey all, please read this issue, and in all your dbus-xyz projects change your code accordingly.

https://github.com/henne49/dbus-opendtu/issues/173

Its urgent and important.

thank you very much!


If you have modified your project, pls post a message here: https://github.com/victronenergy/venus/issues/1284

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Related Resources

Victron Venus OS Open Source intro page

Venus OS GitHub (please do not post to this)

Energy Meter Selection Guide

Additional resources still need to be added for this topic