-
Notifications
You must be signed in to change notification settings - Fork 667
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect Negative rate error reported #2744
Comments
Raw: 149.5651 will compared to the last round value (PRE) 149.5652. And so it's a negative rate. Depending on light and model sometimes the AI recognizes in different rounds different digits. In this case 1 and 2. In most times I can live with it. @Slider0007 @jomjol : What do you mean. A small fix like in extendedResolution on +/-1? And using the the highest value? |
@haverland: I totally agree to make this less sensitive in terms of error logging. |
I think it depends on the number transition. Here from the dataset: We see only 149.565 1 and 149.565 2 but it could a real rate change or the last was a totally false predicted value. Do you agree? |
@jasonkaisersmith if you set extendedResolution=true, it could be fixed for you and you get a digit more in the value, because it reads the tenth steps too. |
* not extended resolution allows -1 on the lowest digit * not extended resolution allows -1 on the lowest number * negatives on last value digit with -1 will set to prevalue and is not an error #2744 --------- Co-authored-by: jomjol <[email protected]>
I have tried this, but I still get the same problem! |
@jasonkaisersmith could you test the current rolling? A fix for extended resolution = false is now merged. |
unnecessary calculation/comparison components/jomjol_flowcontroll/ClassFlowPostProcessing.cppbool ClassFlowPostProcessing::doFlow(string zwtime), at lines 1022 to 1024 changed from: // Include inaccuracy of 0.2 for isExtendedResolution.
if ((NUMBERS[j]->Value >= (NUMBERS[j]->PreValue-(2/pow(10, NUMBERS[j]->Nachkomma))) && NUMBERS[j]->isExtendedResolution)
// not extended resolution allows -1 on the lowest digit
|| (NUMBERS[j]->Value >= (NUMBERS[j]->PreValue-(1/pow(10, NUMBERS[j]->Nachkomma))) && !NUMBERS[j]->isExtendedResolution)) { to: // Include inaccuracy of 0.2 for isExtendedResolution.
if ((NUMBERS[j]->Value >= (NUMBERS[j]->PreValue - (2 / pow(10, NUMBERS[j]->Nachkomma))) && NUMBERS[j]->isExtendedResolution))
{ or: // Include inaccuracy of 0.1 for isExtendedResolution.
if ((NUMBERS[j]->Value >= (NUMBERS[j]->PreValue - (1 / pow(10, NUMBERS[j]->Nachkomma))) && NUMBERS[j]->isExtendedResolution))
{ |
components/jomjol_flowcontroll/ClassFlowPostProcessing.cppbool ClassFlowPostProcessing::doFlow(string zwtime), from line 1018 ------->if (!NUMBERS[j]->AllowNegativeRates)
{
LogFile.WriteToFile(ESP_LOG_DEBUG, TAG, "handleAllowNegativeRate for device: " + NUMBERS[j]->name);
if ((NUMBERS[j]->Value < NUMBERS[j]->PreValue))
{ shouldn't it be like this: ------->if (NUMBERS[j]->AllowNegativeRates)
{
LogFile.WriteToFile(ESP_LOG_DEBUG, TAG, "handleAllowNegativeRate for device: " + NUMBERS[j]->name);
if ((NUMBERS[j]->Value < NUMBERS[j]->PreValue))
{ |
Hi, I still have the same problem with the 15.4 release. Attached are the logs entries. |
Why I used two different comparisons? In extendedResolution=true, we get on the lowest digit a tenth step to. Means the analog pointer is 1.3 the 1.3 will be used. Because of the model inaccuracies of +/-0.2 we using in extendedResolution=true the 2/pow .. Means 1.1-1.3 is fine. |
Your logs suggest that you did not have a successful value directly after rebooting. First set the PRE value back to the current value and wait. I also need the last successful run in the log. |
ah I just looked at the difference 1/ and 2/ and missed NUMBERS[j]->isExtendedResolution and !NUMBERS[j]->isExtendedResolution at the end ^^ |
Ok, I have tried again. Attached is the log file, and the data file. WaterMeterLogs.txt Also, unrelated but still an issue, I have this morning a problem reading the log file for today, and have this message. [0d13h34m35s] 2024-01-05T07:29:23 [OTA FILE] Failed to read file: /sdcard/log/message/log_2024-01-05.txt! In the meantime I will try a reboot. |
"if (!NUMBERS[j]->AllowNegativeRates)" is exactly the opposite of what it is supposed to do, if you set AllowNegativeRates=true there should be no "negative rate" errors. But I don't know if it affects other things. |
@jasonkaisersmith a tip from me, put the second alignment mark in a different place, |
A look in the data-log shows, that you have sometimes problems with the third analog ROI:
Look. The others are not changed, but the third value changed totally. Means here we have a false recognition. So @SybexX tip is a good choice. Use for alignment marks only really sharp areas. You can try to reduce the reflections nearby the third ROI with dark tape around it. And the tips from @SybexX with reduced lightning and more contrast in the configuration are also good. And at least you can try another model ana-cont/ana-class100. |
Could you show your config-file (config/config.ini). May be the order of the ROIs are not correct:
|
[Analog] But they won't be of any use to you, since the coordinates depend on the positioning of the camera. |
Ok, so I have tried the suggestions you have all made, with regards to new markers, reducing lighting, increasing contrast etc. I have also realigned all the ROI points again as I also noticed the angle was very slightly off. I will now try with some tape as you suggest. I see a reflection more around analogue point 2 rather than 3 (see picture attachment) Data from latest error |
See attached for my config. |
In order to get the reflection into an area where it wouldn't be disturbing, I had to turn the camera 180°. |
I have also tried that, but no matter how I turn it, it always covers up some of the ROIs, either analog or digital! I am also limited how much I can turn it do to physical limitations on how it is placed. I have now turned it slightly to reduce the reflection, reduced the lighting as much as possible, applied tape (although it is somewhat glossy and reflective!), and improved the sharpness. But now I know what the problem could be, If this doesn't work, I will try other things over the next few days. Thanks. |
The pointer are in the right order. So it can only be the alignment is incorrect. I had in early tries the same issue and stored the full raw image. So I was able to identify if the alignment works correctly or not: If an error occurs a few seconds before the whole image was stored. |
* update * Revert "v15.4.0" This reverts commit 74d4f20. * Revert "prepare v15.4.0 versuch 2" This reverts commit e790a14. * revert submnodules (#2768) Co-authored-by: CaCO3 <[email protected]> * Update submodules (#2769) - Update `esp-nn` to v1.0.2 - Update `esp32-camera` to v2.0.6 - Updated `tflite-micro-esp-examples` (The repo got renamed to `esp-tflite-micro ` and the folder structure got cleaned up). * fix(unity-test): Run unity tests in dedicated task Avoid running out of heap * Add delay * Update * Update * Enhance busy notification (#2774) * on marker updating, show message and retry until round got completed * same for contrast enhancement --------- Co-authored-by: CaCO3 <[email protected]> * Fix negatives on extended resolution false #2744 (#2772) * not extended resolution allows -1 on the lowest digit * not extended resolution allows -1 on the lowest number * negatives on last value digit with -1 will set to prevalue and is not an error #2744 --------- Co-authored-by: jomjol <[email protected]> * Implemented late analog / digital transition (#2778) * Implemented late transition Complete rewrite of analog / digital transition Two tests is still failing, which need to be discussed. * Allow wider range of transition values to support late transition * Added documentation * Fix testings (#2783) * fix all tests and more description * The decimal point offset. -3 corresponds to x.yyy --------- Co-authored-by: jomjol <[email protected]> * Bugfix InfluxDB shifting times (#2785) * Modify time_sntp * Update time_sntp.cpp * Update time_sntp.cpp * update * Update interface_influxdb.cpp * Update interface_influxdb.cpp * Update time_sntp.cpp * Upload * Update interface_influxdb.cpp * Update interface_influxdb.cpp * Update interface_influxdb.cpp * Remove Time Convert vom influx Interface * Update platform-espressif32 to 6.5.0 (#2770) * Update ESP IDF to 6.5.0 * Migration to new IDF * Correct smtp vor v5.1 --------- Co-authored-by: CaCO3 <[email protected]> Co-authored-by: jomjol <[email protected]> * ATA-Trim support (#2781) * Add files via upload * Update main.cpp * Update main.cpp * Update main.cpp * Update Helper.cpp * Update Helper.h * Update CMakeLists.txt * Update CMakeLists.txt * Update diskio_sdmmc_mh.c * Update diskio_sdmmc_mh.h * Update ff_mh.c * Update vfs_fat_sdmmc_mh.c * Update sdmmc_common_mh.h * Update sdmmc_common_mh.c * Update Helper.cpp * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update ff_mh.c --------- Co-authored-by: CaCO3 <[email protected]> * Update Changelog.md * Add device info info page (#2789) Signed-off-by: Florian Grabmeier <[email protected]> * fix chip information REST API * Update pipelines to fix warnings (#2841) Update actions * Move param doc (#2843) moved param doc from docs repo to here * fix(tflite): Fix memory leaks in tflite integration (#2842) * Update Changelog.md (#2849) --------- Signed-off-by: Florian Grabmeier <[email protected]> Co-authored-by: jomjol <[email protected]> Co-authored-by: CaCO3 <[email protected]> Co-authored-by: Slider0007 <[email protected]> Co-authored-by: Frank Haverland <[email protected]> Co-authored-by: Martin Siggel <[email protected]> Co-authored-by: michael <[email protected]> Co-authored-by: flox_x <[email protected]> Co-authored-by: Slider0007 <[email protected]>
* update * Revert "v15.4.0" This reverts commit 74d4f20. * Revert "prepare v15.4.0 versuch 2" This reverts commit e790a14. * revert submnodules (#2768) * Update submodules (#2769) - Update `esp-nn` to v1.0.2 - Update `esp32-camera` to v2.0.6 - Updated `tflite-micro-esp-examples` (The repo got renamed to `esp-tflite-micro ` and the folder structure got cleaned up). * fix(unity-test): Run unity tests in dedicated task Avoid running out of heap * Add delay * Update * Update * Enhance busy notification (#2774) * on marker updating, show message and retry until round got completed * same for contrast enhancement --------- * Fix negatives on extended resolution false #2744 (#2772) * not extended resolution allows -1 on the lowest digit * not extended resolution allows -1 on the lowest number * negatives on last value digit with -1 will set to prevalue and is not an error #2744 --------- * Implemented late analog / digital transition (#2778) * Implemented late transition Complete rewrite of analog / digital transition Two tests is still failing, which need to be discussed. * Allow wider range of transition values to support late transition * Added documentation * Fix testings (#2783) * fix all tests and more description * The decimal point offset. -3 corresponds to x.yyy --------- * Bugfix InfluxDB shifting times (#2785) * Modify time_sntp * Update time_sntp.cpp * Update time_sntp.cpp * update * Update interface_influxdb.cpp * Update interface_influxdb.cpp * Update time_sntp.cpp * Upload * Update interface_influxdb.cpp * Update interface_influxdb.cpp * Update interface_influxdb.cpp * Remove Time Convert vom influx Interface * Update platform-espressif32 to 6.5.0 (#2770) * Update ESP IDF to 6.5.0 * Migration to new IDF * Correct smtp vor v5.1 --------- * ATA-Trim support (#2781) * Add files via upload * Update main.cpp * Update main.cpp * Update main.cpp * Update Helper.cpp * Update Helper.h * Update CMakeLists.txt * Update CMakeLists.txt * Update diskio_sdmmc_mh.c * Update diskio_sdmmc_mh.h * Update ff_mh.c * Update vfs_fat_sdmmc_mh.c * Update sdmmc_common_mh.h * Update sdmmc_common_mh.c * Update Helper.cpp * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update ff_mh.c --------- * Update Changelog.md * Add device info info page (#2789) * fix chip information REST API * Update pipelines to fix warnings (#2841) Update actions * Move param doc (#2843) moved param doc from docs repo to here * fix(tflite): Fix memory leaks in tflite integration (#2842) * Update Changelog.md (#2849) --------- Signed-off-by: Florian Grabmeier <[email protected]> Co-authored-by: jomjol <[email protected]> Co-authored-by: CaCO3 <[email protected]> Co-authored-by: Slider0007 <[email protected]> Co-authored-by: Frank Haverland <[email protected]> Co-authored-by: Martin Siggel <[email protected]> Co-authored-by: michael <[email protected]> Co-authored-by: flox_x <[email protected]> Co-authored-by: Slider0007 <[email protected]>
I'm also experiencing this problem with the latest version 15.7. I'm using the dig-class11 model with only integers. The OCR works well and since switching to this model, I've never had problems with wrongly identified digits.
I since then dropped the leading "0" in case this might create problems and have no results yet, but still, this shouldn't create an error. Is the accuracy for this difference not high enough? |
The Problem
The device is reporting a negative rate and the values read are incorrect. The current actual value are higher than reported.
I tried to reboot, but it had no impact.
I manually set the current value. The device appeared to work again, but shortly afterwards the same problem occured again.
I attach the log files from the past two days, and a picture of the current image.
Version
15.3.0
Logfile
Expected Behavior
No response
Screenshots
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: