Skip to main content

OsmAnd MQTT position reports

Status: In development: its code is written and tested on its own, but it does not work end to end on the platform yet. It cannot be installed.

KindVersionPublisherLicence
Device codec1.0.2ZAITRACKApache-2.0

What it does​

Trackers and phone apps on the OsmAnd protocol, as Traccar describes it: one position per message, its parameters as a URL query or form body (id, lat/lon or location, timestamp in seconds, milliseconds, ISO 8601 or yyyy-MM-dd HH:mm:ss, speed in knots, bearing, altitude, accuracy, hdop, batt, charge, cell, wifi, custom attributes). Built as a zaitrack:codec@1.0.0 component, loaded by codec-runtime from the adapter registry; devices reach it over MQTT (dev//data), profile mqtt-position-v1. Timestamp and coordinates are mandatory; speed uses knots. This is an MQTT adaptation, not a direct HTTP listener. HTTP/TCP/UDP WIT transports and all commands are refused. Candidate release; acceptance remains open.

  • Devices: vehicle_tracker
  • Transport: mqtt
  • Commands: None.
  • Capabilities: telemetry.position

How to use it​

Not yet: see its status above.

Configuration​

SettingTypeRequiredAllowed values and default
profilestringnoone of mqtt-position-v1; default "mqtt-position-v1"; Timestamped query/form position reports delivered over authenticated MQTT. No HTTP listener or commands.

Credentials​

None.

Limits​

It runs in codec-runtime's WASM sandbox, within these limits (the platform's own ceilings bound them too):

  • Memory: 16 MB
  • Time per call: 50 ms
  • Instructions per call (fuel): 50,000,000
  • Largest message: 8,192 bytes
  • Calls per second: 2,000
  • Network: no network access

Troubleshooting​

  • The device does not connect. Check the host and port its Connect page gives for your region, that the SIM has data and the APN is set, and that the device sends to that host (some send to the last server they were given).
  • It connects but no position arrives. The device must be registered with this protocol and the IMEI or serial it reports: a device the platform does not know, or a retired one, is refused when it connects. Trackers shows it as Check (never reported) until its first position.
  • Positions arrive with the wrong time. The protocol's timestamps are UTC; a device set to local time reports hours off. Set it to UTC.
  • A command does not reach the device. Only the commands listed under Commands are sent; the device must be online, and some models need the command enabled in their own configuration.

Source​

adapters/codecs/osmand