owntracks / talk

Questions, talk about OwnTracks
30 stars 4 forks source link

Owntracks status in HA app device_tracker #140

Closed AcidSleeper closed 5 months ago

AcidSleeper commented 2 years ago

Hello there.

Have a strange problem with my Owntracks in Home Assistant. Need help. The problem occured when both my son and wife changed phones: my son phone did a new installation and my wifes phone copied the old phone settings.

  1. I have 3 phones (1 iphone, 2 android) connected to Owntracks in HA.

    • device_tracker.niclas_iphone_owntracks
    • device_tracker.sara_android_owntracks
    • device_tracker.gustav_mobilowntracks
  2. I also have device_trackers from Home Assistant app.

    • device_tracker.niclas_iphone
    • device_tracker.sara_mobil
    • device_tracker.gustav_mobil

The problem is that either "device_tracker.gustav_mobilowntracks" is somehow sending message to "device_tracker.niclas_iphone" and "device_tracker.sara_mobil" with is name and status. OR HA app is getting that info somehow from device_tracker.gustav_mobilowntracks. The normal status of HA app device.tracker should be "Hemma" /Home in swedish/. See picture. owntracks

Se configfiles for owntracks on each device: Saraconfig.txt Gustavconfig.txt Niclasconfig.txt

jpmens commented 2 years ago

A very brief glance at the *.txt files you’ve attached show differing types of specification for the deviceIds. That might be a source of confusion? I would carefully check those to see that they correspond to the names you are expecting to get. It’s useful to remember OwnTracks apps use owntracks/<username>/<devicename> as topics to publish to, by default.

Other than that we can likely not help you with HomeAssistant; you’d have to ask that project, please.

AcidSleeper commented 2 years ago

Im not very familiar with owntracks. Could you be more specific about the difference between theese 3 mobiles? Maybe edit them så there is no fault from my side. =)

Should deviceId be the same for all 3 mobiles?

Thanks!

jpmens commented 2 years ago

We cannot give you specific configurations as we're not clear as to what you need. You will want to pay attention to how you've configured "username" and "deviceId" as those are part of what makes the address (topic) that the apps use to publish location data.

All three devices will want distinct combinations. For example I can have two devices "owntracks/jpmens/phone" and "owntracks/jpmens/otherphone", and another friend might well have "owntracks/susanne/nokia". Depending on how HomeAssistant is configured you will likely have to configure these topics there as well.

Good luck.

AcidSleeper commented 2 years ago

So the deviceId should be different or not?

jpmens commented 2 years ago

So the deviceId should be different or not?

I can be different, but need not be. The full topic (owntracks/username/devicename) must be unique across all your devices.

The topic must match what the server obtaining your location data expects it to be.

AcidSleeper commented 2 years ago

I have a problem with this.

Can someone more qualified check the configfiles and see of something is strange and/or wrong in configuration. and perhaps change the configfiles to a correct setting.

I know that perhaps this isnt an OwnTracks issue and a HA issue with OwnTracks. But have to start somewhere and check of any potential wrongdoings by me.

ckrey commented 2 years ago

the configs seem to be ok.

We do not have in depth knowledge of HA. But you should check in HA the

AcidSleeper commented 2 years ago

Hey I checked Zones and there is something strange. BE2CE5D1-A9F3-4606-BF06-8B06AE3A3396

How could (if you know this) OwnTracks a zone!? This is why Im getting strange behaviour.

Whats the setting so Gustavs OwnTracks zone dont register in HA? The othe mobiles dont register their zone in HA.

AcidSleeper commented 2 years ago

Seems like I found ONE solution.

In HA settings there is a configuration thats called "waypoints:" - true or false. I had it to true but changed it to false. Also had to clear retained mqtt-messages.

But that doesnt explain why only 1 of 3 mobiles transfer their "zone" into HA. So it must be a setting in Owntracks on Gustavs mobile. But I cant find it.

jpmens commented 1 year ago

Have you been able to solve this on the HA side?

AcidSleeper commented 1 year ago

No. But set waypoints to false in above… havens had ANT problems since