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

Cannot compile cometblue for esp32 az-delivery-devkit-v4 #7

Open
stuckinger opened this issue Sep 29, 2022 · 4 comments
Open

Cannot compile cometblue for esp32 az-delivery-devkit-v4 #7

stuckinger opened this issue Sep 29, 2022 · 4 comments

Comments

@stuckinger
Copy link

When installing this repo to my config-folder and add your example configuration for cometblue I cannot compile the config:

esphome from docker 2022.6.2

INFO Reading configuration heizung.yaml...
ERROR Unable to import component cometblue.climate:
Traceback (most recent call last):
  File "/esphome/esphome/loader.py", line 162, in _lookup_module
    module = importlib.import_module(f"esphome.components.{domain}")
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 790, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/config/custom_components/cometblue/climate.py", line 5, in <module>
    from esphome.const import CONF_ID, CONF_TIME_ID, CONF_MAC_ADDRESS, \
ImportError: cannot import name 'ESP_PLATFORM_ESP32' from 'esphome.const' (/esphome/esphome/const.py)
INFO Detected timezone 'Etc/UTC'
Failed config

climate.cometblue: [source heizung.yaml:98]
  
  Platform not found: 'climate.cometblue'.
  platform: cometblue
  pin: 0
  id: trv_cb1
  name: Radiator 1
  mac_address: BA:A1:8F:BC:E1:73
  update_interval: 5min
  temperature_offset: 0
  window_open_sensitivity: 4
  window_open_minutes: 10

I found a thread on github with the same error message:
ImportError: cannot import name 'ESP_PLATFORM_ESP32'
After looking at the changes they made to solve the problem I got a little stuck...
Removing the import of ESP_PLATFORM_ESP32 seems to break more and I have not idea what to do next - right now I am just hacking around from one error to the next...

Since I am not deep in that code I could not see what to change to get it running:
probably a similar issue with a current version of esphome?

I would love to control my cometblue valves from my esp32 instead of the raspi as it is working right now!
Any chance someone may have a look at the (kinda old) code to find a solution?

If more information is needed I can provide then just let me know!
Any help would be appreciated - thx!

@bhuebschen
Copy link

It's PLATFORM_ESP32 now ... but that's not the only problem ... esphome has now an integrated ble-stack and the implementation inside this repo is not compatible with an actual esp-idk

@bhuebschen
Copy link

@stuckinger
Copy link
Author

Thank you for this input. Just didn't have much time lately but I could try it - still no success:

It compiles, just with some warnings - maybe I could dig deeper later. But the code still runs in watchdog errors:

INFO Reading configuration thermostate.yaml...                                                                                                                 
INFO Cloning https://github.com/bhuebschen/esphome-components.git@None                                                                                                                                                                                                                                                         
INFO Generating C++ source...                                                                                                                                                                                                                                                                                                  
INFO Compiling app...                                                                                                                                                                                                                                                                                                          
Processing thermostate (board: az-delivery-devkit-v4; framework: arduino; platform: platformio/espressif32 @ 3.5.0)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------                                                                                                                                                                                                                                                                                                                               
HARDWARE: ESP32 240MHz, 520KB RAM, 16MB Flash                                                                                                                  
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf                                                                                             
Dependency Graph                                                                                                                                                                                                                                                                                                               
|-- AsyncTCP-esphome @ 1.2.2                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
|-- WiFi @ 1.0                                                                                                                                                 
|-- FS @ 1.0                                                                                                                                                   
|-- Update @ 1.0                                                                                                                                               
|-- ESPAsyncWebServer-esphome @ 2.1.0                                                                                                                          
|   |-- AsyncTCP-esphome @ 1.2.2                                                                                                                                                                                                                                                                                               
|-- DNSServer @ 1.1.0                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
|-- ESPmDNS @ 1.0                                                                                                                                              
Compiling .pioenvs/thermostate/src/esphome/components/cometblue/cometblue.cpp.o                                                                                
Compiling .pioenvs/thermostate/src/esphome/components/cometblue/cometblue_cmd.cpp.o                                                                                                                                                                                                                                            
Compiling .pioenvs/thermostate/src/esphome/components/esp32_ble_clients/esp32_ble.cpp.o                                                                                                                                                                                                                                        
Compiling .pioenvs/thermostate/src/esphome/components/esp32_ble_clients/esp32_ble_client.cpp.o                                                                                                                                                                                                                                 
src/esphome/components/cometblue/cometblue.cpp: In member function 'virtual esphome::climate::ClimateTraits CometBlueClimate::traits()':                                                                                                                                                                                       
src/esphome/components/cometblue/cometblue.cpp:135:37: warning: 'void esphome::climate::ClimateTraits::set_supports_heat_mode(bool)' is deprecated: This method is deprecated, use set_supported_modes() instead [-Wdeprecated-declarations]                                                                                                                                                                                                                                                                                                                                                                                                                   
   traits.set_supports_heat_mode(true);                                                                                                                        
                                     ^                                                                                                                                                                                                                                                                                         
In file included from src/esphome/components/climate/climate.h:9:0,                                                                                            
                 from src/esphome/components/cometblue/cometblue.h:5,                                                                                          
                 from src/esphome/components/cometblue/cometblue.cpp:1:                                                                                        
src/esphome/components/climate/climate_traits.h:58:8: note: declared here                                                                                      
   void set_supports_heat_mode(bool supports_heat_mode) { set_mode_support_(CLIMATE_MODE_HEAT, supports_heat_mode); }                                                                                                                                                                                                          
        ^                                                                                                                                                      
Compiling .pioenvs/thermostate/src/esphome/components/esp32_ble_clients/esp32_ble_client_state.cpp.o                                                                                                                                                                                                                           
Compiling .pioenvs/thermostate/src/esphome/components/logger/logger.cpp.o                                                                                      
Compiling .pioenvs/thermostate/src/esphome/components/md5/md5.cpp.o                                                                                            
Compiling .pioenvs/thermostate/src/esphome/components/mdns/mdns_component.cpp.o                                                                                
Compiling .pioenvs/thermostate/src/esphome/components/mdns/mdns_esp32_arduino.cpp.o                                                                                                                                                                                                                                            
Compiling .pioenvs/thermostate/src/esphome/components/mdns/mdns_esp8266.cpp.o                                                                                  
Compiling .pioenvs/thermostate/src/esphome/components/mdns/mdns_esp_idf.cpp.o                                                                                  
Compiling .pioenvs/thermostate/src/esphome/components/mdns/mdns_rp2040.cpp.o                                                                                   
Compiling .pioenvs/thermostate/src/esphome/components/network/util.cpp.o                                                                                       
Compiling .pioenvs/thermostate/src/esphome/components/ota/ota_backend_arduino_esp32.cpp.o                                                                                                                                                                                                                                      
Compiling .pioenvs/thermostate/src/esphome/components/ota/ota_backend_arduino_esp8266.cpp.o                                                                                                                                                                                                                                    
Compiling .pioenvs/thermostate/src/esphome/components/ota/ota_backend_arduino_rp2040.cpp.o                                                                                                                                                                                                                                     
Compiling .pioenvs/thermostate/src/esphome/components/ota/ota_backend_esp_idf.cpp.o                                                                                                                                                                                                                                            
Compiling .pioenvs/thermostate/src/esphome/components/ota/ota_component.cpp.o                                                                                  
Compiling .pioenvs/thermostate/src/esphome/components/sensor/automation.cpp.o                                                                                  
Compiling .pioenvs/thermostate/src/esphome/components/sensor/filter.cpp.o                                                                                      
Compiling .pioenvs/thermostate/src/esphome/components/sensor/sensor.cpp.o                                                                                      
Compiling .pioenvs/thermostate/src/esphome/components/sntp/sntp_component.cpp.o                                                                                
Compiling .pioenvs/thermostate/src/esphome/components/socket/bsd_sockets_impl.cpp.o                                                                                                                                                                                                                                            
Compiling .pioenvs/thermostate/src/esphome/components/socket/lwip_raw_tcp_impl.cpp.o                                                                                                                                                                                                                                           
Compiling .pioenvs/thermostate/src/esphome/components/socket/socket.cpp.o                                                                                      
Compiling .pioenvs/thermostate/src/esphome/components/switch/automation.cpp.o                                                                                  
Compiling .pioenvs/thermostate/src/esphome/components/switch/switch.cpp.o                                                                                      
Compiling .pioenvs/thermostate/src/esphome/components/template/switch/template_switch.cpp.o                                                                                                                                                                                                                                    
Compiling .pioenvs/thermostate/src/esphome/components/time/automation.cpp.o                                                                                    
Compiling .pioenvs/thermostate/src/esphome/components/time/real_time_clock.cpp.o                                                                                                                                                                                                                                               
Compiling .pioenvs/thermostate/src/esphome/components/web_server_base/web_server_base.cpp.o                                                                                                                                                                                                                                    
Compiling .pioenvs/thermostate/src/esphome/components/wifi/wifi_component.cpp.o                                                                                
Compiling .pioenvs/thermostate/src/esphome/components/wifi/wifi_component_esp32_arduino.cpp.o                                                                                                                                                                                                                                  
Compiling .pioenvs/thermostate/src/esphome/components/wifi/wifi_component_esp8266.cpp.o                                                                                                                                                                                                                                        
Compiling .pioenvs/thermostate/src/esphome/components/wifi/wifi_component_esp_idf.cpp.o                                                                                                                                                                                                                                        
Compiling .pioenvs/thermostate/src/esphome/components/wifi/wifi_component_pico_w.cpp.o                                                                                                                                                                                                                                         
Compiling .pioenvs/thermostate/src/esphome/core/application.cpp.o                                                                                              
Compiling .pioenvs/thermostate/src/esphome/core/color.cpp.o                                                                                                    
Compiling .pioenvs/thermostate/src/esphome/core/component.cpp.o                                                                                                
Compiling .pioenvs/thermostate/src/esphome/core/component_iterator.cpp.o                                                                                       
Compiling .pioenvs/thermostate/src/esphome/core/controller.cpp.o                                                                                               
Compiling .pioenvs/thermostate/src/esphome/core/entity_base.cpp.o                                                                                              
Compiling .pioenvs/thermostate/src/esphome/core/helpers.cpp.o                                                                                                  
Compiling .pioenvs/thermostate/src/esphome/core/log.cpp.o                                                                                                      
Compiling .pioenvs/thermostate/src/esphome/core/scheduler.cpp.o                                                                                                
Compiling .pioenvs/thermostate/src/esphome/core/util.cpp.o                                                                                                     
Compiling .pioenvs/thermostate/src/main.cpp.o                                                                                                                  
Compiling .pioenvs/thermostate/libf14/AsyncTCP-esphome/AsyncTCP.cpp.o                                                                                          
Compiling .pioenvs/thermostate/lib18f/WiFi/ETH.cpp.o                                                                                                           
Compiling .pioenvs/thermostate/lib18f/WiFi/WiFi.cpp.o                                                                                                          
Compiling .pioenvs/thermostate/lib18f/WiFi/WiFiAP.cpp.o                                                                                                        
Archiving .pioenvs/thermostate/libf14/libAsyncTCP-esphome.a                                                                                                    
Compiling .pioenvs/thermostate/lib18f/WiFi/WiFiClient.cpp.o                                                                                                    
Compiling .pioenvs/thermostate/lib18f/WiFi/WiFiGeneric.cpp.o                                                                                                   
Compiling .pioenvs/thermostate/lib18f/WiFi/WiFiMulti.cpp.o                                                                                                     
Compiling .pioenvs/thermostate/lib18f/WiFi/WiFiSTA.cpp.o                                                                                                       
Compiling .pioenvs/thermostate/lib18f/WiFi/WiFiScan.cpp.o                                                                                                      
Compiling .pioenvs/thermostate/lib18f/WiFi/WiFiServer.cpp.o                                                                                                    
Compiling .pioenvs/thermostate/lib18f/WiFi/WiFiUdp.cpp.o                                                                                                       
Compiling .pioenvs/thermostate/lib6ca/FS/FS.cpp.o                                                                                                              
Compiling .pioenvs/thermostate/lib6ca/FS/vfs_api.cpp.o                                                                                                         
Compiling .pioenvs/thermostate/libb83/Update/HttpsOTAUpdate.cpp.o                                                                                              
Archiving .pioenvs/thermostate/lib18f/libWiFi.a                                                                                                                
Compiling .pioenvs/thermostate/libb83/Update/Updater.cpp.o                                                                                                     
Compiling .pioenvs/thermostate/libd38/ESPAsyncWebServer-esphome/AsyncEventSource.cpp.o                                                                                                                                                                                                                                         
Compiling .pioenvs/thermostate/libd38/ESPAsyncWebServer-esphome/AsyncWebSocket.cpp.o                                                                                                                                                                                                                                           
Archiving .pioenvs/thermostate/lib6ca/libFS.a                                                                                                                  
Compiling .pioenvs/thermostate/libd38/ESPAsyncWebServer-esphome/WebAuthentication.cpp.o                                                                                                                                                                                                                                        
Archiving .pioenvs/thermostate/libb83/libUpdate.a                                                                                                              
Compiling .pioenvs/thermostate/libd38/ESPAsyncWebServer-esphome/WebHandlers.cpp.o                                                                                                                                                                                                                                              
Compiling .pioenvs/thermostate/libd38/ESPAsyncWebServer-esphome/WebRequest.cpp.o                                                                                                                                                                                                                                               
Compiling .pioenvs/thermostate/libd38/ESPAsyncWebServer-esphome/WebResponses.cpp.o                                                                                                                                                                                                                                             
Compiling .pioenvs/thermostate/libd38/ESPAsyncWebServer-esphome/WebServer.cpp.o                                                                                
Compiling .pioenvs/thermostate/lib5e9/DNSServer/DNSServer.cpp.o                                                                                                
Archiving .pioenvs/thermostate/lib5e9/libDNSServer.a                                                                                                           
Compiling .pioenvs/thermostate/lib3c3/ESPmDNS/ESPmDNS.cpp.o                                                                                                    
Compiling .pioenvs/thermostate/FrameworkArduino/Esp.cpp.o                                                                                                      
Compiling .pioenvs/thermostate/FrameworkArduino/FunctionalInterrupt.cpp.o                                                                                      
Archiving .pioenvs/thermostate/libd38/libESPAsyncWebServer-esphome.a                                                                                           
Compiling .pioenvs/thermostate/FrameworkArduino/HardwareSerial.cpp.o                                                                                           
Compiling .pioenvs/thermostate/FrameworkArduino/IPAddress.cpp.o                                                                                                
Compiling .pioenvs/thermostate/FrameworkArduino/IPv6Address.cpp.o                                                                                              
Archiving .pioenvs/thermostate/lib3c3/libESPmDNS.a                                                                                                             
Compiling .pioenvs/thermostate/FrameworkArduino/MD5Builder.cpp.o                                                                                               
Compiling .pioenvs/thermostate/FrameworkArduino/Print.cpp.o                                                                                                    
Compiling .pioenvs/thermostate/FrameworkArduino/Stream.cpp.o                                                                                                   
Compiling .pioenvs/thermostate/FrameworkArduino/StreamString.cpp.o                                                                                             
Compiling .pioenvs/thermostate/FrameworkArduino/WMath.cpp.o                                                                                                    
Compiling .pioenvs/thermostate/FrameworkArduino/WString.cpp.o                                                                                                  
Compiling .pioenvs/thermostate/FrameworkArduino/base64.cpp.o                                                                                                   
Compiling .pioenvs/thermostate/FrameworkArduino/cbuf.cpp.o                                                                                                     
Compiling .pioenvs/thermostate/FrameworkArduino/esp32-hal-adc.c.o                                                                                              
Compiling .pioenvs/thermostate/FrameworkArduino/esp32-hal-bt.c.o                                                                                               
Compiling .pioenvs/thermostate/FrameworkArduino/esp32-hal-cpu.c.o                                                                                              
Compiling .pioenvs/thermostate/FrameworkArduino/esp32-hal-dac.c.o                                                                                              
Compiling .pioenvs/thermostate/FrameworkArduino/esp32-hal-gpio.c.o                                                                                             
Compiling .pioenvs/thermostate/FrameworkArduino/esp32-hal-i2c.c.o                                                                                              
Compiling .pioenvs/thermostate/FrameworkArduino/esp32-hal-ledc.c.o                                                                                             
Compiling .pioenvs/thermostate/FrameworkArduino/esp32-hal-log.c.o                                                                                              
Compiling .pioenvs/thermostate/FrameworkArduino/esp32-hal-matrix.c.o                                                                                           
Compiling .pioenvs/thermostate/FrameworkArduino/esp32-hal-misc.c.o                                                                                             
Compiling .pioenvs/thermostate/FrameworkArduino/esp32-hal-psram.c.o                                                                                            
Compiling .pioenvs/thermostate/FrameworkArduino/esp32-hal-rmt.c.o                                                                                              
Compiling .pioenvs/thermostate/FrameworkArduino/esp32-hal-sigmadelta.c.o                                                                                       
Compiling .pioenvs/thermostate/FrameworkArduino/esp32-hal-spi.c.o                                                                                              
Compiling .pioenvs/thermostate/FrameworkArduino/esp32-hal-time.c.o                                                                                             
Compiling .pioenvs/thermostate/FrameworkArduino/esp32-hal-timer.c.o                                                                                            
/config/.esphome/platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-spi.c: In function 'spiTransferBytesNL':                                                                                                                                                                                               
/config/.esphome/platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-spi.c:922:39: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                 uint8_t * last_out8 = &result[c_longs-1];                                                                                                     
                                       ^                                                                                                                       
/config/.esphome/platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-spi.c:923:40: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                 uint8_t * last_data8 = &last_data;                                                                                                            
                                        ^                                                                                                                      
Compiling .pioenvs/thermostate/FrameworkArduino/esp32-hal-touch.c.o                                                                                            
Compiling .pioenvs/thermostate/FrameworkArduino/esp32-hal-uart.c.o                                                                                             
Compiling .pioenvs/thermostate/FrameworkArduino/libb64/cdecode.c.o                                                                                             
Compiling .pioenvs/thermostate/FrameworkArduino/libb64/cencode.c.o                                                                                             
Compiling .pioenvs/thermostate/FrameworkArduino/main.cpp.o                                                                                                     
Compiling .pioenvs/thermostate/FrameworkArduino/stdlib_noniso.c.o                                                                                              
Compiling .pioenvs/thermostate/FrameworkArduino/wiring_pulse.c.o                                                                                               
Compiling .pioenvs/thermostate/FrameworkArduino/wiring_shift.c.o                                                                                               
Archiving .pioenvs/thermostate/libFrameworkArduino.a                                                                                                           
Linking .pioenvs/thermostate/firmware.elf                                          
[...] Uploading Parts [...]

Then running:

INFO Successfully uploaded program.                                                                                                                            
INFO Starting log output from /dev/ttyUSB1 with baud rate 115200                                                                                               
[18:58:57][I][logger:258]: Log initialized                                                                                                                     
[18:58:57][C][ota:469]: There have been 1 suspected unsuccessful boot attempts.                                                                                
[18:58:57][D][esp32.preferences:113]: Saving 1 preferences to flash...                                                                                         
[18:58:57][D][esp32.preferences:142]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed                                                                                                                                                                                                                             
[18:58:57][I][app:029]: Running through setup()...                                                                                                             
[18:58:57][C][wifi:037]: Setting up WiFi...                                      
[...]

[...]
[18:59:00][C][api:025]: Setting up Home Assistant API server...                                                                                                
[18:59:00][C][sntp:028]: Setting up SNTP...                                                                                                                    
[18:59:00][I][app:062]: setup() finished successfully!                                                                                                         
[18:59:00][I][cometblue:039]: Requesting update of 7e86e0368d5...                                                                                              
[18:59:01][D][esp32_ble:104]: BT init done.                                                                                                                    
[18:59:05]E (8385) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:                                                                                                                                                                                                              
[18:59:05]E (8385) task_wdt:  - loopTask (CPU 1)                                                                                                               
[18:59:05]E (8385) task_wdt: Tasks currently running:                                                                                                          
[18:59:05]E (8385) task_wdt: CPU 0: IDLE0                                                                                                                      
[18:59:05]E (8385) task_wdt: CPU 1: IDLE1                                                                                                                      
[18:59:05]E (8385) task_wdt: Aborting.                                                                                                                         
[18:59:05]abort() was called at PC 0x401c2a84 on core 0                                                                                                        
[18:59:05]                                                                                                                                                     
[18:59:05]ELF file SHA256: 0000000000000000                                                                                                                    
[18:59:05]                                                                                                                                                     
[18:59:05]Backtrace: 0x4008f6e4:0x3ffbfdf0 0x4008f961:0x3ffbfe10 0x401c2a84:0x3ffbfe30 0x4008dd8d:0x3ffbfe50 0x401eef13:0x3ffbc160 0x401c440f:0x3ffbc180 0x40092185:0x3ffbc1a0 0x400909d6:0x3ffbc1c0                                                                                                                                                                                                                                                                                                                                                                                                                                                           
WARNING Found stack trace! Trying to decode it                                                                                                                 
WARNING Decoded 0x4008f6e4: invoke_abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:715                                                                                                                                                                         
WARNING Decoded 0x4008f961: abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:715                                                                                                                                                                                
WARNING Decoded 0x401c2a84: task_wdt_isr at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/task_wdt.c:252                                                                                                                                                                      
WARNING Decoded 0x4008dd8d: _xt_lowint1 at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/xtensa_vectors.S:1154                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
WARNING Decoded 0x401eef13: esp_pm_impl_waiti at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/pm_esp32.c:492                                                                                                                                                                 
WARNING Decoded 0x401c440f: esp_vApplicationIdleHook at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/freertos_hooks.c:108                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
WARNING Decoded 0x40092185: prvIdleTask at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/tasks.c:3507                                                                                                                                                                      
WARNING Decoded 0x400909d6: vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c:355 (discriminator 1)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
[18:59:06]                                                                                                                                                     
[18:59:06]Rebooting...                                                                                                                                                                                                                                                                                                         
[18:59:06]ets Jun  8 2016 00:22:57                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
[18:59:06]                                                                                                                                                     
[18:59:06]rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)                                                                                               
[18:59:06]configsip: 0, SPIWP:0xee                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
[18:59:06]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00                                                                                                                                                                                                                                              
[18:59:06]mode:DIO, clock div:2                                                                                                                                
[18:59:06]load:0x3fff0018,len:4                                                                                                                                
[18:59:06]load:0x3fff001c,len:1044                                                                                                                             
[18:59:06]load:0x40078000,len:10124                                                                                                                            
[18:59:06]load:0x40080400,len:5828                                                                                                                             
[18:59:06]entry 0x400806a8                                                                                                                                     
[18:59:06][I][logger:258]: Log initialized                                                           
[...]

Still seems to block it somehow when trying more than one bluetooth?
With only one BT target configured, it mostly works, but still got sometimes a watchdog trigger...

Any ideas?

@stuckinger
Copy link
Author

I am quite sure it has something to do with the update process on init.
When starting with only one comet_blue in the config it works, but when there are two, it hangs while requesting update from the second one.
Probably just a matter of parallelism where serialization would be better? 🤔
Do you know where this is handled and how one could achieve those events not running in parallel?
I mean that's usually not really time critical I guess...

[08:49:16][D][climate:385]: 'CometBlue3' state:
[08:49:16][D][climate:388]:   Mode: HEAT          
[08:49:16][D][climate:408]:   Current Temperature: nan°C
[08:49:16][D][climate:414]:   Target Temperature: -0.00°C
[08:49:16][D][climate:385]: 'ThermyBlue1' - Sending state:                                                                                         
[08:49:16][D][climate:388]:   Mode: HEAT                       
[08:49:16][D][climate:408]:   Current Temperature: nan°C
[08:49:16][D][climate:414]:   Target Temperature: 20.50°C      
[08:49:16][I][app:062]: setup() finished successfully!            
[08:49:16][I][cometblue:039]: Requesting update of 118be1472be9...
[08:49:17][D][esp32_ble:104]: BT init done.                                                                                                                     
[08:49:19][D][climate:385]: 'ThermyBlue1' - Sending state:                                                                                         
[08:49:19][D][climate:388]:   Mode: HEAT                                                                                                                                                                                                                                                                                        
[08:49:19][D][climate:408]:   Current Temperature: 19.00°C
[08:49:19][D][climate:414]:   Target Temperature: 20.50°C              
[08:49:19][I][cometblue:051]: Update of 118be1472be9 succeeded.                                                                                                 
[08:49:19][I][cometblue:039]: Requesting update of baa18fbce173...
[08:49:21]E (8420) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:                                                                                                                                                                                                              
[08:49:21]E (8420) task_wdt:  - loopTask (CPU 1)                                                                                                                
[08:49:21]E (8420) task_wdt: Tasks currently running:             
[08:49:21]E (8420) task_wdt: CPU 0: IDLE0            
[08:49:21]E (8420) task_wdt: CPU 1: IDLE1                                                                                                                       
[08:49:21]E (8420) task_wdt: Aborting.   
[08:49:21]abort() was called at PC 0x401c21d4 on core 0   
[08:49:21]                                               
[08:49:21]ELF file SHA256: 0000000000000000                    
[08:49:21]                                                                                                                                                      
[08:49:21]Backtrace: 0x4008f6e4:0x3ffbfdf0 0x4008f961:0x3ffbfe10 0x401c21d4:0x3ffbfe30 0x4008dd8d:0x3ffbfe50 0x401ee55b:0x3ffbc160 0x401c3b5f:0x3ffbc180 0x40092185:0x3ffbc1a0 0x400909d6:0x3ffbc1c0                                                                                                                                                                                                                                                                                                                                                                                                                                                           
WARNING Found stack trace! Trying to decode it                                                                                                                                                                                                                                                                                  
WARNING Decoded 0x4008f6e4: invoke_abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:715                                                                                                                                                                         
WARNING Decoded 0x4008f961: abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:715                                                                                                                                                                                
WARNING Decoded 0x401c21d4: task_wdt_isr at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/task_wdt.c:252
WARNING Decoded 0x4008dd8d: _xt_lowint1 at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/xtensa_vectors.S:1154                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
WARNING Decoded 0x401ee55b: esp_pm_impl_waiti at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/pm_esp32.c:492
WARNING Decoded 0x401c3b5f: esp_vApplicationIdleHook at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/freertos_hooks.c:108
WARNING Decoded 0x40092185: prvIdleTask at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/tasks.c:3507      
WARNING Decoded 0x400909d6: vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c:355 (discriminator 1)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
[08:49:21]                                                                                                                                                      
[08:49:21]Rebooting...                                                                                

config.yaml:

         - platform: cometblue                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
               pin: 0000                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
               id: ThermyBlue1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
               name: ThermyBlue1
               mac_address: 11:8B:E1:47:2B:E9                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
               update_interval: 10min                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
               temperature_offset: 0                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
               window_open_sensitivity: 4                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
               window_open_minutes: 10

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