I installed the add-on and see it’s working, created sensors and tested out the template json parsing with dev tools > templates, but I can’t get the state to change.
Any pointers?
Starting RTL_433 with parameters:
MQTT Host = 192.168.2.10
MQTT User = mqtt-user
MQTT Password = mqttpwd
MQTT Topic = homeassistant/sensor/honeywell
RTL_433 Protocol = 70
RTL_433 Frequency = 344975000
RTL_433 Gain = 0
RTL_433 Frequency Offset = 50
+ + read line
/usr/local/bin/rtl_433 -F json -R 70 -f 344975000 -g 0 -p 50
rtl_433 version 18.12-210-g7ab2894 branch master at 201905261917 inputs file rtl_tcp RTL-SDR
Trying conf file at "rtl_433.conf"...
Trying conf file at "/root/.config/rtl_433/rtl_433.conf"...
Trying conf file at "/usr/local/etc/rtl_433/rtl_433.conf"...
Trying conf file at "/etc/rtl_433/rtl_433.conf"...
Consider using "-M newmodel" to transition to new model keys. This will become the default someday.
A table of changes and discussion is at https://github.com/merbanan/rtl_433/pull/986.
Registered 1 out of 126 device decoding protocols [ 70 ]
Found Rafael Micro R820T tuner
Exact sample rate is: 250000.000414 Hz
[R82XX] PLL not locked!
Sample rate set to 250000 S/s.
Tuner gain set to Auto.
Frequency correction set to 50 ppm.
Tuned to 344.975MHz.
Allocating 15 zero-copy buffers
+ echo '{"time"' : '"2019-06-12' '23:56:06",' '"model"' : '"Honeywell' Door/Window 'Sensor",' '"id"' : 827623, '"channel"' : 8, '"event"' : 128, '"state"' : '"open",' '"heartbeat"' : '"no"}'+
jq --raw-output .model
+ tr -s ' ' _
+ DEVICE=Honeywell_Door/Window_Sensor
+ + jq --raw-output .id
echo '{"time"' : '"2019-06-12' '23:56:06",' '"model"' :+ tr -s ' ' _
'"Honeywell' Door/Window 'Sensor",' '"id"' : 827623, '"channel"' : 8, '"event"' : 128, '"state"' : '"open",' '"heartbeat"' : '"no"}'
+ DEVICEID=827623
+ MQTT_PATH=homeassistant/sensor/honeywell
+ '[' 28 ]
+ MQTT_PATH=homeassistant/sensor/honeywell/Honeywell_Door/Window_Sensor
+ '[' 6 ]
+ MQTT_PATH=homeassistant/sensor/honeywell/Honeywell_Door/Window_Sensor/827623
+ '[' -w /tmp/rtl_433.log ]
+ echo '{"time"' : '"2019-06-12' '23:56:06",' '"model"' : '"Honeywell' Door/Window 'Sensor",' '"id"' : 827623, '"channel"' : 8, '"event"' :+ 128, '"state"' : '"open",' '"heartbeat"' : '"no"}'
/usr/bin/mosquitto_pub -h 192.168.2.10 -u mqtt-user -P mqttpwd -i RTL_433 -r -l -t homeassistant/sensor/honeywell/Honeywell_Door/Window_Sensor/827623
+ read line
home-assistant.log
2019-06-13 00:22:03 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/honeywell/Honeywell_Door/Window_Sensor/827623: b'{"time" : "2019-06-13 00:21:21", "model" : "Honeywell Door/Window Sensor", "id" : 827623, "channel" : 8, "event" : 128, "state" : "open", "heartbeat" : "no"}'
binary_sensor:
- platform: mqtt
state_topic: homeassistant/sensor/honeywell
#state_topic: "homeassistant/sensor/honeywell/Honeywell_Door/Window_Sensor/827623"
name: "Honeywell Sunroom Door East"
qos: 0
device_class: door
value_template: '{% if (value_json.event is equalto 160) %} on {% elif (value_json.event is equalto 128) %} off {% else %} {{states.binary_sensor.honeywell_sunroom_door_east.state}} {% endif %}'
If I use the topic with the device id in it (like the commented line in the sensor), I see this…
2019-06-13 01:17:17 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/honeywell/Honeywell_Door/Window_Sensor/998796: b'{"time" : "2019-06-13 01:16:25", "model" : "Honeywell Door/Window Sensor", "id" : 998796, "channel" : 8, "event" : 0, "state" : "closed", "heartbeat" : "no"}'
2019-06-13 01:17:17 WARNING (MainThread) [homeassistant.components.mqtt.binary_sensor] No matching payload found for entity: Honeywell Front Door with state_topic: homeassistant/sensor/honeywell/Honeywell_Door/Window_Sensor/998796
````