Revision as of 14:59, 15 June 2018
Management - How to manage an IoT installation
Something that I noticed (even) at home: Once you deployed a number of IoT devices, some questions arise:
- Does a device have a problem?
- What devices are actually deployed?
- What software versions are in use (devices, IoT framework, capabilities)?
- What topics are in use? Who is publishing, who is subscribing? What is being published? How often?
- Security - 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)
Ingredients to the solution are
- Tools to monitor what is going on in the network
- Naming and Behavioral Conventions that allow for systematic collection and analysis of data, and for controlling devices
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.
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.
My devices report the software version of
- the device (like, "gardener")
- each capability (like, "watering", "temperature")
- the underlying IoT framework
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 - hmmm...
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?).