BPidk
February 21, 2024, 9:20pm
1
I am trying to get data from MQTT into Home assistant.
Data origin is a RF pir sensor.
Recognised in MQTT Explorer but never seen as a device in HA.
Configuration.YAML looks like this:
binary_sensor:
#Your PIR
- platform: mqtt
name: "PIR1"
state_topic: "tele/rf-bridge1/RESULT"
value_template: '{{value_json.RfReceived.Data}}'
payload_on: "FD6AAE"
payload_off: "FD6AAE_off"
device_class: motion
off_delay: 5
qos: 1
#Backdoor
- platform: mqtt
name: "Backdoor"
statte_topic: "tele/rf-bridge1/RESULT"
value_template: '{{value_json.RfReceived.Data}}'
payload_on: "A991A9"
payload_off: "A991A9_off"
off_delay: 5
device_class: door
qos: 1
Any help pls.
123
(Taras)
February 21, 2024, 10:49pm
2
The configuration you created for the two MQTT Binary Sensors uses an outdated format.
Refer to the documentation for examples of the new format.
BPidk
February 23, 2024, 8:06am
3
Thanks. I have looked into the documentation, but still not able to get the results into HA. I’ll continue after the week-end.
What software is running on your RF bridge device? Topic seems suspiciously like Tasmota. If so, all you need is the Tasmota integration installed & you won’t need to manually write the yaml.
Ps. You have a typo for backdoor. Statte_topic instead of state_topic
BPidk
February 23, 2024, 4:45pm
5
Yes, You are right, I’ts Tasmoto.
I use Tasmoto for Switches w/o nay problems nor Yaml code.
Hmm, not sure I understand. Aren’t those devices shown as entities or events under your rf bridge?
I’d just try what Taras said - he’s pretty spot on with his answers
BPidk
February 23, 2024, 11:13pm
7
My switches loaded with Tasmota come as Device and entity under Tasmota, and working perfectly.
They are not under RF Bridge.
Sonoff 1
switch.sonoff_1
Tasmota
Stue
—
Sonoff 1 Last Restart Time
sensor.sonoff_1_last_restart_time
Tasmota
Stue
—
Sonoff 1 MQTT Connect Count
sensor.sonoff_1_mqtt_connect_count
Tasmota
Stue
—
Sonoff 1 Restart Reason
sensor.sonoff_1_restart_reason
Tasmota
Stue
—
Sonoff 1 SSID
sensor.sonoff_1_ssid
Tasmota
Stue
—
Sonoff 1 WiFi Connect Count
sensor.sonoff_1_wifi_connect_count
Tasmota
Stue
BPidk
February 23, 2024, 11:44pm
8
Output from MQTT Explorer
{"Time":"2024-02-24T00:36:42","RfReceived":{"Sync":12630,"Low":410,"High":1240,"Data":"A991A9","RfKey":"None"}}
bridge1
LWT = Online
RESULT = {"Time":"2024-02-24T00:39:52","RfReceived":{"Sync":12600,"Low":430,"High":1210,"Data":"FD6AAE","RfKey":"None"}}
STATE = {"Time":"2024-02-24T00:38:12","Uptime":"8T02:50:12","UptimeSec":701412,"Heap":26,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":2,"Wifi":{"AP":1,"SSId":"DD-WRT-L44","BSSId":"14:CC:20:B4:FF:9B","Channel":9,"Mode":"11n","RSSI":72,"Signal":-64,"LinkCount":1,"Downtime":"0T00:00:03"}}
INFO1 = {"Info1":{"Module":"Sonoff Bridge","Version":"12.3.1(tasmota)","FallbackTopic":"cmnd/rf-bridge1_fb/","GroupTopic":"cmnd/tasmotas/"}}
INFO2 = {"Info2":{"WebServerMode":"Admin","Hostname":"rf-bridge1-4678","IPAddress":"10.1.44.253"}}
INFO3 = {"Info3":{"RestartReason":"Power On","BootCount":36}}