I’m a complete newbie on this and am using lots of your guys scripts and knowledge to get things up and running
I have used the code in the components area without any errors but I cant see to get any output or info into HA.
I know my MQTT is working as have send messages to the pi via HA but clearly am missing some coding or configuration of owntracks on my android phone to get the device from the phone populating HA
Any one managed to get this working. I have 4 kids and want to get this tracking software set up on their phones to use for safety and home automation
I’ve been using Owntracks and Mosquitto MQTT for about a year now. It works fairly well but you might also want to look at Zanzito too since it may offer more functionality, especially down the road.
Best way for us to help you out here is for you to post up your config files. Either through github or by using the pre-formatted text option (icon looks like “< />” above).
I was reading the https://home-assistant.io/getting-started/presence-detection/ and thought it seems a good idea. So far I have downloaded the owntracks app on my mobile , but not sure how to configure it . But the rest of the home assistant site doesn’t really help me put this all together
In my yaml file so far all I have is
device_tracker:
platform: owntracks
mqtt:
broker: my ip address
port: 1883
username: mydetails
password my details
I used BruH video to set this part up and test it and I know mqtt is good
I have also set up a zone
zone:
name: Home
latitude: my details
longitude: my details
radius: 100
As I have said , I am very new to this and have just copied a load of code from here and you tube tutorials to get it up and running.
Im my HA home page nothing appears at this point but when I check the code all seems good
I have discovery up and running and they haven’t appeared on the home page. I do have a number of different *.conf files for other devices like by tv and hue lights but nothing for this owntracks device. I’m still in testing at the moment so I have opened up the port forwarding for the mqtt broker but my device is sat on my internal network
I have the connect mode set to private MQTT and the host is my pi ip address and port 1883 and in identification I have put the username and password I set up on the pi , device ID I have put my name and tracker ID is blank.
Being a newbie I’m trying to piece this all together as I go along but I’m very raw with this
Well I’m no expert on this stuff either but I will help where I can, usually with just the basic checks. So let’s start there.
Being a newbie I’m going to assume that you don’t have iptables or firewalld running on your Pi/MQTT server. Generally speaking if you didn’t set it up it won’t be running.
First question is, after setting up the configuration file did you restart the Home Assistant service? It seems like a silly question but I can’t tell you how many “problems” I’ve spent time trying to figure out only to realize I either never saved the config or didn’t actually restart the service.
If you open OwnTracks and click the menu icon, at the very bottom it should have an option to view the status. (Sorry, doing this from memory since I don’t currently have OT installed on my phone). Does it show as connected?
For tracker ID just throw in a 2 letter system (like initials) for ease of following multiple devices from OT app.
Sounds like you’ve got it set up to run at home. Are you running a DDNS service? afraid.org, duckdns, etc etc etc.?
You should be able to hit the hamburger (3 dashes upper left corner) and go to the map on your HA webpage and see your devices, when they are away. I’ve never seen mine when I’m local on my LAN other than telling me I’m in the specific ‘Home’ zone which appears on the main dashboard.
At the moment I have registered duckdns but haven’t set up any port forwarding at home so not tested that far. as I was sat at home working yesterday I was hoping I could test from being inside my internal network. But im not even seeing a map on my HA set up
Im using a raspberry pi 3 running my home assistant install will MQTT broker set up on there
I will take a look at the tutorial later today as im in my office today and see if I can get it running
No map option on the left hand side to click?
No map at all?
Or just a patchy map?
In Chrome it works perfectly for me, but occasionally in Firefox i get a patchy map.
No map option at all - perhaps something is wrong with the HA install? The Map component is integrated, short of a reinstall of HA, I dont know how else to resolve that
As for the general functionality, take a look at this thread, and the links inside it
First thing Id do, is get your external DNS sorted, port forward in your home router, and then configure the owntracks app in your phone with the relevant details.
Once youve done that, the known_devices.yaml file should populate itself with your phones details providing youve got mqtt config right
If not, post any changes you made to any configs, any errors in your log, and the status of your owntracks app and we’ll see what we can do from there
I used the BruH video above and have set up my phone and my HA code below
device_tracker:
platform: owntracks
max_gps_accuracy: 200
mqtt:
broker: m20.cloudmqtt.com
port: 18014
client_id: HA-1
keepalive: 60
username: MY Username
password: MY PASSWORD
now at the top of my HA Console it does show im not at home and the details I was expecting so thank you all (like a sensor switch)
However , I want to take this one step further, I have seen some clips with actually maps appear in the main console , what do I need to add to my scrip to add that
so im not getting any errors as when loading up but not getting any map showing up on the home page instead I get is Generic Camera (Error loading image) . All I have done is remove the demo.paulus. in the device tracker and enter owntracks (see the code below) but im guessing this is the bit that is wrong and it cant get the map image to display
I already have a video camera set up in the house so it forms part of this code
Yeah, so all you need to do is add the owntracks app to whatever device, and when it checks in with your mqtt broker, your known_devices will get another few lines with a new device type in it. That will then show up as another entity in your home assistant.
For simplicity, you can use the same mqtt settings as you have in your first device which you have already set up
Rinse and repeat for all devices you want to show in HA
As for zones, in your YAML, you can use this
Note that, any devices that are in the HOME zone, will not show on the map. However, if you make a card to go on your home assistant view, you can list each device and its status. This will show ‘Home’ if its in the Home zone
brilliant I have got one of my children to add install owntracks and I can see his entry at the top of the HA screen at home so I know it has him but wondered will his image appear on the map when away from home without me adding another line in the yaml file for his device entity, like the one below for my device