PVOutput strange 'energy used' behaviour since 21-05-2023

I sent my values from homeassistant with the following script:

*'curl -d “d={{now().strftime(”%Y%m%d")}}" -d “t={{now().strftime(”%H:%M")}}" -d “v1={{((states.sensor.sma_energy_production_daily.state|float)*1000)|round(0)}}” -d “v2={{states.sensor.sma_ac_power.state|round(0)}}” -d "v3={{((states.sensor.consumptie_energie_huidige_dag.state|float)1000)|round(0)}}" -d “v4={{states.sensor.consumptie_vermogen_totaal.state|round(0)}}” -d “v5={{states.sensor.buiten_temperatuur.state|round(1)}}” -d “v6={{states.sensor.shelly_meterkast_energy_voltage.state|round(1)}}” -d “v7={{states.sensor.buienradar_irradiance.state|round(3)}}” -d “v9={{states.sensor.sma_temperature.state|round(1)}}” -d “c1=0” -H “X-Pvoutput-Apikey: xxxx” -H “X-Pvoutput-SystemId: 12345” https://pvoutput.org/service/r2/addstatus.jsp

This translates to:

‘curl -d “d=20230527” -d “t=09:39” -d “v1=1579” -d “v2=1235” -d “v3=13317” -d “v4=1319” -d “v5=14.8” -d “v6=234.6” -d “v7=442.0” -d “v9=23.8” -d “c1=0” -H “X-Pvoutput-Apikey: xxxxxxxx” -H “X-Pvoutput-SystemId: 12345” https://pvoutput.org/service/r2/addstatus.jsp

The script is executed every 4 minutes.

For the value v3 which should be energy used is already a value of 31044 since midnight in pvoutput’s database, so the lower value of 13317 wil not be shown. I have no idea where this initial value comes from. It’s not the last value of the previous day, it seems random. My values in homeassistant are reset to zero every midnight therefor I have c1=0.

It worked perfectly until 21-5-2023 and didn’t change any configuration.

My graph look like this:

From the previous day, it looks like this:

Does anyone recognise this behaviour? Is it a bug? Misconfiguration?

Strange thing. After several hours, leaving my browser open. The graph changes like this:

In the data I see one wrong value at 0:05:

After refreshing my browser:

Hi @arnobroeders is there a reason why your script is scheduled to run every FOUR minutes?

According to API Specification — PVOutput documentation

The Add Status service accepts live output data at the Status Interval (5 to 15 minutes) configured for the system.

As there are [ obviously ] more 4 minute intervals than 5 minute intervals in a 24 hour period your data will tend to drift in and out of synch with PVO as the received data may or may not overwrite previously sent data. I realise that this doesn’t explain why your setup worked before 21MAY2023 but it may be a step in working out what’s going on.

Grannos.

1 Like

Hi grannos, I used to have the interval at 5 minutes way back… I can’t recall what problem i had at that time, but the 4 minutes interval solved it at that time. Now I set it back to 5 minutes, I’ll see tomorrow if it helps. Good suggestion.

Problem solved. I still don’t know what change made things go wrong, but manually resetting the daily counters at 23:59:59 in homeassistant in stead of midnight solves the problem.

Hi @arnobroeders. I’m glad that you solved the problem. Thanks for the feedback.

The script may be sending the ending energy value of the previous day for the current day at time 00:00. By resetting to 0 earlier seems to ensure that it starts at 0 before the new day.