Use RF button as trigger


#1

Is it possible to use a RF button as a trigger?
I have a Broadlink RM Pro setup which works great. I would really like to be able to use one of my RF remotes to trigger automations, scripts, scene’s, whatever.

This works fine if I “switch the switch” from the frontend:

- alias: 'Test automation'
  trigger:
    platform: state
    entity_id: switch.the_button
    state: 'on'
  action:
    service: media_player.play_media
    data:
      entity_id: media_player.home_group
      media_content_id: ##LINK_TO_MP3
      media_content_type: 'audio/mp3'

However, the Broadlink does not tell HASS that a button has been pressed, if I press the button on the remote my Hass also doesn’t know that the switch state has been changed from “off” to “on” (or vice versa). Therefor I can’t use it as a trigger.

Does anyone know if this is possible at all?


#2

So with broadlink how I think it works is you tell it a command via wifi (home assistant can do this), and it will execute the corresponding IR command. But, if you control broadlink from some other device (like a remote) then broadlink sends out the corresponding IR command, but home assistant will not know about it because it was never a part of the exchange at any point.

So I don’t think this is possible unless you add some sort of IR receiver to your pi, or whatever is hosting home assistant that could take in an IR command and tell home assistant to do something (not sure if possible)

Basically you need a way to control home assistant via IR commands, I think. Also you would have to teach broadlink what IR command to send out that could control home assistant, if that’s even possible.


#3

I think the main issue is that the Broadlink can listen to RF/IR signals (learning mode for example) but does not do it by default. Therefor it will never receive a request to pass something on to other instances (Home Assistant in this case).

I know that it is possible with an RFXCOM (you can use “button_pressed” trigger) but I’d rather not spend another €100 while the Broadlink is doing a great job.


#4

Well no matter what you would need a way for your home assistant to receive an IR or a RF command as a trigger… or some other device that can receive the IR/RF commands then transmit that via another protocol like wifi


#5

Well it’s true the broadlink is not able to do this. But you can always build your own as seen here: 433toMQTTto433 Gateway Device List with this you could read and write to IR and RF. I ordered my broadlink before I’ve seen that so I’ll stick to that as I don’t have any RF sensors or remotes. But this would allow both, control via IR and RF of HA.

~Cheers


#6

I have a seperate transponder + receiver but had some trouble learning codes. The day after that, I discovered the Broadlink so ordered it right away and never touched the transceiver kit again. Perhaps this will be a nice project for the weekend :wink:


#7

Or perhaps several weekends :smiley:


#8

Broad link has its own sensors (door and pir motion, I think). So how would it recognize those sensors events if it can’t operate as a receiver ?
Does it mean as the Broadlink DOES operate as a receiver ?


#9

Well I never said it’s not a receiver (In fact I know it has a receiving mode how else would it learn the RF/IR commands) just that this is not possible AFAIK with this piece of hardware. But if those sensors indeed would work with a RM Pro, that would mean the RM component in HA should be able to do this as well or at least should be able to be changed in a way that it supports those sensors as well.

~Cheers


#10

I thought the sensors talk to the app, or rather Broadlink’s servers, and then just use the RM Pro to do the switching.


#11

The door and pir sensors have an extra controller, called something like S1C smart security kit :wink:
Still waiting for mine, so I don’t have more details now