My hands are almost bleeding from plugging and unplugging Molex connectors from the back of 26 Choral Greenwich devices, but it’s been fun. (Those damn things are almost impossible to take out, which is good; they don’t fall out by themselves!) I’ve told you about the Choral Greenwich before, but a lot has happened in the last three months.


First and foremost, my unstoppable friend Christoph, who also made OwnTracks for iOS and MQTT Inspector for iOS, has completely revamped the software onboard this vehicle and asset tracking device. With some advice from our friends at Choral, and a boatload of testing by both of us, we’ve transformed the software into something which is ready to roll and, in fact, has already been running live on six vehicles during the last couple of months without a hitch.

In particular, what we lovingly call the OwnTracks Edition of the software has the following features:

  • Publishing of location updates over MQTT with TLS
  • Device configuration via MQTT or SMS
  • Message payloads compatible with OwnTracks’ JSON which means you can use our OwnTracks apps to display location data on a smartphone
  • Watchdog resets the device if it becomes unresponsive
  • Over the Air (OTA) upgrades
  • GPIO (input and output) controllable over MQTT
  • Alarming if device is moved

and many more features which make this a very versatile and affordable device. In particular, I’m proud of being able to trigger an OTA upgrade directly over MQTT, which, a) saves on the cost of an SMS (relatively expensive with M2M SIM data plans), and b) allows us to seamlessly push software updates out into devices installed in the field. While OTA upgrades may sound expensive, the M2M data plan we’re using translates a full upgrade into 0.0416 €, which is almost not worth speaking of.

As for the JSON payloads, we’ve added a few elements. First and foremost, a so-called tid which we use also in the new iOS app to display what we call an “automatic face”, if you don’t want to associate a photo from your address book with an OwnTracks MQTT topic. Next up are cog (course over ground), vel (speed in KM/h), dist (distance covered in meters from the previous location published), and trip which shows the total distance covered since reset (and yes: you can zero this counter via MQTT).

    "_type": "location", 
    "alt": 497, 
    "cog": 223, 
    "dist": 1572, 
    "lat": "47.453453", 
    "lon": "8.703986", 
    "t": "t", 
    "tid": "AP", 
    "trip": 119779, 
    "tst": "1411120145", 
    "vel": 98

In fact we’ve already got our first “customer”, namely my brother in law, who’s ordered said 26 devices to put on tour buses they operate. He’s been so impressed with the first four, that he’s decided to put one in each of their vehicles.

Initial provisioning of naked Greenwich devices has been a bit of a pain, but we’ve now solved that rather nicely: a small program creates and sends the PDU SMS for the OTA upgrade, and off we go. Here’s a photo of my workspace during the last 20 hours or so.

Provisioning Greenwich

We’re also hard at work on an appropriate back-end which will collect and visualize data. This is almost ready and will be contributed to the OwnTracks project in due course. In addition to being able to display historic routes using GeoJSON we generate from the database, we’re making heavy use of “live” updates, which are provided by Mosquitto with Websockets.

table view

So, if you’re a fan of MQTT, and you’re looking for a very neat device for tracking the position of your vehicles, talk to me.

MQTT, GPS, and vehicle :: 18 Sep 2014 :: e-mail