IoT Management: Difference between revisions
No edit summary |
No edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[IoT with AME|Home]] | [[IoT with AME|Home]] | ||
=Management - How to | =IoT Management - How to Manage an Installation= | ||
Something that I noticed (even) at home: Once you deployed a number of IoT devices, some | 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? | * What devices are actually deployed? Where? | ||
* What software versions are in use ( | * What software versions are in use (IoT framework, devices, capabilities)? | ||
* What topics are in use? Who is publishing, who is subscribing? What | * 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 | |||
* [[Tools]] to monitor what is going on in the network | * [[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 | * [[Naming and Behavioral Conventions]] that allow for systematic collection and analysis of data, and for controlling devices | ||
==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. | |||
All | |||
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== | ==Network== | ||
Similarly, | 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== | ==Software== | ||
My devices report the software version of | 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== | ==Location== | ||
With enough devices, the MQTT-ID may or may not tell you enough to find out where the device is physically located (maybe it even moves?). | 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. | ||
[[IoT with AME|Home]] | [[IoT with AME|Home]] | ||
__NOTOC__ |
Latest revision as of 17:05, 15 June 2018
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
- 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
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.