Hello everyone
I have a problem when I want to compile my yaml code.
I want to use remote_transmitter but I have an error:
I put my code
esphome:
name: climtoshiba1
libretuya:
board: generic-bk7231n-qfn32-tuya
framework:
version: dev
# Enable Home Assistant API
api:
password: ""
ota:
password: ""
wifi:
ssid: ""
password: ""
# Enable fallback hotspot in case wifi connection fails
ap:
ssid: "Climtoshiba1 Fallback Hotspot"
password: "gJBhimkI3WdN"
captive_portal:
web_server:
port: 80
# Enable logging
logger:
# status_led:
# pin: GPIO4 #checked
# Configure the IR LED: this one sends commands to other devices
remote_transmitter:
pin: D5 #checked OU GPIO14
carrier_duty_percent: 50%
#Pour allumer :
button:
- platform: template
name: "17"
on_press:
- remote_transmitter.transmit_samsung:
data: 0xF20D03FC01000000
nbits: 64
somebody knows ?
thank you
Seems like
opened 12:07PM - 14 Jan 23 UTC
### The problem
I seem to be getting a compile error when trying to enable the … "remote_receiver:" option in the yaml config using the RP2040 platform.
`remote_receiver:`
` pin: GPIO20`
` dump: all`
` buffer_size: 1kb`
If I remove the above code snippit or hash it out the YAML will compile and upload to the RP2040
### Which version of ESPHome has the issue?
2022.12.3
### What type of installation are you using?
Docker
### Which version of Home Assistant has the issue?
_No response_
### What platform are you using?
RP2040
### Board
_No response_
### Component causing the issue
remote_receiver
### Example YAML snippet
```yaml
esphome:
name: liam-led
rp2040:
board: rpipicow
framework:
# Required until https://github.com/platformio/platform-raspberrypi/pull/36 is merged
platform_version: https://github.com/maxgerhardt/platform-raspberrypi.git
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
domain: .homea.local
remote_receiver:
pin: GPIO20
dump: all
buffer_size: 1kb
light:
- platform: rgb
name: "Liam LED Strip"
red: output_component2
green: output_component3
blue: output_component1
effects:
- pulse:
- random:
- strobe:
output:
- platform: rp2040_pwm
id: output_component1
pin: GPIO15
- platform: rp2040_pwm
id: output_component2
pin: GPIO13
- platform: rp2040_pwm
id: output_component3
pin: GPIO10
sensor:
- platform: wifi_signal
name: "Liam LED WiFi"
update_interval: 60s
```
### Anything in the logs that might be useful for us?
```txt
INFO Reading configuration /config/liam-led.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing liam-led (board: rpipicow; framework: arduino; platform: https://github.com/maxgerhardt/platform-raspberrypi.git)
--------------------------------------------------------------------------------
HARDWARE: RP2040 133MHz, 264KB RAM, 2MB Flash
- framework-arduinopico @ 1.20604.0 (2.6.4)
- tool-rp2040tools @ 1.0.2
Flash size: 2.00MB
Sketch size: 1.00MB
Filesystem size: 1.00MB
Maximium Sketch size: 1044480 EEPROM start: 0x101ff000 Filesystem start: 0x100ff000 Filesystem end: 0x101ff000
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
Dependency Graph
|-- WiFi @ 1.0.0
| |-- Updater @ 1.0
| | |-- MD5Builder @ 1.0.0
| | |-- LittleFS @ 0.1.0
| | |-- PicoOTA @ 1.0.0
| | | |-- LittleFS @ 0.1.0
| |-- MD5Builder @ 1.0.0
| |-- lwIP-Ethernet @ 1
| | |-- lwIP_CYW43 @ 1
| | | |-- SPI @ 1.0
| | |-- SPI @ 1.0
| |-- lwIP_CYW43 @ 1
| | |-- SPI @ 1.0
| |-- SPI @ 1.0
|-- LEAmDNS @ 1.2
| |-- lwIP-Ethernet @ 1
| | |-- lwIP_CYW43 @ 1
| | | |-- SPI @ 1.0
| | |-- SPI @ 1.0
| |-- WiFi @ 1.0.0
| | |-- Updater @ 1.0
| | | |-- MD5Builder @ 1.0.0
| | | |-- LittleFS @ 0.1.0
| | | |-- PicoOTA @ 1.0.0
| | | | |-- LittleFS @ 0.1.0
| | |-- MD5Builder @ 1.0.0
| | |-- lwIP-Ethernet @ 1
| | | |-- lwIP_CYW43 @ 1
| | | | |-- SPI @ 1.0
| | | |-- SPI @ 1.0
| | |-- lwIP_CYW43 @ 1
| | | |-- SPI @ 1.0
| | |-- SPI @ 1.0
|-- Updater @ 1.0
| |-- MD5Builder @ 1.0.0
| |-- LittleFS @ 0.1.0
| |-- PicoOTA @ 1.0.0
| | |-- LittleFS @ 0.1.0
|-- noise-c @ 0.1.4
| |-- libsodium @ 1.10018.1
|-- MD5Builder @ 1.0.0
Linking .pioenvs/liam-led/firmware.elf
/config/.esphome/platformio/packages/toolchain-rp2040-earlephilhower/bin/../lib/gcc/arm-none-eabi/10.3.0/../../../../arm-none-eabi/bin/ld: .pioenvs/liam-led/src/main.cpp.o: in function `setup':
main.cpp:(.text.setup+0x46c): undefined reference to `_ZTVN7esphome15remote_receiver23RemoteReceiverComponentE'
collect2: error: ld returned 1 exit status
*** [.pioenvs/liam-led/firmware.elf] Error 1
========================= [FAILED] Took 134.60 seconds =========================
```
### Additional information
_No response_
What baord are you compiling for? ESP8266, RP2040, ESP32?
Well since the error is appearing for both RP2040 and LibreTuya (I guess you are using this PR ) then the error is likely in the code base for the remote transmitter. With the “undefined referenced to vtable” error probably an unimplemented virtual function , meaning the code just hasn’t been expanded yet to work on the platform you want.
so there is nothing i can do about it?
I already know the frames I want to send and it is with the samsung protocol.
Sure you can do something about it, go into the source code, find where the RemoteTransmitterComponent
class is implemented, look for unimplemented virtual functions. That would be first guess.
how can i implement them ?
Have you already identified the missing functions?
Yikes. So basically every microcontroller has its own complete implementation and there’s no generic fallback implementation that works for all platforms.
I hope you have godly patience and a will of steel, this will require you to deeply study the microcontroller you’re working for, select the most appropriate hardware component to push out the bytes / generate the timing and write the code for it.
ouch…
I’m not able
Do you think i can change the CB3S into esp8266?
If you just want esphome and a remote transmitter, I’d recommend to get an ESP32 board that esphome supports, an ESP32 has way more storage and capabilities than even an ESP8266.
I need this one and I need it on home assistant. That’s why I thought of changing it to esp8266. If I do DIY it won’t be as clean. It’s weird that I can’t integrate it…
I don’t understand. Your current board has a BK7231 ARM-based SoC on it. That’s a completetly different chip compared to an ESP8266 or ESP32 (both XTensa/RISC-V). Even if you change your configuration file to say “compile for an ESP32 chip”, the resulting binary firmware will not work when put on your BK7231 o_O. They’re binary incompatible.