Picking up yesterday's cumulative energy figure

I’ve recently switched to using a Pi to bluetooth to my SMA inverter and upload to PVOutput using a script. The script runs on a cron job which doesn’t run during hours of darkness. Most days it works perfectly such as yesterday


but on other days, like today, it erroneously starts the day with yesterday’s cumulative power

It’s quite irritating & I’d really welcome any suggestions as to how to fix. Many thanks in advance
Jeremy

The script should be modified to not pass energy during moonlight.

Otherwise remove energy completely from the upload by always sending v1=-1 and it will be calculated on PVOutput.

Thank you bankstownbloke
The script runs daylight only. I’ve edited it with v=-1 as you suggest and at least today it has started up as it should. I’ll report back if I have further problems but I’m hopeful that has fixed it
Many thanks
Jeremy