No values in API response
Closed this issue · 8 comments
Since December 16th and with v1.4.1 I get this error:
No values in API response! This likely indicates an API error. Original response: {'optIn': True, 'consumptionAverage': 0, 'consumptionMinimum': 0, 'consumptionMaximum': 0}
Anyone else seeing this? @DarwinsBuddy Has the API changed once more?
There are values in the WN Dashboard...
as I changed it on the weekend I got back the right values. I guess I've to again get rid of calls to /verbrauchRaw
in favor of /verbrauch
as it's not reliable.
I hope I get to it this week. maybe even today
i have the problem too!
Looks like the update is not working for a lot of people. Has anyone tested reverting to the previous release?
I think I see the problem. The endpoint returns no values
key when there is no data - before that meant something is wrong. now this just means, that there is no data yet.
Removing the return from _import_statistics
should fix it.
I'm testing this right now!
huh, why do I only get daily data now?! Okay, so something else has changed too :/
However, the import is working again in principle ^^
ahh okay - the issue is the verbrauchRaw
endpoint cannot handle hourly data. That one is only used to get daily consumptions.
At least that is how it works on the dashboard.
There is even a (hacky) way to remove statistics and re-import hourly ones (might also be a trick for later...)
with SQLite Web installed, first query the metadata_id of the statistics sensor, by looking into the date statistics_meta
. Mine was 49. Then delete all statistics data starting from some timestamp:
delete FROM "statistics" where metadata_id = 49 and start_ts >= 1702508400;
but you better have a backup before you do this ;)