OsmAnd turns any smartphone into a GPS tracker (Android). It reports location to your own or a hosted server with selected time intervals.
With the osmand channel, you can get the position data from your OsmAnd application straight into flespi.
In order to receive data from your OsmAnd application, you need to activate Online tracking in the TripRecording plugin settings.
In the Web Address field, you need to specify the address of the flespi channel and add the desired parameters. You also need to add the id parameter to identify the device.
Example of a Web Address field:
https://ch*********.flespi.gw:****?lat={0}&lon={1}×tamp={2}&hdop={3}&latitude={4}&speed={5}&id=test_id
Please note that by default, your channel will start an HTTPS server, so use "https://" prefix for the channel uri when configuring your osmand application on smartphone.
{ "ident": "352625333222111", "position.altitude": 273.61, "position.hdop": 0.7, "position.latitude": 49.069782, "position.longitude": 28.632826, "position.satellites": 18, "server.timestamp": 1650636570.426424, "timestamp": 1650636570.426424, "device.type.id": "OsmAnd", "channel.id": 1111, "protocol.id": "osmand" "engine.ignition.status": true ... }
curl -X GET --header 'Authorization: FlespiToken XXX' 'https://flespi.io/gw/devices/<device id>/messages'