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/
5.67k stars 612 forks source link

nach mehren Ablesungen Bild weggewandert #91

Closed pejonp closed 3 years ago

pejonp commented 3 years ago

Hallo jomjol, vielen Dank für das schöne Tool zum auslesen der Zähler. Einen Wasserzähler habe ich schon mit der Version: master - v5.0.0 - 2020-12-06/2021-01-02 08:56/HTML 4.0.2. Dieser läuft sehr gut.

Jetzt habe ich einen zweiten aufgebaut dieser soll die Gasuhr auslesen. Zum testen nehme ich erst einmal einen Digitalen Stromzähler. Bei diesem habe ich aber das Problem das nach einigen Ablesungen die Referenzen oder das Bild auseinander drifften. Kann das an diesem Digitalenstromzähler liegen ?

Bild noch ok: 1 Bild

Bild etwas später: 3 Bild Verschiebung Referenz

Ich habe auch schon den ESP32-CAM getauscht. Der hatte das Problem das er beim abspeichern der "Define Alignment Structure in Reference Image" neu bootete. Die SD-Karte ist die gleiche.

2021-01-17 17 46 57 2021-01-17 17 47 14

pejonp commented 3 years ago

Der ESP32-S (siehe vorherige Bilder) mach beim Update der "Define Alignment Structure in Reference Image" config.ini ein panic. und bootet neu.

`uri: /fileserver/config/, filename: /config/, filepath: /sdcard/config/ Dirpath: </sdcard/config/>, Pathlength: 15 entrypath: </sdcard/config/> Entrypath: /sdcard/config/ana0630s2.tflite I (56689) file_server: Found file : ana0630s2.tflite (134180 bytes) Entrypath: /sdcard/config/config.ini I (56709) file_server: Found file : config.ini (1225 bytes) Entrypath: /sdcard/config/dig0721s1.tflite I (56729) file_server: Found file : dig0721s1.tflite (765980 bytes) Entrypath: /sdcard/config/prevalue.ini I (56749) file_server: Found file : prevalue.ini (32 bytes) Entrypath: /sdcard/config/ref0.jpg I (56779) file_server: Found file : ref0.jpg (958 bytes) Entrypath: /sdcard/config/ref0_org.jpg I (56799) file_server: Found file : ref0_org.jpg (958 bytes) Entrypath: /sdcard/config/ref1.jpg I (56859) file_server: Found file : ref1.jpg (901 bytes) Entrypath: /sdcard/config/ref1_org.jpg I (56879) file_server: Found file : ref1_org.jpg (901 bytes) Entrypath: /sdcard/config/reference.jpg I (56909) file_server: Found file : reference.jpg (33745 bytes) handler_editflow uri: /editflow.html?task=copy&in=/img_tmp/ref_zw.jpg&out=/config/ref0.jpg task is found: copy in: /img_tmp/ref_zw.jpg out: /config/ref0.jpg handler_editflow uri: /editflow.html?task=copy&in=/img_tmp/ref_zw_org.jpg&out=/config/ref0_org.jpg task is found: copy in: /img_tmp/ref_zw_org.jpg out: /config/ref0_org.jpg After Invoke /sdcard/img_tmp/rd0.bmp Result Digit0: 10 DigitalDigit 1 - TfLite handler_editflow uri: /editflow.html?task=cutref&in=/config/reference.jpg&out=/img_tmp/ref_zw_org.jpg&x=144&y=223&dx=43&dy=12 task is found: cutref in: /config/reference.jpg out: /img_tmp/ref_zw_org.jpg x: 144 y: 223 dx: 43 dy: 12 Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled. Core 1 register dump: PC : 0x401aedbf PS : 0x00060930 A0 : 0x801a869c A1 : 0x3fff9210
A2 : 0x00000000 A3 : 0x00000007 A4 : 0x00000000 A5 : 0x3fffc9a8
A6 : 0x3ffc148c A7 : 0x3f9870b4 A8 : 0x00000000 A9 : 0x3fff91f0
A10 : 0x04040404 A11 : 0x00000000 A12 : 0x00002800 A13 : 0x0000000a
A14 : 0x00002800 A15 : 0x3f8fdd70 SAR : 0x00000008 EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000 LBEG : 0x401eeb68 LEND : 0x401eeb70 LCOUNT : 0x00000000

ELF file SHA256: 5423d7637cbf2403

Backtrace: 0x401aedbc:0x3fff9210 0x401a8699:0x3fff9250 0x401a932c:0x3fff9270 0x4019b2f7:0x3fff92b0 0x4019bec4:0x3fff94e0 0x4019a0bd:0x3fff9530 0x400fceb2:0x3fff96e0 0x400fd3e8:0x3fff9730 0x4008fd6d:0x3fff98c0

Rebooting... ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0030,len:4 load:0x3fff0034,len:7140 load:0x40078000,len:13856 load:0x40080400,len:4052 entry 0x40080688 I (29) boot: ESP-IDF 3.40100.200827 2nd stage bootloader I (29) boot: compile time 18:09:43 I (29) boot: chip revision: 1 I (33) boot_comm: chip revision: 1, min. bootloader chip revision: 0 I (40) boot.esp32: SPI Speed : 40MHz I (44) boot.esp32: SPI Mode : DIO I (49) boot.esp32: SPI Flash Size : 4MB I (53) boot: Enabling RNG early entropy source... I (59) boot: Partition Table: I (62) boot: ## Label Usage Type ST Offset Length I (70) boot: 0 nvs WiFi data 01 02 00009000 00004000 I (77) boot: 1 otadata OTA data 01 00 0000d000 00002000 I (85) boot: 2 phy_init RF data 01 01 0000f000 00001000 I (92) boot: 3 ota_0 OTA app 00 10 00010000 001db000 I (99) boot: 4 ota_1 OTA app 00 11 001f0000 001db000 I (107) boot: End of partition table I (111) boot_comm: chip revision: 1, min. application chip revision: 0 I (118) esp_image: segment 0: paddr=0x001f0020 vaddr=0x3f400020 size=0x4cbc4 (314308) map I (263) esp_image: segment 1: paddr=0x0023cbec vaddr=0x3ffb0000 size=0x0342c ( 13356) load I (270) esp_image: segment 2: paddr=0x00240020 vaddr=0x400d0020 size=0x15d714 (1431316) map I (890) esp_image: segment 3: paddr=0x0039d73c vaddr=0x3ffb342c size=0x01cf4 ( 7412) load I (893) esp_image: segment 4: paddr=0x0039f438 vaddr=0x40080000 size=0x00404 ( 1028) load I (897) esp_image: segment 5: paddr=0x0039f844 vaddr=0x40080404 size=0x1ee44 (126532) load I (967) esp_image: segment 6: paddr=0x003be690 vaddr=0x50000000 size=0x00004 ( 4) load I (985) boot: Loaded app from partition at offset 0x1f0000 I (985) boot: Disabling RNG early entropy source... I (986) psram: This chip is ESP32-D0WD I (991) spiram: Found 64MBit SPI RAM device I (995) spiram: SPI RAM mode: flash 40m sram 40m I (1000) spiram: PSRAM initialized, cache is in low/high (2-core) mode. I (1007) cpu_start: Pro cpu up. I (1011) cpu_start: Application information: I (1016) cpu_start: Project name: esp32cam-server-only I (1022) cpu_start: App version: 0.0.9.3 I (1027) cpu_start: Compile time: Dec 6 2020 19:33:00 I (1033) cpu_start: ELF file SHA256: 5423d7637cbf2403... I (1039) cpu_start: ESP-IDF: 3.40100.200827 I (1045) cpu_start: Starting app cpu, entry point is 0x40082c00 I (1037) cpu_start: App cpu up. I (1937) spiram: SPI SRAM memory test OK I (1938) heap_init: Initializing. RAM available for dynamic allocation: I (1938) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM I (1944) heap_init: At 3FFC2A60 len 0001D5A0 (117 KiB): DRAM I (1951) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM I (1957) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM I (1963) heap_init: At 4009F248 len 00000DB8 (3 KiB): IRAM I (1970) cpu_start: Pro cpu start user code I (1975) spiram: Adding pool of 4096K of external SPI memory to heap allocator CreateClassCamera I (2000) spi_flash: detected chip: generic I (2001) spi_flash: flash io: dio I (2001) cpu_start: Starting scheduler on PRO CPU. I (0) cpu_start: Starting scheduler on APP CPU. I (2009) spiram: Reserving pool of 32K of internal memory for DMA/internal allocations Do Reset Camera I (2019) gpio: GPIO[32]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0  Init Flash Init Camera I (4029) gpio: GPIO[5]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0  I (4029) gpio: GPIO[18]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0  I (4029) gpio: GPIO[19]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0  I (4039) gpio: GPIO[21]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0  I (4049) gpio: GPIO[22]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0  I (4059) gpio: GPIO[23]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0  I (4069) gpio: GPIO[25]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0  I (4079) gpio: GPIO[34]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0  I (4089) gpio: GPIO[35]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0  I (4099) gpio: GPIO[36]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0  I (4109) gpio: GPIO[39]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0  I (4119) sccb: pin_sda 26 pin_scl 27  I (4119) gpio: GPIO[32]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0  I (4269) camera: Detected OV2640 camera I (4269) camera: Allocating 1 frame buffers (937 KB total) I (4399) camera: Allocating 937 KB frame buffer in OnBoard RAM I (4839) connect_wlan_main: Initializing SD card I (4849) gpio: GPIO[13]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0  Name: NCard Type: SDHC/SDXC Speed: 20 MHz Size: 15269MB I (4889) server_ota: Start CheckOTAUpdateCheck ... Start CheckOTAUpdateCheck ... I (4899) server_ota: SHA-256 for the partition table: : 9d4a2809ae90fb20709a8ca3dd3ac3462e1e73286bcd31b689060c91de06fa3a I (4959) server_ota: SHA-256 for bootloader: : 5b946cea78aa42d2c8e638e55a0483378a09f304c7b84229525930857cab8667 I (5699) server_ota: SHA-256 for current firmware: : 12dabed3ac1bcbe58f21f41d2945a643ce0257364486fe6dc9411b4df724f1f0 CheckOTAUpdate Partition: ESP_OK file loaded ssid = "Hxxxx" password = "Hxxxx" hostname = "Gasuhr" ;ssid = "SSID" ;password = "PASSWORD" ;hostname = "watermeter" ;hostname is optional

;if you want to use a fixed IP you need to specify the following 3 parameters (ip, gateway, netmask) with IP4-Addresses "123.456.789.012" ;ip = "IP4-ADDRESS" ;gateway = "IP4-ADDRESS" ;netmask = "255.255.255.0"

;in some cases you want to specify the DNS server as well (especially, if it is not identical to the gateway - this is optional for a fixed IP dns = "192.168.4.1"To use WLan: Hxxxx, Hxxxxx To set Hostename: Gasuhr Fixed IP: , Gateway , Netmask I (5789) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (5789) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (5919) phy: phy_version: 4180, cb3948e, Sep 12 2019, 16:39:13, 0, 0 I (5929) gpio: GPIO[33]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0  I (7279) esp_netif_handlers: sta ip: 192.168.4.184, mask: 255.255.255.0, gw: 192.168.4.1 I (7279) gpio: GPIO[33]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0  IPv4 : 192.168.4.184 HostName : Gasuhr Netparameter: IP: 192.168.4.184 - GW: 192.168.4.1 - NetMask 255.255.255.0 Autoflow: sleep for : 200ms I (9299) sntp: Boot count: 1 I (9299) sntp: Time is not set yet. Connecting to WiFi and getting time over NTP. I (9299) sntp: Initializing SNTP I (9299) sntp: Waiting for system time to be set... (1/10) I (11309) sntp: Waiting for system time to be set... (2/10) TimeZone set to CET-1CEST,M3.5.0,M10.5.0/3 I (13329) sntp: The current date/time in Berlin is: Sun Jan 17 18:05:24 2021 I (13329) sntp: The current date/time in Berlin is: 2021-01-17_18:05 timeist 20210117-180524 time 20210117-180524 Autoflow: sleep for : 200ms I (15349) server-main: Starting server on port: '80' I (15349) server-main: Registering URI handlers I (15349) server_camera: server_part_camera - Registering URI handlers I (15349) server_tflite: server_part_camera - Registering URI handlers I (15359) server_ota: server_ota - Registering URI handlers Start tfliteflow.InitFlow(config); [MakeImage] ;LogImageLocation = /log/source ;LogfileRetentionInDays = 15 WaitBeforeTakingPicture = 5 ImageQuality = 5 ImageSize = VGA

[Alignment] InitialRotate = 240 /config/ref0.jpg 144 223 /config/ref1.jpg 441 329 SearchFieldX = 20 SearchFieldY = 20

[Digits] Model = /config/dig0721s1.tflite ;LogImageLocation = /log/digit ;LogfileRetentionInDays = 3 ModelInputSize = 20 32 digit1 96 195 32 57 digit2 135 194 30 54 digit3 172 195 33 54 ROI3 208 193 34 55 ROI4 246 194 30 54 ROI5 282 195 29 52 ROI6 319 194 32 52 ROI7 352 192 36 57

[Analog] Model = /config/ana0630s2.tflite ;LogImageLocation = /log/analog ;LogfileRetentionInDays = 3 ModelInputSize = 32 32 analog1 324 372 68 68

[PostProcessing] DecimalShift = 0 PreValueUse = true PreValueAgeStartup = 720 AllowNegativeRates = false MaxRateValue = 0.1 ErrorMessage = true CheckDigitIncreaseConsistency = false

[MQTT] 2021-01-17_17-29-59 4088.600098 Uri = mqtt://asrock.fritz.box:1884 Topic = gaszaehler/zaehlerstand TopicError = gaszaehler/error ClientID = gasuhr ;user = USERNAME ;password = PASSWORD

[AutoTimer] I (15469) interface_mqtt: Other event id:7 AutoStart = true Intervall = 4.85

[Debug] Logfile = true LogfileRetentionInDays = 3

[System] TimeZone = CET-1CEST,M3.5.0,M10.5.0/3 TimeZone set to CET-1CEST,M3.5.0,M10.5.0/3 I (15519) log: Can't open log file /sdcard/log/message/log_2021-01-17.txt handler_editflow uri: /editflow.html?task=copy&in=/img_tmp/ref_zw_org.jpg&out=/img_tmp/ref_zw.jpg task is found: copy in: /img_tmp/ref_zw_org.jpg out: /img_tmp/ref_zw.jpg I (15539) interface_mqtt: MQTT_EVENT_CONNECTED ;TimeServer = fritz.box ;SetupMode = false

[Ende] [MakeImage] Finished tfliteflow.InitFlow(config); Autoflow: start Autoflow: doFLow wird gestartet doflow - start 20210117-180527 Start CaptureFile uri: /fileserver/img_tmp/ref_zw.jpg?1610903127046 uri: /fileserver/img_tmp/ref_zw.jpg?1610903127046, filename: /img_tmp/ref_zw.jpg, filepath: /sdcard/img_tmp/ref_zw.jpg I (15789) file_server: Sending file : /img_tmp/ref_zw.jpg (958 bytes)... I (15799) file_server: File sending complete uri: /fileserver/img_tmp/ref_zw_org.jpg?1610903127046 uri: /fileserver/img_tmp/ref_zw_org.jpg?1610903127046, filename: /img_tmp/ref_zw_org.jpg, filepath: /sdcard/img_tmp/ref_zw_org.jpg I (15839) file_server: Sending file : /img_tmp/ref_zw_org.jpg (958 bytes)... I (15849) file_server: File sending complete w 640, h 480, size 47983 Save Camera to : /sdcard/img_tmp/raw.jpg Filetype: JPG Load rotationfile: /sdcard/img_tmp/raw.jpg E (30679) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time: E (30679) task_wdt: - IDLE0 (CPU 0) E (30679) task_wdt: Tasks currently running: E (30679) task_wdt: CPU 0: task_autodoFlow E (30679) task_wdt: CPU 1: IDLE1 E (36629) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time: E (36629) task_wdt: - IDLE0 (CPU 0) E (36629) task_wdt: Tasks currently running: E (36629) task_wdt: CPU 0: task_autodoFlow E (36629) task_wdt: CPU 1: IDLE1 Alignment: alignment ROI created: /sdcard/img_tmp/rot_roi.jpg E (43479) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time: E (43479) task_wdt: - IDLE0 (CPU 0) E (43479) task_wdt: Tasks currently running: E (43479) task_wdt: CPU 0: task_autodoFlow E (43479) task_wdt: CPU 1: IDLE1 `

jomjol commented 3 years ago

zu 1 - Weglaufen des Bildes:

zu 2 - Reboot bei Referenz:

Hoffe, das hilft dir weiter.' Beste Grüße, jomjol

jomjol commented 3 years ago

Ich schließe den Issue erstmal. Wenn du weiteren Input benötigt, bitte wieder öffnen.