owntracks / talk

Questions, talk about OwnTracks
30 stars 4 forks source link

Global Regions #176

Closed troycarpenter closed 5 months ago

troycarpenter commented 6 months ago

It would be nice to be able to add "global" regions that apply to all users on the server.

The way I understand region notifications, based on my experience, is that a user must create a region using a device in order for other "friends" to be notified the user is entering/exiting that region. With the concept of global regions, each user would not need to create a specific region for the rest of the friends to be notified. In fact, I would think most friend groups would be interested in a common set of regions across all friends.

It looks like user regions are stored in owntracks/+/+/waypoints. All the appropriate tools could store global regions further up the chain (like owntracks/waypoints).

jpmens commented 6 months ago

It would be nice to be able to add "global" regions that apply to all users on the server.

This is non-trivial as it strongly depends on how the MQTT broker (or HTTP server) for users is configured (think ACL).

What you might want to do, permissions assumed, is to publish new regions to devices. OwnTracks devices can accept remote cmd (commands) if so configured, and using our JSON {"_type":"cmd", "action":"setWaypoints", ...} you can add regions remotely.

troycarpenter commented 6 months ago

It would be nice to be able to add "global" regions that apply to all users on the server.

This is non-trivial as it strongly depends on how the MQTT broker (or HTTP server) for users is configured (think ACL).

What you might want to do, permissions assumed, is to publish new regions to devices. OwnTracks devices can accept remote cmd (commands) if so configured, and using our JSON {"_type":"cmd", "action":"setWaypoints", ...} you can add regions remotely.

Yes, I think I can do this. I'm using Home Assistant with their Mosquito broker add-on. Should be relatively easy to see a new waypoint added and then push it like you suggest.

Thanks!

jpmens commented 5 months ago

Closing as answered.