Iāve been running this very useful strategy for almost three years now and it works superbly with my 5 RF Bridge devices.
Iām now moving to another hardware option for HA and not all of my RF devices are available in the front end.
My rfbridge_demux.py file is as below:
d = { 'D3226E':['garage_motion','ON','false'],
'51F65A':['telegraph_pole_garage','ON','false'],
'119B0A':['garage_door','ON','true'],
'119B0E':['garage_door','OFF','true'],
'715FFF':['gym_motion','ON','false'],
'9F150A':['garage_motion_2','ON','false'],
'49732E':['courtyard_gates','ON','true'],
'497327':['courtyard_gates','OFF','true'],
'F9010A':['back_door','ON','true'],
'F9010E':['back_door','OFF','true'],
'91F60A':['gym_door','ON','true'],
'91F60E':['gym_door','OFF','true'],
'71BDEE':['front_door','ON','true'],
'71BDE7':['front_door','OFF','true'],
'C5790A':['fridge','ON','true'],
'C5790E':['fridge','OFF','true'],
'A68B23':['letterbox','ON','false'],
'142186':['stable_motion','ON','false'],
'54F65A':['north_east_pir','ON','false'],#
'45F64A':['north_central_pir','ON','false'],#
'4DF64A':['north_west_pir','ON','false'],#
'49F64A':['garage_north_pir','ON','false'],#
'59F65A':['pergola_pir','ON','false'],#
'6DF66A':['courtyard_pir','ON','false'],#
'61F66A':['south_central_pir','ON','false'],#
'AA0D0A':['south_central_pir_2','ON','false'],#
'850E0A':['south_east_pir','ON','false'],#
'780E0A':['firepit_pir','ON','false'],#
'32F63A':['carpark_pir','ON','false'],#
'64F66A':['driveway_1_pir','ON','false'],#
'42F64A':['driveway_2_pir','ON','false'],#
'545F10':['firepit_2_pir','ON','false'],#
'3EF63A':['garage_west_pir','ON','false'],#
'54F65F':['north_east_pir_battery','ON','false'],
'45F64F':['north_central_pir_battery','ON','false'],
'4DF64F':['north_west_pir_battery','ON','false'],
'49F64F':['garage_north_pir_battery','ON','false'],
'59F65F':['pergola_pir_battery','ON','false'],
'6DF66F':['courtyard_pir_battery','ON','false'],
'61F66F':['south_central_pir_battery','ON','false'],
'AA0D0F':['south_central_pir_2_battery','ON','false'],
'850E0F':['south_east_pir_battery','ON','false'],
'780E0F':['firepit_pir_battery','ON','false'],
'32F63F':['carpark_pir_battery','ON','false'],
'64F66F':['driveway_1_pir_battery','ON','false'],
'42F64F':['driveway_2_pir_battery','ON','false'],
'545F1F':['firepit_2_pir_battery','ON','false'],
'3EF63F':['garage_west_pir_battery','ON','false'],
'861B2F':['courtyard_gates_battery','ON','false'],
'71BDEF':['front_door_battery','ON','false'],
'D7159F':['gun_cabinet_door_battery','ON','false'],
'2479EF':['catflap_battery','ON','false'],
'A74723':['awning_vibration','ON','false'],
'A7472F':['awning_vibration_battery','ON','false'],
'51F65F':['telegraph_pole_garage_battery','ON','false'],
'9F150F':['garage_motion_2_battery','ON','false'],
'C5790F':['fridge_battery','ON','false'],
'D3226F':['garage_motion_battery','ON','false'],
'F9010F':['back_door_battery','ON','false'],
'A68B2F':['letterbox_battery','ON','false']
}
p = str(data.get('payload'))
if p is not None:
if p in d.keys():
service_data = {'topic':'home/{}'.format(d[p][0]), 'payload':'{}'.format(d[p][1]), 'qos':0, 'retain':'{}'.format(d[p][2])}
else:
service_data = {'topic':'home/unknown', 'payload':'{}'.format(p), 'qos':0, 'retain':'false'}
logger.warning('<rfbridge_demux> Received unknown RF command: {}'.format(p))
hass.services.call('mqtt', 'publish', service_data, False)
All of the devices with a ā#ā at the end of the line are showing up - but no others.
The automation is as below:
- alias: "rfbridge_demultiplexer"
trigger:
- platform: mqtt
topic: tele/Garage_RF_Bridge/RESULT
- platform: mqtt
topic: tele/RF_bridge_west/RESULT
- platform: mqtt
topic: tele/RF_bridge_east/RESULT
- platform: mqtt
topic: tele/RF_bridge_stable/RESULT
- platform: mqtt
topic: tele/RF_bridge_1st_floor/RESULT
action:
- service: python_script.rfbridge_demux
data_template:
payload: "{{trigger.payload_json.RfReceived.Data}}"
What could be the reason for this?