Home Sensor Network Part 0 - Prologue

Mar 15, 2023 · 852 words · 4 minute read

I've wanted to set up some kind of basic smart home/home sensor network for a while. It doesn't have to control anything (yet), just be an easy way of recording and seeing temperatures and home energy use. But I've been struggling to get going on this project for two reasons; young children which reduces the time I have to anything else, and option paralysis. I just want a simple set up, but what is 'simple'?

The fastest way would just be buy a setup, there are lots of options available, but this comes with big drawbacks. Cost is the biggest, and this is not something that I consider useful enough to spend any serious money on; in most cases if you buy some sensors and some kind of 'hub', then you're already on your way to spending a lot, and worse there may be some kind of subscription service required to continue using it. Another issue is control, your data may be locked away in a system which you can't get at, and if the company goes bust, or just changes its mind, you may be out of luck and unable to use your equipment.

This also provides very little learning experience, something also I want out of this project, so that option is out.

The next option is to integrate something yourself; set up a server of your own and then load some kind of pre-made software, either almost complete solutions like Home Assistant, or follow a tutorial that connects some of the more popular applications like InfluxDB, Grafana and Node-RED together. This is also a good option, its cheaper, gives you more choices and lets you keep control over your data.

The downside of this second option is that each of these individual bits of software is very complicated in itself, and you spend a long time fiddling with configuration files to try and get everything working well together. That tends to be frustrating, and the kind of frustrating that doesn't pay off with learning anything other than a specific configuration option, or discovering that somewhere some permissions aren't set correctly1.

So if they're all too complicated, what do I propose as a 'simple' solution? - easy; use simple apps and write most of the code yourself. No, wait, I have reasons!

As above, this is a hobby project, so I want to learn new things, as I enjoy that, and this is (mostly) meant to be about fun. This will also result in a simpler, more basic solution, that will be easier to reason about, hopefully reducing the amount of time fixing bugs takes, as well as there being fewer places for them to come from.

Don't worry, I'm proposing to write everything, I'll still be relying on 'real' software for all the heavy lifting. By sticking to a few tried and tested basics, my hope is that it'll be a system that is robust and require few upgrades.

Lastly the reason for doing it the 'basic' way, is that I kept putting this off as I keep re-thinking how it should be set up, and how much additional technology I have to get in there. In the last few years it feels like there's been a strong trend of using enterprise system tools and patterns on hobby projects: micro-services, containers, continuous integration, redundant databases and cloud services. All of these have their uses, and if you're running a system with many users and need high levels of availability, then they're appropriate.

For a little home project I think they add more overhead than advantage. Perhaps the people doing these projects have that experience professionally, so using all these systems is second nature, but if you don't I think it's added a whole level of extra complexity and off putting as each puts in a layer of abstraction that you have to understand.

With having small children, the amount of time I have to actually do anything, verses the amount of time I have to over-think how I'd do something is completely out of proportion, so when thinking about this in 2021 and 2022, I kept defaulting to a more complex architecture, and then not doing anything because I didn't know where to start. Luckily I ended up reading Dan Luu's In Defense of Simple Architectures and the Unixsheihk's post on Sqlite, both of which reminded me that maybe the loud noises are always around the latest enterprise technologies, but that even for large applications and businesses, a simple set up is one that works best. From reading around I know I'm not the only one suffering from this problem.

So this is why I believe my approach is the 'simple' one. The exact details of what that looks like will emerge in more detail as I work through this project, and not having everything figured out up front is an important step for me, a classic over-thinker. If I wait for everything to be 'perfectly' thought through in my mind before starting, I'll never start. Onwards.

Next: The Plan


Only if it's not DNS, or Docker.