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

Watchdog triggers after adding a light #27

Open
repvik opened this issue Oct 27, 2023 · 3 comments
Open

Watchdog triggers after adding a light #27

repvik opened this issue Oct 27, 2023 · 3 comments

Comments

@repvik
Copy link

repvik commented Oct 27, 2023

When adding a light to the config, the watchdog starts triggering.

This is the config without light:

esphome:
  name: ansluta
  friendly_name: Ansluta

esp32:
  board: m5stack-atom
  framework:
    type: arduino

logger:
  level: VERBOSE

api:
  encryption:
    key: "xxx"

ota:
  password: "yyy"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  
spi:
  clk_pin: GPIO23
  mosi_pin: GPIO19
  miso_pin: GPIO33

ikea_ansluta:
  cs_pin: GPIO22

This config works fine:

ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 188777542, 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:1184
load:0x40078000,len:13132
load:0x40080400,len:3036
entry 0x400805e4
[     6][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz, APB: 80000000 Hz
[I][logger:326]: Log initialized
[C][ota:473]: There have been 2 suspected unsuccessful boot attempts.
[D][esp32.preferences:114]: Saving 1 preferences to flash...
[V][esp32.preferences:126]: sync: key: 233825507, len: 4
[D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[I][app:029]: Running through setup()...
[V][app:030]: Sorting components by setup priority...
[D][spi:039]: Setting up SPI bus...
[D][spi_device:355]: mode 0, data_rate 4000kHz
[C][wifi:038]: Setting up WiFi...
[C][wifi:051]: Starting WiFi...
[C][wifi:052]:   Local MAC: xyz
[V][esp32.preferences:059]: nvs_get_blob('1269076133'): ESP_ERR_NVS_NOT_FOUND - the key might not be set yet
[V][wifi_esp32:039]: Enabling STA.
[   109][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 0 - WIFI_READY
[V][wifi_esp32:417]: Event: WiFi ready
[   200][V][WiFiGeneric.cpp:338] _arduino_event_cb(): STA Started
[   201][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 2 - STA_START
[V][wifi_esp32:428]: Event: WiFi STA start
[  6326][V][WiFiGeneric.cpp:381] _arduino_event_cb(): SCAN Done: ID: 128, Status: 0, Results: 10
[  6327][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 1 - SCAN_DONE
[V][wifi_esp32:422]: Event: WiFi Scan Done status=0 number=10 scan_id=128
[D][wifi:443]: Found networks:
[I][wifi:487]: - 'IoT' [redacted]▂▄▆█
[D][wifi:488]:     Channel: 7
[D][wifi:489]:     RSSI: -51 dB
[I][wifi:277]: WiFi Connecting to 'IoT'...
[V][wifi:279]: Connection Params:
[V][wifi:280]:   SSID: 'IoT'
[V][wifi:283]:   BSSID: xyz
[V][wifi:303]:   Password: [redacted]
[V][wifi:308]:   Channel: 7
[V][wifi:317]:   Using DHCP IP
[V][wifi:319]:   Hidden: NO
[  7147][V][WiFiGeneric.cpp:353] _arduino_event_cb(): STA Connected: SSID: IoT, BSSID: xyz, Channel: 7, Auth: WPA2_PSK
[  7148][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 4 - STA_CONNECTED
[V][wifi_esp32:442]: Event: Connected ssid='IoT' bssid=[redacted] channel=7, authmode=WPA2 PSK[  7171][V][WiFiGeneric.cpp:367] _arduino_event_cb(): STA Got New IP:10.x.x.x

[  7177][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 7 - STA_GOT_IP
[  7181][D][WiFiGeneric.cpp:991] _eventCallback(): STA IP: 10.x.x.x, MASK: 255.255.0.0, GW: 10.x.x.x
[V][wifi_esp32:496]: Event: Got IP static_ip=10.x.x.x gateway=10.x.x.x
[C][ota:097]: Over-The-Air Updates:
[C][ota:098]:   Address: ansluta.local:3232
[C][ota:101]:   Using Password.
[W][ota:107]: Last Boot was an unhandled reset, will proceed to safe mode in 8 restarts
[C][api:025]: Setting up Home Assistant API server...
[I][app:062]: setup() finished successfully!
[I][app:102]: ESPHome version 2023.10.3 compiled on Oct 27 2023, 17:21:09
[C][wifi:546]: WiFi:
[C][wifi:382]:   Local MAC: xyz
[C][wifi:383]:   SSID: [redacted]
[C][wifi:384]:   IP Address: 10.x.x.x
[C][wifi:386]:   BSSID: [redacted]
[C][wifi:387]:   Hostname: 'ansluta'
[C][wifi:389]:   Signal strength: -51 dB ▂▄▆█
[V][wifi:391]:   Priority: 0.0
[C][wifi:393]:   Channel: 7
[C][wifi:394]:   Subnet: 255.255.0.0
[C][wifi:395]:   Gateway: 10.x.x.x
[C][wifi:396]:   DNS1: 10.x.x.x
[C][wifi:397]:   DNS2: 0.0.0.0
[C][logger:416]: Logger:
[C][logger:417]:   Level: VERBOSE
[C][logger:418]:   Log Baud Rate: 115200
[C][logger:420]:   Hardware UART: UART0
[C][spi:067]: SPI bus:
[C][spi:068]:   CLK Pin: GPIO23
[C][spi:069]:   SDI Pin: GPIO33
[C][spi:070]:   SDO Pin: GPIO19
[C][spi:072]:   Using HW SPI: SPI
[C][ikea_ansluta:063]:   CS Pin: GPIO22
[C][mdns:115]: mDNS:
[C][mdns:116]:   Hostname: ansluta
[V][mdns:117]:   Services:
[V][mdns:119]:   - _esphomelib, _tcp, 6053
[V][mdns:121]:     TXT: friendly_name = Ansluta
[V][mdns:121]:     TXT: version = 2023.10.3
[V][mdns:121]:     TXT: mac = xyz
[V][mdns:121]:     TXT: platform = ESP32
[V][mdns:121]:     TXT: board = m5stack-atom
[V][mdns:121]:     TXT: network = wifi
[V][mdns:121]:     TXT: api_encryption = Noise_NNpsk0_25519_ChaChaPoly_SHA256
[C][ota:097]: Over-The-Air Updates:
[C][ota:098]:   Address: ansluta.local:3232
[C][ota:101]:   Using Password.
[W][ota:107]: Last Boot was an unhandled reset, will proceed to safe mode in 8 restarts
[C][api:138]: API Server:
[C][api:139]:   Address: ansluta.local:6053
[C][api:141]:   Using noise encryption: YES

But if I add a light:

light:
  - platform: ikea_ansluta
    name: 'Benkelys'
    remote_address: 0x35c0    

The device fails to boot:

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 188777542, 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:1184
load:0x40078000,len:13132
load:0x40080400,len:3036
entry 0x400805e4
[     6][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz, APB: 80000000 Hz
[I][logger:326]: Log initialized
[C][ota:473]: There have been 5 suspected unsuccessful boot attempts.
[D][esp32.preferences:114]: Saving 1 preferences to flash...
[V][esp32.preferences:126]: sync: key: 233825507, len: 4
[D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[I][app:029]: Running through setup()...
[V][app:030]: Sorting components by setup priority...
[D][spi:039]: Setting up SPI bus...
[C][light:035]: Setting up light 'Benkelys'...
[D][light:036]: 'Benkelys' Setting:
[D][light:041]:   Color mode: 
[D][spi_device:355]: mode 0, data_rate 4000kHz
[C][wifi:038]: Setting up WiFi...
[C][wifi:051]: Starting WiFi...
[C][wifi:052]:   Local MAC: xyz
[V][esp32.preferences:059]: nvs_get_blob('3278020994'): ESP_ERR_NVS_NOT_FOUND - the key might not be set yet
[V][wifi_esp32:039]: Enabling STA.
[   131][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 0 - WIFI_READY
[V][wifi_esp32:417]: Event: WiFi ready
[   225][V][WiFiGeneric.cpp:338] _arduino_event_cb(): STA Started
[   226][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 2 - STA_START
[V][wifi_esp32:428]: Event: WiFi STA start
E (10802) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (10802) task_wdt:  - loopTask (CPU 1)
E (10802) task_wdt: Tasks currently running:
E (10802) task_wdt: CPU 0: IDLE
E (10802) task_wdt: CPU 1: IDLE
E (10802) task_wdt: Aborting.

abort() was called at PC 0x400f3b00 on core 0


Backtrace:0x400837b9:0x3ffbeafc |<-CORRUPTED




ELF file SHA256: 0000000000000000

Rebooting...
@repvik
Copy link
Author

repvik commented Oct 27, 2023

If I add fast_connect: on under the wifi section, the device connects to the wifi network and gets an IP address before the watchdog triggers.

@torrottum
Copy link
Owner

Which branch are you using? Personally I'm running the unfinished v2 branch, but I didn't get around to finish the code or documentation in the way I wanted because of health problems and didn't really pick up the project again.
As I said docs aren't good, but there is some stuff in the wiki: https://github.com/torrottum/ikea-ansluta-esphome/wiki

Here's how I'm using it: https://github.com/torrottum/home-assistant-config/blob/main/esphome/kitchen_counter.yaml
(The esp uses 0xbeef as the adress and has been paired with the light already using the pairing mode: https://github.com/torrottum/ikea-ansluta-esphome/wiki/IKEA-Ansluta-component)

My health is better these days, so perhaps I should spend a weekend cleaning this up...

@repvik
Copy link
Author

repvik commented Nov 19, 2023

I'm using the v2 branch.

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

No branches or pull requests

2 participants