I’m trying to have sensors that track which room various devices (tile sensors, phones, watches, etc.) are in.
To that end, I set up a number of ESPresence nodes in various rooms in the house, enrolled the iPhones and iPads, and then added the following mqtt_room sensors in my configuration.yaml:
sensor:
- platform: mqtt_room
device_id: "irk:SECRET1"
name: "Eric's iPhone BLE"
state_topic: "espresense/devices/irk:SECRET1"
timeout: 5
away_timeout: 120
- platform: mqtt_room
device_id: "ipad_one"
name: "First iPad BLE"
state_topic: "espresense/rooms"
timeout: 5
away_timeout: 120
- platform: mqtt_room
device_id: "ipad_two"
name: "Second iPad BLE"
state_topic: "espresense/rooms"
timeout: 10
away_timeout: 120
- platform: mqtt_room
device_id: "tile:TILEID2"
name: "Checkbook Tile"
state_topic: "espresense/rooms"
timeout: 10
away_timeout: 120
- platform: mqtt_room
device_id: "tile:TILEID"
name: "Car Keys Tile"
state_topic: "espresense/rooms"
timeout: 10
away_timeout: 120
I’ve replaced the IRKs with macros for secrecy.
When I reload Home Assistant, the sensors eventually appear; the Tile sensors took more than 24 hours to appear, and I’m not sure why.
For clarity: All these nodes are visible in MQTT explorer, and are being updated regularly.
Now, my problem is that some of the sensors (the Tile sensors and the iPhone sensor) update correctly, but other sensors (the iPad sensors) do not; the values are always ‘not_home’, even though the rooms topic (espresense/rooms/my_room
) gets updates for ipad_one
and ipad_two
, and the topic espresense/settings/irk:MYIRK/config
has
{"id":"ipad_one","name":"IPad One"}
, as one would expect.
So - what am I doing wrong?
I do have autodiscover on, incidentally.