Using TV Remote turn Lights ON/OFF

This Is about Joining the Dots to Show how I used my TV remote to turn My Lights ON/OFF

love the wemos and Tasmota

so find this

https://wiki.wemos.cc/products:d1_mini_shields:ir_controller_shield

these are the input outputs

after uploading tasmota on to the wemos
I setup the the wemos

on the remote
just doing the colors

image

I press the BLUE one
I see this in the console

then a made rule1

rule1 on IrReceived#Data=100CECF do publish IR/CODES BLUE endon

rule1 1 turn it on

it work bugger

so press each color buttom on remote got the codes
and build rule1 up

rule1
on IrReceived#Data=100CECF do publish IR/CODES BLUE endon
on IrReceived#Data=1004E4F do publish IR/CODES YELLOW endon
on IrReceived#Data=1000E0F do publish IR/CODES RED endon
on IrReceived#Data=1008E8F do publish IR/CODES GREEN endon

get me thinking
can I MQTT the other data

wrote rule2

rule2
on IrReceived#Data do publish IR/REMOTE %value% endon
on IrReceived#Protocol do publish IR/Protocol %value% endon
on IrReceived#Bits do publish IR/Bits %value% endon

rule2 1 turn it on

NOW do more reading and work out how Irsend works

now get it into HA in the senor file i added

#=======================================================================
#
#=======================================================================
  - platform: mqtt
    name: "IR codes"
    state_topic: "IR/CODES"
    qos: 1
#=======================================================================
#
#=======================================================================
  - platform: mqtt
    name: "IR Remote"
    state_topic: "IR/REMOTE"
    qos: 1
#=======================================================================
#
#=======================================================================
  - platform: mqtt
    name: "IR Protocol"
    state_topic: "IR/Protocol"
    qos: 1
#=======================================================================
#
#=======================================================================
  - platform: mqtt
    name: "IR Bits"
    state_topic: "IR/Bits"
    qos: 1

#=======================================================================
#
#=======================================================================

NOW the fan bit the automations

#=======================================================================
#
#=======================================================================
- id: 'BLUE IR'
  alias: BLUE IR
  trigger:
  - entity_id: sensor.ir_codes
    platform: state
    to: 'BLUE'
  condition: []
  action:
  - data:
      entity_id: light.hallway
    service: light.toggle
  - data:
      payload: "IR-BLUE"
      topic: "IR/CODES"
    service: mqtt.publish

as I want the Light to toggle with press the same blue botton on the remoto
had to send a differance payload to the IR/CODES was “IR-BLUE”
other wise the toggle would not work.

injoy

and all four color on the remote to differance light in the house.

remember YOU have to point the remote to the IR Controller Shield to turn the lights ON/OFF not the lights ok how did i work that out

1 Like

I did also use the ir_controller_shield with the d1 mini, but used


for the firmware.

Now i have 20 binary_sensors to use in automations.
20190604_13%3A52%3A47_001

It worked best for me with an universal remote and dvd panasonic settings.

found this

Got it open it

Tasmota it

Now the thinking out side the SQUARE remote

image

gave it the MQTT message

and change the rule

rule1
on IrReceived#Data=12E9 do publish IR/CODES BLUE endon

and bugger its work didn’t have to reboot Has change anything

now

press the blue button on the tv remote in lounge hall light toggles

press the blue button on the TV remote in bedroom (sony) toggle the hall light.

working on the other colours (colors) in bedroom to do other things

I use a harmony remote, so created an emulated Roku in Hass, then added it as a device in harmony.
Then programs my colour buttons to Roku key presses and set up automations that listen for these and call the relevant scenes. Works wonderfully

1 Like

cool Nice one

the more you do it the more you push it the more you think out side the square (remote) LOL