jagheterfredrik / esphome-rego1000

ESPHome custom component for IVT Rego1000 heat pump controller
12 stars 5 forks source link

Install fails on any board #15

Closed ksahlen closed 11 months ago

ksahlen commented 1 year ago

Trying to install this repo on a board. Target was to use this: https://www.olimex.com/Products/IoT/ESP32/ESP32-EVB/open-source-hardware

However, the board fails to boot if the full code is installed with the following logs (verbose level):

`Rebooting... ets Jul 29 2019 12:21:46

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: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:262]: Log initialized [C][ota:469]: There have been 1 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... [C][canbus:010]: Setting up Canbus... [C][wifi:038]: Setting up WiFi... [C][wifi:048]: Starting WiFi... [C][wifi:049]: Local MAC: A0:B7:65:F5:99:B8 [V][esp32.preferences:059]: nvs_get_blob('1580381305'): ESP_ERR_NVS_NOT_FOUND - the key might not be set yet [V][wifi_esp32:039]: Enabling STA. [ 99][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 0 - WIFI_READY [V][wifi_esp32:454]: Event: WiFi ready [ 198][V][WiFiGeneric.cpp:338] _arduino_event_cb(): STA Started [ 198][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 2 - STA_START [V][wifi_esp32:469]: Event: WiFi STA start [D][canbus:031]: send extended id=0x04caffe0 rtr=TRUE size=0 [D][canbus:031]: send extended id=0x04c2bfe0 rtr=TRUE size=0 [D][canbus:031]: send extended id=0x04d9bfe0 rtr=TRUE size=0 [D][canbus:031]: send extended id=0x04be7fe0 rtr=TRUE size=0 [W][component:204]: Component rego1000.sensor took a long time for an operation (1.00 s). [W][component:205]: Components should block for at most 20-30ms. [D][canbus:031]: send extended id=0x0664bfe0 rtr=TRUE size=0 [W][component:204]: Component rego1000.sensor took a long time for an operation (1.01 s). [W][component:205]: Components should block for at most 20-30ms. [D][canbus:031]: send extended id=0x0492ffe0 rtr=TRUE size=0 [W][component:204]: Component rego1000.switch took a long time for an operation (1.01 s). [W][component:205]: Components should block for at most 20-30ms. [D][canbus:031]: send extended id=0x04d5bfe0 rtr=TRUE size=0 [W][component:204]: Component rego1000.sensor took a long time for an operation (1.01 s). [W][component:205]: Components should block for at most 20-30ms. [D][canbus:031]: send extended id=0x04f9bfe0 rtr=TRUE size=0 E (10671) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time: E (10671) task_wdt: - loopTask (CPU 1) E (10671) task_wdt: Tasks currently running: E (10671) task_wdt: CPU 0: IDLE E (10671) task_wdt: CPU 1: IDLE E (10671) task_wdt: Aborting.

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

Backtrace:0x400836dd:0x3ffbeadc |<-CORRUPTED

ELF file SHA256: 0000000000000000`

I've tried also on this board and this (https://www.olimex.com/Products/IoT/ESP32/ESP32-POE/open-source-hardware and https://www.az-delivery.de/en/products/esp32-d1-mini) but both posts the same error.

I have managed to make the board boot by removing a few sensors from the rego1000.yaml

With the below sensors the board booted fine but adding another one crashes the ESP32:

sensor:

  • platform: homeassistant entity_id: sensor.indoor_temperature id: indoor_temp accuracy_decimals: 1
  • platform: rego1000 name: Heat Carrier 1 rego_variable: $GT1_TEMP value_factor: .1 unit_of_measurement: °C state_class: measurement accuracy_decimals: 1
  • platform: rego1000 name: Outdoor rego_variable: $GT2_TEMP value_factor: .1 unit_of_measurement: °C state_class: measurement accuracy_decimals: 1
  • platform: rego1000 name: Warm water rego_variable: $GT3_TEMP value_factor: .1 unit_of_measurement: °C state_class: measurement accuracy_decimals: 1
  • platform: rego1000 name: Hot gas rego_variable: $GT6_TEMP value_factor: .1 unit_of_measurement: °C state_class: measurement accuracy_decimals: 1
  • platform: rego1000 name: Heat fluid out rego_variable: $GT8_TEMP value_factor: .1 unit_of_measurement: °C state_class: measurement accuracy_decimals: 1
  • platform: rego1000 name: Heat fluid in rego_variable: $GT9_TEMP value_factor: .1 unit_of_measurement: °C state_class: measurement accuracy_decimals: 1
  • platform: rego1000 name: Cold fluid in rego_variable: $GT10_TEMP value_factor: .1 unit_of_measurement: °C state_class: measurement accuracy_decimals: 1
  • platform: rego1000 name: Cold fluid out rego_variable: $GT11_TEMP value_factor: .1 unit_of_measurement: °C state_class: measurement accuracy_decimals: 1

However, it does not seem to be a specific issue with the sensors after the above as the boards will boot with those provided I delete the previous ones.

Are my boards not capable of handling the amount of code lines?

My specific code (for rego1000.yaml) below:

esphome: name: ivt-rego-heatpump-logger

esp32: board: esp32-evb framework: type: arduino

wifi: ssid: [REDACTED] password: [REDACTED] manual_ip: static_ip: 192.168.6.15 gateway: 192.168.6.1 subnet: 255.255.255.0 ap: ssid: "esp-rego1000" password: [REDACTED]

logger: level: verbose

api: encryption: key: "[REDACTED]"

ota: password: test2

external_components:

  • source: components

web_server:

canbus:

  • platform: esp32_can id: can0 can_id: 0 tx_pin: GPIO5 rx_pin: GPIO35 bit_rate: 125kbps

climate:

  • platform: rego1000 name: House rego_setpoint_variable: $ROOM_SETPOINT_BASE_TEMP sensor_id: indoor_temp

sensor:

  • platform: homeassistant entity_id: sensor.indoor_temperature id: indoor_temp accuracy_decimals: 1
  • platform: rego1000 name: Heat Carrier 1 rego_variable: $GT1_TEMP value_factor: .1 unit_of_measurement: °C state_class: measurement accuracy_decimals: 1
  • platform: rego1000 name: Outdoor rego_variable: $GT2_TEMP value_factor: .1 unit_of_measurement: °C state_class: measurement accuracy_decimals: 1
  • platform: rego1000 name: Warm water rego_variable: $GT3_TEMP value_factor: .1 unit_of_measurement: °C state_class: measurement accuracy_decimals: 1
  • platform: rego1000 name: Hot gas rego_variable: $GT6_TEMP value_factor: .1 unit_of_measurement: °C state_class: measurement accuracy_decimals: 1
  • platform: rego1000 name: Heat fluid out rego_variable: $GT8_TEMP value_factor: .1 unit_of_measurement: °C state_class: measurement accuracy_decimals: 1
  • platform: rego1000 name: Heat fluid in rego_variable: $GT9_TEMP value_factor: .1 unit_of_measurement: °C state_class: measurement accuracy_decimals: 1
  • platform: rego1000 name: Cold fluid in rego_variable: $GT10_TEMP value_factor: .1 unit_of_measurement: °C state_class: measurement accuracy_decimals: 1
  • platform: rego1000 name: Cold fluid out rego_variable: $GT11_TEMP value_factor: .1 unit_of_measurement: °C state_class: measurement accuracy_decimals: 1
  • platform: rego1000 name: Heating start rego_variable: $HEATING_START value_factor: .1 unit_of_measurement: °C state_class: measurement accuracy_decimals: 1
  • platform: rego1000 name: Heating stop rego_variable: $HEATING_STOP value_factor: .1 unit_of_measurement: °C state_class: measurement accuracy_decimals: 1
  • platform: rego1000 name: Heating setpoint rego_variable: $HEATING_SETPOINT value_factor: .1 unit_of_measurement: °C state_class: measurement accuracy_decimals: 1
  • platform: rego1000 name: Energy output rego_variable: $STATS_ENERGY_OUTPUT value_factor: .01 unit_of_measurement: kWh state_class: "total_increasing" device_class: "energy" accuracy_decimals: 2

binary_sensor:

  • platform: rego1000 name: "Heat carrier pump" rego_listen_can_id: 0x00028${REGO_CAN_SUFFIX}
  • platform: rego1000 name: "Heat fluid pump" rego_listen_can_id: 0x0002c${REGO_CAN_SUFFIX}
  • platform: rego1000 name: "Three-way valve" rego_listen_can_id: 0x00038${REGO_CAN_SUFFIX}
  • platform: rego1000 name: "Additional heat" rego_listen_can_id: 0x0003c${REGO_CAN_SUFFIX}
  • platform: rego1000 name: "Compressor" rego_listen_can_id: 0x00048${REGO_CAN_SUFFIX}
  • platform: rego1000 name: "Cold fluid pump" rego_listen_can_id: 0x00054${REGO_CAN_SUFFIX}

number:

  • platform: rego1000 name: Hysterisis min rego_variable: $HEATING_1A_DIFF_MIN unit_of_measurement: °C min_value: 2 max_value: 30 step: .1 value_factor: .1
  • platform: rego1000 name: Hysterisis max rego_variable: $HEATING_1A_DIFF_MAX unit_of_measurement: °C min_value: 2 max_value: 30 step: .1 value_factor: .1
  • platform: rego1000 name: Hysterisis time factor rego_variable: $HEATING_1A_DIFF_CONST min_value: 10 max_value: 30 step: 1 value_factor: .1
  • platform: rego1000 name: Room dial range rego_variable: $ROOM_DIAL_RANGE min_value: 0 max_value: 6 step: 1

switch:

  • platform: rego1000 name: "DHW Economy" rego_variable: $DHW_STATE_ECONOMY
  • platform: rego1000 name: "Admin access" rego_variable: $ACCESS_LEVEL
ksahlen commented 1 year ago

Forgot to mention I'm using the 3.9.0 registers but the same symptoms is presented with the 3.7.0 registers.

jagheterfredrik commented 1 year ago

Weird. Try using an older version of esphome, e.g. 2023.2.4.

(pip install esphome=2023.2.4)

ksahlen commented 11 months ago

Did not get to try with an older version of ESPHome but under 2023.9.1 it installs and runs fine. Will try and install it to the heat pump next week.