This project started off as a fork of Choral's OrionMQTT demo app. It is a Java MIDlet application which includes the Paho library to send MQTT position messages in OwnTracks format with Choral Greenwich hardware.
The Choral Greenwich is a Java based GPS- and GPRS-enabled sensing box for vehicles which, together with this application, enables it to routinely report a vehicle's position using the OwnTracks JSON format over MQTT. An example payload may look like this:
{
"_type": "location",
"alt": 160,
"batt": 12.2,
"cog": 130,
"dist": 18903,
"lat": "xx.xxxxxx",
"lon": "y.yyyyyy",
"vel": 82,
"t": "t",
"tst": "1406803894"
}
- Message payloads compatible with OwnTracks' JSON which means you can use the OwnTracks apps to display location data.
- Location updates on a per/time and per/moved distance basis. For example, publish location after vehicle has moved 200 meters or at most 120 seconds, whichever comes first.
- MQTT authentication
- TLS
- Subscription to a configurable topic branch for remote-control / information retrieval.
- Watchdog: device resets itself if GPS or GPRS unavailable or in case of the device hanging itself up.
- Configurable via SMS.
- Over the Air upgrades (OTA)
- MQTT Last Will and Testament (LWT) messages for monitoring
- The OwnTracks Live Map has support for the additional JSON elements provided by Greenwich.
- Configurable MQTT client-ID which defaults to the device's IMEI.
- GPIO states published over MQTT.
- Power-up handling:
- when ignition is switched on
- when movement with the builtin accelerometer is detected
- alarm clock
- Power-down handling
- when ignition is switched off
- movement sensor detects the device is stationary
- alarm clock
The app requires a Greenwich device as well as an MQTT broker such as Mosquitto or HiveMQ. Installing the app onto an existing Greenwich requires a serial connection.
The application is highly configurable. Note, that if you have been using a Greenwich, the format of the commands, as well as most of the configurable settings have changed.