owntracks / quicksetup

A (mostly) automated installer for OwnTracks Recorder, Frontend with MQTT and Let's Encrypt
https://owntracks.org/booklet/guide/quicksetup/
12 stars 3 forks source link

User-specific waypoints for inline/otrc configuration #27

Closed jpmens closed 7 months ago

jpmens commented 7 months ago

Similarly to how we create friend-specific MQTT ACLs, we could add user-specific waypoints to the inline/otrc configuration during bootstrapping.

A directory waypoints/ would contain <username>.json with an array of waypoints which is merged into .otrc.

This permits, say, a family to pre-configure "Home", "Sports", etc. for certain or all members.

ckrey commented 7 months ago

or, we could split the waypoints from the config and add an .otrw and inline equivalent

jpmens commented 7 months ago

Also a good idea, but I think it'll be easier for users to create a JSON array of waypoints -- syntax is a bit easier.

jpmens commented 7 months ago

Also inline otrw would mean changing our android app which I'd like to avoid

ckrey commented 7 months ago

Also a good idea, but I think it'll be easier for users to create a JSON array of waypoints -- syntax is a bit easier.

The waypoints array in .otrc is the same as in an .otrw

jpmens commented 7 months ago

which is wrapped into a dict with two additional elements:

{
  "waypoints" : [
    {
      "tst" : 1432817332,
      "lat" : 52.0,
      "lon" : 6.0,
      "rad" : 0,
      "desc" : "Main@WestWing"
    }
  ],
  "_type" : "waypoints"
}

We might support both:

jpmens commented 7 months ago

Ready for testing. Documentation here.