Still no sensor readings. I’ve tried restarting HA and the emonTx. I can’t see any relevant error logs in the HA log.
I didnt previously, but I’ve just updated the ESP config with the HTTP integration to post data directly to emoncms.org. This is working fine. It so cool, that ESPhome can do this
I’ve just checked the logs and it seems adding the HTTP posting is causing the emonWiFi to periodically crash, it’s taking 2406ms to do the HTTP post. I think this issue is unrelated to the HA sensor issue. Have you got HTTP posting working reliably?
[08:59:43.543][D][http_request.idf:044]: Received response header, name: content-length, value: 2
[08:59:43.548][D][http_request.idf:044]: Received response header, name: content-type, value: application/json
[08:59:51.498][D][emontx:034]: Received line: {"MSG":3115,"V1":242.49,"P1":0,"P2":0,"P3":0,"P4":0,"P5":0,"P6":0,"E1":4329930,"E2":-6,"E3":-36,"E4":-87,"E5":-53,"E6":-101}
[08:59:53.477][D][http_request.idf:044]: Received response header, name: content-length, value: 2
[08:59:53.480][D][http_request.idf:044]: Received response header, name: content-type, value: application/json
[09:00:01.300][D][emontx:034]: Received line: {"MSG":3116,"V1":242.55,"P1":0,"P2":0,"P3":0,"P4":0,"P5":0,"P6":0,"E1":4329930,"E2":-6,"E3":-36,"E4":-87,"E5":-53,"E6":-101}
[09:00:03.107][D][http_request.idf:044]: Received response header, name: content-length, value: 2
[09:00:03.111][D][http_request.idf:044]: Received response header, name: content-type, value: application/json
[09:00:03.134][I][safe_mode:142]: Boot seems successful; resetting boot loop counter
[09:00:05.572][D][preferences:148]: Writing 1 items: 0 cached, 1 written, 0 failed
[09:00:11.119][D][emontx:034]: Received line: {"MSG":3117,"V1":242.31,"P1":0,"P2":0,"P3":0,"P4":0,"P5":0,"P6":0,"E1":4329930,"E2":-6,"E3":-36,"E4":-87,"E5":-53,"E6":-101}
INFO Processing unexpected disconnect from ESPHome API for emontx6 @ 192.168.86.22
WARNING Disconnected from API
INFO Successfully resolved emontx6 @ 192.168.86.22 in 0.000s
INFO Successfully connected to emontx6 @ 192.168.86.22 in 0.005s
INFO Successful handshake with emontx6 @ 192.168.86.22 in 0.118s
[09:00:47.671][E][esp32.crash:329]: *** CRASH DETECTED ON PREVIOUS BOOT ***
[09:00:47.675][E][esp32.crash:332]: Reason: Fault - Unknown
[09:00:47.676][E][esp32.crash:336]: Crashed core: 0
[09:00:47.676][E][esp32.crash:337]: PC: 0x40383128 (fault location)
WARNING Decoded 0x40383128: esp_cpu_wait_for_intr at /COMPONENT_ESP_HW_SUPPORT_DIR/cpu.c:64
[09:00:47.925][E][esp32.crash:302]: BT0: 0x40383128 (backtrace)
WARNING Decoded 0x40383128: esp_cpu_wait_for_intr at /COMPONENT_ESP_HW_SUPPORT_DIR/cpu.c:64
[09:00:48.163][E][esp32.crash:302]: BT1: 0x40383118 (backtrace)
WARNING Decoded 0x40383118: esp_cpu_wait_for_intr at /COMPONENT_ESP_HW_SUPPORT_DIR/cpu.c:57 (discriminator 1)
[09:00:48.403][E][esp32.crash:302]: BT2: 0x420C426A (stack scan)
WARNING Decoded 0x420c426a: prvCheckTasksWaitingTermination at /COMPONENT_FREERTOS_DIR/FreeRTOS-Kernel/tasks.c:4576
(inlined by) prvIdleTask at /COMPONENT_FREERTOS_DIR/FreeRTOS-Kernel/tasks.c:4301
[09:00:48.570][E][esp32.crash:358]: Use: addr2line -pfiaC -e firmware.elf 0x40383128 0x40383128 0x40383118 0x420C426A
[09:00:55.258][D][emontx:034]: Received line: {"MSG":3121,"V1":242.40,"P1":0,"P2":0,"P3":0,"P4":0,"P5":0,"P6":0,"E1":4329930,"E2":-6,"E3":-36,"E4":-87,"E5":-53,"E6":-101}
[09:00:57.169][D][http_request.idf:044]: Received response header, name: content-length, value: 2
[09:00:57.175][D][http_request.idf:044]: Received response header, name: content-type, value: application/json
[09:00:57.183][W][component:522]: emontx took a long time for an operation (1925 ms), max is 30 ms
[09:01:05.064][D][emontx:034]: Received line: {"MSG":3122,"V1":242.34,"P1":0,"P2":0,"P3":0,"P4":0,"P5":0,"P6":0,"E1":4329930,"E2":-6,"E3":-36,"E4":-87,"E5":-53,"E6":-101}
[09:01:06.999][D][http_request.idf:044]: Received response header, name: content-length, value: 2
[09:01:07.004][D][http_request.idf:044]: Received response header, name: content-type, value: application/json
[09:01:07.013][W][component:522]: emontx took a long time for an operation (1950 ms), max is 30 ms
[09:01:14.868][D][emontx:034]: Received line: {"MSG":3123,"V1":242.48,"P1":0,"P2":0,"P3":0,"P4":0,"P5":0,"P6":0,"E1":4329930,"E2":-6,"E3":-36,"E4":-87,"E5":-53,"E6":-101}
[09:01:16.625][D][http_request.idf:044]: Received response header, name: content-length, value: 2
[09:01:16.631][D][http_request.idf:044]: Received response header, name: content-type, value: application/json
[09:01:16.638][I][safe_mode:142]: Boot seems successful; resetting boot loop counter
[09:01:18.148][D][preferences:148]: Writing 1 items: 0 cached, 1 written, 0 failed
[09:01:24.673][D][emontx:034]: Received line: {"MSG":3124,"V1":242.40,"P1":0,"P2":0,"P3":0,"P4":0,"P5":0,"P6":0,"E1":4329930,"E2":-6,"E3":-36,"E4":-87,"E5":-53,"E6":-101}
[09:01:26.454][D][http_request.idf:044]: Received response header, name: content-length, value: 2
[09:01:26.458][D][http_request.idf:044]: Received response header, name: content-type, value: application/json
[09:01:34.480][D][emontx:034]: Received line: {"MSG":3125,"V1":242.42,"P1":0,"P2":0,"P3":0,"P4":0,"P5":0,"P6":0,"E1":4329930,"E2":-6,"E3":-36,"E4":-87,"E5":-53,"E6":-101}
[09:01:36.491][D][http_request.idf:044]: Received response header, name: content-length, value: 2
[09:01:36.495][D][http_request.idf:044]: Received response header, name: content-type, value: application/json
[09:01:36.504][W][component:522]: emontx took a long time for an operation (2025 ms), max is 30 ms
[09:01:44.290][D][emontx:034]: Received line: {"MSG":3126,"V1":242.20,"P1":0,"P2":0,"P3":0,"P4":0,"P5":0,"P6":0,"E1":4329930,"E2":-6,"E3":-36,"E4":-87,"E5":-53,"E6":-101}
[09:01:46.117][D][http_request.idf:044]: Received response header, name: content-length, value: 2
[09:01:46.120][D][http_request.idf:044]: Received response header, name: content-type, value: application/json
Well, I’m afraid, there’s not that much we can do for this problem. Looks like it triggers the watchdog because from time to time, http takes too long.
It might be worth trying that: