question

wkirmair avatar image
wkirmair asked

Shelly Pro 3EM as Grid Meter with Venus OS 3.0 and dbus-shelly

Hi folks,

with Venus OS 3.0 it is very easy to add a Shelly Pro 3EM (the updated version of the 3EM, with LAN connector). Simply enter the Cerbo IP in the Shelly Web GUI under „Outbound Websocket“ with port 8000 and it appears in the Cerbo device list with readings for L1 to L3.

6e6d0f1d-e8f2-4c34-b05c-21a8d4353319.jpeg

The role in the settings is „Grid Meter“ but the overview page still shows the measurements of the MultiPlus

5a191645-6b3a-42a2-bc6f-b75712731e61.jpegAny ideas, how to fix this?

By the way: ESS is regulating to 0W as the sum of all three phases as expected.

I really appreciate your help!

Best regards

Wolfgang

Venus OS
2 |3000

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

12 Answers
André Jerleke avatar image
André Jerleke answered ·

Hi! I have the exactly same issue, was easy to add it after figuring out that it was just a setting in the Shelly and everything else was already in the new Venus OS 3 , before that i compiled and tested alot of programs from different GitHub places.

So after i got this running i believed the error i got (ac showing 0w) was an error caused by all my trial end errors. But now that I see you have the same issue I'm certain it's a bug/setting issue.

Also trying to get the ESS working with Shelly and hope to get it up and running soon cause right now i can just charge the battery and keep it charged, well i can get ESS to use power from battery to about 98% SOC when I set it to optimal mode but then it recharges but 2 % is not much. So... Asap we have the Shelly Pro 3EM running i hope this fixes this.

2 |3000

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

evilputz avatar image
evilputz answered ·

Hi, i also have the same problem (Try to use it as PV Meter) the Data is Displayed correctly in the Device View but its just not showing up.

2 |3000

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

claus avatar image
claus answered ·

yes, it's a bug.

don't expect the bug to be fixed in the near future.

I have a similar problem with AC load.

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 ·

I also plan to use the Shelly Pro 3EM as PV inverter meter.

Maybe the issues in Venus OS 3.0 can be fixed with overwriting the two files (dbus_shelly.py + meter.py) in directory /opt/victronenergy/dbus-shelly with the files from the following github fork: https://github.com/sakulisko/dbus-shelly

0 Likes 0 ·
André Jerleke avatar image
André Jerleke answered ·

@EvilPutz its not possible to change since the settings aint showingskarmbild-2023-06-07-160049.pngskarmbild-2023-06-07-160056.png


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.

evilputz avatar image evilputz commented ·
I have the same Problem wit the Pro 1 EM .... the Pro 3 EM Delivers data but wont show up in the Dashboard.
0 Likes 0 ·
etamminga avatar image
etamminga answered ·

How fast is the Shelly Pro 3EM updating it's values in Venus OS? Every second, or is it even faster?

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 answered ·

Some of the issues in Venus OS 3.0 can be fixed with overwriting the file meter.py in directory /opt/victronenergy/dbus-shelly with the file from the following github fork: https://github.com/sakulisko/dbus-shelly

I have the 3 EM Pro now in use as 3 phase PV inverter and settings were available to change the role.

Value updates seen with dbus-spy come every ~2 seconds it seems -> my old shelly 1PM has updates more frequently (~2-3 times per second) but the ESS works anyways very well as I have the EM540 as gridmeter which updates like ~10 times per second :)

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

bi-solarpv avatar image bi-solarpv commented ·

Hi @b_e_r_n_d , thank you for the note regarding the updated meter.py file. I installed it and have still same issue that @wkirmair describe. The values at "energy meter" section up-to-date but the dashboard isn't reflect this:


1691878044273.png


Any additional hints/notes?


Thanks in advance.


Best, Andreas

0 Likes 0 ·
1691878044273.png (95.2 KiB)
b-e-r-n-d avatar image b-e-r-n-d bi-solarpv commented ·

Hi Andreas,

sorry I have no clue why it doesn't show up.

If you have a Shelly Pro3EM you could also use the following as a baseline coding (3em Generation 1) as it provides both possibilities grid meter and pvinverter but only for old gen1 shellys

https://github.com/fabian-lauer/dbus-shelly-3em-smartmeter


I can provide you with code snippets to use a pro 3EM (Gen2) which I have made to another script using it as a multiphase "pvinverter" (https://github.com/Halmand/dbus-shelly-1pm-and-pm1-Plus-pvinverter-multi-instance) which is working smoothly :)

Best,Bernd

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

Hi @b_e_r_n_d , thank you for your reply. I initially adapted my PR to Halmand's repo as well as to the repository of dbus-shelly-3em-smartmeter from Fabian.

Now, it works fine. The values in the dashboard are correct and up-to-date.

I'm wondering the original dbus-shelly repo. doesn't update the values for L2 and L3 at "com.victronenergy.system" on the dbus:

Ac/Grid/L1/Current                                     1.997
Ac/Grid/L1/Power                                       -440.1 Ac/Grid/L2/Current                                         0 Ac/Grid/L2/Power                                           0 Ac/Grid/L3/Current                                         0 Ac/Grid/L3/Power 0

only L1 is updated.

The values in the dbus-shelly page itself are correct and updated regularly.

Does anyone know which role plays the newly introduced and released aiovelib in this case?


Best, Andreas

0 Likes 0 ·
davo2500 avatar image davo2500 commented ·
I'm still learning how to work with the raspi and venus os. How do I overwrite the file?
0 Likes 0 ·
b-e-r-n-d avatar image b-e-r-n-d davo2500 commented ·
you need to connect via ssh to the raspi and edit it with the nano or vi editor or copy it over via SCP (secure copy)
0 Likes 0 ·
marceldb avatar image
marceldb answered ·

I read all the posts and still have no PV inverter in VRM and the front page. The Shelly is in the list. I saw that it is lacking the VRM instance. Is there a way to add an VRM instance to the Shelly, may be that will let it appear in the VRM device list?
1692776560818.png


1692776560818.png (44.0 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.

wicki avatar image
wicki answered ·

Habe dasselbe Problem: Nirgendwo eine VRM-Nr., weder in den Angaben aus der Device-Liste noch in den Details zu Services->Modbus TVP->Available Services.

Hoffentlich wird das in einer der nächsten Firmwares angegangen, damit die Daten auch über VictronConnect sichtbar werden. Oder ist es doch schon jetzt über die Remote Console irgendwie sichtbar zu machen?

Habe neben dieser noch eine andere Frage: Wie bekomme ich den shelly pro 3EM dazu, die Daten noch an einen zweiten Cerbo zu schicken? Im Webserver für den shelly sieht es so aus, als wäre nur ein Eintrag möglich (firmware=1.0.0).

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.

wicki avatar image wicki commented ·

Just some additional info regarding potential "automatic" issue resolution by installing the current release candidate v3.10-32: this did not fix it out of the box.

0 Likes 0 ·
duester avatar image
duester answered ·

Ich habe jetzt eine Lösung gefunden die funktioniert. Den Websocket Eintrag in den Shelly Einstellungen habe ich gelöscht und folgendes Script installiert:

https://github.com/funkmaster86/dbus-shelly-pro-3em-smartmeter

1693767385522.png


1693767444640.png

1693767478682.png


Gruß Duester


1693767385522.png (35.9 KiB)
1693767444640.png (23.6 KiB)
1693767478682.png (23.3 KiB)
7 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.

marceldb avatar image marceldb commented ·
That will be great, will test it tomorrow. Your tile shows the power in a negative value. Does it matter whether it is positive or negative?
0 Likes 0 ·
tom w avatar image tom w marceldb commented ·
Da scheint etwas nicht richtig zu sein.

Der Multiplus ist aus und die Batterie wird mit 542W entladen. Wie geht das?

0 Likes 0 ·
wicki avatar image wicki marceldb commented ·
@marceldb: So have you tested and are you happy?


0 Likes 0 ·
marceldb avatar image marceldb wicki commented ·
It works, but when you connect the PV to the AC out, the system does not calculate the AC load right. I had even added PV inverter to the ESS assistent, and I had configured the EM3 config so that it should know that it was connected to ac out. So I put the PV inverters back to AC in and that works
0 Likes 0 ·
wicki avatar image wicki commented ·

Hallo duester,

kann es sein, dass der Multiplus bei Dir auf "aus" steht, weil Du einen anderen Inverter als den Multiplus am Start hast?

Sieht bei mir jedenfalls auch so aus, wenn ich einen soyosource verwende, um zu AC zu wandeln von den Victron MPPTs bzw. der Batterie.

Gregor


0 Likes 0 ·
wicki avatar image wicki wicki commented ·

Habe es installiert und bin super happy damit. Vielen Dank!!!

screenshot-2023-09-19-213139-kopie.jpg


0 Likes 0 ·
tomhei avatar image tomhei commented ·
ich habe das Script bei mir installiert bekomme den Shelly allerdings nicht angezeigt. Muss man am Shelly eventuell noch Einstellungen machen damit es funktioniert ?


Gruß Thomas

0 Likes 0 ·
kudos50 avatar image
kudos50 answered ·

Did anyone figure out how to connect multiple Pro 3EM meters yet ? Up to till now I have been using https://github.com/funkmaster86/dbus-shelly-pro-3em-smartmeter and it has been working well for me. It also survived various upgrades without manual intervention which is also great!

I have 2 envoys reporting data for 20 micro's. The way in which the Enphase system reports is fine for hourly consumption calculation in HomeAssistant but it's way too slow to use for Victron's Dynamic ESS even if an integration had existed.
In other words; I need to install 2 more Pro 3EM meters and/or run 2 more funkmaster86 instances or 2 websockets with "replaced meter.py" to get grid tied inverter reporting?

Suggestions are most welcome.

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.

kudos50 avatar image kudos50 commented ·
never mind... like earlier in this thread I cannot get web sockets to work. No matter what config you change it never seems to show up in the VRM. Not even with a correct VRM id.

But using the code from funkmaster86/fabian it's a piece of cake. Just create 3 different directories for the same code and change the individual configs and run files.

1 Like 1 ·
evilputz avatar image evilputz kudos50 commented ·
Hi, what excatly have you modified in the scripts ?
0 Likes 0 ·
kudos50 avatar image kudos50 evilputz commented ·

Just unzip the same code as many times as you need in individual directories and set each individual config file:

root@einstein:/data# ls -l dbus-s*

dbus-shelly-3em-smartmeter1:

-rw-r--r-- 1 root root 5830 Apr 16 2023 README.md

-rw-r--r-- 1 root root 463 Jan 25 20:32 config.ini

-rw-r--r-- 1 root root 7274516 Mar 4 20:54 current.log

-rw-r--r-- 1 root root 12245 Apr 16 2023 dbus-shelly-3em-smartmeter.py

-rw-r--r-- 1 root root 12629 Apr 16 2023 dbus-shelly-3em-smartmeter.py.3em

-rw-r--r-- 1 root root 12245 Apr 16 2023 dbus-shelly-3em-smartmeter.py.pro

drwxrwxrwx 2 root root 4096 Apr 16 2023 docs

drwxrwxrwx 2 root root 4096 Apr 16 2023 img

-rwxr-xr-x 1 root root 775 Apr 16 2023 install.sh

-rwxr--r-- 1 root root 173 Apr 16 2023 restart.sh

drwxrwxrwx 3 root root 4096 Apr 16 2023 service

-rwxr--r-- 1 root root 300 Apr 16 2023 uninstall.sh


dbus-shelly-3em-smartmeter2:

-rw-r--r-- 1 root root 5830 Sep 21 19:01 README.md

-rw-r--r-- 1 root root 473 Jan 25 20:27 config.ini

-rw-r--r-- 1 root root 14310206 Mar 11 10:24 current.log

-rw-r--r-- 1 root root 12245 Sep 21 19:01 dbus-shelly-3em-smartmeter.py

-rw-r--r-- 1 root root 12629 Sep 21 19:01 dbus-shelly-3em-smartmeter.py.3em

-rw-r--r-- 1 root root 12245 Sep 21 19:01 dbus-shelly-3em-smartmeter.py.pro

drwxr-xr-x 2 root root 4096 Sep 21 19:01 docs

drwxr-xr-x 2 root root 4096 Sep 21 19:01 img

-rwxr-xr-x 1 root root 775 Sep 21 19:01 install.sh

-rwxr--r-- 1 root root 173 Sep 21 19:01 restart.sh

drwxr-xr-x 3 root root 4096 Sep 21 19:16 service

-rwxr--r-- 1 root root 300 Sep 21 19:01 uninstall.sh


dbus-shelly-3em-smartmeter3:

-rw-r--r-- 1 root root 5830 Sep 21 19:29 README.md

-rw-r--r-- 1 root root 473 Jan 25 20:27 config.ini

-rw-r--r-- 1 root root 1226244 Mar 4 21:01 current.log

-rw-r--r-- 1 root root 12245 Dec 6 08:01 dbus-shelly-3em-smartmeter.py

-rw-r--r-- 1 root root 12629 Sep 21 19:29 dbus-shelly-3em-smartmeter.py.3em

-rw-r--r-- 1 root root 12245 Sep 21 19:29 dbus-shelly-3em-smartmeter.py.pro

drwxr-xr-x 2 root root 4096 Sep 21 19:29 docs

drwxr-xr-x 2 root root 4096 Sep 21 19:29 img

-rwxr-xr-x 1 root root 775 Sep 21 19:29 install.sh

-rwxr--r-- 1 root root 173 Sep 21 19:29 restart.sh

drwxr-xr-x 3 root root 4096 Sep 21 19:30 service

-rwxr--r-- 1 root root 300 Sep 21 19:29 uninstall.sh


And set role, position, customname, deviceinstance (I used 50, 51 and 52 for example) and host ip address.

Put both the 3em and the pro file in the directories and copy or rename the one you need.

0 Likes 0 ·
glipschitz avatar image
glipschitz answered ·

I have not been able to get the WebSockets to work correctly either :(

Doesn't seem to be much interest from Victron to support 3rd Party Energy Meters.

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.

ejrossouw avatar image ejrossouw commented ·

Interestingly, Victron supports a 3rd party product, namely Carlo Gavazzi and only recently introduced their own product, the VM-3P75CT, which I think serves the majority of applications. ABB also now have GX firmware support. Easy to ask support, but I imagine intellectual property sharing agreements as well as costly testing and ongoing support are just some of the things that any business have to take into account and Victron would be no exception if you ask me.

1702209399525.png



0 Likes 0 ·
1702209399525.png (134.8 KiB)
Sven Bluege avatar image Sven Bluege ejrossouw commented ·
I'm currently offering an ABB B24 and an EM530 :)


Jokes/Ads aside. With the VM-3C75CT I don't see the need for a third-party-device if:
- you are not forced to use WiFi, then the 3EM is awesome
- you can install a new smart meter

In any other situation, I'm happy to get rid of any DYI solution.. even if it is fun getting them so work as a hobby.

But since I like the Shelly 3EM, I would love to see this device added in the native firmware.

0 Likes 0 ·
glipschitz avatar image glipschitz ejrossouw commented ·
The main reason people go down the path of the Shelly product is because it connects to things like Home Assistant with ease. The vendor supplied product is so far behind the times with things like Wifi connectivity. Most still want RS232 / RS485
0 Likes 0 ·
ejrossouw avatar image ejrossouw glipschitz commented ·

I can appreciate, however for me wired connections are still the preferred solution for secure and reliable service. A key driver for my customers has always been energy security and increased grid independance. (read keeps some lights on and the fridges powered) It of course ultimately depends on an individual's requirements. I am also aware that some new builds (where customers have an input) are typically hardwired for internet and control systems as were the energy efficient homes I looked at when I still resided in Melbourne some time ago now. With dynamic ESS, the Victron charging stations and customers controlling excess PV through various mechanisms already to e.g. heat water storage etc. Victron already covers a lot of bases. PS - I still think Victron is more cautiously openminded than generic product manufacturers and why you opted for a Multiplus-II? Otherwise why not go for something that already offers home assitant integration with your Shelly?

0 Likes 0 ·
matt1309 avatar image
matt1309 answered ·

Sorry to dig up old thread. Looking to purchase one of these and would really like the websockets functionality for speed more than anything. Did anyone resolve this or did firmware update fix?

If not I was going to try and order one and edit the websockets driver code if needed. (Ngl couldnt spot any obvious issues in the code unless data format has changed on shelly api side)

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