exsertus
The ramblings of an IT Professional, Long Distance Runner, Creative, and Maker of Stuff.
IoT Project Retrospective
Part 1, Software
24th February 2020
 4 min read
Categoriessoftware

I've been running a Internet of Things (IoT) project for about 6 years continuously, and the components / solution has evolved considerably, whilst the over function has remained the same. It's provided me with a neat springboard to learn and try out different technologies as they evolve.
The conceptual architecture is quite simple:
Since its inception the core technologies have been based around the following hardware:

Iteration #1

2013-2016, "The Arduino Years"

Rudimentary but a bit flaky, using a Ethernet based arduino as the controller/bridge, pinging the sensor "log" data to a remote backend - PHP based web app hosted on Register1. This same back-end existed until iteration #3 when I moved it to AWS.
At this point, the project was sensor only, hence just spewing out log reads every 15 mins for a small number of sensor nodes. Since the compute power on the Arduino was low, it was simply using AT command based commands rather than API, and hence receiving a string from the sensor nodes (CSV) and passing that up to a simple CSV based API. Not particularly elegant, but it worked.
Whilst this served a purpose, the processing power and durability of using an Ethernet Arduino as the local hub started to creak when I moved beyond just logging sensor readings (ie control). Time for more horsepower!

Iteration #2

2016-2018, "The RPi Years"

This iteration was actually the most stable in terms of change as it just worked and I kinda lost interest in the project for while. Moving to RPI had enabled the project to stretch its legs a bit and use:

Iteration #3

2018-2020, "The AWS Years"

Late 2017 / early 2018, I started learning working with AWS components for work, so what better way to learn, than through a pet project. This was very much a back-end migration piece where the DB, logic, API's and UI where ported across to AWS, specifically:
Iot Architecture, v3Iot Architecture, v3
Once migrated and stable, again I lost interest in it, primarily as it was just working fine; it was taking readings, producing some nice graphs (HighChart) and dashboards, plus it was watering the garden flawlessly!
HighCharts graph showing sensor node battery lifespanHighCharts graph showing sensor node battery lifespan

Iteration #4

2020+, "Cloud Native"

This brings us right up to date with the current iteration, which again was triggered as a work based learning exercise, as I'd been running a project that was really "doing cloud native properly", ie serverless architecture, infrastructure as code, full CI/CD pipelines and the the kitchen sink. So again, the functionality got picked up, refactored and in many cases completely re-architected:
Iot Architecture, v4Iot Architecture, v4
The most sizable change was to move away from a RDBMS and use S3 + Glue + Athena for the graphing. This probably warrants a series on its own, but to summarize:
Couple of key points around this architecture:

Iteration #5

Future

Unclear at this point, but would like to incorporate some ML and predictive analysis on the data, in particularly battery cycles. Beyond that, who knows!

More posts in this series: