Converting an existing Arduino sketch to ESPHome

I have six motorised vertical blinds from Hunter Douglas which supports IR or RF 2.4Ghz to control them. The RF option is preferred given I can control multiple blinds (via groups) without line of sight.

I found a sketch file online which allowed me to capture the RF payload the remote was sending for each direction and groups and modified it to use a basic web call interface to control and have it working in HA. It currently runs on an ESP8266 with a connected nRF24l01 board. I turned off state maintenance as it was overly complicated to monitor the timing of open/close actions and reflect the state accurately.

I’m wondering if it is possible to convert this sketch to instead run via ESPHome, either on the same hardware or on an esp32 - mainly to simplify maintenance but also to be able to take advantage of open_duration/close_duration to maintain state more accurately.

I’ve also found the ESPHome instances I already have running seem to be more reliable generally and respond quicker to incoming requests compared to this Arduino instance.

Happy to send through the sketch file if it’s any use to anyone with the same or similar blinds.

Yes you can. There is no one to one correspondence. You’ll have to figure out esphome.

Thanks Nick. Any pointers or example code on transmitting an RF payload on a particular channel using my current hardware? I’ve got the blinds defined in ESPHome, just missing the code to init the RF and then broadcast the open/close commands, and have struggled to find a working example.

1 Like

I have carefully placed door sensors on mine for reliable fully open state (ie open endstop).

Then my send commands have repeats/loops with a delay that break on state changes.

1 Like