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

IRremoteESP8266 library compile error bk7231t #2059

Open
DevineCZ opened this issue Jan 30, 2024 · 2 comments
Open

IRremoteESP8266 library compile error bk7231t #2059

DevineCZ opened this issue Jan 30, 2024 · 2 comments
Assignees

Comments

@DevineCZ
Copy link

DevineCZ commented Jan 30, 2024

Version/revision of the library used

2.8.6

Describe the bug

When I compile in ESPHome 2023.12.9 in Home Assistant IRremoteESP826, I get an error message.

Compiling .pioenvs/samsung-ac-remote-control/lib84c/IRremoteESP8266/IRrecv.cpp.o
Compiling .pioenvs/samsung-ac-remote-control/lib84c/IRremoteESP8266/IRtext.cpp.o
Compiling .pioenvs/samsung-ac-remote-control/lib84c/IRremoteESP8266/IRtimer.cpp.o
Compiling .pioenvs/samsung-ac-remote-control/lib84c/IRremoteESP8266/IRutils.cpp.o
/piolibs/IRremoteESP8266/src/IRrecv.cpp:140:7: error: '_IRrecv' has not been declared
140 | using _IRrecv::timer;
| ^~~~~~~
/piolibs/IRremoteESP8266/src/IRrecv.cpp:174:3: error: expected unqualified-id before 'if'
174 | if (params.rawlen) params.rcvstate = kStopState;
| ^~
/piolibs/IRremoteESP8266/src/IRrecv.cpp:181:1: error: expected declaration before '}' token
181 | }
| ^
/piolibs/IRremoteESP8266/src/IRrecv.cpp:184:27: error: expected initializer before 'gpio_intr'
184 | static void USE_IRAM_ATTR gpio_intr() {
| ^~~~~~~~~
/piolibs/IRremoteESP8266/src/IRrecv.cpp: In member function 'void IRrecv::enableIRIn(bool)':
/piolibs/IRremoteESP8266/src/IRrecv.cpp:389:35: error: 'gpio_intr' was not declared in this scope
389 | attachInterrupt(params.recvpin, gpio_intr, CHANGE);
| ^~~~~~~~~
*** [.pioenvs/samsung-ac-remote-control/lib84c/IRremoteESP8266/IRrecv.cpp.o] Error 1

To Reproduce

In the ESPHome add-on in Home Assistant, try compiling the following:

esphome:
name: samsung-ac-remote-control
friendly_name: samsung-ac
includes:

  • include/irsamsung.h
    libraries:
  • IRremoteESP8266
    build_path: build/samsung-ac-remote-control
    area: ''
    platformio_options: {}
    name_add_mac_suffix: false
    min_version: 2023.12.9
    bk72xx:
    board: wb3s
    framework:
    version: 0.0.0
    loglevel: WARN
    debug: []
    sdk_silent: all
    gpio_recover: true
    options: {}
    source: null
    family: BK7231T
    component_id: bk72xx
    wifi:
    ap:
    ssid: Samsung Ac Remote Control
    password: password
    ap_timeout: 1min
    domain: .local
    reboot_timeout: 15min
    power_save_mode: NONE
    fast_connect: false
    passive_scan: false
    enable_on_boot: true
    networks:
  • ssid: xxxxxx
    password: xxxxxx
    priority: 0.0
    use_address: samsung-ac-remote-control.local
    captive_portal: {}
    logger:
    baud_rate: 115200
    tx_buffer_size: 512
    deassert_rts_dtr: false
    hardware_uart: DEFAULT
    level: DEBUG
    logs: {}
    api:
    password: password
    port: 6053
    reboot_timeout: 15min
    ota:
    password: password
    safe_mode: true
    port: 8892
    reboot_timeout: 5min
    num_attempts: 10
    status_led:
    pin:
    number: 9
    mode:
    output: true
    input: false
    open_drain: false
    pullup: false
    pulldown: false
    analog: false
    inverted: false
    sensor:
  • platform: template
    name: My Room Temperature
    accuracy_decimals: 1
    id: my_room_temp
    disabled_by_default: false
    force_update: false
    update_interval: 60s
    climate:
  • platform: custom
    lambda: !lambda |-
    auto samsungac = new SamsungAC();
    samsungac->set_sensor(id(my_room_temp));
    App.register_component(samsungac);
    return {samsungac};
    climates:
    • name: My Room AC
      disabled_by_default: false
      visual: {}

Example code used

INFO ESPHome 2023.12.9
INFO Reading configuration /config/esphome/samsung-ac-remote-control.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing samsung-ac-remote-control (board: wb3s; framework: arduino; platform: libretiny @ 1.4.1)
--------------------------------------------------------------------------------
Warning! Non-Git installations are NOT SUPPORTED.
HARDWARE: BK7231T 120MHz, 256KB RAM, 1.03MB Flash
 - framework-arduino-api @ 2022.8.24+sha.237b10a 
 - framework-beken-bdk @ 0.0.0+v2021.06.07.sha.6491b8c 
 - library-flashdb @ 1.2.0+sha.d5c892f 
 - library-freertos @ 9.0.0+sha.95cc959 
 - library-freertos-port @ 2023.5.23+sha.a917d93 
 - library-lwip @ 2.1.3-bdk+sha.4ee4d34 
 - library-printf @ 6.1.0+sha.28a79bd 
 - library-uf2ota @ 5.0.0+sha.f955412 
PLATFORM VERSIONS:
 - libretiny @ 1.4.1
 - ltchiptool @ 4.10.1
CUSTOM OPTIONS:
 - fw_name = esphome
 - fw_version = 2023.12.9
Dependency Graph
|-- AsyncTCP-esphome @ 2.0.1
|-- IRremoteESP8266 @ 2.8.6
|-- ESPAsyncWebServer-esphome @ 3.1.0
|-- DNSServer @ 1.1.0
Compiling .pioenvs/samsung-ac-remote-control/lib84c/IRremoteESP8266/IRrecv.cpp.o
Compiling .pioenvs/samsung-ac-remote-control/lib84c/IRremoteESP8266/ir_Bose.cpp.o
Compiling .pioenvs/samsung-ac-remote-control/lib84c/IRremoteESP8266/ir_Carrier.cpp.o
Compiling .pioenvs/samsung-ac-remote-control/lib84c/IRremoteESP8266/ir_ClimaButler.cpp.o
/piolibs/IRremoteESP8266/src/IRrecv.cpp:140:7: error: '_IRrecv' has not been declared
  140 | using _IRrecv::timer;
      |       ^~~~~~~
/piolibs/IRremoteESP8266/src/IRrecv.cpp:174:3: error: expected unqualified-id before 'if'
  174 |   if (params.rawlen) params.rcvstate = kStopState;
      |   ^~
/piolibs/IRremoteESP8266/src/IRrecv.cpp:181:1: error: expected declaration before '}' token
  181 | }
      | ^
/piolibs/IRremoteESP8266/src/IRrecv.cpp:184:27: error: expected initializer before 'gpio_intr'
  184 | static void USE_IRAM_ATTR gpio_intr() {
      |                           ^~~~~~~~~
/piolibs/IRremoteESP8266/src/IRrecv.cpp: In member function 'void IRrecv::enableIRIn(bool)':
/piolibs/IRremoteESP8266/src/IRrecv.cpp:389:35: error: 'gpio_intr' was not declared in this scope
  389 |   attachInterrupt(params.recvpin, gpio_intr, CHANGE);
      |                                   ^~~~~~~~~
*** [.pioenvs/samsung-ac-remote-control/lib84c/IRremoteESP8266/IRrecv.cpp.o] Error 1
========================= [FAILED] Took 18.63 seconds =========================


I have followed the steps in the Troubleshooting Guide & read the FAQ

Yes

Has this library/code previously worked as expected for you?

No.

Other useful information

I found the same error here:

esphome/issues#5432

@crankyoldgit
Copy link
Owner

Processing samsung-ac-remote-control (board: wb3s; framework: arduino; platform: libretiny @ 1.4.1)

I think your problem is you're trying to build for a platform that this library doesn't support.
ie. wb3s is not an ESP8266 or a ESP32.

See the main README.md for this repository/project/library:

This library enables you to **send _and_ receive** infra-red signals on an [ESP8266](https://github.com/esp8266/Arduino) or an
[ESP32](https://github.com/espressif/arduino-esp32) using the [Arduino framework](https://www.arduino.cc/) using common 940nm IR LEDs and common IR receiver modules. e.g. TSOP{17,22,24,36,38,44,48}* demodulators etc.

@nagyrobi
Copy link

Fix in #2111

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

No branches or pull requests

3 participants