Database repair (utility meter totals)
Posted: Thursday 17 April 2025 14:22
Version: 2024.7 (SjoerdNLD build)
Platform: Pi B+
OS: Buster Lite
Hardware: MQTT LAN interface, Enphase Envoy, 1wire (owfs)
Something in my system suffered a brain fart yesterday afternoon. Below is an extract from my nightly Domoticz database backup, ID 50 is my solar production, at 15:20 it almost doubled in 5 minutes.
50 7099466 14460 2025-04-16 15:10:01 0.0
50 7099591 13730 2025-04-16 15:15:01 0.0
50 7099699 15490 2025-04-16 15:20:00 0.0
50 14199380 14400 2025-04-16 15:25:01 0.0
50 14199496 13850 2025-04-16 15:30:01 0.0
50 14199622 13330 2025-04-16 15:35:01 0.0
I'm not blaming Domoticz here, it could equally have been my Envoy or a network gremlin. Right now my Enphase Envoy is reporting on api/v1/production:
Domoticz is still reporting ~7 megawatt hours ahead. It's the first time it's happened in 5 years of having solar PV so I'm not fussed about what happened, I don't have evidence to point fingers in any case. I just need to fix my data.
In Influx I can just overwrite the bad values with corrected ones at the matching timestamp. But I need to correct the Domoticz database too. If I stop domoticz, correct the bad values and restart it will I break anything? Are there checksums on the data I'd also have to correct for example?
Thanks
Sumdum
Platform: Pi B+
OS: Buster Lite
Hardware: MQTT LAN interface, Enphase Envoy, 1wire (owfs)
Something in my system suffered a brain fart yesterday afternoon. Below is an extract from my nightly Domoticz database backup, ID 50 is my solar production, at 15:20 it almost doubled in 5 minutes.
50 7099466 14460 2025-04-16 15:10:01 0.0
50 7099591 13730 2025-04-16 15:15:01 0.0
50 7099699 15490 2025-04-16 15:20:00 0.0
50 14199380 14400 2025-04-16 15:25:01 0.0
50 14199496 13850 2025-04-16 15:30:01 0.0
50 14199622 13330 2025-04-16 15:35:01 0.0
I'm not blaming Domoticz here, it could equally have been my Envoy or a network gremlin. Right now my Enphase Envoy is reporting on api/v1/production:
Code: Select all
{
"wattHoursToday": 7334,
"wattHoursSevenDays": 83388,
"wattHoursLifetime": 7109139,
"wattsNow": 1083
}
In Influx I can just overwrite the bad values with corrected ones at the matching timestamp. But I need to correct the Domoticz database too. If I stop domoticz, correct the bad values and restart it will I break anything? Are there checksums on the data I'd also have to correct for example?
Thanks
Sumdum