fabian-lauer / dbus-shelly-3em-smartmeter

Integrate Shelly 3EM smart meter into Victron Energies Venus OS
125 stars 55 forks source link

HTTP API iobroker or another sources #6

Closed amnesia106 closed 1 year ago

amnesia106 commented 2 years ago

Hi, and great work! that saves a lot of users the em24 enery meter.

it is possible to integrate every data over http api in JSON format? without high costs in my meter housing i cant integrate a em24. a shelly e3m is possible, but i have all energy data on iobroker (generation, grid relation and grid feeding). iobroker can provide with a plugin all data over http GET in JSON format. all values of my energy meters phases shown in total.

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

Hi, erstmal top Arbeit, das erspart vielen den em24.

Mich würde interessieren ob es möglich ist, auch auf Daten von iobroker (http api) zuzugreifen? Ohne größere Umbauarbeiten am Zählerschrank (ist voll bei mir) bekomme ich kein em24 rein. Jedoch bekomme ich die Werte von Bezug, Einspeisung und Erzeugung von meinem Wechselrichter und smartmeter direkt. Diese könnten per iobroker simpleapi per http JSON zu Verfügung gestellt werden. Abtastraten ab 1 Sekunde sind dort möglich.

https://github.com/ioBroker/ioBroker.simple-api

sieht dann z.b. folgendermaßen aus:

http://192.168.2.8:8090/getPlainValue/javascript.0.Haus_Strom_Verbrauch_gesamt?json 

1158

Es wird der Bezug, Einspeisung und Eigenverbrauch saldierend anzeigt.

Vielleicht kann ich unterstützend mitwirken oder bei der Machbarkeit helfen…

fabian-lauer commented 2 years ago

Hi,

I would say that this is doable, but I have still some logical error in the script - but this is based on the Shelly 3EM logic of blanacing/sum.

I guess what you want to do is very easy in Python - you just need to call your endpoint for "every" value - may take longer, but should be ok.

I am not familiar with iobroker yet - is this structure a common one or specific for your setup? Asking, because it would make sense to implement in in a way, more people can use it....

amnesia106 commented 2 years ago

with iobroker and the simple api adapter everybody can provide any values. with iobroker you can change the variables like you want. example: when this script needs a "grid" ; "generation" or something else, every user can rename or dublicate his variable which is needed for the script. I think the most iobroker users have three values. energy generation, grid relation and feeding.

exampe i open a variable in a browser

http://192.168.2.8:8090/getPlainValue/javascript.0.Haus_Strom_Bezug_Netz?json

response is only the value of this variable

0

for each variable for example

http://192.168.2.8:8090/getPlainValue/javascript.0.Piko.Ausgangsleistung?json

4456,4447
http://192.168.2.8:8090/getPlainValue/javascript.0.Einspeisung?json

2541

the structure is common - http://ipiobrokerserver:portfromsimpleapi/getPlainValue/yourvariable?json this gives the raw output from that value without any extras

all values are in watt in my case

fabian-lauer commented 1 year ago

Closing this issue as it is more a Q&A regarding ioBroker - will move to discussion section