amsreader-firmware
amsreader-firmware copied to clipboard
Daily power array zeroing not correct Kamstrup meter
Daily power has an hourly spike as the array needs to be zeroed for hour +1
Code mod needed:
AmsDataStorage.cpp
utc.Hour needs to be +1:
else { if(debugger->isActive(RemoteDebug::DEBUG)) { debugger->printf("(AmsDataStorage) Last day update: %lld\n", (int64_t) day.lastMeterReadTime); } tmElements_t last; breakTime(day.lastMeterReadTime, last); for(int i = last.Hour; i < (utc.Hour + 1) ; i++) { if(debugger->isActive(RemoteDebug::VERBOSE)) { debugger->printf("(AmsDataStorage) Clearing hour: %d\n", i); } setHourImport(i, 0); setHourExport(i, 0); } }
Did you actually fix it by doing that? I am assuming you are using realtime/import/day from mqtt?
Did you actually fix it by doing that? I am assuming you are using realtime/import/day from mqtt?
Yes it fixed it. I have modded the hass mqtt to give me the day and month stats.
I am unable to reproduce your problem with my meter. Your proposed fix also removes a bar from the day graph. I have a different approach I expect to work for you. Firmware attached. esp32.zip esp32s2.zip esp8266.zip
Fix included in v2.1.6