Skip to content

Java MIDlet Project that includes Paho library to send MQTT position messages with Choral Greenwich hardware

License

Notifications You must be signed in to change notification settings

owntracks/gw

 
 

Repository files navigation

OrionMqtt - OwnTracks Edition

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.

greenwich

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"
}

Features of the OwnTracks Edition

  • 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

Requirements

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.

Setup

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.

Resources

About

Java MIDlet Project that includes Paho library to send MQTT position messages with Choral Greenwich hardware

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Java 98.1%
  • HTML 1.1%
  • Other 0.8%