Good day,
I am trying to setup a couple of freezer monitors because we had our fridge go out a couple months ago and we lost a lot of food.
I am following this guide:
I don’t really understand MQTT that well, but unfortunately it appears that all the sensors are being published to the same topic “rtl_433/9b13b3f4-rtl433/events”. This includes random soil sensors and remotes that my neighbors must have. It also includes both of my freezer monitors.
In the guide linked it appears each device of the authors publishes different data to different topics.
In MQTT explorer if I highlight anything other than events I get no data. In MQTT configuration I can listen to a topic and events is the only one that populates anything.
So if I am getting events for 7 different sensors, how do I create devices out of only 2 of those sensors?
I tried adding identifiers, as shown in the YAML below, but it is updating both temperatures at once with the latest one polled, so they both always read the same temp, instead of the temp for the proper sensor.
Also, is it possible to just create 1 “device” in home assistant with the sensor data as attributes to that device, instead of just creating sensors for each attribute I am pulling?
mqtt:
sensor:
- name: deepfreeze_1_temp
state_topic: "rtl_433/9b13b3f4-rtl433/events"
json_attributes_topic: "rtl_433/9b13b3f4-rtl433/events"
value_template: "{{ value_json.temperature_F }}"
device_class: temperature
unique_id: deepfreeze_1_temp
unit_of_measurement: '°F'
expire_after: 600
device:
identifiers: 52815
- name: deepfreeze_2_temp
state_topic: "rtl_433/9b13b3f4-rtl433/events"
json_attributes_topic: "rtl_433/9b13b3f4-rtl433/events"
value_template: "{{ value_json.temperature_F }}"
device_class: temperature
unique_id: deepfreeze_2_temp
unit_of_measurement: '°F'
expire_after: 600
device:
identifiers: 53265
binary_sensor:
- name: deepfreezer_1_battery_ok
state_topic: "rtl_433/9b13b3f4-rtl433/events"
json_attributes_topic: "rtl_433/9b13b3f4-rtl433/events"
value_template: "{{ value_json.battery_ok }}"
payload_off: 0
payload_on: 1
unique_id: deepfreezer_1_battery_ok
device:
identifiers: 52815
- name: deepfreezer_2_battery_ok
state_topic: "rtl_433/9b13b3f4-rtl433/events"
json_attributes_topic: "rtl_433/9b13b3f4-rtl433/events"
value_template: "{{ value_json.battery_ok }}"
payload_off: 0
payload_on: 1
unique_id: deepfreezer_2_battery_ok
device:
identifiers: 53265
I tried to use the rtl433_autodiscovery addon and it worked how I wanted it, but for some reason the devices went unavailable after like 6 hours even though I can still see them publishing data in MQTT Explorer.
Thanks for your time.