I just checked the board manager and found the ESP8266 board support been locked at 2.0.0 (wifi freedom packet support) and that’s probably why the issue is similar to the nodemcu 0.9 issue. An upgrade to 2.3.0 solved it.
I am sorry as this was a local issue on my IDE and really appreciate your support.
I’m pretty sure I have everything set up correctly but no IR devices are responding.
I’m sending my code using mosquitto_pub with the right version of tv (sendLG in this case)
I’ve checked the IR is flashing and even recorded the IR transmission with the IR receiver and all checks out.
Depending on the IR led you are using you can be too far or not in the right direction. Try with the led at 10 cm to your TV IR receiver to check if it is the case. Did you made the circuit with a transistor?
Try also with the sendNEC command it looks more common, I have an LG tv and did my test with this command.
be carefull also about garbage codes you can receive, repeat the push on your remote control several time to extract the code that is coming back each time.
Changing to sendNEC worked. Turned the telly off while missus was watching Eastenders.
I found sending the codes from the remote under and tea towel cut out a lot of the noise.
Thank you so much for this work!
Last question.
I use RF already on Pi and with emulated Hue my echo dot can control them. Will this work with IR switches too?
I have a similar setup to yours but I am trying to control my IR Dimmable light switch using an IR Remote. I have decoded the IR Codes for my IR remote and I want to now use them to operate the switch using esp8266 board and connecting it to MQTT which will then be operated by HA via MQTT.
Could you please help me? and share your (IR + MQTT + HA) setup/project?
After days of trying this is what worked for me. I’m not interested in receiving to HA so I put the state topic as #. As recommended earlier I had more luck using home/command/SendNEC (worked on LG TV and Xbox one). You will have to try all the send… commands to see which works for you.
In terms of a switch I tried to group them but my knowledge of YAML is still poor so I clumsily made each switch like this, it gets the job done:
switch tv: (no space before)
platform: mqtt (2 space indent for all the rest)
name: “TV”
state_topic: “home/commands/#”
command_topic: “home/commands/sendNEC”
payload_on: 551489775
payload_off: 551489775
optimistic: false
retain: true
@bachoo786 I’m catching up to you on the forums. I’m glad you asked around. There would be no change to the sketch, even if your not using the 433 Mhz component. The sketch simply receives the code you put into HA via the MQTT topic and transmits this via IR. It also does this in reverse.
To make this dim-able at the moment would require creating several instances of the switch, one with the codes for on/off, one substituting the codes for 25% and 50% etc.
I’m wondering if there isn’t a component already created for HA that has a slider for dim-able switches that could be used or altered. Or even something like mysensors…
Can you please share your IR circuit I have managed to get MQTT wor king and everything is connected to HA but only for the circuit which I think is incorrect as I am try to emit the codes via the IR LED but it doesn’t seen to do anything.
My goal is to have two or three ESP8266 nodes around my house. I successfully replicated this project with one ESP8266 node so I added a second one to the mix. This node has a different client name, IP address, etc. but when I turn on the second node only one of them seem to work. I change the order of plugging in etc and basically the second unit turned on wins. So, I figured maybe they need different topics (home/upstairs/commands/MQTTto433, home/downstairs/commands/MQTTto433) to subscribe too and this hasn’t worked out either. I’m not clear on how to differentiate between the two (or three).