Hey everyone, I’ve been diving into integrating my Enphase Envoy solar system with Home Assistant, but I’m hitting a snag with the JSON readings. Let me walk you through my experience and see if anyone else has encountered this or has some insights to share!
So, here’s the deal: when I added my Enphase Envoy to HA, the power consumption and production readings were off. Specifically, today’s power consumption showed up as negative (-5.29), and the production was also negative, with a total production of zero. That’s definitely not right! I noticed that if I add all inverters as separate sensors, the production readings come through correctly. So, it seems like HA is pulling the wrong data from the JSON file.
Looking at the JSON structure, under the ‘production’ header, there are two entries: one for ‘inverters’ and another for ‘EIM’. The ‘inverters’ entry shows a positive wNow of 109 and a lifetime of 3,081,204. However, the ‘EIM’ entry has a negative wNow of -5.29 and a lifetime of 0. It appears that HA is mistakenly reading the EIM field instead of the inverters field for production data. That’s where the issue lies!
I’ve tried adjusting the configuration and verifying the JSON structure, but I’m still not getting the expected results. Has anyone else faced this problem? Or perhaps you’ve encountered a similar issue with JSON parsing in HA and found a workaround? Any tips or solutions would be greatly appreciated!
To give a bit more context, here’s the JSON snippet I’m working with:
{
“production”: [
{
“type”: “inverters”,
“activeCount”: 12,
“readingTime”: 1572881147,
“wNow”: 109,
“whLifetime”: 3081204
},
{
“type”: “eim”,
“activeCount”: 0,
“measurementType”: “production”,
“readingTime”: 1572881198,
“wNow”: -5.29,
“whLifetime”: 0.0,
“varhLeadLifetime”: 0.0,
“varhLagLifetime”: 0.0,
“vahLifetime”: 0.0,
“rmsCurrent”: 0.285,
“rmsVoltage”: 242.249,
“reactPwr”: 0.162,
“apprntPwr”: 36.847,
“pwrFactor”: -0.19,
“whToday”: 0.0,
“whLastSevenDays”: 0.0,
“vahToday”: 0.0,
“varhLeadToday”: 0.0,
“varhLagToday”: 0.0
}
],
“consumption”: [
{
“type”: “eim”,
“activeCount”: 0,
“measurementType”: “total-consumption”,
“readingTime”: 1572881198,
“wNow”: -16.119,
“whLifetime”: 0.0,
“varhLeadLifetime”: 0.0,
“varhLagLifetime”: 0.0,
“vahLifetime”: 0.0,
“rmsCurrent”: -0.067,
“rmsVoltage”: 242.651,
“reactPwr”: -0.162,
“apprntPwr”: -16.243,
“pwrFactor”: -1.0,
“whToday”: 0.0,
“whLastSevenDays”: 0.0,
“vahToday”: 0.0,
“varhLeadToday”: 0.0,
“varhLagToday”: 0.0
},
{
“type”: “eim”,
“activeCount”: 0,
“measurementType”: “net-consumption”,
“readingTime”: 1572881198,
“wNow”: -10.829,
“whLifetime”: 0.0,
“varhLeadLifetime”: 0.0,
“varhLagLifetime”: 0.0,
“vahLifetime”: 0.0,
“rmsCurrent”: 0.352,
“rmsVoltage”: 243.052,
“reactPwr”: 0.0,
“apprntPwr”: 45.295,
“pwrFactor”: -0.35,
“whToday”: 0,
“whLastSevenDays”: 0,
“vahToday”: 0,
“varhLeadToday”: 0,
“varhLagToday”: 0
}
],
“storage”: [
{
“type”: “acb”,
“activeCount”: 0,
“readingTime”: 0,
“wNow”: 0,
“whNow”: 0,
“state”: “idle”
}
]
}
From what I can gather, HA is mistakenly pulling the ‘wNow’ value from the EIM section instead of the inverters. This is causing the negative readings, which don’t make sense in this context. I’ve tried tweaking the configuration to point HA to the correct field, but without success so far.
I’d love to hear if anyone has a workaround or a fix for this. Maybe there’s a way to adjust the JSON parsing or modify the configuration to ensure HA reads the correct production field. Any advice or shared experiences would be incredibly helpful!
Thanks in advance for your insights and support! Let’s crack this together! ![]()