Home Assistant Polling Data Rate

Hello everyone,

I want to increase the update rate of Home Assistant so that the grid import/export data can be sent to my Electric Vehicle charger every second, so the charger maximises the use of electricity I produce.

My setup consists of an Enphase solar system and an OpenEVSE EV charger. HA receives the grid import and grid export values, then sends the grid import/export power via MQTT to the OpenEVSE charger.

The problem is that HA only updates every minute, whereas the Enphase Envoy (Solar PV controller) updates every second. The OpenEVSE charger can receive information every second.

How do I change HA to update the data every second?

Alternatively, how do I scrape the JSON data (see below) and send it out as an MQTT stream every second? Ideally I would actually use the “consumption”/“measurementType”:“net-consumption”/“wNow” variable.

From http://envoy/production.json:

{
“production”:
[
{
“type”:“inverters”,
“activeCount”:23,
“readingTime”:1681078932,
“wNow”:3609,
“whLifetime”:14450825
},
{
“type”:“eim”,“activeCount”:1,
“measurementType”:“production”,
“readingTime”:1681079067,
“wNow”:3789.698,
“whLifetime”:14572341.061,
“varhLeadLifetime”:5786.21,
“varhLagLifetime”:2546716.172,
“vahLifetime”:16710712.723,
“rmsCurrent”:16.057,
“rmsVoltage”:236.091,
“reactPwr”:12.148,
“apprntPwr”:3789.698,
“pwrFactor”:1.0,
“whToday”:3732.061,
“whLastSevenDays”:238770.061,
“vahToday”:6186.723,
“varhLeadToday”:0.21,
“varhLagToday”:2602.172
}
],
“consumption”:
[
{
“type”:“eim”,
“activeCount”:1,
“measurementType”:“total-consumption”,
“readingTime”:1681079067,
“wNow”:191.058,
“whLifetime”:6903830.667,
“varhLeadLifetime”:6472451.451,
“varhLagLifetime”:2547069.999,
“vahLifetime”:20542062.469,
“rmsCurrent”:0.733,
“rmsVoltage”:236.043,
“reactPwr”:-456.731,
“apprntPwr”:173.132,
“pwrFactor”:1.0,
“whToday”:1165.667,
“whLastSevenDays”:136869.667,
“vahToday”:9331.469,
“varhLeadToday”:6462.451,
“varhLagToday”:2601.999
},
{
“type”:“eim”,“activeCount”:1,
“measurementType”:“net-consumption”,
“readingTime”:1681079067,
“wNow”:-3598.64, ******* I want this value *******
“whLifetime”:4642823.623,
“varhLeadLifetime”:6466665.241,
“varhLagLifetime”:353.827,
“vahLifetime”:20542062.469,
“rmsCurrent”:15.324,
“rmsVoltage”:235.995,
“reactPwr”:-444.583,
“apprntPwr”:3613.082,
“pwrFactor”:-1.0,
“whToday”:0,
“whLastSevenDays”:0,
“vahToday”:0,
“varhLeadToday”:0,
“varhLagToday”:0
}
],
“storage”:
[
{
“type”:“acb”,
“activeCount”:0,
“readingTime”:0,
“wNow”:0,
“whNow”:0,
“state”:“idle”
}
]
}

1 Like