Hi guys,
Recently I’m trying to set up the device tracker
component to track my mobile phone’s location and support for presence detection. After reading through the official docs for device tracker
component, mqtt broker
component and OwnTracks
component, I got confused about how they work together.
From what I understand so far, the device tracker
component supports multiple platforms to grab device information from. MQTT broker is one of the supported platforms. Then I registered at CloudMQTT and start a cat plan, created a dedicated username, giving it a topic owntracks/{my-username}/{my-device-model}
with read/write access. Later I edited my configuration.yaml
file:
mqtt:
broker: m11.cloudmqtt.com
port: 23340
username: {my-username}
password: {my-password-for-username}
device_tracker:
- platform: mqtt
devices:
{my-device-id}: 'owntracks/{my-username}/{my-device-model}'
I installed the OwnTracks app and set it up to communicate with my CloudMQTT mqtt broker, the status says connected
and I can also see a connection from my device at the CloudMQTT admin portal. However, nothing appeared in my HA map and I didn’t get any sensor about the device.
I spent quite some time on this but still don’t know why it doesn’t work, could anyone help on this issue or pointed it out where I understand wrong?