Hi folks,
I finally got my ByeByeStandby 433MHz RF switches configured in HA RfCode payloads. While working through the triage to get them working I noticed that the Sonoff Bridge records the following in the log when a key is pressed on the remote:
22:33:37 SER: Received A4 2A 58 01 68 04 1A 14 00 15 55
22:33:37 MQT: tele/sonoffrfbr/RESULT = {“RfReceived”:{“Sync”:10840,“Low”:360,“High”:1050,“Data”:“140015”,“RfKey”:1}}
22:33:40 SER: Received A4 2A 4E 01 68 04 1A 14 00 14 55
22:33:40 MQT: tele/sonoffrfbr/RESULT = {“RfReceived”:{“Sync”:10830,“Low”:360,“High”:1050,“Data”:“140014”,“RfKey”:5}}
This set me away thinking that I could configure a sensor to change whenever a button on the remote was pressed, by monitoring for that payload, or more specifically the ‘Data’ portion. My intention ultimately is to use the sensor state in later automations.
The config of the Sensor doesn’t work and I even tried looking for the RfKey value instead as some others seem to have done, but neither work and the binary sensors always show as off in the front end.
The config I’m using is:
binary_sensor:
- platform: mqtt
name: “BB1button”
state_topic: “tele/sonoffrfbr/RESULT”
value_template: ‘{{ value_json.RfReceived.Data }}’
payload_on: “140015”
payload_off: “140014” - platform: mqtt
name: “BB1button2”
state_topic: “tele/sonoffrfbr/RESULT”
value_template: ‘{{ value_json.RfReceived.Rfkey }}’
payload_on: “1”
payload_off: “5”
I’m also seeing warnings in the logs:
2018-11-02 22:17:06 WARNING (MainThread) [homeassistant.components.binary_sensor.mqtt] No matching payload found for entity: BB1button with state_topic: tele/sonoffrfbr/RESULT
2018-11-02 22:17:06 WARNING (MainThread) [homeassistant.components.binary_sensor.mqtt] No matching payload found for entity: BB1button2 with state_topic: tele/sonoffrfbr/RESULT
Can anyone advise what is wrong with my configuration or advise of a better way to monitor for Remote key presses?
Thanks.