@TheOnlyNexus said in IR remote:
Thank you for your responses.
Just for me to sum up:
Is there already a complete .ino file of ESPimatic on GitHub that I can directly upload to the ESP with the Arduino IDE?
(Btw. I have never flashed an Arduino, so please bear with me if I don’t get it )
I would get an NodeMCU as an esp8266:
This has the esp8266 on-board. If you only buy an esp8266, you also need a usb converter to program it.
Also, order an micro-usb cable to power the NodeMCU, you also need it to upload the .ino through Arduino IDE.
You will need a receiver to get the raw commands. You can record it also with the NodeMCU:
And last but not least, how are you going to put it in pimatic? This is how i did it.
Create a new variable with the raw code you recorded as a value:
$aircopoweron has value 3356,1653,444,1184,363,1255,364,472,378,455,379,454,363,1256,363,472,362,471,444,1185,364,1255,363,472,362,1256,380,455,401,433,362,1256,363,1255,444,402,362,1255,364,1256,363,471,363,471,363,1255,403,432,362,472,443,1186,363,471,363,472,401,433,362,471,362,472,362,472,362,472,443,402,362,472,362,471,363,471,362,472,362,472,362,472,362,472,443,401,363,472,402,1215,364,471,362,472,362,1256,363,472,362,471,444,1185,364,471,362,472,362,472,362,471,363,472,402,431,363,471,443,1186,364,471,362,1256,363,471,363,472,362,472,402,431,362,472,443,402,362,1256,404,431,362,1256,363,471,363,471,362,472,362,1256,444,402,362,471,363,472,403,430,362,472,362,472,362,472,362,472,443,401,363,471,363,471,362,472,362,472,362,472,403,431,362,472,438,407,362,471,362,472,362,472,362,472,362,472,362,471,421,410,443,401,363,471,363,471,362,472,362,472,362,472,362,471,363,471,443,1186,363,472,362,472,362,1256,363,472,403,430,363,1256,362,1256,437
Then, we execute it by rule:
WHEN yourbuttonispressed THEN execute "sudo curl --silent --data 'action=ir&value=$aircopoweron' http://192.168.x.x/api > /dev/null"
As you can see, the action is IR and the value is the variable i mentioned. Replace ip with your ESPimatic ip.
I’ve made my IR sender with a old remote led and receiver from an old settop box.
For installing ESPimatic, see this page. Cant go wrong