question

vijith avatar image
vijith asked

Shelly PM mini gen3 as PV Inverter in Venus OS

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

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

if change the values in "dbus-shelly-1pm-pvinverter.py" script "line 168", then i am getting the readings in Device List, but not getting in VRM or Remote Console.

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

to

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


Venus OSEnergy MeterRaspberry Pishelly implimentation
2 |3000

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

10 Answers
vijith avatar image
vijith answered ·

Issue Resolved. Need to change the code in line 52. Change Position', 0 to Position', 1.working.jpg


working.jpg (31.3 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.

matt1309 avatar image
matt1309 answered ·

@vijith


Are all the other data points in shelly PM mini in same location/format.
Also have you set phase and other required settings in device list

2 |3000

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

vijith avatar image
vijith answered ·

I don't have programing skills. I am using reference in the Google. I have attached the VRM device list and Remote Console device list. Kindly guide.vrm.jpgdevice-list.jpginverter-1.jpginverter-2.jpg


vrm.jpg (36.4 KiB)
device-list.jpg (35.0 KiB)
inverter-1.jpg (37.8 KiB)
inverter-2.jpg (38.8 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.

matt1309 avatar image
matt1309 answered ·

Hi @vijith


Here's the api documentation. I haven't got a shelly gen3 device to test it unfortunately.

PM1 | Shelly Technical Documentation

I think you'll just need to change what's in lines 168 to 170 to work with the above data layout.

You may also need to change line 110.


For understanding:

So what the script is doing is getting the status url of the shelly device and reading the data from it.

The new generation has a different api structure/data layout hence the issue you've got.


The python code is reading the data from the status url of the shelly device and it seems to say the plus model's status url is http://%s/rpc/Shelly.GetStatus

The api documentation seems to say it's now http://%s/rpc/PM1.GetStatus (this is assuming i've found the right api documentation, please double check I've not got the wrong model)


It's easy for you to test this if you're on the same network as the shelly device. Open up a browser and go to the shelly devices url followed by the above path ie

http://192.168.1.10/rpc/Shelly.GetStatus

if this fails try the below (im hoping iit's the below)

http://192.168.1.10/rpc/PM1.GetStatus

(of course changing it to your shelly's IP).


This will also show you the format of the data. ie this will tell you what you need to change lines 168 to be to get the data to be read correctly.

If you're struggling to work out that part just ask chatgpt or google "how to access power from this json data" and paste the data you see in that window. it'll tell you something like data[paramter][power] similar to what you see in the python code already. ofcource the variable data will need to change to meter_data if you're using that python script.



2 |3000

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

vijith avatar image
vijith answered ·

Hi, actually i am getting all the information in Device list.

screenshot-2024-01-28-at-08-46-57-remote-console-o.pngOnly i am not getting in VRM and Remote Console. I have attached the .JSON files. this one is working

http://192.168.1.102/rpc/Shelly.GetStatus

and my current .py script also attached. seems everything is correct as you mentioned.

json and py script.zip



2 |3000

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

matt1309 avatar image
matt1309 answered ·

Ahh i see that is odd.


My next guess was going to be it's configured as a ac load meter rather than pv inverter but that doesn't seem to be the case.


Have you configured pv position in the device settings (in gx device under setup?


Its odd that it shows under vrm devices. If it wasn't there I'd guess the dbus instance ID wasn't unique ie inverter 1 and inverter 2 conflicting.


How do you know it's not showing in vrm. Does the data in advanced tab show zero for that device?




2 |3000

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

vijith avatar image
vijith answered ·


I have attached the screenshots of VRM advanced tab, VRM device list and VRM Dashboard


advanced-tab.jpg


1706500329178.png



device-list.jpg



dashboard.jpg



device-list.jpg (47.4 KiB)
dashboard.jpg (24.3 KiB)
advanced-tab.jpg (38.7 KiB)
1706500329178.png (58.3 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.

vijith avatar image
vijith answered ·

Its weird. In VRM i am getting data in the "Installation data view". But in VRM graphical view its not. I have attached the screenshots.

last-7-days.jpg


Full View of VRM dashboard. Its not showing the PV inverter.


vrm.jpg




last-7-days.jpg (57.9 KiB)
vrm.jpg (62.3 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.

matt1309 avatar image
matt1309 answered ·

HI @vijith


I noticed your victron inverter is off. I've seen others have issues when their multiplus is off. If you turn that on i think it'll solve the issue on the graphic.

2 |3000

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

vijith avatar image
vijith answered ·

Actually I am not using Victron Inverter. Before "Shelly MiniPMG3" i was using "Shelly 1 One Pm Smart Relay" and it was fine. I was getting all the data.

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

Additional resources still need to be added for this topic

Energy Meter Selection Guide

Victron Venus OS Open Source intro page

Venus OS GitHub (please do not post to this)

Additional resources still need to be added for this topic

Raspberry Pi running Victron’s Venus firmware - Blog Post

Venus OS Large image: Signal K and Node-RED - Install

raspberrypi install venus image