A MQTT remote with sonoff/Tasmota and a LFN IR sensor

First!
Thanks to Dale3h wich made the first version,
and sinker1345 who got me on the right track for this JSON string
also Tinkerer & Ludeeus for all this support for us all!

Got an very old lightstrip laying around (You know this things with a IR Blaster for the colurs and an other part for the Power and reciving the message)
wanted to throw it in the garbage, but thourght… maybe i can use this LFN thing… so i just putted it on my “to try around” sonoff with all the cables outside - switching the GPIO14 to IR recv(gnd to gnd, vcc to vcc) and subscribing to tele/sonoff/RESULT…
WTF - Im getting a MQTT message… (hardest part for me was filtering the json string, took me a month =P ) and I can use an ordanary IR blaster to control ALL (insert evil laugh here)

sensor:
  - platform: mqtt
    name: "IR Data"
    state_topic: tele/sonoff2/RESULT
    value_template: '{{ value_json["IrReceived"]["DATA"] }}'
    expire_after: 1


automation:
- action:
  - data:
      entity_id: light.nachttisch
    service: light.toggle
  alias: IRTEST OK
  condition: []
  id: '1525091728944'
  trigger:
  - entity_id: sensor.ir_data
    platform: state
    to: BCB47

The data i recive is
tele/sonoff2/RESULT = {“IrReceived”:{“PROTOCOL”:“SONY”,“BITS”:20,“DATA”:“B47”}} # sony remote button 1
and the debug mqtt logger helped a lot

logger:
  default: warning
  logs:
    homeassistant.components.mqtt: debug
2 Likes

Can you tell me what the pin voltages are supposed to be for the infrared receiver? I know they are Vcc, Ground and out, but when I test mine it shows the Vcc=5 volts, Ground is well ground, and Out= 5 volts. My question is should there be 5 volts on both terminals without a button pressed? When I do press a button there is no change at all either.

1 Like

huh? the Sonoffs should have 3.3v
3.2v here and when I press a butten the voltage goes down to 2.6v (but my multimeter only costed 7$)

have a look here (tasmota wiki, Sonoff Basic)

https://camo.githubusercontent.com/90d51860fa05a2c0992d9f82e7a8bbaf5b5ebb5c/68747470733a2f2f63646e2e696e73747275637461626c65732e636f6d2f4638512f305538392f4a315745514b374a2f463851305538394a315745514b374a2e4d454449554d2e6a7067

did the same with a node MCU - works the same way.

Today i tried the same with a TSOP 4838, removed from a MagicHome LED Controller where i didn’t use it. Works like a charm connected to a NodeMCU, thanks for the info. Made some tests with an adjustable lab psu, this one still works with ~2.2V, datasheet says 2.5V - 5V.

1 Like

I have zemismart Universal IR remote which is ESP 8266 based.
I Flashed it with Tasmoto. Identified GPIO 14 as IR send pin.
How do I Identify & configure IR receive GPIO pin?
Please help

tywe3s