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:
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?
If you were at home you will see nothing on the HA map as it only displays location when you are away from your home location it could be that is your issue?
I need my iPhone to communicate with the mqtt broker on one of my Ha instances (using a secure port forward from domain.duckdns.org) , and have always done so via the mqtt setting in the app.
which now stopped working…
Although I hadn’t setup the integration by clicking add integration, it has always showed in the list of integrations. deleted that, as per instructions in the documentation, to add it again and received a ridiculously long url… entered that, but still no connection.
What is going wrong here?
just to be clear: I have 2 HA instances (mqtt broker on one of them) and need my iPhone to talk to both HA instances
please help me getting my Owntracks back? deleted the app and reentered my credentials didn’t help either btw.
where @deisi explains how t setup http connection, but how would that work for 2 Ha instances… couldn’t set the 2 web hooks in the one Owntracks app. This is really silly.
Just so you understand, your MQTT broker is never listening on 8123, since that service is handled by your HA. MQTT non TLS broker port is 1883, and TLS is 8883, so never would it have worked to point MQTT to 8123. Ever.
its just that all of a sudden things stopped working. And trying to follow the guidelines of the new integration doesn’t help. It doesn’t even mention the possibility of using the Mqtt setup, merely as a collateral pickup of the http integration.
Coming from a nicely tuned Mqtt configuration, reading all the issues people have with the new http integration, wasn’t very attractive, so I put all on getting the mqtt setup to work again.
Thanks to the authors on Owntracks GitHub, and a brainwave for a port forward, I have it back again…
both mqtt and device_tracker entities, via the owntracks: setup.
On all my Ha instances, via the clean Mqtt route. No horrendous entity-names, all very concise and simple.
btw, its never as black and white with these ports, since there are internal and external ports, defaults and non defaults… let alone on more than one instance ;-)), or maybe :-((
yes, its still working
without a hiccup. Still don’t understand what happened before, but Owntracks is steady as a rock again.
Mqtt is tailor-made used in my setups. very powerful.