As my fourth year bachelor’s project, I decided to do a project that straddled both the computing and electronics aspects of my degree. This therefore leaves the most obvious answer in the Internet of Things. I decided this aspect first, then went in search of something more interesting than a remote temperature monitor network. While in search of a problem while sat in the lab, the construction work going on with the building was being super annoying and loud- a perfect thing to monitor. Therefore, I went in search of ways to describe and monitor environmental noise.

This ended up being three aspects- a device based noise-to-weighted-loudness project, import and export APIs and a basic web dashboard. It’s a serverless cloud project mostly because I can’t be bothered to deal with putting it on my server and it was only going to be low usage anyway, so what the heck. Time to learn the ✨ cloud ✨. At the beginning I wanted to use the LoRAWAN gateway that the uni owns, but it turns out the building being made of about a million tons of solid concrete isn’t very helpful for passing low power RF through, so I bailed and made the ingest happen over WiFi instead (which had its own problems because eduroam is fucky and weird, but it worked log enough to demo).

The whole thing ended up on GCP because I wanted to keep everything on the same cloud and their hosted IoT gateway has the option to run standard MQTT over TLS on port 443, instead of anything more standards compliant which would be more work. I’m lazy, sue me. IMHO, GCP is probably the worst platform out there for anything serious and long term because (a) it’s slow as balls and (b) the supported languages for everything suck (Node 12 support came in the last 6 months, well over 2 years after its initial release).

In the end I could probably make the code more maintainable with something like protobuf to structure the device messages, but again, lazy. There’s only one kind of message, and it’s raw binary in [double, double, (endless list of uint_16’s)].

Ultimately, my final dissertation is hosted here. The serverless functions are at github blueish4/IndividualProject-functions, the simple dashboard’s code is at github blueish4/ip-dashboard and the device code is at github blueish4/IndividualProject-device.