From IoT with AME
Jump to: navigation, search

Home

IoT Management - How to Manage an Installation

Something that I noticed (even) at home: Once you deployed a number of IoT devices, you'll notice some things need addressing that haven't crossed your mind before:

  • How do I know a device has a problem?
  • What devices are actually deployed? Where?
  • What software versions are in use (IoT framework, devices, capabilities)?
  • What topics are in use? Who is publishing, who is subscribing? What topics are being published and subscribed to? What are the latest messages?
  • How do I secure the whole thing? Currently I rely on the privacy of my WLAN, but I guess message exchange via SSL would be "really nice" (and require a reworking of my infrastructure)

I came up with the following ingredients to the solution

Operational Status

All my devices are reporting their status under topic "<mqttID>/status". Subscribing to "+/status" gives me an overview about what devices are deployed, and how they are doing connection-wise.

Sometime devices even don't connect or experience other hangups. My devices use a self-developed logging facility called "Logsury" that, among others things, is able to output logging information via I2C. When I connect my programmer to a device I get logging output displayed on a LCD (note to self: extend to main connector to include A4 and A5; there are enough free pins to use). Of course, any other device capable of receiving I2C transmissions can display that information.

Network

Similarly, my devices report their IP and MAC addresses. Once devices are able to connect to more than one WLAN, they should report the SSID in use as well. This helps setting up routers, firewalls, and the like.

Additionally, I use a programmable RGB LED to display the (predominantly network) status of the device in a directly observable fashion. I get information about connecting to the WLAN, connecting to the MQTT broker, pings sent and received, and publications send and received. This actually has often helped me to pin-point troubles.

Software

My devices report the software version of

  • the IoT framework
  • the device (like, "gardener")
  • each capability (like, "watering", "temperature")

This allows me to find devices which need to be, or could be updated.

REM The Arduino/ ESP8266 combination I use does NOT allow for over the air updates. But, all devices have a plug that allows for in-place SPI programming. REM On a second thought - the Arduino could download the update to the ESP, and then the ESP flashes the Arduino. Or two Arduinos (€2.50 from China) flash each other. Hmmm...

Location

With enough devices deployed, the MQTT-ID may or may not tell you enough to find out where the device is physically located (maybe it even moves?). It would be nice to save the location as part of the configuration, and have the device report on it on request or when rebooting.

Home