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 ·
54 Answers
baxter avatar image
baxter answered ·

Sir you are my hero. Exactly what i was waiting for ...

2 |3000

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

qualle888 avatar image
qualle888 answered ·
Hello, thank you. This works very well. Is there a way to add a 2nd and 3rd Shelly1PM as an inverter to VenusOS. Is it possible to run the script more often?

Thanks very much. Sorry for my bad English
 
                
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.

vikt0rm avatar image vikt0rm commented ·

Hi @Qualle888, yes you can install more than one instances of the script. In my setup I use two instances for example.

You can copy your first instance by simply logging in to your venus os over ssh and run:

cp /data/dbus-shelly-1pm-pvinverter /data/dbus-shelly-1pm-pvinverter2

Configure the second instance and run

/data/dbus-shelly-1pm-pvinverter2/install.sh
0 Likes 0 ·
elko avatar image
elko answered ·

Hello,

can you also build something like this, e.g. to integrate the Sonoff POW device with Tasmota?

2 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.

vikt0rm avatar image vikt0rm commented ·
Hi elko,

I don‘t have these devices you mentioned in my setup. But I guess when there is an API then it should be no problem to adapt my code to fit your needs. You can simply create a fork of my project an do your adaptions on your fork.

0 Likes 0 ·
stundenblume avatar image stundenblume commented ·
Hi @elko,

I use this MQTT-dbus driver to generate a "pvinverter" and write with Tasmota via rules into the corresponding topics.
Best regards,
Sebastian


0 Likes 0 ·
stefdewilde avatar image
stefdewilde answered ·

Do you use this with a huawei sun2000?

2 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.

vikt0rm avatar image vikt0rm commented ·
No it is one of these blue grid tie inverter with built in power limiter that is widely used in the DIY community.
0 Likes 0 ·
stefdewilde avatar image stefdewilde vikt0rm commented ·
Oh okay. Anyway I installed my 1PM and your project and it works like a charm.


Using a Huawei Sun2000 as (second) inverter.

Thanks for the project and your time!

0 Likes 0 ·
cwaxe avatar image
cwaxe answered ·

Hello @vikt0rm,

thanks a lot for your script.
Is it also possible to install it on a Multiplus II GX?
I have tried to do that but i cannot see my Shelly 1 PM in the device list.
How can i check if the service is running correctly or where can i find the logfiles?

Thank you in advance.

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.

stefdewilde avatar image stefdewilde commented ·

I have it installed on a Multiplus II GX!

Connect through it with the internal IP

The follow this: https://www.victronenergy.com/live/ccgx:root_access

Step 1 and 2. Then use Putty (common for ssh access) and login (root and your password you set) and run the script provided by viktrom. It will install.

Then use the command 'nano /data/dbus-shelly-1pm-pvinverter/config.ini ' and change the ip adress to the ip of the shelly and login if needed.

After a few seconds the device will show in your victron device list :)

1 Like 1 ·
stundenblume avatar image
stundenblume answered ·

Hello @vikt0rm,
do you know which "dbus channels" are minimal necessary for a pvinverter to work?
I use this MQTT Devices driver to generate a pvinverter, but it won't work with a second one. VRM don't calculate the phases correctly, but replaces the first one with the second one.
Thanks, Sebastian

2 |3000

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

elko avatar image
elko answered ·

Hello @vikt0rm
after a restart the PV inverter kept disappearing.
What can I do?

2 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.

elko avatar image elko commented ·
@vikt0rm 
I would be very happy if you could help me with my problem.
0 Likes 0 ·
elko avatar image elko commented ·
The entry /data/dbus-shelly-1pm-pvinverter/install.sh in the rc.local seems to be removed after a restart. The file has the permissions 777
0 Likes 0 ·
zwiebacksaege avatar image
zwiebacksaege answered ·

Hi all

as i connected my pv on acout1 as the only Device i think about using this Script and taking the acout values directly from dbus.

currently my only idea is to Grab them over mqtt from the venus. can anyone tell me if i can get them directly from dbus in this Script?

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.

zwiebacksaege avatar image zwiebacksaege commented ·
got it solved by replacing the shelly Web request function with a dbus call for the ACout of the Multiplus-VEBus-Service.
0 Likes 0 ·
styrx avatar image
styrx answered ·

Would it also be possible to display individual loads instead of pv inverters with several Shelly 1PMs in the VRM?

e.g. washer, dryer, stove, oven...

unbenannt.png




unbenannt.png (51.4 KiB)
3 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.

zwiebacksaege avatar image zwiebacksaege commented ·
das ist sicher nicht schwer.

Für jeden Shelly einfach einen neuen Dienst mit eigener ID starten und als Typ Verbraucher anstelle von PV wählen

0 Likes 0 ·
minioh avatar image minioh zwiebacksaege commented ·
Hallo,


wo definiere ich in den Script den Typ Verbraucher?


Danke


1 Like 1 ·
der-neue avatar image der-neue minioh commented ·
Das würde mich auch interessieren.
1 Like 1 ·
minioh avatar image
minioh answered ·

@vikt0rm

Are there already plans for Shelly Gen 2 support, e.g. Shelly 1 Plus PM or Shelly PRO? Thank you in advance.

2 |3000

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

styrx avatar image
styrx answered ·

Unfortunately I cannot get any further and could not find the place in the script where the type is specified.

I could also imagine that the sign for a consumer must also be reversed for "/Ac/Power" and "/Ac/Energy/Forward"?

It would be ideal if it could also be specified in the config.ini whether it is a generator or a load.


Ich komme leider auch nicht weiter und konnte auch nicht die Stelle im Skript finden, wo der Typ festgelegt wird.

Außerdem könnte ich mir vorstellen, dass auch das Vorzeichen für einen Verbraucher umgekehrt werden muss bei "/Ac/Power" und "/Ac/Energy/Forward"?

Optimal wäre es, wenn in der config.ini festgelegt werden könnte, ob es sich um einen Verbraucher oder Erzeuger handelt.

2 |3000

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

minioh avatar image
minioh answered ·

Hallo, ich habe 2 Shelly 1PM als PV Inverter eingeunden und diese werden auch sofort auf der Console und im VRM angezeigt. Allerdings fehlt bei mit im VRM und auch in der Console die Anzeige der Phase. Hier in den Beispiel Fotos werden die Phasen mit angezeigt.
Die Config Datei ist korrekt ausgefüllt. An was kann das liegen?
In der Detailansicht in der Geräteliste wird die Phase korrekt angezeigt.


===========================


Hello, I connected 2 Shelly 1PM as PV inverters and they are immediately displayed on the console and in the VRM. However, the display of the phase is missing in the VRM and also in the console. Here in the example photos, the phases are shown. The config file is filled out correctly. What could be the reason? The phase is displayed correctly in the detail view in the device list.

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.

marza-bogdan avatar image marza-bogdan commented ·
Hi. It seems i have the same issue like you. I set up one shelly plus 1pm. I can see it under services menu in venus os but i can't see the icon on the console. Do you find a way to solve it ?
0 Likes 0 ·
styrx avatar image
styrx answered ·

Hmm... the developer vikt0rm has not been here in the forum since April. Maybe we should ask him at Github for support?


Hmm... der Entwickler vikt0rm war seit April nicht mehr hier im Forum. Vielleicht sollten wir es bei Github versuchen, ob er hier unterstützen kann?

2 |3000

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

styrx avatar image
styrx answered ·

I have now read something and experimented a lot.

Unfortunately, Victron does not have a load as a "servicename" (e.g. com.victronenergy.load), but only the service names specified in the D-Bus API, e.g .: com.victronenergy.charger, com.victronenergy.inverter, com.victronenergy.battery, com.victronenergy.pvinverter, ...

Depending on the service name, the paths are specified here that can be filled with values, e.g. "/Ac/Power" or "/Ac/Current" at "com.victronenergy.pvinverter".

So I tried it as a PV inverter and transmitted the values negatively. Unfortunately, however, all PV inverters are added and not listed individually, which did not lead to the desired result.

I also tried "com.victronenergy.system" and "com.victronenergy.vebus". Unfortunately without success. These service names were not listed as other independent devices.

However, I have now rewritten RalfZim's script and adapted it to my needs. So my Fronius Smart Meter is now displayed as a standalone device:

1655370352404.png


Ich habe mich nun in die Materie etwas eingelesen und viel experimentiert.

Leider gibt es seitens Victron keinen Verbraucher als "servicename" (z.B.: com.victronenergy.load), sondern nur die in der D-Bus API angegebenen service names, z.B.: com.victronenergy.charger, com.victronenergy.inverter, com.victronenergy.battery, com.victronenergy.pvinverter, ...

Je nach service name sind dann auch hier die Pfade vorgegeben, die mit Werten gefüllt werden können, z.B. "/Ac/Power" oder "/Ac/Current" bei "com.victronenergy.pvinverter".

Also habe ich es doch als PV-Inverter versucht und die Werte negativ übermittelt. Leider werden dadurch aber alle PV-Inverter addiert und nicht einzeln aufgeführt, was nicht zum gewünschten Ergebnis führte.

Ich habe mich auch an "com.victronenergy.system" und "com.victronenergy.vebus" versucht. Leider ohne Erfolg. Diese service names wurden nicht als weitere eigenständige Geräte aufgeführt.

Allerdings habe ich jetzt das Skript von RalfZim umgeschrieben und an meine Bedürfnisse angepasst. Somit wird jetzt auch mein Fronius Smart Meter als eigenständiges Gerät angezeigt:

1655370352404.png


1655370352404.png (24.8 KiB)
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.

brekkis avatar image brekkis commented ·

Moin Moin,


Kannst du mir (oder hier der Community) das angepasste Script zukommen lassen?

Ich habe folgendes Problem:

Setup: Multiplus 2, Raspi mit Venus OS, PV-Inverter, Shelly 1PM als Leistungsmesser an PV-Anlage, Batterie, .... alles läuft soweit.

Gestern mit dem Script hier den Shelly ins Venus-System eingebunden, leider wird der Wert der PV-Anlage als positiver "Verbraucher" angezeigt und zum Hausverbrauch (AC-loads) addiert und somit funktioniert die Einspeise-/Batterielade-/-Entladeregelung nicht.

Habe mir das Script hier mal angeschaut und würde jetzt folgende Zeilen im Script anpassen:

# send data to DBus

self._dbusservice[f'/Ac/{phase}/Voltage'] = voltage

self._dbusservice[f'/Ac/{phase}/Current'] = current

self._dbusservice[f'/Ac/{phase}/Power'] = power

self._dbusservice[f'/Ac/{phase}/Energy/Forward'] = energy / 1000 / 60

ändern zu:

# send data to DBus

self._dbusservice[f'/Ac/{phase}/Voltage'] = voltage

self._dbusservice[f'/Ac/{phase}/Current'] = (-1)** current

self._dbusservice[f'/Ac/{phase}/Power'] = (-1)** power

self._dbusservice[f'/Ac/{phase}/Energy/Forward'] = (-1)** energy / 1000 / 60


Bitte um Hilfe.


Danke und Gruß

Brekkis


**********************************english version****************************

Can you send me (or here the community) the customized script?


I have the following problem:


Setup: Multiplus 2, Raspi with Venus OS, PV inverter, Shelly 1PM as power meter on PV system, battery, .... everything is working so far.


Yesterday with the script here the Shelly integrated into the Venus system, unfortunately the value of the PV system is displayed as a positive "consumer" and added to the house consumption (AC loads) and thus the feed / battery charge / discharge control does not work.


I have looked at the script here and would now adjust the following lines in the script:

***See code upwards***

regards Brekkis


0 Likes 0 ·
elektrowolf avatar image
elektrowolf answered ·

Mithilfe eines Freundes habe ich den Shelly Plus 1PM zum laufen gebracht. Die Rest api zu den Plus Geräten ist geändert worden. Die Doku auf Github ist allerdings noch nicht geupdatet.
https://github.com/MaKess/dbus-shelly-1pm-pvinverter

Allerdings hatte ich das Problem das der Shelly Plus sehr wärmeempfindlich ist und sich immer wieder resettet. Das heißt der Shelly rebootet mehrmals am Tag und somit der Wechselrichter auch. Ich habe im Shelly eine Auto on Timer auf 0,1s eingestellt damit ich den Wechselrichter auch bei Stromausfall sofort wieder an geht. Zusätzlich habe ich das Problem, dass der Max power protection immer wieder an geht obwohl ich es deaktiviert habe. Habt ihr beim Shelly 1PM auch Überhitzungsprobleme?

6 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.

domii666 avatar image domii666 commented ·

ist das dann wirklich für den Plus PM? weil im Link ja noch alles auf das alte Skript verweist, danke dir auf alle Fälle mal! der 1 Plus PM ist deutlich besser finde ich.

0 Likes 0 ·
pau1phi11ips avatar image pau1phi11ips commented ·

This one works with the Plus 1 PM. I did intend on making the code a bit neater and submit a PR so the original code could support the 1 PM and the Plus but haven't got around to it yet.
https://github.com/pau1phi11ips/dbus-venus-mqqt-pvinverter

0 Likes 0 ·
bg30 avatar image bg30 pau1phi11ips commented ·

@pau1phi11ips: I tested your code with my shelly plus 1pm. Unfortunatly i can't see the shelly in the victron console. I find no logfile. The value in rc.local seems correctly.

0 Likes 0 ·
rittschie avatar image rittschie commented ·

Hallo elektrowolf, habe selbst versucht die "dbus-shelly-1pm-pvinverter.py" soweit zu bearbeiten das es mit der "Shelly plus 1pm" läuft. Leider keinen Erfolg. Die Parameter die z.B. http://ip_adresse/rpc/Shelly.GetStatus beim Shelly plus 1pm raushaut, unterscheiden sich leider zu sehr, als das ich dort einen Ansatz finde. Deine modifizierte dbus-shelly-1pm-pvinverter.py würde mich interessieren. Kannst Du mir diese zukommen lassen?

0 Likes 0 ·
elektrowolf avatar image elektrowolf rittschie commented ·

Der Link ist mit dem angepassten Skript:

https://github.com/MaKess/dbus-shelly-1pm-pvinverter

1 Like 1 ·
der-neue avatar image der-neue elektrowolf commented ·
Ich bekomme das mit dem letzten Script nicht ans laufen.

Ist außer der IP wenn ich keine Benutzernamen und Passwort habe noch etwas zu ändern?

0 Likes 0 ·
brekkis avatar image
brekkis answered ·

Moin Moin,


Kannst du mir (oder hier der Community) das angepasste Script zukommen lassen?

Ich habe folgendes Problem:

Setup: Multiplus 2, Raspi mit Venus OS, PV-Inverter, Shelly 1PM als Leistungsmesser an PV-Anlage, Batterie, .... alles läuft soweit.

Gestern mit dem Script hier den Shelly ins Venus-System eingebunden, leider wird der Wert der PV-Anlage als positiver "Verbraucher" angezeigt und zum Hausverbrauch (AC-loads) addiert und somit funktioniert die Einspeise-/Batterielade-/-Entladeregelung nicht.

Habe mir das Script hier mal angeschaut und würde jetzt folgende Zeilen im Script anpassen:

# send data to DBus

self._dbusservice[f'/Ac/{phase}/Voltage'] = voltage

self._dbusservice[f'/Ac/{phase}/Current'] = current

self._dbusservice[f'/Ac/{phase}/Power'] = power

self._dbusservice[f'/Ac/{phase}/Energy/Forward'] = energy / 1000 / 60

ändern zu:

# send data to DBus

self._dbusservice[f'/Ac/{phase}/Voltage'] = voltage

self._dbusservice[f'/Ac/{phase}/Current'] = (-1)* current

self._dbusservice[f'/Ac/{phase}/Power'] = (-1)*power

self._dbusservice[f'/Ac/{phase}/Energy/Forward'] = (-1)* energy / 1000 / 60


Bitte um Hilfe.


Danke und Gruß

Brekkis


**********************************english version****************************

Can you send me (or here the community) the customized script?


I have the following problem:


Setup: Multiplus 2, Raspi with Venus OS, PV inverter, Shelly 1PM as power meter on PV system, battery, .... everything is working so far.


Yesterday with the script here the Shelly integrated into the Venus system, unfortunately the value of the PV system is displayed as a positive "consumer" and added to the house consumption (AC loads) and thus the feed / battery charge / discharge control does not work.


I have looked at the script here and would now adjust the following lines in the script:

***See code upwards***

regards Brekkis


2 |3000

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

hias0815 avatar image
hias0815 answered ·

Hello, i noticed a rather interesting "Bug" If i switch of one of my Shellys to off. The last amount of Power wich was send to the grid is frozen in the Venus OS. Also if i switch the shelly on aggain. Workarround is to reboot the cerbo, then everything is fine again.
Do you have any solutions?

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.

pau1phi11ips avatar image pau1phi11ips commented ·

Hi, you should be able to run this to restart it without having to reboot the Cerbo

/data/dbus-shelly-pvinverter/restart.sh

I'm not sure how you'd automate that though.

0 Likes 0 ·
houser avatar image
houser answered ·

Hello,

This is interesting, but I don't get the concept, as my German is not what it should be, but I have extensive knowledge from Shellies of various kinds and have meny working in my installs. So what exactly do these Shelly PM1 do in this setup? Just concept wise basic in a sentence or two? Curious..

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.

hias0815 avatar image hias0815 commented ·
They measuring the power which is produced by the (any brand/not native supported)solar inverter and sent it to the cerbo
1 Like 1 ·
houser avatar image houser hias0815 commented ·

So just as a power meter then? That part I get. It said something about as a "PV inverter". Ah well. Thanks!

0 Likes 0 ·
pau1phi11ips avatar image pau1phi11ips houser commented ·
If you are measuring the power produced by a PV inverter connected to the Shelly, then it's classed as a PV inverter meter in Venus.

Is this that confusing?

0 Likes 0 ·
kurtinge avatar image kurtinge commented ·
Can Shelly Pro 2PM be measuring AC Input? I am planning to install it for the reason I can remotely switch the shore power on/off


0 Likes 0 ·
Tosog avatar image
Tosog answered ·

Hello, thank you for this nice tool!


I have two inverters running: One Fronius, which is supported directly and another one (hoymiles), running on that shelly. With this tool, I can see the Shelly-PV in the device list in the remote console, but in VRM it seems that the output power of the Shelly-PV is being added to the Fronius one.


So when the Fronius generates 1700W and the Shelly-PV is reporting 80w, The value for the Fronius will be shown with 1780w on VRM. Is there a way to have two separate PV Inverters in VRM?

Screenshots:
("Dach" is the Fronius, "BalkonPV" is the hoymiles with shelly)

1666254303298.png

1666254323025.png


1666254303298.png (76.4 KiB)
1666254323025.png (9.0 KiB)
2 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.

chrisu avatar image chrisu commented ·
does both device have a different Bus-ID?
0 Likes 0 ·
deadrabbit avatar image deadrabbit commented ·
Quite some time ago, but could you find a solution for that issue?
0 Likes 0 ·
der-neue avatar image
der-neue answered ·

Ist es möglich den Shelly an AC Out anzeigen zu lassen? Aktuell wird er mir nur auf der AC in Seite angezeigt.

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.

cschoch avatar image cschoch commented ·

Ja, das geht, dazu muss in Zeile 50

Dieser Eintrag:

self._dbusservice.add_path('/Position', 0) # normaly only needed for pvinverter

So geändert werden;

self._dbusservice.add_path('/Position', 1) # normaly only needed for pvinverter

Siehe:

https://github.com/victronenergy/venus/wiki/dbus#pv-inverters

/Position              <- 0=AC input 1; 1=AC output; 2=AC input 2
1 Like 1 ·
towatai avatar image
towatai answered ·

Moin,

funktioniert dein Plugin auch grundsätzlich mit den neueren Shelly ala Shelly Plus 1PM oder dem Plus 2PM?

2 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.

pau1phi11ips avatar image pau1phi11ips commented ·
0 Likes 0 ·
ebrandy avatar image ebrandy pau1phi11ips commented ·
Hallo,


hat jemand Erfahrung, ob das Script auch mit den Shelly Pro läuft?

Vielen Dank vorab für die Hilfe!


Liebe Grüße

0 Likes 0 ·
tunnelmax avatar image
tunnelmax answered ·

Hallo Leute

Bin ganz neu auf diesem Gebiet und bekomme es einfach nicht hin einen 2ten und 3ten shelly1Pm in die Venus zu bekommen hab jetzt schon Tagelang probiert aber keine Chance - der 2te Shelly wird nicht erkannt(angezeigt).Der Erste shelly läuft einwandfrei --kann mir bitte jemand helfen ?

LG

Thomas

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.

bonzai avatar image bonzai commented ·

Hi,

du musst die erste installation kopieren zu pvinverter 2, 3 usw.

dann in der jeweiligen config.ini die Deviceinstance ändern. z.B. 42, 43 usw.

wenn alle unter der gleichen Instance laufen, können sie nicht gefunden werden

0 Likes 0 ·
tunnelmax avatar image tunnelmax bonzai commented ·

Danke Dir ohne ende war wirklich nur an der Deviceinstance gelegen :-) wegen einer Zahl Tagelang getüftelt obwohls so einfach war.

Jetzt werd ich versuchen noch etwas an der RM Console Tüfteln da geht bestimmt auch einiges

Lg

Thomas

0 Likes 0 ·
der-neue avatar image der-neue bonzai commented ·
Muss ich dafür das Script zur Installation anpassen? Oder Kopiere ich die installierten Ordner im VenusOS?
0 Likes 0 ·
bonzai avatar image bonzai der-neue commented ·
Einfach kopieren und dann die jeweilige config. Ini anpassen
0 Likes 0 ·
macung avatar image
macung answered ·

Hi Leute,


ich bin ebenfalls neu hier udn wollte fragen ob schon mal jemand einen Shelly 4PM in die Venus software eingebunden hat.

Wollte die schon im Schaltschrank montieren und nicht unbedingt 4 einzelne sensoren nutzen.


LG Michael

2 |3000

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

marcin1981 avatar image
marcin1981 answered ·

Hallo Leute,

ich wollte fragen wie ich einen Shelly 1PM so ins Venus Os installiere (BOOT) das er mir den als (AC in) anzeigt. Der soll nur den Verbrauch vom Landstrom messen.

Hab vieles Probiert aber nur die Installation als PVinverter zeigt Bewegung beim verbrauch.

LG

Marcin

2 |3000

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

fmac avatar image
fmac answered ·

Hallo

Ich habe meinen Shelly 3EM als AC-Load eingebunden

bildschirmfoto-2022-12-15-um-174641.pngbildschirmfoto-2022-12-15-um-174810.png

bildschirmfoto-2022-12-15-um-174827.png

meine Zeilen im Script :

#self._dbusservice.add_path('/Role', 'grid')
    self._dbusservice.add_path('/Role', 'acload')
    self._dbusservice.add_path('/Position', 2) # normaly only needed for pvinverter
#servicename='com.victronenergy.grid',
        servicename='com.victronenergy.acload',
        deviceinstance=42, #war 40 #pvinverters from 20-29

dann sehe ich den Shelly als "AC Meter" im VRM, aber nur unter "Erweitert" und in der Geräteliste

ganz vorne in Dashboard sehe ich ihn noch nicht

bildschirmfoto-2022-12-15-um-180326.png

bildschirmfoto-2022-12-15-um-180529.png

Hoffe das hilft




2 |3000

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

fmac avatar image
fmac answered ·

Hallo nochmal

eigentlich müsste das hier die Lösung für alle Probleme sein

aber ich hab das noch nicht installiert bekommen

https://github.com/victronenergy/dbus-shelly

bildschirmfoto-2022-12-15-um-184242.png


2 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.

brekkis avatar image brekkis commented ·
Hat das hier schon jemand mal ausprobiert?

hört sich an, als ob es für alle Shellys (Gen.2) in Venus OS funktioniert!?


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

Habe es erfolgreich mit Venus OS 3.0 und einem Shelly Gen2 3EM Pro am Laufen nachdem ich die Datei meter.py in directory /opt/victronenergy/dbus-shelly mit der aus dem fork überschrieben habe:

https://github.com/sakulisko/dbus-shelly


0 Likes 0 ·
ebrandy avatar image
ebrandy answered ·

Hallo!

Hat jemand Erfahrung, ob dieses Script auch mit den neuen Shelly Pro läuft?


Liebe Grüße und herzlichen Dank!

2 |3000

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

brekkis avatar image
brekkis answered ·

Danke für die tolle Arbeit hier und in den anderen Shelly/Victron-Gits


Ich habe einen Shelly 3EM, einen Shelly EM und einen Shelly1PM in meinem System laufen.

- 3EM für Grid-Messung

- EM für Messung der PV-Anlage und

- 1PM für das Balkonkraftwerk

Habe mit den Skripten hier (für 1PM) und für 3EM und EM die Systeme wie folgt eingebunden:

- 3EM als grid auf Pos 0

- EM als pv-inverter auf Pos 0

- 1PM als pv-inverter auf Pos 1

Komisch an der Sache ist, dass der 1PM egal welche Position ich ihn setze immer auf "grid" (wenn Pos0) oder auf kritische Lasten (wenn Pos1) aufaddiert wird. d.h. ich produziere 600W, mit dem Balkonkraftwerk, diese werden aber nicht genutzte um Akku zu laden, oder einzuspeisen, sondern als kritische Last gedeutet und entsprechend aus der PV-Anlage oder dem Netz bedient....

Hat da jemand einen Workaround? Finde nichts im Code, das darauf hindeutet.


Gruß



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.

domii666 avatar image domii666 commented ·

würde mich auch interessieren.

0 Likes 0 ·
kampfiltis avatar image
kampfiltis answered ·

Hallo zusammen,

ich habe mir das Script von viktr0m geschnappt und für den Shelly EM adaptiert... Vielen dank dafür an viktr0m!

Fall interesse besteht, zu finden ist das EM Script hier: https://github.com/Eddy0815/dbus-shelly-em-pvinverter

Evtl. hilft es jemandem weiter...

@brekkis wenn du magst, kannst du es ja mal mit deinem EM Script vergleichen? Meine Variante läuft erst seit gestern, kann also noch nicht sagen, ob alles korrekt ist.

Grüße

6 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.

Rene Mullie avatar image Rene Mullie commented ·

hi @Kampfiltis : nice addition to the Shelley script series! I have been using the version of @vikt0rm and it is working great so far!


Could you describe which changes you made exactly to get the script for the EM version?

I am looking to make adaption for the Shelly Pro 3EM, as a grid meter.


Maybe also an idea to get the 'role' ( self._dbusservice.add_path('/Role', 'pvinverter')) value, which is hard coded now, to the .ini file so users can easily set it to grid/load etc?


Keep up the good work!

0 Likes 0 ·
sebastian-wein avatar image sebastian-wein commented ·

@Kampfiltis: Vielen Dank dafür... funktioniert soweit. Nur eine Frage hierzu: Der pv-inverter wird mir zwar im vrm in der Übersicht mit Watt gezeigt und in der remote console sehe ich auch Leistung, Strom und Spannung. Leider wird der Wert im VRM Portal aber nicht unter "Solar" in die Kalkulationen der kWh einberechnet. Ist das bei dir auch so bzw. weißt du hierfür eine Lösung?

1687804258741.png

1687804225940.png

0 Likes 0 ·
1687804225940.png (214.7 KiB)
1687804258741.png (209.9 KiB)
frank-online avatar image frank-online sebastian-wein commented ·
Das hatte ich auch. Der Grund war, dass der Sensor falsch herum montiert war. Der Wert wurde im VRM positiv angezeigt, in der Shelly App aber negativ. Ich haben ihn umgedreht, seitdem läuft die Aufzeichnung im VRM.



0 Likes 0 ·
kampfiltis avatar image kampfiltis commented ·

Hi Sebastian, freut mich, dass du meine Adaption des Scripts verwendest... Bei mir läuft es einwandfrei, auch die Anzeige im VRM läuft wie es soll... Evtl. setzt du das VRM Portal einmal zurück, komplette Daten löschen und dann Venus neu in VRM aufnehmen. Anfangs während der Entwicklung hatte ich teilweise seltsame Anzeigen im VRM, die nach einem Löschen der Daten behoben wurden... Bei mir sieht es jetzt im Portal so aus:

shelly.png

0 Likes 0 ·
shelly.png (89.1 KiB)
sebastian-wein avatar image sebastian-wein kampfiltis commented ·

VRM Reset gerade versucht. Leider genau so wie vorher. Echt strange, dass das bei dir klappt. Werde noch versuchen den Shelly nochmal neu im Cerbo hinzuzufügen, ansonsten fällt mir nix ein.

0 Likes 0 ·
frank-online avatar image frank-online commented ·

Das Script funktioniert prima soweit.

Hast Du für das Problem mit dem überlaufenden Log File eine Lösung??

https://www.youtube.com/watch?v=kW8YTbdxZ9U


Eine weitere Frage hätte ich noch:
Der Shelly EM hat zwei Eingänge, mit denen man auf der selben Phase zwei Messungen vornehmen kann. Wäre es möglich, auch den zweiten Kanal zu aktivieren. Das würde mir eine Menge Hardware Kosten für Shellys sparen.



0 Likes 0 ·
luigi-1 avatar image
luigi-1 answered ·
Hello, everyone,
can this script also be used for the Shelly Plug S, or could someone adapt it? If you want me to supply any data for this, I'm happy to do so...

The Shelly Plug S can also measure performance.

Hallo zusammen, kann dieses Script auch für den Shelly Plug S verwendet werden, oder könnte es jemand anpassen? Wenn Sie möchten, dass ich Ihnen dazu Daten zur Verfügung stelle, tue ich das gerne ... Der Shelly Plug S kann auch die Leistung messen.

2 |3000

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

jailbraik avatar image
jailbraik answered ·

Hallo, habe jetzt auch 2 Shelly 1 plus EM am rennen.

Aber heute ist mir einer eingefroren. Obwohl jetzt keine Energie mehr erzeugt wird steht im VRM 58Watt - ist der Fehler bekannt?


Edit hat sich erledigt , es war eine nicht eingerichte Datei


2 |3000

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

jailbraik avatar image
jailbraik answered ·

Ich habe drei Shelly 1plus pm am Laufen. Ohne Probleme.



3 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.

juf avatar image juf commented ·
Can you pls share your script for the plus 1pm.

regards

1 Like 1 ·
marza-bogdan avatar image marza-bogdan juf commented ·
Hi. Do you find the right script for 1pm plus ?
0 Likes 0 ·
juf avatar image juf marza-bogdan commented ·
0 Likes 0 ·
Marian Titieni avatar image
Marian Titieni answered ·

Anyone using it as a Energy meter? I cannot make it appear there.

2 |3000

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

rrupesh87 avatar image
rrupesh87 answered ·

need open energy meter readings on vrm victron, as energy meter has 2 ct sensors, ac voltage reading. please 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.

ostwest avatar image
ostwest answered ·

I use a 1PM-Plus, but it has low WiFi reception. I asume therefore ist is getting lost within the Victron-Dashboard. Is there a way to restart it automaticly every hour or so? How can I start the connection / the service "by hand"?


OK, I could find the answer:

Inside the installed folder e.g.:

/data/dbus-shelly-1pm-pvinverter01

is a script to restart the service: restart.sh

This can be called by cron for example in the early morning.

crontab -e

There you can install a job to do it. (attention, it uses VI, find the keycodes elsewhere)

the line for crontab is then:

00 02 * * * /data/dbus-shelly-1pm-pvinverter01/restart.sh

So it will restart the script every day at 2:00 AM

Not a good solution, but better than nothing

2 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.

olafd avatar image olafd commented ·

Do you have „Eco mode“ ON ?

For me - after switching "Eco mode" OFF, the PM1-Plus-WiFi is working OK again.

0 Likes 0 ·
ostwest avatar image ostwest olafd commented ·
no, I checheck it allready.
0 Likes 0 ·
haubada avatar image
haubada answered ·

Does anyone know if this skript works for Shelly Pro 1PM?

6 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.

matze avatar image matze commented ·

Hey @haubada

thanks for the fine work!

My setup is a "Shelly Pro 3EM" (GitHub) and "Shelly 1pm Plus" (GitHub).

Everything seems to be working fine, the only problem is, that the "Shelly 1pm Plus" isn't displayed as PV-Inverter on the dashboard. Solar yield is displayed correctly, but the inverter is missing in the diagramm.

dashboard.png

devicelist.png

devicelistremoteconsole.png

Anyone got an idea?


EDIT: I think it has something to do with me not having a battery (-> no ESS).

I switch the Position to 1 (AC output) and now the inverter is displayed, like in the first screenshot of @vikt0rm


Thanks

1 Like 1 ·
dashboard.png (55.3 KiB)
matze avatar image matze matze commented ·

Ok my suspicion was correct.

After installing a battery (with a Multiplus and ESS) and switching the Position of my Shelly 1PM back to 0 the inverter gets displayed correctly:

1687241919518.png

0 Likes 0 ·
1687241919518.png (65.3 KiB)
marza-bogdan avatar image marza-bogdan matze commented ·
Hi. Please help me. Where you set the position 0 of your shelly . I have the same issue like you. The pv inverter ot is not displayed. Thank you.
0 Likes 0 ·
boco avatar image boco commented ·
I am also interested in connecting a Shelly Pro 1pm
0 Likes 0 ·
haubada avatar image haubada boco commented ·

Hello, I have tried it with Pro 1PM and it works with Version:

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

wget https://github.com/Halmand01/dbus-shelly-1pm-pvinverter-mult-instance/archive/refs/heads/main.zip
unzip main.zip "dbus-shelly-1pm-pvinverter-mult-instance-main/*" -d /data
mv /data/dbus-shelly-1pm-pvinverter-mult-instance-main /data/dbus-shelly-1pm-pvinverter03
chmod a+x /data/dbus-shelly-1pm-pvinverter03/install.sh
/data/dbus-shelly-1pm-pvinverter03/install.sh
rm main.zip
nano /data/dbus-shelly-1pm-pvinverter01/config.ini

I have changed config.ini to L2, and my IP Adress

1683644572036.png

reboot

1683644341073.png

The only problem was, that Inverter power was negativ and flow inverted.

I have changed code in file: /data/dbus-shelly-1pm-pvinverter.py

Now Power is positiv and flow is in right direction:

1683723443923.png

Hope that helps you guys!!!


4 Likes 4 ·
1683644341073.png (38.5 KiB)
1683723443923.png (13.9 KiB)
boco avatar image boco haubada commented ·

Yes, great! It works for me, also. Thanks @haubada !

The config.ini has no entry for Position, like the code from @fabian-lauer .
Is there an option to move the pv-inverter to AC-Out 1?

Documentet option from fabian:

Position Available Postions: 0 = AC, 1 = AC-Out 1, AC-Out 2


0 Likes 0 ·
buddhafragt avatar image
buddhafragt answered ·

after restarting the Raspi the service stop, and need to start again. Someone know this problem?

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.

b-e-r-n-d avatar image b-e-r-n-d commented ·

the install.sh script should add a line to itself in /data/rc.local file like this example:

root@einstein:/data# cat rc.local

#!/bin/bash

/data/dbus-shelly-1pm-pvinverter/install.sh

So after reboot it will setup itself again, it even survives a cerbo version upgrade btw. but I don't have a Raspi so maybe the handling is slightly different there...

0 Likes 0 ·
jackj avatar image
jackj answered ·

Works great on the RPI, but I cannot get it to display anything on VRM portal. any ideas?

Thanks

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.

b-e-r-n-d avatar image b-e-r-n-d commented ·
maybe check in the config the vrm id? If the same is already assigned to another energy meter/pv inverter maybe it won't be shown.
0 Likes 0 ·
haubada avatar image
haubada answered ·

Hallo, seit heute funktioniert meine Anzeige nicht mehr. Es wird immer nur ein fester Wert (1006W) angezeigt, der sich nicht mehr ändert. Hat jemande das gleiche Problem?

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.

b-e-r-n-d avatar image b-e-r-n-d commented ·
Hi, das kommt manchmal leider vor (hatte es bisher 1x in 6 Monaten), ein Restart des Service oder Reboot des Cerbo hilft dann.
0 Likes 0 ·
haubada avatar image haubada b-e-r-n-d commented ·

Hallo, danke für die Info. Habe das zwischenzeitlich auch gemacht und hat geholfen. Danke!

Leider habe ich jetzt Probleme mit meiner Modbus Verbindung zum Iobroker. Es werden nicht mehr alle Werte aktualisiert.

0 Likes 0 ·
boco avatar image boco commented ·
Ja, ich hab's gerade das erst mal. Zum Einsatz kommt bei mir das Skript von Halmad, da gen2 device.

Gibt's außer dem workaround Restart Skript inzwischen andere Erkenntnisse?

0 Likes 0 ·
b-e-r-n-d avatar image b-e-r-n-d boco commented ·
Du könntest einfach per cronjob nachts ./restart.sh ausführen, da wäre dann zumindest nicht tagelang die Statistik kaputt...
0 Likes 0 ·
kajwek avatar image
kajwek answered ·

I'm using the script with Shelly EM, and realtime measuring in Cerbo is turned on so the log file in the script folder has filled all the memory available in Cerbo in 3 months.

How can I deactivate the log file? Can I just delete it?

2 |3000

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

frank-online avatar image
frank-online answered ·

Do you mean

/data/dbus-shelly-em-pvinverter01/current.log

Yes, you can delete it. Perhaps it could help to edit the config.ini

The problem is a known bug. https://www.youtube.com/watch?v=kW8YTbdxZ9U

But I don't know how to fix it.

I do not need the log file. At the moment I am trying to find the max. value of SignOfLifeLog. At he moment it is 1440.

(60 x 24h = 1440)

So there would be only one event every 24h at the log file. If it works, I will try this with higher values.




2 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.

kajwek avatar image kajwek commented ·
Yes, this is correct. I will delete the current.log, also do not need it.

Will the log file again be automaticly created? I'm not near the Cerbo to try.

0 Likes 0 ·
frank-online avatar image frank-online kajwek commented ·
Yes, it will be automaticly new created.
0 Likes 0 ·
rgnz avatar image
rgnz answered ·

Hello,

I have the shelly-em-smartmeter install and it seems to work but doesn't show the total grid watts correctly. It is an Original Shelly-EM with the CT. It does show L1 but doesn't add it to the AC Totals and therefore doesn't show on the device list with a total W. Any help would be appreciated.

1692490362467.png

1692490444667.png


1692490362467.png (24.7 KiB)
1692490444667.png (12.5 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.

dmsims avatar image
dmsims answered ·

For the Shelly 1EM to display the totals properly add this before line 166 in the code

self._dbusservice['/Ac/Current'] = self._dbusservice['/Ac/L1/Current']
self._dbusservice['/Ac/Power'] = self._dbusservice['/Ac/L1/Power']
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.

rgnz avatar image rgnz commented ·
Thank you! Works perfectly!
0 Likes 0 ·
kent2ben avatar image
kent2ben answered ·

Great project! I have connected a non Victron DC->AC inverter to my system. Would it be possible to measure this and feed it into Victron system as AC ?

Or does this only work for PV inverters ?

2 |3000

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

marcob1979 avatar image
marcob1979 answered ·

wie kann man das script wieder löschen?

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.

towatai avatar image towatai commented ·
Im Installationsverzeichnis einmal die "uninstall.sh" ausführen.
0 Likes 0 ·
marceldb avatar image
marceldb answered ·

Will this one work as well? This is just a power meter, I guess based on 1PM technology. https://www.shelly.com/en-nl/products/product-overview/shelly-plus-pm-mini1694268631303.png


1694268631303.png (248.9 KiB)
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.

b-e-r-n-d avatar image b-e-r-n-d commented ·

It is shelly gen2 device so it should work with this one:

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

(use "PlusPmSupport = True" in config.ini and the correct URL is called/parsed)


0 Likes 0 ·
frank-online avatar image
frank-online answered ·

Is the log-problem solved at that Halmand-link?


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.

pau1phi11ips avatar image pau1phi11ips commented ·
You can set the log level to CRITICAL in the settings file so should help with the huge logs.
0 Likes 0 ·
fcattaneo avatar image
fcattaneo answered ·

Thanks for the script.

I have this problem: shown correct power value from shelly EM but the total power are zero.

In the foto the power from my second inverter, measured by shelly EM, connected in AC1, is 147 Watt but the total power is zero.


Thanks in advance,

Fabrizio.


venus-em.png

venus-em2.png


venus-em.png (41.7 KiB)
venus-em2.png (54.3 KiB)
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.

b-e-r-n-d avatar image b-e-r-n-d commented ·
which script are you using? As the 3EM is slightly different to the 1PM you may need a different script or do some adjustments manually.
0 Likes 0 ·
boco avatar image
boco answered ·

The config.ini has no entry for Position, like the code from fabian lauer.
Is there an option to move the pv-inverter to AC-Out 1?

I use the halmand link to add my Pro1pm.

Documentet option from fabian:

Position Available Postions: 0 = AC, 1 = AC-Out 1, AC-Out 2
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.

boco avatar image boco commented ·

Two changes in the code from Halmand are nessecary:

1. config.ini --> Add: Position with the needed value:

# Available Postions: 0 = AC, 1 = AC-Out 1, AC-Out 2
Position       = 1

2. dbus-shelly-1pm-pvinverter.py --> Change the line for Position to:

self._dbusservice.add_path('/Position', int(config['DEFAULT']['Position']))

The Position in my Remote Console and VRM Portal are now correct. I will see tomorrow if the values are correct too.

0 Likes 0 ·
kurtinge avatar image
kurtinge answered ·

Hi @vikt0rm
Do I have to do something on the Shelly side? Any configuration besides bringing it online? I have the Shelly Plus PM Mini and no measurements are coming in to the Venus. I am monitoring the AC input from grid. Not the inverter. Did not change very much in the config.ini except the IP-address.
The log is saying this:

2023-10-08 12:25:48,321 root CRITICAL Error at _update
Traceback (most recent call last):
File "/data/dbus-shelly-1pm-pvinverter/dbus-shelly-1pm-pvinverter.py", line 168, in _update
power = meter_data['switch:0']['apower']
KeyError: 'switch:0'

12 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.

b-e-r-n-d avatar image b-e-r-n-d commented ·

the shelly plus pm mini is a gen2 device!!

are you sure you are using the right script for it? like this one with PlusPmSupport = True in config?

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


1 Like 1 ·
kurtinge avatar image kurtinge b-e-r-n-d commented ·
I am not sure now :-D

I will check out, deinstall and try again next time I am at the marina. Thanks for the update

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

img-0657.pngimg-0656.pngImage CaptionDid deinstall/install and still I are getting the same message:

Remark that I am using the Shelly Pm Mini and I am planning to use it for AC input monitoring.


0 Likes 0 ·
img-0657.png (279.6 KiB)
img-0656.png (253.0 KiB)
b-e-r-n-d avatar image b-e-r-n-d kurtinge commented ·

what's the output in Browser?

http://<ip_of_shelly>/rpc/Shelly.GetStatus

I have a 1PM mini and it looks like:

{
  "ble": {

  },
  "cloud": {
    "connected": true
  },
  "input:0": {
    "id": 0,
    "state": null
  },
  "mqtt": {
    "connected": false
  },
  "switch:0": {
    "id": 0,
    "source": "http",
    "output": false,
    "apower": 0,
    "voltage": 233.6,
    "freq": 50,
    "current": 0,
    "aenergy": {
      "total": 0,
      "by_minute": [0, 0, 0],
      "minute_ts": 1697193288
    },
1 Like 1 ·
kurtinge avatar image kurtinge b-e-r-n-d commented ·
Did you change anything except the config.ini? Could you share config.ini with me. I will check out the URL and see how it appear in my "Plus 1PM Mini". Don't know if that differ from the "Plus PM Mini"?
0 Likes 0 ·
b-e-r-n-d avatar image b-e-r-n-d kurtinge commented ·

no changes, plain install.

config.ini changed:

[DEFAULT]

AccessType = OnPremise

SignOfLifeLog = 15

Deviceinstance = 44

CustomName = Garage_Temp

Phase = L3

PlusPmSupport = True

LogLevel = CRITICAL


[ONPREMISE]

Host = 192.168.123.123

Username = a

Password = b

1 Like 1 ·
kurtinge avatar image kurtinge b-e-r-n-d commented ·

I will check out next time. I think the line PlusPmSupport = True is absent

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

The http://192.168.0.199/rpc/Shelly.GetStatus return this:

{"ble":{},"cloud":{"connected":true},"mqtt":{"connected":true},"pm1:0":{"id":0, "voltage":227.4, "current":1.264, "apower":281.0 ,"freq":50.0,"aenergy":{"total":73.831,"by_minute":[426.771,4694.479,4907.865],"minute_ts":1697791383}},"sys":{"mac":"348518DEB824","restart_required":false,"time":"08:43","unixtime":1697791385,"uptime":750,"ram_size":261516,"ram_free":101328,"fs_size":393216,"fs_free":94208,"cfg_rev":25,"kvs_rev":1,"schedule_rev":0,"webhook_rev":0,"available_updates":{"beta":{"version":"1.0.7-beta2"}}},"wifi":{"sta_ip":"192.168.0.199","status":"got ip","ssid":"Mavi","rssi":-57},"ws":{"connected":false}}

A update tells me there are activity. But at the console there are zero values. But, where do I tell the coda that this is the value of AC input and not some inverter?


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

it seems your device is not the same as mine ;-)

you have a ShellyPlusPMMini and I have a ShellyPlus1PMMini

the difference in output is:

 "switch:0": {
    "id": 0,
    "source": "http",
    "output": false,
    "apower": 0,
    "voltage": 233.6,
"pm1:0":{ 
"id":0, 
"voltage":227.4, 
"current":1.264, 
"apower":281.0 ,


Python script searches for switch:0:

 if phase == pvinverter_phase and plusPmSupport == 'True':
             power = meter_data['switch:0']['apower']
             total = meter_data['switch:0']['aenergy']['total']
             voltage = meter_data['switch:0']['voltage']
             current = power / voltage


So two points:

1. Currently no github script uses the PlusPMMini and you have to adapt the script at certain points where the json file is read ( just change for example:

power = meter_data['switch:0']['apower']

to

power = meter_data['pm1:0']['apower']


2. I'm not sure what you mean with AC input. AC input is measured by the multiplus directly so no need to have a shelly for it. Or do you mean you want to measure what the grid is providing to your house on this phase? ( so you want a single phase grid meter?)


0 Likes 0 ·
kurtinge avatar image kurtinge b-e-r-n-d commented ·
Ok, that figures. Thougt I had the correct device. I am not a good programer to be honest, but I have been looking at those lines to see if I could figure, but did not :-)

I will try to change the lines as proposed and see what happens. Or I just buy the 1PM.

Else, I do not have a multiplus (have Victron smartshunt, MPPT and inverter) so this power-meter is only measuring the power which are provided when the 3rd party charger (Cristec) is running.
0 Likes 0 ·
kurtinge avatar image kurtinge b-e-r-n-d commented ·

Thanks.... that helped and the correct values showes up in the console. but not in the graphic and VRM.


1698389549098.png

1698389606755.png

0 Likes 0 ·
1698389549098.png (33.9 KiB)
1698389606755.png (107.6 KiB)
vijith avatar image vijith b-e-r-n-d commented ·

Hi, i had bought shelly PM mini gen3 and tried to connect in venus os. but its not displaying the values. I tried this step

power = meter_data['switch:0']['apower']

to

power = meter_data['pm1:0']['apower']

and iam getting the values, but not in VRM.

0 Likes 0 ·

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