jomjol / AI-on-the-edge-device

Easy to use device for connecting "old" measuring units (water, power, gas, ...) to the digital world
https://jomjol.github.io/AI-on-the-edge-device-docs/
6.05k stars 653 forks source link

Add optional termination condition when alignment markers are not discovered #3389

Open detzen opened 1 week ago

detzen commented 1 week ago

The Feature

Hello, I have a new digital watermeter which shows the water consumption as m³ with 3 decimal places on its display per default. Approximately every 3 minutes, the device starts a sequence in which the firmware status, display test, daily statistics, weekly statistics and a few other things are shown on one after another. For more details, please see discussion #3382.

As described in the mentioned discussion, I choosed aligment markers which only appear during the display test and the display of the current counter reading, because I initially thought, that digit detection will only take place when those markers are detected. But unfortunately, this is actually not the case and I have to deal with incorrectly recognized digits, when the picture has been taken at a time where e.g. the weekly stats are displayed.

I think the described problem could be solved (or prevented), if there would be a configuration option for a termination condition like "Don't try to detect digits, when alignment markers were not recognized". In addition to false detections, such an option would also save CPU cycles on the ESP.

SybexX commented 6 days ago

here's something to test if you feel like it: AI-on-the-edge-deviceupdatetest_(32d2fbb).zip (based on version 16.0.0-RC4)

detzen commented 6 days ago

I installed the modified firmware and as I can tell so far, it's working as desired. I'll continue to monitor it. Is there a way to access your code to keep track what has been modified? Or will you raise a pull-request to implement it in a future release?

pidator commented 4 days ago

Great idea! It'll also prevent wrong meter readings through e.g. shifted esp holder. Hope it will make it in the next release ;)