Setting up Cloudmqtt, Owntracks and HA

hi there,

i’m trying to get mqtt, owntracks and HA to get to work together. My phone has the owntracks app on it and sends data to cloudmqtt. I can see that in the websocket ui. I used bruh automatisation tutorial for that:

my config file shows this:
mqtt:
broker: m21.cloudmqtt.com
port: 15904
username: <ha_account>
password:
client_id: homeassistant
keepalive: 60

device_tracker:

  • platform: owntracks_http
    interval_seconds: 10
    consider_home: 180
    track_new_devices: yes

zone:

  • name: Home
    latitude: x0.1x2x3x
    longitude: x.5x7x1x
    radius: 100
    icon: mdi:home

known_devices.yaml was not created so I created it on my own with following information:

oneplus5:
name: myName
mac: 9x:x5:xD:7x:xC:xE
picture: https://home-assistant.io/images/favicon-192x192.png
gravatar: [email protected]
track: yes
hide_if_away: no

I can see the device in the HA frontend with status away. The zone “home” shows up in the frontend as well and owntracks has the same home zone configured.

I cannot trigger the device status from not_home to home. What to do? It seems something is missing? Do you need some kind of port forwarding to get the information from cloudmqtt into HA?

Cheers
Sven

Please format your code properly (as stated in the bluebox above your post) this helps reading your code. As for your problem you seem to mix owntracks_http and MQTT. You should either follow these instructions:


Or this: