Open doits opened 5 months ago
What version of the envoy firmware do you use? Having this json is usefull to map it to the openHAB domain with channels and such.
Do you know what encharge_capacity means?
What version of the envoy firmware do you use?
D7.6.358
Do you know what encharge_capacity means?
I think this is the storage capacity: 3.5kWh in this case.
I switched to /ivp/livedata/status
and parsing the json output to monitor the battery though. There I get the current storage level and percent of the battery (and the current live values of the meters, too).
Can you share that JSON? I might try to build something this evening or tomorrow
Sure, the important bits look like this:
{
"meters": {
"last_update": 1722325974,
"soc": 100,
"enc_agg_soc": 100,
"enc_agg_energy": 10500,
"acb_agg_soc": 0,
"acb_agg_energy": 0,
"pv": {
"agg_p_mw": 1248663,
"agg_s_mva": 1978937,
"agg_p_ph_a_mw": 414719,
"agg_p_ph_b_mw": 418743,
"agg_p_ph_c_mw": 415201,
"agg_s_ph_a_mva": 640268,
"agg_s_ph_b_mva": 668520,
"agg_s_ph_c_mva": 670149
},
"storage": {
"agg_p_mw": 19000,
"agg_s_mva": 19000,
"agg_p_ph_a_mw": 19000,
"agg_p_ph_b_mw": 0,
"agg_p_ph_c_mw": 0,
"agg_s_ph_a_mva": 19000,
"agg_s_ph_b_mva": 0,
"agg_s_ph_c_mva": 0
},
"grid": {
"agg_p_mw": 41979,
"agg_s_mva": 382063,
"agg_p_ph_a_mw": 142328,
"agg_p_ph_b_mw": -251883,
"agg_p_ph_c_mw": 151533,
"agg_s_ph_a_mva": 503622,
"agg_s_ph_b_mva": -678988,
"agg_s_ph_c_mva": 557427
},
"load": {
"agg_p_mw": 1309642,
"agg_s_mva": 2380000,
"agg_p_ph_a_mw": 576047,
"agg_p_ph_b_mw": 166860,
"agg_p_ph_c_mw": 566734,
"agg_s_ph_a_mva": 1162890,
"agg_s_ph_b_mva": -10468,
"agg_s_ph_c_mva": 1227576
}
}
}
Currently I only monitor:
meters.{pv,storage,grid,load}.agg_p_mw
: Power of {pv,storage,grid,load} (mW)meters.enc_agg_soc
: Storage level of batteries (percent)meters.enc_agg_energy
: Storage level of batteries (Wh)To monitor it, you have to activate it every 15 minutes though, by POSTing '{"enable":1}'
to /ivp/livedata/stream
. And you need a bearer token, which you have to get from https://entrez.enphaseenergy.com/tokens
. It is described at enhpase in this pdf on page 5.
My box is on older firmware and /ivp/ensemble/inventory
gives 404. Same for /ivp/livedata/status
Getting a token from the cloud is adding dependency to a remote connection. To be honest; not sure if i want to code all that for a device that i don't use. If it was just grabbing the json from a local api and mapping it to openHAB channels i would be fine. Not saying i won;t but im to time cosntraint now to pick this up.
I see it is possible to monitor the envoy, inverters and relays with the enhpase addon. Could it be possible to monitor betteries, too?
I can get the data from the local API at
/ivp/ensemble/inventory
, which returns an array like this:A lot of information is visible, though I guess the most important is:
What is missing is the current power rate (watts pulling or pushing to the grid), not sure where to get this from.
Would this be a good addition? Or is there another endpoint to query?