Can I use a flashed sonoff rf bridge r1 or r2 as a receiver for these 433 RF remote to trigger an automation or to turn on some of the tasmota sonoff basics?
Yes with a proviso that their encoding scheme is recognised.
Most of my remotes work, but I have a couple that are “433MHz” but only work wth the matched equipment.
If the are generic 433MHz remotes they should be fine. Just act on the MQTT topic the Sonoff bridge will send when a signal is received:
- alias: keyfob
initial_state: true
trigger:
platform: mqtt
topic: fob/remote
action:
- choose:
- conditions:
- condition: template
value_template: '{{ ''AWAY'' in trigger.payload }}'
sequence:
- service: alarm_control_panel.alarm_arm_away
data:
entity_id: alarm_control_panel.alarm
code: 'xxxx'
- conditions:
- condition: template
value_template: '{{ ''HOME'' in trigger.payload }}'
sequence:
- service: alarm_control_panel.alarm_arm_home
data:
entity_id: alarm_control_panel.alarm
code: 'xxxx'
- conditions:
- condition: template
value_template: '{{ ''DISARM'' in trigger.payload }}'
sequence:
- service: alarm_control_panel.alarm_disarm
data:
entity_id: alarm_control_panel.alarm
code: 'xxxx'
- conditions:
- condition: template
value_template: '{{ ''SOS'' in trigger.payload }}'
sequence:
- service: alarm_control_panel.alarm_trigger
entity_id: alarm_control_panel.alarm
default:
service: persistent_notification.create
data_template:
message: 'Invalid alarm fob data received: {{ trigger.payload }}'
In my case I have a python script that translates the original topic into something meaningful, but you could just act on the raw data as well.
Python script:
d = {
'0B4C81':['fob/remote','AWAY','true'],
'0B4C82':['fob/remote','DISARM','true'],
'0B4C84':['fob/remote','HOME','true'],
'0B4C88':['fob/remote','SOS','true'],
'DC6881':['fob/remote','AWAY','true'],
'DC6882':['fob/remote','DISARM','true'],
'DC6884':['fob/remote','HOME','true'],
'DC6888':['fob/remote','SOS','true']
}
p = data.get('payload')
if p is not None:
if p in d.keys():
service_data = {'topic':'{}'.format(d[p][0]), 'payload':'{}'.format(d[p][1]), 'qos':0, 'retain':'{}'.format(d[p][2])}
else:
service_data = {'topic':'433mhz/unknown', 'payload':'{}'.format(p), 'qos':0, 'retain':'false'}
logger.warning('<bridge_demux> Received unknown RF command: {}'.format(p))
hass.services.call('mqtt', 'publish', service_data, False)
So this has codes for 2 remote fobs in it.
Thanks for the fast reply. Hopefully I’ll get the hang of it once I get my hands on it now its just codes I don’t understand yet. I only have one Broadlink RF universal remote but that’s a different thing.
Thanks
Yep Node-Red is good for this sort of thing too - I used it for years. The only reason I changed is I thought Python may be faster (it wasn’t), but I do like using the one script for all 3 of my bridges so I kept it. You could probably do the same with Node-Red.
Your remotes may use some rolling code protocols such as Keeloq, in this case it maybe not easy to build a receiver. The easiest would be to open the case and check what chip is inside. But if those fobs send PT2262 type of signals then hardware mod of the Sonoff RF bridge may help.
I like Tasmota firmware, but not all supported libraries provide the decoding of protocols I need: Nexus/Rubiscon, Keeloq, etc. Finally I decided to implement my own decoder for Tasmota and add protocols I need. I published few projects on Tasmota/433MHz mods on Github.