I was wondering if you could guide me on the following:
I have an IR Dimmer Light Switch connected to 230V mains that controls the LED dimmers and is controlled by an IR remote controller.
I was thinking of connecting an IR emitter to a ESP8266 which controls the light switch after retrieving the IR codes of the IR remote controller. The ESP8266 would then be controlled by HA via MQTT.
Do you guys think this is possible? If yes, could you please guide me on how to get the ESP8266 linked to HA via MQTT i.e. HA controlling the IR remote?
Many thanks for your comments and taking the time to read my post.
That seems a good idea but I have many IR light switches in different rooms and floors, would the Broadlink RM2 pro be able to control the light switches on different floors?
I am looking into it now and wondering how to modify the IR file as it contains codes for various brands of TVs. I need to insert the codes for my IR Remote to control the IR light switch. Do you have any idea or have you done a similar project like this before?
What do you mean by IR file?
Regarding the gateway that @phileep pointed you just need to add your wifi and mqtt broker parameters, no needs to modify the IR commands.
-Set the parameters of wifi and mqtt
-upload the sketch into your esp8266
-put the IR diode with a transistor if you have
-subscribe with your borker to the topic home/sensors/ir
-press your remote control in front of the diode during several seconds
-record the code
-publish with your broker the code to the topic âhome/commands/sendNECâ
-if not working try different send topics
Next step is the HA connection on which there is several subjects dealing with it.
IR File : I meant the one that contains the IR codes in my case I am not using a TV instead I have the IR codes for my switch light remote which I thought I would have to put in the file/sketch?
no you donât need to put the codes in the file/sketch. The gateway is only a bridge between your MQTT broker and the IR signal (in both directions)
You publish a remote code from your file (by a command) to your broker and the gateway will translate it into an IR signal.
If you have mosquitto an example will be:
mosquitto_pub -t home/commands/sendSony -m 3609272523
3609272523 is the code coming from your file (copy/paste)
Cliking enter and pointing the IR diode to the right direction close enough to the device you want to control should command it.
ok I have a few questions for you:
1). I could use any IR remote i.e. not a TV Remote?
2). Can I use your setup without an IR receiver? because I have already decoded my IR remote control and have the codes.
when I publish the code to my broker to the topic âhome/commands/sendNECâ will these codes be stored permanently or would I have to send it everytime?
and finally if I do not want to use rf how shall I remove it from your setup? I only want to use IR.