owntracks / talk

Questions, talk about OwnTracks
30 stars 4 forks source link

Removing devices from db #161

Closed thecdnhermit closed 5 months ago

thecdnhermit commented 1 year ago

This is probably something I'm just not understanding one how Owntracks works, but I've been using Owntracks for a few years now and have switched up some device IDs. I need to know how to edit the database to remove nonexistent devices so my map isn't cluttered with current and old devices.

Can someone please help me out? Thanks!

jpmens commented 1 year ago

Assuming you mean remove IDs from the data store on the device, in the friends list you can swipe out one of the friends and it should disappear. Unless your mosquito broker will re-publish it in which case the device will obtain it again.

In order to remove those you need to publish a retained, null payload on the appropriate topic to the MQTT broker.

thecdnhermit commented 10 months ago

So apparently I'm not as active here as I should be.

Swiping a friend listing from the list, or attempting to, doesn't seem to change anything.

Can you give more details on the other option?

jpmens commented 10 months ago

Well, if you are using MQTT you would for each friend "delete" the retained message on broker-side. So, for a user jane with device android this would probably be

$ mosquitto_pub -h <your-broker-IP> -u <username> -P <password> -t owntracks/jane/android -n -r

With <username> and <password> being the credentials for your broker.

jpmens commented 5 months ago

@thecdnhermit have we answered your question?