This was supposed to be simple, but I’m tying myself up in knots. The ESP32 documentation… for some reason it’s not, “clicking,” in my head and AI has been driving me round the twist because it seems to be hallucinating.
The situation is straightforward. It’s an IR blaster and rather than on-board codes, I want to pass the strings from HA to the ESP32 (C3 Zero) to transmit, so that I don’t have to keep large sections of IR codes on the limited C3 flash.
Here’s my current code which is simply publishing buttons and then triggering, but the actual codes I need to send are nearly 900 characters long, so I’m not sure if I’m hitting limits anywhere…
How and where are you storing a 900 character long string in HA?
But yes, that could be the issue.
Each remote action is not that long is it?
So what if you use an input text, and an automation to change the value of the input text when the remote triggers?
But you really only want the one sensor attribute, and do the transmit in an on_value: block. Otherwise you still chew up memory. Maybe a combination of what @Hellis81 suggested with a HA sensor. I will have to think about it.
Thanks to the code snippets you kindly provided, I was able to get closer, and then adjust what I asked of AI. There’s a chance I might now have a solution… possibly… got to test.
I flashed a Tuya IR Blaster (has a BK7231N CB3S microcontroller) to use with ESPHome.
Just a couple of things I’d like to mention -
First, the ESP32 is a powerhouse compared to the BK7231N. On my device, I use a “script:” block to hold the pronto codes and use the “button:” block to execute the scripts directly on the device. The ESPHome HA integration will show any buttons I program under the device. It looks like this -
button:
# Family Room TV Controls
- platform: template
name: "Family Room TV Power"
on_press:
- script.execute: family_room_tv_power
Second, I reviewed your link. Great work! I can confirm that you need to use the Broadlink app to setup the device, BUT I would like to mention that Broadlink devices, once integrated into HA, can be removed from the Broadlink app and you can use your router’s firewall to block it from the WAN, making it fully local. I’ve done this with the RM mini 3 and the RM4 Pro.
Thanks for that. Yes, the ESP32 has a lot more going for it.
When I initially bought the blasters, I was intending to do just that. However, the maximum wifi password length is 32 characters, and I’m using the max. So I was somewhat stuck