You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My Enphase Envoy API returns the following at the URL http://{{ .host }}/production.json: {"production":[{"type":"inverters","activeCount":22,"readingTime":1734616504,"wNow":207,"whLifetime":6787031}],"storage":[{"type":"acb","activeCount":0,"readingTime":0,"wNow":0,"whNow":0,"state":"idle"}]}
jq: if .production[] | select(.measurementType == "production").activeCount >= 1 then .production[] | select(.measurementType == "production").wNow else .production[] | select(.type == "inverters").wNow end
does not return anything.
(.production[] | select(.measurementType == "production").wNow) // (.production[] | select(.type == "inverters").wNow) does work for me but I don't have an instance that returns measurementType so I can't be sure if the jq is correct. It's probably missing the activeCount check.
I see. Assumption was that the key are universal, but it seems that they are not. We need to check if they exist before we use them. I'll try to work on this today. @othi does production.json?details=1 return different set of keys? I see you are using http, and not https, so you have an older firmware too (not using tokens for auth)?
Describe the bug
My Enphase Envoy API returns the following at the URL
http://{{ .host }}/production.json
:{"production":[{"type":"inverters","activeCount":22,"readingTime":1734616504,"wNow":207,"whLifetime":6787031}],"storage":[{"type":"acb","activeCount":0,"readingTime":0,"wNow":0,"whNow":0,"state":"idle"}]}
The jq query as defined here
evcc/templates/definition/meter/enphase.yaml
Line 44 in e33a682
(.production[] | select(.measurementType == "production").wNow) // (.production[] | select(.type == "inverters").wNow)
does work for me but I don't have an instance that returnsmeasurementType
so I can't be sure if the jq is correct. It's probably missing theactiveCount
check.The same is true for
evcc/templates/definition/meter/enphase.yaml
Line 54 in e33a682
wNow
withwhLifetime
Steps to reproduce
Configuration details
Log details
What type of operating system are you running?
HomeAssistant Add-on
Nightly build
Version
0.131.12
The text was updated successfully, but these errors were encountered: