H4nsie / EnphaseEnvoy

Enphase Envoy with LAN interface - with individual inverters (Domoticz plugin)
7 stars 1 forks source link

Updating code for Streamer version ? #8

Open Sebastiii opened 1 year ago

Sebastiii commented 1 year ago

Hello, It's not an issue but more a request ;)

Do you think you can try to code in python to use information from URL : https://envoy.local/stream/meter ? It returns data like this :

`data: {"production":{"ph-a":{"p":1483.545,"q":172.849,"s":1491.152,"v":240.278,"i":6.321,"pf":1.0,"f":50.06},"ph-b":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0},"ph-c":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0}},"net-consumption":{"ph-a":{"p":-577.121,"q":-736.611,"s":-988.052,"v":240.19,"i":-4.114,"pf":-1.0,"f":50.06},"ph-b":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0},"ph-c":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0}},"total-consumption":{"ph-a":{"p":906.424,"q":-563.762,"s":530.09,"v":240.19,"i":2.207,"pf":1.0,"f":50.06},"ph-b":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0},"ph-c":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0}}}

data: {"production":{"ph-a":{"p":1653.099,"q":175.099,"s":1654.863,"v":240.694,"i":7.342,"pf":1.0,"f":50.0},"ph-b":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0},"ph-c":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0}},"net-consumption":{"ph-a":{"p":-750.605,"q":-744.391,"s":-1158.185,"v":240.627,"i":-4.813,"pf":-1.0,"f":50.0},"ph-b":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0},"ph-c":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0}},"total-consumption":{"ph-a":{"p":902.495,"q":-569.292,"s":608.501,"v":240.627,"i":2.529,"pf":1.0,"f":50.0},"ph-b":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0},"ph-c":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0}}}

data: {"production":{"ph-a":{"p":1877.833,"q":175.965,"s":1879.05,"v":241.009,"i":8.215,"pf":0.99,"f":50.0},"ph-b":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0},"ph-c":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0}},"net-consumption":{"ph-a":{"p":-971.186,"q":-745.045,"s":-1318.051,"v":240.948,"i":-5.47,"pf":-1.0,"f":50.06},"ph-b":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0},"ph-c":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0}},"total-consumption":{"ph-a":{"p":906.647,"q":-569.08,"s":661.407,"v":240.948,"i":2.745,"pf":1.0,"f":50.06},"ph-b":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0},"ph-c":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0}}}

data: {"production":{"ph-a":{"p":1998.835,"q":174.849,"s":2002.79,"v":241.054,"i":8.416,"pf":1.0,"f":50.06},"ph-b":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0},"ph-c":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0}},"net-consumption":{"ph-a":{"p":-1096.269,"q":-736.768,"s":-1363.369,"v":240.994,"i":-5.657,"pf":-1.0,"f":50.06},"ph-b":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0},"ph-c":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0}},"total-consumption":{"ph-a":{"p":902.566,"q":-561.919,"s":664.756,"v":240.994,"i":2.758,"pf":1.0,"f":50.06},"ph-b":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0},"ph-c":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0}}}

data: {"production":{"ph-a":{"p":2023.088,"q":173.953,"s":2029.096,"v":241.066,"i":8.419,"pf":1.0,"f":50.0},"ph-b":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0},"ph-c":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0}},"net-consumption":{"ph-a":{"p":-1127.187,"q":-730.724,"s":-1365.352,"v":241.003,"i":-5.665,"pf":-1.0,"f":50.0},"ph-b":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0},"ph-c":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0}},"total-consumption":{"ph-a":{"p":895.9,"q":-556.771,"s":663.703,"v":241.003,"i":2.754,"pf":1.0,"f":50.0},"ph-b":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0},"ph-c":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0}}}

data: {"production":{"ph-a":{"p":2023.088,"q":173.953,"s":2029.096,"v":241.066,"i":8.419,"pf":1.0,"f":50.0},"ph-b":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0},"ph-c":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0}},"net-consumption":{"ph-a":{"p":-1127.187,"q":-730.724,"s":-1365.352,"v":241.003,"i":-5.665,"pf":-1.0,"f":50.0},"ph-b":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0},"ph-c":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0}},"total-consumption":{"ph-a":{"p":895.9,"q":-556.771,"s":663.703,"v":241.003,"i":2.754,"pf":1.0,"f":50.0},"ph-b":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0},"ph-c":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0}}}

data: {"production":{"ph-a":{"p":2018.912,"q":173.704,"s":2026.211,"v":241.034,"i":8.401,"pf":0.99,"f":50.06},"ph-b":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0},"ph-c":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0}},"net-consumption":{"ph-a":{"p":-1123.613,"q":-728.906,"s":-1360.483,"v":240.946,"i":-5.646,"pf":-1.0,"f":50.06},"ph-b":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0},"ph-c":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0}},"total-consumption":{"ph-a":{"p":895.299,"q":-555.203,"s":663.762,"v":240.946,"i":2.755,"pf":1.0,"f":50.06},"ph-b":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0},"ph-c":{"p":0.0,"q":0.0,"s":0.0,"v":0.0,"i":0.0,"pf":0.0,"f":0.0}}}`

So it's not related to inverter, but it's for Production/ Consumption / Net-Consumption Thanks.