Skip to content
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

MQTT Uptime and rate odd for a moment after restart #1658

Closed
TopGoalVl opened this issue Dec 21, 2022 · 8 comments
Closed

MQTT Uptime and rate odd for a moment after restart #1658

TopGoalVl opened this issue Dec 21, 2022 · 8 comments

Comments

@TopGoalVl
Copy link

The Problem

I think that the reported bugs do not affect the essential functions of the system.

1. MQTT data point "uptime" STARTS/BEGINS with negativ values after OTA update and auto reboot
2. After a reboot (auto or manuell), the fist rate value is negativ (-0.000002). Is that correct?

See log files (extract).

Version

Release: v13.0.8 (Commit: 04f2f23+), 2022-12-19 20:41

Logfile

Message Log (debug level, extract):
===================================

===> MQTT data point "uptime" STARTS/BEGINS with negativ values after OTA update and auto reboot <===
[0d00h00m34s] 2022-12-20T20:06:10 <DBG> [MQTT IF] Published topic: LeupoldsPub/Wasserzähler/uptime, content: -2727 (msg_id=6)
[0d00h01m13s] 2022-12-20T20:06:49 <DBG> [MQTT IF] Published topic: LeupoldsPub/Wasserzähler/uptime, content: -2688 (msg_id=16)
[0d00h34m59s] 2022-12-20T20:40:36 <DBG> [MQTT IF] Published topic: LeupoldsPub/Wasserzähler/uptime, content: -661 (msg_id=156)
[0d00h44m42s] 2022-12-20T20:50:18 <DBG> [MQTT IF] Published topic: LeupoldsPub/Wasserzähler/uptime, content: -79 (msg_id=196)
[0d00h49m32s] 2022-12-20T20:55:09 <DBG> [MQTT IF] Published topic: LeupoldsPub/Wasserzähler/uptime, content: 212 (msg_id=216)

Data Log (extract):
===================
2022-12-20T19:55:49+0100,main,0407.1878,407.1878,407.1878,0.001175,0.0057,no error,0.0,4.0,0.0,7.0,1.9,8.6,7.9,8.7
2022-12-20T20:00:40+0100,main,0407.1880,407.1880,407.1880,0.000041,0.0002,no error,0.0,4.0,0.0,7.0,1.9,8.7,8.2,0.9
===> After a reboot, the fist rate value is negativ (-0.000002). Is that correct? <===
2022-12-20T20:06:13+0100,main,0407.18809,407.18809,407.18809,-0.000002,0.00009,no error,0.0,4.0,0.0,7.0,1.9,8.6,8.2,0.9
2022-12-20T20:10:54+0100,main,0407.18809,407.18809,407.18809,0.000000,0.00000,no error,0.0,4.0,0.0,7.0,1.9,8.6,8.2,0.9 

===> Reboot after config.ini changed <===
2022-12-20T21:09:06+0100,main,0407.18877,407.18877,407.18877,0.000000,0.00000,no error,0.0,4.0,0.0,7.0,1.9,8.7,8.8,7.7
2022-12-20T21:13:57+0100,main,0407.18877,407.18877,407.18877,0.000000,0.00000,no error,0.0,4.0,0.0,7.0,1.9,8.7,8.8,7.7
===> After a reboot, the fist rate value is negativ (-0.000099). Is that correct? <===
2022-12-20T21:17:15+0100,main,0407.1944,407.1944,407.1944,-0.000099,0.0056,no error,0.0,4.0,0.0,7.0,2.0,9.2,4.3,4.1
2022-12-20T21:21:56+0100,main,0407.1945,407.1945,407.1945,0.000021,0.0001,no error,0.0,4.0,0.0,7.0,2.0,9.2,4.5,5.7

Expected Behavior

No response

Screenshots

No response

Additional Context

Build Info:

Firmware Version: 	Release: v13.0.8 (Commit: 04f2f23+)
Firmware Build Time: 	2022-12-19 20:41
Web Interface Version:	Release: v13.0.8 (Commit: 04f2f23+)
@TopGoalVl TopGoalVl added the bug Something isn't working label Dec 21, 2022
@caco3 caco3 changed the title Check Update to Version V13.0.8 (tiny bugs?) MQTT Uptime and rate odd for a moment after restart Dec 21, 2022
@caco3
Copy link
Collaborator

caco3 commented Dec 27, 2022

I tried to reproduce your issue, but I can't!

On my side, all looks ok.
I did several runs on 13.0.8, then did an update to 13.0.8 again and waited for a completed round:

[0d02h46m20s] 2022-12-28T00:09:32 <INF> [TFLITE SERVER] Round #84 started
[0d02h46m20s] 2022-12-28T00:09:32 <DBG> [MQTT IF] Published topic: gaszaehler/status, content: Take Image (msg_id=1604)
[0d02h46m28s] 2022-12-28T00:09:40 <DBG> [MQTT IF] Published topic: gaszaehler/status, content: Aligning (msg_id=1605)
[0d02h46m58s] 2022-12-28T00:10:10 <DBG> [MQTT IF] Published topic: gaszaehler/status, content: Digitalization of ROIs (msg_id=1606)
[0d02h46m58s] 2022-12-28T00:10:10 <DBG> [CNN] doFlow nach Alignment
[0d02h46m59s] 2022-12-28T00:10:11 <DBG> [TFLITE] Make Allocate
[0d02h46m59s] 2022-12-28T00:10:11 <DBG> [CNN] Processing Number 'main'
[0d02h46m59s] 2022-12-28T00:10:11 <DBG> [CNN] ROI #0 - TfLite
[0d02h46m59s] 2022-12-28T00:10:11 <DBG> [CNN] CNN Type: Digital100 or Analogue100
[0d02h47m00s] 2022-12-28T00:10:12 <DBG> [CNN] ROI #1 - TfLite
[0d02h47m00s] 2022-12-28T00:10:12 <DBG> [CNN] CNN Type: Digital100 or Analogue100
[0d02h47m01s] 2022-12-28T00:10:13 <DBG> [CNN] ROI #2 - TfLite
[0d02h47m01s] 2022-12-28T00:10:13 <DBG> [CNN] CNN Type: Digital100 or Analogue100
[0d02h47m02s] 2022-12-28T00:10:13 <DBG> [CNN] ROI #3 - TfLite
[0d02h47m02s] 2022-12-28T00:10:13 <DBG> [CNN] CNN Type: Digital100 or Analogue100
[0d02h47m02s] 2022-12-28T00:10:14 <DBG> [CNN] ROI #4 - TfLite
[0d02h47m02s] 2022-12-28T00:10:14 <DBG> [CNN] CNN Type: Digital100 or Analogue100
[0d02h47m03s] 2022-12-28T00:10:15 <DBG> [CNN] ROI #5 - TfLite
[0d02h47m03s] 2022-12-28T00:10:15 <DBG> [CNN] CNN Type: Digital100 or Analogue100
[0d02h47m04s] 2022-12-28T00:10:16 <DBG> [CNN] ROI #6 - TfLite
[0d02h47m04s] 2022-12-28T00:10:16 <DBG> [CNN] CNN Type: Digital100 or Analogue100
[0d02h47m05s] 2022-12-28T00:10:17 <DBG> [MQTT IF] Published topic: gaszaehler/status, content: Post-Processing (msg_id=1607)
[0d02h47m05s] 2022-12-28T00:10:17 <DBG> [CNN] getReadout _analog=0, _extendedResolution=0, prev=-1
[0d02h47m05s] 2022-12-28T00:10:17 <DBG> [CNN] ZeigerEvalHybridNeu - kein Vorgänger - Ergebnis = 0 zahl: 0.000000 zahl_vorgaenger = -1.000000 eval_vorgaenger = -1 DigitalUnschaerfe = 0.200000
[0d02h47m05s] 2022-12-28T00:10:17 <DBG> [CNN] getReadout(dig100) prev=0
[0d02h47m05s] 2022-12-28T00:10:17 <DBG> [CNN] ZeigerEvalHybridNeu - KEIN Analoger Vorgänger, Nulldurchgang hat stattgefunden = 9 zahl: 8.900000 zahl_vorgaenger = 0.000000 eval_vorgaenger = 0 DigitalUnschaerfe = 0.200000
[0d02h47m05s] 2022-12-28T00:10:17 <DBG> [CNN] getReadout#ZeigerEvalHybridNeu()= 9
[0d02h47m05s] 2022-12-28T00:10:17 <DBG> [CNN] getReadout#result= 90
[0d02h47m05s] 2022-12-28T00:10:17 <DBG> [CNN] ZeigerEvalHybridNeu - KEIN Analoger Vorgänger, kein Ziffernwechsel, da Vorkomma weit genug weg = 6 zahl: 5.900000 zahl_vorgaenger = 8.900000 eval_vorgaenger = 9 DigitalUnschaerfe = 0.200000
[0d02h47m05s] 2022-12-28T00:10:17 <DBG> [CNN] getReadout#ZeigerEvalHybridNeu()= 6
[0d02h47m05s] 2022-12-28T00:10:17 <DBG> [CNN] getReadout#result= 690
[0d02h47m05s] 2022-12-28T00:10:17 <DBG> [CNN] ZeigerEvalHybridNeu - KEIN Analoger Vorgänger, kein Ziffernwechsel, da Vorkomma weit genug weg = 7 zahl: 7.000000 zahl_vorgaenger = 5.900000 eval_vorgaenger = 6 DigitalUnschaerfe = 0.200000
[0d02h47m05s] 2022-12-28T00:10:17 <DBG> [CNN] getReadout#ZeigerEvalHybridNeu()= 7
[0d02h47m05s] 2022-12-28T00:10:17 <DBG> [CNN] getReadout#result= 7690
[0d02h47m05s] 2022-12-28T00:10:17 <DBG> [CNN] ZeigerEvalHybridNeu - KEIN Analoger Vorgänger, kein Ziffernwechsel, da Vorkomma weit genug weg = 7 zahl: 6.900000 zahl_vorgaenger = 7.000000 eval_vorgaenger = 7 DigitalUnschaerfe = 0.200000
[0d02h47m05s] 2022-12-28T00:10:17 <DBG> [CNN] getReadout#ZeigerEvalHybridNeu()= 7
[0d02h47m05s] 2022-12-28T00:10:17 <DBG> [CNN] getReadout#result= 77690
[0d02h47m05s] 2022-12-28T00:10:17 <DBG> [CNN] ZeigerEvalHybridNeu - KEIN Analoger Vorgänger, kein Ziffernwechsel, da Vorkomma weit genug weg = 6 zahl: 6.000000 zahl_vorgaenger = 6.900000 eval_vorgaenger = 7 DigitalUnschaerfe = 0.200000
[0d02h47m05s] 2022-12-28T00:10:17 <DBG> [CNN] getReadout#ZeigerEvalHybridNeu()= 6
[0d02h47m05s] 2022-12-28T00:10:17 <DBG> [CNN] getReadout#result= 677690
[0d02h47m05s] 2022-12-28T00:10:17 <DBG> [CNN] ZeigerEvalHybridNeu - KEIN Analoger Vorgänger, kein Ziffernwechsel, da Vorkomma weit genug weg = 0 zahl: 0.000000 zahl_vorgaenger = 6.000000 eval_vorgaenger = 6 DigitalUnschaerfe = 0.200000
[0d02h47m05s] 2022-12-28T00:10:17 <DBG> [CNN] getReadout#ZeigerEvalHybridNeu()= 0
[0d02h47m05s] 2022-12-28T00:10:17 <DBG> [CNN] getReadout#result= 0677690
[0d02h47m05s] 2022-12-28T00:10:17 <INF> [POSTPROC] main: Raw: 06776.90, Value: 6776.90, Status: no error
[0d02h47m05s] 2022-12-28T00:10:17 <DBG> [MQTT IF] Published topic: gaszaehler/status, content: Sending MQTT (msg_id=1608)
[0d02h47m05s] 2022-12-28T00:10:17 <DBG> [MQTT SERVER] Publishing system MQTT topics...
[0d02h47m06s] 2022-12-28T00:10:17 <DBG> [MQTT IF] Published topic: gaszaehler/uptime, content: 10018 (msg_id=1609)
[0d02h47m06s] 2022-12-28T00:10:17 <DBG> [MQTT IF] Published topic: gaszaehler/freeMem, content: 3045631 (msg_id=1610)
[0d02h47m06s] 2022-12-28T00:10:18 <DBG> [MQTT IF] Published topic: gaszaehler/wifiRSSI, content: -63 (msg_id=1611)
[0d02h47m06s] 2022-12-28T00:10:18 <DBG> [MQTT IF] Published topic: gaszaehler/CPUtemp, content: 50 (msg_id=1612)
[0d02h47m06s] 2022-12-28T00:10:18 <DBG> [MQTT] Publishing MQTT topics...
[0d02h47m06s] 2022-12-28T00:10:18 <DBG> [MQTT IF] Published topic: gaszaehler/main/value, content: 6776.90 (msg_id=1613)
[0d02h47m06s] 2022-12-28T00:10:18 <DBG> [MQTT IF] Published topic: gaszaehler/main/error, content: no error (msg_id=1614)
[0d02h47m06s] 2022-12-28T00:10:18 <DBG> [MQTT IF] Published topic: gaszaehler/main/rate, content: 0.000000 (msg_id=1615)
[0d02h47m06s] 2022-12-28T00:10:18 <DBG> [MQTT IF] Published topic: gaszaehler/main/rate_per_time_unit, content: 0.000000 (msg_id=1616)
[0d02h47m06s] 2022-12-28T00:10:18 <DBG> [MQTT IF] Published topic: gaszaehler/main/changeabsolut, content: 0.00 (msg_id=1617)
[0d02h47m06s] 2022-12-28T00:10:18 <DBG> [MQTT IF] Published topic: gaszaehler/main/rate_per_digitalization_round, content: 0.00 (msg_id=1618)
[0d02h47m06s] 2022-12-28T00:10:18 <DBG> [MQTT IF] Published topic: gaszaehler/main/raw, content: 06776.90 (msg_id=1619)
[0d02h47m06s] 2022-12-28T00:10:18 <DBG> [MQTT IF] Published topic: gaszaehler/main/timestamp, content: 2022-12-28T00:09:40+0100 (msg_id=1620)
[0d02h47m06s] 2022-12-28T00:10:18 <DBG> [MQTT IF] Published topic: gaszaehler/main/json, content: { "value": "6776.90", "raw": "06776.90", "pre": "6776.90", "er.. (msg_id=1621)
[0d02h47m06s] 2022-12-28T00:10:18 <DBG> [MQTT IF] Published topic: gaszaehler/status, content: Flow finished (msg_id=1622)
[0d02h47m06s] 2022-12-28T00:10:18 <DBG> [TFLITE SERVER] CPU Temperature: 50.0
[0d02h47m06s] 2022-12-28T00:10:18 <INF> [TFLITE SERVER] Round #84 completed
[0d02h48m20s] 2022-12-28T00:11:32 <DBG> [TFLITE SERVER] ----------------------------------------------------------------
[0d02h48m20s] 2022-12-28T00:11:32 <INF> [TFLITE SERVER] Round #85 started
[0d02h48m20s] 2022-12-28T00:11:32 <DBG> [MQTT IF] Published topic: gaszaehler/status, content: Take Image (msg_id=1623)
[0d02h48m28s] 2022-12-28T00:11:40 <DBG> [MQTT IF] Published topic: gaszaehler/status, content: Aligning (msg_id=1624)
[0d02h48m36s] 2022-12-28T00:11:48 <DBG> [OTA FILE] log_get_last_part_handler
[0d02h48m59s] 2022-12-28T00:12:11 <DBG> [MQTT IF] Published topic: gaszaehler/status, content: Digitalization of ROIs (msg_id=1625)
[0d02h48m59s] 2022-12-28T00:12:11 <DBG> [CNN] doFlow nach Alignment
[0d02h49m00s] 2022-12-28T00:12:11 <DBG> [TFLITE] Make Allocate
[0d02h49m00s] 2022-12-28T00:12:12 <DBG> [CNN] Processing Number 'main'
[0d02h49m00s] 2022-12-28T00:12:12 <DBG> [CNN] ROI #0 - TfLite
[0d02h49m00s] 2022-12-28T00:12:12 <DBG> [CNN] CNN Type: Digital100 or Analogue100
[0d02h49m00s] 2022-12-28T00:12:12 <DBG> [CNN] ROI #1 - TfLite
[0d02h49m00s] 2022-12-28T00:12:12 <DBG> [CNN] CNN Type: Digital100 or Analogue100
[0d02h49m01s] 2022-12-28T00:12:13 <DBG> [CNN] ROI #2 - TfLite
[0d02h49m01s] 2022-12-28T00:12:13 <DBG> [CNN] CNN Type: Digital100 or Analogue100
[0d02h49m02s] 2022-12-28T00:12:14 <DBG> [CNN] ROI #3 - TfLite
[0d02h49m02s] 2022-12-28T00:12:14 <DBG> [CNN] CNN Type: Digital100 or Analogue100
[0d02h49m02s] 2022-12-28T00:12:14 <DBG> [OTA] handler_ota_update
[0d02h49m02s] 2022-12-28T00:12:14 <DBG> [OTA FILE] upload_post_handler
[0d02h49m25s] 2022-12-28T00:12:36 <DBG> [CNN] ROI #4 - TfLite
[0d02h49m27s] 2022-12-28T00:12:38 <DBG> [CNN] CNN Type: Digital100 or Analogue100
[0d02h49m29s] 2022-12-28T00:12:41 <DBG> [OTA FILE] download_get_handler
[0d02h49m29s] 2022-12-28T00:12:41 <DBG> [OTA] handler_ota_update
[0d02h49m29s] 2022-12-28T00:12:41 <INF> [OTA] Update for reboot.
[0d02h49m30s] 2022-12-28T00:12:42 <DBG> [CNN] ROI #5 - TfLite
[0d02h49m30s] 2022-12-28T00:12:42 <DBG> [CNN] CNN Type: Digital100 or Analogue100
[0d02h49m31s] 2022-12-28T00:12:43 <DBG> [OTA] handler_reboot
[0d02h49m31s] 2022-12-28T00:12:43 <INF> [OTA] Reboot triggered by Software (5s).
[0d02h49m31s] 2022-12-28T00:12:43 <WRN> [OTA] Reboot in 5sec
[0d02h49m31s] 2022-12-28T00:12:43 <DBG> [CNN] ROI #6 - TfLite
[0d02h49m31s] 2022-12-28T00:12:43 <DBG> [CNN] CNN Type: Digital100 or Analogue100
[0d02h49m32s] 2022-12-28T00:12:44 <INF> [MQTT IF] Init
[0d02h49m32s] 2022-12-28T00:12:44 <INF> [MQTT IF] Client started, waiting for established connection...
[0d00h00m04s] 2022-12-28T00:30:38 <INF> [MAIN] =================================================
[0d00h00m04s] 2022-12-28T00:30:38 <INF> [MAIN] ==================== Startup ====================
[0d00h00m04s] 2022-12-28T00:30:38 <INF> [MAIN] =================================================
[0d00h00m04s] 2022-12-28T00:30:38 <INF> [MAIN] Branch: 'HEAD', Revision: 04f2f23+, Date/Time: 2022-12-19 20:41, Web UI: Release: v13.0.8 (Commit: 04f2f23+)
[0d00h00m04s] 2022-12-28T00:30:38 <INF> [MAIN] Reset reason: Via esp_restart
[0d00h00m07s] 2022-12-28T00:30:41 <INF> [MAIN] =================================================
[0d00h00m07s] 2022-12-28T00:30:41 <INF> [MAIN] ================== Main Started =================
[0d00h00m07s] 2022-12-28T00:30:41 <INF> [MAIN] =================================================
[0d00h00m07s] 2022-12-28T00:30:41 <INF> [MAIN] The device has 8 MBytes of PSRAM
[0d00h00m09s] 2022-12-28T00:30:43 <INF> [MAIN] Initialization completed successfully!
[0d00h00m12s] 2022-12-28T01:30:46 <INF> [SNTP] Time zone set to CET-1CEST,M3.5.0,M10.5.0/3
[0d00h00m14s] 2022-12-28T01:30:48 <DBG> [MQTT] Digitizer interval is 2.0 minutes => setting MQTT LWT timeout to 5.0 minutes.
[0d00h00m14s] 2022-12-28T01:30:48 <DBG> [MQTT IF] URI: mqtt://192.168.1.99:1883, clientname: gaszaehler, user: , password: XXXXXXXX, maintopic: gaszaehler, last-will-topic: gaszaehler/connection, keepAlive: 300, RetainFlag: 0
[0d00h00m14s] 2022-12-28T01:30:48 <INF> [MQTT IF] Init
[0d00h00m14s] 2022-12-28T01:30:48 <INF> [MQTT IF] Client started, waiting for established connection...
[0d00h00m14s] 2022-12-28T01:30:48 <DBG> [TFLITE SERVER] ----------------------------------------------------------------
[0d00h00m14s] 2022-12-28T01:30:48 <INF> [TFLITE SERVER] Round #1 started
[0d00h00m15s] 2022-12-28T01:30:49 <DBG> [OTA FILE] log_get_last_part_handler
[0d00h00m24s] 2022-12-28T01:30:58 <INF> [MQTT SERVER] MQTT - Sending Homeassistant Discovery Topics (Meter Type: gas, Value Unit: m³ , Rate Unit: m³/h)...
[0d00h00m24s] 2022-12-28T01:30:58 <DBG> [MQTT IF] Published topic: homeassistant/sensor/gaszaehler/uptime/config, content: { "~": "gaszaehler", "unique_id": "gaszaehler-uptime", "object_id": "gaszaehler_.. (msg_id=2)
[0d00h00m24s] 2022-12-28T01:30:58 <DBG> [MQTT IF] Published topic: homeassistant/sensor/gaszaehler/MAC/config, content: { "~": "gaszaehler", "unique_id": "gaszaehler-MAC", "object_id": "gaszaehler_MAC.. (msg_id=3)
[0d00h00m24s] 2022-12-28T01:30:58 <DBG> [MQTT IF] Published topic: homeassistant/sensor/gaszaehler/hostname/config, content: { "~": "gaszaehler", "unique_id": "gaszaehler-hostname", "object_id": "gaszaehle.. (msg_id=4)
[0d00h00m24s] 2022-12-28T01:30:58 <DBG> [MQTT IF] Published topic: homeassistant/sensor/gaszaehler/freeMem/config, content: { "~": "gaszaehler", "unique_id": "gaszaehler-freeMem", "object_id": "gaszaehler.. (msg_id=5)
[0d00h00m24s] 2022-12-28T01:30:58 <DBG> [MQTT IF] Published topic: homeassistant/sensor/gaszaehler/wifiRSSI/config, content: { "~": "gaszaehler", "unique_id": "gaszaehler-wifiRSSI", "object_id": "gaszaehle.. (msg_id=6)
[0d00h00m24s] 2022-12-28T01:30:58 <DBG> [MQTT IF] Published topic: homeassistant/sensor/gaszaehler/CPUtemp/config, content: { "~": "gaszaehler", "unique_id": "gaszaehler-CPUtemp", "object_id": "gaszaehler.. (msg_id=7)
[0d00h00m24s] 2022-12-28T01:30:58 <DBG> [MQTT IF] Published topic: homeassistant/sensor/gaszaehler/IP/config, content: { "~": "gaszaehler", "unique_id": "gaszaehler-IP", "object_id": "gaszaehler_IP",.. (msg_id=9)
[0d00h00m24s] 2022-12-28T01:30:58 <DBG> [MQTT IF] Published topic: homeassistant/sensor/gaszaehler/value/config, content: { "~": "gaszaehler", "unique_id": "gaszaehler-value", "object_id": "gaszaehler_v.. (msg_id=11)
[0d00h00m25s] 2022-12-28T01:30:59 <DBG> [MQTT IF] Published topic: homeassistant/sensor/gaszaehler/error/config, content: { "~": "gaszaehler", "unique_id": "gaszaehler-error", "object_id": "gaszaehler_e.. (msg_id=13)
[0d00h00m25s] 2022-12-28T01:30:59 <DBG> [MQTT IF] Published topic: homeassistant/sensor/gaszaehler/rate_per_time_unit/config, content: { "~": "gaszaehler", "unique_id": "gaszaehler-rate_per_time_unit", "object_id": .. (msg_id=14)
[0d00h00m25s] 2022-12-28T01:30:59 <DBG> [MQTT IF] Published topic: homeassistant/sensor/gaszaehler/timestamp/config, content: { "~": "gaszaehler", "unique_id": "gaszaehler-timestamp", "object_id": "gaszaehl.. (msg_id=16)
[0d00h00m25s] 2022-12-28T01:31:00 <DBG> [MQTT IF] Published topic: homeassistant/sensor/gaszaehler/json/config, content: { "~": "gaszaehler", "unique_id": "gaszaehler-json", "object_id": "gaszaehler_js.. (msg_id=17)
[0d00h00m26s] 2022-12-28T01:31:00 <DBG> [MQTT SERVER] Publishing static MQTT topics...
[0d00h00m26s] 2022-12-28T01:31:00 <DBG> [MQTT IF] Published topic: gaszaehler/MAC, content: EC:94:CB:6E:18:68 (msg_id=19)
[0d00h00m26s] 2022-12-28T01:31:00 <DBG> [MQTT IF] Published topic: gaszaehler/IP, content: 192.168.1.152 (msg_id=20)
[0d00h00m26s] 2022-12-28T01:31:00 <DBG> [MQTT IF] Published topic: gaszaehler/hostname, content: Gaszaehler (msg_id=21)
[0d00h00m26s] 2022-12-28T01:31:00 <DBG> [MQTT IF] Published topic: gaszaehler/interval, content: 2.0 (msg_id=22)
[0d00h00m26s] 2022-12-28T01:31:00 <DBG> [MQTT SERVER] Publishing system MQTT topics...
[0d00h00m26s] 2022-12-28T01:31:00 <DBG> [MQTT IF] Published topic: gaszaehler/uptime, content: 19 (msg_id=23)
[0d00h00m26s] 2022-12-28T01:31:00 <DBG> [MQTT IF] Published topic: gaszaehler/freeMem, content: 3032379 (msg_id=24)
[0d00h00m26s] 2022-12-28T01:31:00 <DBG> [MQTT IF] Published topic: gaszaehler/wifiRSSI, content: -63 (msg_id=25)
[0d00h00m26s] 2022-12-28T01:31:00 <DBG> [MQTT IF] Published topic: gaszaehler/CPUtemp, content: 50 (msg_id=26)
[0d00h00m26s] 2022-12-28T01:31:00 <DBG> [MQTT IF] Published topic: gaszaehler/status, content: Take Image (msg_id=27)
[0d00h00m28s] 2022-12-28T01:31:02 <DBG> [OTA FILE] log_get_last_part_handler
[0d00h00m34s] 2022-12-28T01:31:08 <DBG> [MQTT IF] Published topic: gaszaehler/status, content: Aligning (msg_id=28)
[0d00h00m42s] 2022-12-28T01:31:16 <DBG> [OTA FILE] log_get_last_part_handler
[0d00h00m53s] 2022-12-28T01:31:27 <DBG> [MAIN SERVER] info_get_handler
[0d00h00m53s] 2022-12-28T01:31:27 <DBG> [MAIN SERVER] info_get_handler
[0d00h00m53s] 2022-12-28T01:31:27 <DBG> [MAIN SERVER] info_get_handler
[0d00h00m54s] 2022-12-28T01:31:28 <DBG> [MAIN SERVER] info_get_handler
[0d00h00m54s] 2022-12-28T01:31:28 <DBG> [MAIN SERVER] info_get_handler
[0d00h01m08s] 2022-12-28T01:31:42 <DBG> [MQTT IF] Published topic: gaszaehler/status, content: Digitalization of ROIs (msg_id=29)
[0d00h01m08s] 2022-12-28T01:31:42 <DBG> [CNN] doFlow nach Alignment
[0d00h01m08s] 2022-12-28T01:31:42 <DBG> [TFLITE] Make Allocate
[0d00h01m08s] 2022-12-28T01:31:43 <DBG> [CNN] Processing Number 'main'
[0d00h01m08s] 2022-12-28T01:31:43 <DBG> [CNN] ROI #0 - TfLite
[0d00h01m08s] 2022-12-28T01:31:43 <DBG> [CNN] CNN Type: Digital100 or Analogue100
[0d00h01m09s] 2022-12-28T01:31:43 <DBG> [CNN] ROI #1 - TfLite
[0d00h01m09s] 2022-12-28T01:31:43 <DBG> [CNN] CNN Type: Digital100 or Analogue100
[0d00h01m10s] 2022-12-28T01:31:44 <DBG> [CNN] ROI #2 - TfLite
[0d00h01m10s] 2022-12-28T01:31:44 <DBG> [CNN] CNN Type: Digital100 or Analogue100
[0d00h01m11s] 2022-12-28T01:31:45 <DBG> [CNN] ROI #3 - TfLite
[0d00h01m11s] 2022-12-28T01:31:45 <DBG> [CNN] CNN Type: Digital100 or Analogue100
[0d00h01m11s] 2022-12-28T01:31:45 <DBG> [MAIN SERVER] info_get_handler
[0d00h01m11s] 2022-12-28T01:31:45 <DBG> [MAIN SERVER] info_get_handler
[0d00h01m11s] 2022-12-28T01:31:46 <DBG> [MAIN SERVER] info_get_handler
[0d00h01m12s] 2022-12-28T01:31:46 <DBG> [MAIN SERVER] info_get_handler
[0d00h01m12s] 2022-12-28T01:31:46 <DBG> [MAIN SERVER] info_get_handler
[0d00h01m14s] 2022-12-28T01:31:48 <DBG> [CNN] ROI #4 - TfLite
[0d00h01m14s] 2022-12-28T01:31:48 <DBG> [CNN] CNN Type: Digital100 or Analogue100
[0d00h01m15s] 2022-12-28T01:31:49 <DBG> [CNN] ROI #5 - TfLite
[0d00h01m15s] 2022-12-28T01:31:49 <DBG> [CNN] CNN Type: Digital100 or Analogue100
[0d00h01m16s] 2022-12-28T01:31:50 <DBG> [CNN] ROI #6 - TfLite
[0d00h01m16s] 2022-12-28T01:31:50 <DBG> [CNN] CNN Type: Digital100 or Analogue100
[0d00h01m17s] 2022-12-28T01:31:51 <DBG> [MQTT IF] Published topic: gaszaehler/status, content: Post-Processing (msg_id=30)
[0d00h01m17s] 2022-12-28T01:31:51 <DBG> [CNN] getReadout _analog=0, _extendedResolution=0, prev=-1
[0d00h01m17s] 2022-12-28T01:31:51 <DBG> [CNN] ZeigerEvalHybridNeu - kein Vorgänger - Ergebnis = 0 zahl: 0.000000 zahl_vorgaenger = -1.000000 eval_vorgaenger = -1 DigitalUnschaerfe = 0.200000
[0d00h01m17s] 2022-12-28T01:31:51 <DBG> [CNN] getReadout(dig100) prev=0
[0d00h01m17s] 2022-12-28T01:31:51 <DBG> [CNN] ZeigerEvalHybridNeu - KEIN Analoger Vorgänger, Nulldurchgang hat stattgefunden = 9 zahl: 8.900000 zahl_vorgaenger = 0.000000 eval_vorgaenger = 0 DigitalUnschaerfe = 0.200000
[0d00h01m17s] 2022-12-28T01:31:51 <DBG> [CNN] getReadout#ZeigerEvalHybridNeu()= 9
[0d00h01m17s] 2022-12-28T01:31:51 <DBG> [CNN] getReadout#result= 90
[0d00h01m17s] 2022-12-28T01:31:51 <DBG> [CNN] ZeigerEvalHybridNeu - KEIN Analoger Vorgänger, kein Ziffernwechsel, da Vorkomma weit genug weg = 6 zahl: 5.900000 zahl_vorgaenger = 8.900000 eval_vorgaenger = 9 DigitalUnschaerfe = 0.200000
[0d00h01m17s] 2022-12-28T01:31:51 <DBG> [CNN] getReadout#ZeigerEvalHybridNeu()= 6
[0d00h01m17s] 2022-12-28T01:31:51 <DBG> [CNN] getReadout#result= 690
[0d00h01m17s] 2022-12-28T01:31:51 <DBG> [CNN] ZeigerEvalHybridNeu - KEIN Analoger Vorgänger, kein Ziffernwechsel, da Vorkomma weit genug weg = 7 zahl: 7.000000 zahl_vorgaenger = 5.900000 eval_vorgaenger = 6 DigitalUnschaerfe = 0.200000
[0d00h01m17s] 2022-12-28T01:31:51 <DBG> [CNN] getReadout#ZeigerEvalHybridNeu()= 7
[0d00h01m17s] 2022-12-28T01:31:51 <DBG> [CNN] getReadout#result= 7690
[0d00h01m17s] 2022-12-28T01:31:51 <DBG> [CNN] ZeigerEvalHybridNeu - KEIN Analoger Vorgänger, kein Ziffernwechsel, da Vorkomma weit genug weg = 7 zahl: 6.900000 zahl_vorgaenger = 7.000000 eval_vorgaenger = 7 DigitalUnschaerfe = 0.200000
[0d00h01m17s] 2022-12-28T01:31:51 <DBG> [CNN] getReadout#ZeigerEvalHybridNeu()= 7
[0d00h01m17s] 2022-12-28T01:31:51 <DBG> [CNN] getReadout#result= 77690
[0d00h01m17s] 2022-12-28T01:31:51 <DBG> [CNN] ZeigerEvalHybridNeu - KEIN Analoger Vorgänger, kein Ziffernwechsel, da Vorkomma weit genug weg = 6 zahl: 6.000000 zahl_vorgaenger = 6.900000 eval_vorgaenger = 7 DigitalUnschaerfe = 0.200000
[0d00h01m17s] 2022-12-28T01:31:51 <DBG> [CNN] getReadout#ZeigerEvalHybridNeu()= 6
[0d00h01m17s] 2022-12-28T01:31:51 <DBG> [CNN] getReadout#result= 677690
[0d00h01m17s] 2022-12-28T01:31:51 <DBG> [CNN] ZeigerEvalHybridNeu - KEIN Analoger Vorgänger, kein Ziffernwechsel, da Vorkomma weit genug weg = 0 zahl: 0.000000 zahl_vorgaenger = 6.000000 eval_vorgaenger = 6 DigitalUnschaerfe = 0.200000
[0d00h01m17s] 2022-12-28T01:31:51 <DBG> [CNN] getReadout#ZeigerEvalHybridNeu()= 0
[0d00h01m17s] 2022-12-28T01:31:51 <DBG> [CNN] getReadout#result= 0677690
[0d00h01m17s] 2022-12-28T01:31:51 <INF> [POSTPROC] main: Raw: 06776.90, Value: 6776.90, Status: no error
[0d00h01m17s] 2022-12-28T01:31:51 <DBG> [MQTT IF] Published topic: gaszaehler/status, content: Sending MQTT (msg_id=31)
[0d00h01m17s] 2022-12-28T01:31:51 <DBG> [MQTT SERVER] Publishing system MQTT topics...
[0d00h01m17s] 2022-12-28T01:31:51 <DBG> [MQTT IF] Published topic: gaszaehler/uptime, content: 70 (msg_id=32)
[0d00h01m17s] 2022-12-28T01:31:51 <DBG> [MQTT IF] Published topic: gaszaehler/freeMem, content: 3054923 (msg_id=33)
[0d00h01m17s] 2022-12-28T01:31:52 <DBG> [MQTT IF] Published topic: gaszaehler/wifiRSSI, content: -63 (msg_id=34)
[0d00h01m17s] 2022-12-28T01:31:52 <DBG> [MQTT IF] Published topic: gaszaehler/CPUtemp, content: 50 (msg_id=35)
[0d00h01m18s] 2022-12-28T01:31:52 <DBG> [MQTT] Publishing MQTT topics...
[0d00h01m18s] 2022-12-28T01:31:52 <DBG> [MQTT IF] Published topic: gaszaehler/main/value, content: 6776.90 (msg_id=36)
[0d00h01m18s] 2022-12-28T01:31:52 <DBG> [MQTT IF] Published topic: gaszaehler/main/error, content: no error (msg_id=37)
[0d00h01m18s] 2022-12-28T01:31:52 <DBG> [MQTT IF] Published topic: gaszaehler/main/rate, content: 0.000000 (msg_id=38)
[0d00h01m18s] 2022-12-28T01:31:52 <DBG> [MQTT IF] Published topic: gaszaehler/main/rate_per_time_unit, content: 0.000000 (msg_id=39)
[0d00h01m18s] 2022-12-28T01:31:52 <DBG> [MQTT IF] Published topic: gaszaehler/main/changeabsolut, content: 0.00 (msg_id=40)
[0d00h01m18s] 2022-12-28T01:31:52 <DBG> [MQTT IF] Published topic: gaszaehler/main/rate_per_digitalization_round, content: 0.00 (msg_id=41)
[0d00h01m18s] 2022-12-28T01:31:52 <DBG> [MQTT IF] Published topic: gaszaehler/main/raw, content: 06776.90 (msg_id=42)
[0d00h01m18s] 2022-12-28T01:31:52 <DBG> [MQTT IF] Published topic: gaszaehler/main/timestamp, content: 2022-12-28T01:31:08+0100 (msg_id=43)
[0d00h01m18s] 2022-12-28T01:31:52 <DBG> [MQTT IF] Published topic: gaszaehler/main/json, content: { "value": "6776.90", "raw": "06776.90", "pre": "6776.90", "er.. (msg_id=44)
[0d00h01m18s] 2022-12-28T01:31:52 <DBG> [MQTT IF] Published topic: gaszaehler/status, content: Flow finished (msg_id=45)
[0d00h01m18s] 2022-12-28T01:31:52 <DBG> [TFLITE SERVER] CPU Temperature: 51.1
[0d00h01m18s] 2022-12-28T01:31:52 <INF> [TFLITE SERVER] Round #1 completed

As you can see, my uptime starts at zero and the rate is also zero:
[0d00h01m17s] 2022-12-28T01:31:51 <DBG> [MQTT IF] Published topic: gaszaehler/uptime, content: 70 (msg_id=32)
[0d00h01m18s] 2022-12-28T01:31:52 <DBG> [MQTT IF] Published topic: gaszaehler/main/rate, content: 0.000000 (msg_id=38)

Maybe you had some issues with NTP?

If you can reproduce it, please provide a full DEBUG log!

@TopGoalVl
Copy link
Author

TopGoalVl commented Dec 28, 2022

At the moment I am doing tests with changed system configuration. Therefore I have to restart the system more often. I have the negative values after the restart every time.

Procedure:

  1. change configuration in expert mode.
  2. save configuration (without reboot).
  3. restart the system via system menu (Reboot).

See message log (debug mode).

EXTRACT!

[0d00h16m02s] 2022-12-28T00:00:27	<DBG>	[MQTT IF] Published topic: LeupoldsPub/Wasserzähler/uptime, content: -450 (msg_id=56)



[0d07h37m01s] 2022-12-28T07:21:26	<DBG>	[MQTT IF] Published topic: LeupoldsPub/Wasserzähler/main/json, content:   {     "value": "",     "raw": "0409.8092",     "pre": "1441.7662",     "error".. (msg_id=1852)
[0d07h37m01s] 2022-12-28T07:21:26	<DBG>	[MQTT IF] Published topic: LeupoldsPub/Wasserzähler/status, content: Flow finished (msg_id=1853)
[0d07h37m01s] 2022-12-28T07:21:26	<DBG>	[TFLITE SERVER] CPU Temperature: 76.1
[0d07h37m01s] 2022-12-28T07:21:26	<INF>	[TFLITE SERVER] Round #94 completed
[0d07h39m42s] 2022-12-28T07:24:07	<DBG>	[MAIN SERVER] info_get_handler
[0d07h39m42s] 2022-12-28T07:24:07	<DBG>	[MAIN SERVER] info_get_handler
[0d07h40m09s] 2022-12-28T07:24:34	<DBG>	[OTA] handler_reboot
[0d07h40m09s] 2022-12-28T07:24:34	<INF>	[OTA] Reboot triggered by Software (5s).
[0d07h40m09s] 2022-12-28T07:24:34	<WRN>	[OTA] Reboot in 5sec
[0d00h00m04s] 2022-12-28T06:47:33	<INF>	[MAIN] =================================================
[0d00h00m04s] 2022-12-28T06:47:33	<INF>	[MAIN] ==================== Startup ====================
[0d00h00m04s] 2022-12-28T06:47:33	<INF>	[MAIN] =================================================
[0d00h00m04s] 2022-12-28T06:47:33	<INF>	[MAIN] Branch: 'HEAD', Revision: 04f2f23+, Date/Time: 2022-12-19 20:41, Web UI: Release: v13.0.8 (Commit: 04f2f23+) 
[0d00h00m04s] 2022-12-28T06:47:33	<INF>	[MAIN] Reset reason: Via esp_restart
[0d00h00m08s] 2022-12-28T06:47:36	<INF>	[MAIN] =================================================
[0d00h00m08s] 2022-12-28T06:47:36	<INF>	[MAIN] ================== Main Started =================
[0d00h00m08s] 2022-12-28T06:47:36	<INF>	[MAIN] =================================================
[0d00h00m08s] 2022-12-28T06:47:36	<INF>	[MAIN] The device has 8 MBytes of PSRAM
[0d00h00m10s] 2022-12-28T06:47:39	<INF>	[MAIN] Initialization completed successfully!
[0d00h00m18s] 2022-12-28T07:47:47	<INF>	[SNTP] Time zone set to CET-1CEST,M3.5.0,M10.5.0/3
[0d00h00m18s] 2022-12-28T07:47:47	<INF>	[SNTP] Set SNTP-Server to de.pool.ntp.org
[0d00h00m18s] 2022-12-28T07:47:47	<INF>	[SNTP] Waiting until we get a time from the NTP server de.pool.ntp.org
[0d00h00m18s] 2022-12-28T07:47:47	<INF>	[SNTP] Status: Reset
[0d00h00m20s] 2022-12-28T07:47:49	<INF>	[SNTP] Status: Reset
[0d00h00m22s] 2022-12-28T07:47:51	<INF>	[SNTP] Status: Reset
[0d00h00m24s] 2022-12-28T07:25:05	<INF>	[SNTP] Status OK
[0d00h00m24s] 2022-12-28T07:25:05	<INF>	[SNTP] Time is synced with NTP Server de.pool.ntp.org

See attached full message log (2022-12-28)

log_2022-12-28.txt

@caco3
Copy link
Collaborator

caco3 commented Jan 18, 2023

@TopGoalVl
Copy link
Author

TopGoalVl commented Jan 19, 2023 via email

@caco3
Copy link
Collaborator

caco3 commented Jan 21, 2023

so my modification did not help as I understand you. Then we will not add it to the next release.

The other things also look odd but I do not really have the time to look into it as I can not reproduce it.

Could you try to reproduce it using the https://jomjol.github.io/AI-on-the-edge-device-docs/Demo-Mode/ and document it so we can reproduce it as well?

@TopGoalVl
Copy link
Author

I wanted to check the fix for issue #1658, but I get the following error in PIO.

leupoldv@leuvoub2:~/Develope/WaterCounter/FixVerify/AI-on-the-edge-device-try-fixing-negative-uptime-after-restart/code$ platformio run --environment esp32cam Error: Invalid '/home/leupoldv/Develope/WasserZehler/FixVerify/AI-on-the-edge-device-try-fixing-negative-uptime-after-restart/code/platformio.ini' (project configuration file): ' No section: 'common''

@caco3
Copy link
Collaborator

caco3 commented Jan 25, 2023

which branch are you using?
For me it works:

>  platformio run --environment esp32cam
Processing esp32cam (board: esp32cam; framework: espidf; platform: platformio/espressif32 @ 5.2.0)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32cam.html
PLATFORM: Espressif 32 (5.2.0) > AI Thinker ESP32-CAM
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES: 
 - framework-espidf @ 3.40402.0 (4.4.2) 
 - tool-cmake @ 3.16.4 
 - tool-esptoolpy @ 1.40201.0 (4.2.1) 
 - tool-ninja @ 1.7.1 
 - toolchain-esp32ulp @ 1.22851.191205 (2.28.51) 
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch3
Reading CMake configuration...
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 1 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Generating project linker script .pio/build/esp32cam/sections.ld
Building .pio/build/esp32cam/bootloader.bin
Generating partitions .pio/build/esp32cam/partitions.bin
Generating an empty partition .pio/build/esp32cam/ota_data_initial.bin
esptool.py v4.2.1
Creating esp32 image...
Merged 1 ELF section
Successfully created esp32 image.
Linking .pio/build/esp32cam/firmware.elf
Retrieving maximum program size .pio/build/esp32cam/firmware.elf
Checking size .pio/build/esp32cam/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [==        ]  20.6% (used 67368 bytes from 327680 bytes)
Flash: [==========]  97.5% (used 1896053 bytes from 1945600 bytes)
Building .pio/build/esp32cam/firmware.bin
esptool.py v4.2.1
Creating esp32 image...
Merged 25 ELF sections
Successfully created esp32 image.
=========================================================================================== [SUCCESS] Took 29.70 seconds ===========================================================================================

Environment    Status    Duration
-------------  --------  ------------
esp32cam       SUCCESS   00:00:29.695

@TopGoalVl
Copy link
Author

I now have version 14.0.0 installed. If the error occurs again, I'll create a new post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants