smartHomeHub / SmartIR

Integration for Home Assistant to control climate, TV and fan devices via IR/RF controllers (Broadlink, Xiaomi, MQTT, LOOKin, ESPHome)
MIT License
2.06k stars 1.01k forks source link

Problem compiling/linking on an ESP32-C3 #1011

Open OGB1952 opened 1 year ago

OGB1952 commented 1 year ago

I've looked long and hard for any other related issues to no avail. Hopefully someone may spot the blindingly obvious problem I've missed for the past few hours . . .

System:

Home Assistant 2023.2.5 Supervisor 2023.01.1 Operating System 9.5 Frontend 20230202.0 - latest (been running for around a year on an HP T530 thin client with 4Gb RAM and a 32Gb SSD).

Latest version of SmartIR (as of 16th February 2023)

Trying to install on an ESP32-C3, using a direct USB connection to the host that is running HAOS.

YAML file:

`esphome: name: esp32c3-sensor1

esp32: board: esp32-c3-devkitm-1 framework: type: arduino

Enable logging

logger:

Enable Home Assistant API

api: services:

wifi: ssid: !secret wifi_ssid password: !secret wifi_password

Enable fallback hotspot (captive portal) in case wifi connection fails

ap: ssid: "Esp32C3-Sensor1 Fallback Hotspot" password: ""redacted""

Setup IR transmitter

remote_transmitter: pin: GPIO4 carrier_duty_percent: 50% captive_portal: `

ESPHome fails to compile. Spent several hours going through everything I can think of. I've cleaned out old build files, got rid of anything else in ESPHome. Issue seems to be specific to the API. If I comment out the API services (except for the encryption key) then it compiles, links and uploads OK. Debug log below:

`INFO Generating C++ source... INFO Compiling app... Processing esp32c3-sensor1 (board: esp32-c3-devkitm-1; framework: arduino; platform: platformio/espressif32 @ 5.2.0)

HARDWARE: ESP32C3 160MHz, 320KB RAM, 4MB Flash

Not sure what's going on, TBH. I can't see any obvious reason for the problem. The YAML checks out OK, just consistently throws an error when compiling.

OGB1952 commented 1 year ago

I've worked around this. Hard coding the Toshiba AC IR codes I need to use into the ESPHome yaml works OK (I just cut and pasted these from the 7260.json codes file). I'm not using SmartIR now, just sending the IR commands directly and using a thermostat integration, plus a manual override button integration.

Not at all sure why there was a compile issue with SmartIR, but one positive comment I can give that may help others is that the codes in the 7260.json file work just fine with the Toshiba RAS-B10BKVG-E unit.