schollz / find3

High-precision indoor positioning framework, version 3.
https://www.internalpositioning.com/doc
MIT License
4.65k stars 366 forks source link

Add API endpoint to determine most likely location of client #41

Closed DatanoiseTV closed 6 years ago

DatanoiseTV commented 6 years ago

Even though we can currently determine the last known location of a client by sending a request to GET /api/v1/location/FAMILY/DEVICE, it would be useful to have a simplified API endpoint e.g. GET /api/v1/location_min/FAMILY/DEVICE which just returns the name and probability of the most probable last location. This would save a lot of memory on embedded devices by avoiding unnecessary JSON parsing.

schollz commented 6 years ago

Yeah, I agree that's a useful endpoint. I will add that.

DatanoiseTV commented 6 years ago

@schollz Another useful response in the endpoint would be the time in seconds when the client was last seen at that location.

schollz commented 6 years ago

Ok @DatanoiseTV, added in f2e6c947a7edc4f539d16d7c1acc0bf632ce88ed!

Try it here: https://cloud.internalpositioning.com/api/v1/location_basic/testdb/zack2@gmail.com

Let me know if that works!

I think it won't work on ESPs (I think), but FIND also supports some MQTT endpoints for more efficient transfers (just fyi!)

DatanoiseTV commented 6 years ago

It works just as intended.