Logging your everyday life for fun and control.
Prelude
Internet of things is one of those phrases that more often than not make me zone out due to marketing fluff and buzzword over-usage. Like cyber, machine learning, the cloud, block chain and next generation <whatever>.
The problem I face is the abstraction level a lot of this information is presented at.
Take machine learning as an example. It is so often talked about like some magical, new method of making computers find out stuff all by it self. The fact of the matter is that it’s just using computers to calculate man-made math algorithms on data and adjusting it (either manually or automatically). No magic, just clever math.
And the cloud. It’s not some mystical, abstract data storage somewhere in fairyland. It’s just someone else’s computers.
Internet of things. What a silly name. Let’s demystify this one as well. It’s just stuff connected to the internet. Stuff like refrigerators, lightbulbs, webcams and garage doors. It should have been called the Things of Internet.
I love logs, statistics and graphs
Therefore I try to quantify as much as possible without the overhead of manual logging.
Enter Home Assistant.
My setup
Software
Even though I love my Apple devices I hate feeling locked in.
Contradictive, I know.
Therefore I have opted for Home Assistant to hook up a plethora of devices from multiple vendors. I have also set up Home Assistant to log to Splunk.
Hardware
My hubs, in chronological order of purchase:
- Tellstick Duo to control devices on the 433 MHz frequency.
- Aeotec Z-Stick to control Z-Wave.
- IKEA Trådfri Gateway controls IKEAs ZigBee enabled lightbulbs.
- Xiaomi Gateway controlling the Xiaomi Mi range of ZigBee devices.
I started out with 433 MHz devices controlled by the Tellstick. The local gadget shop (Clas Ohlson, for Scandinavians out there) has some combined temperature and humidity sensors as well as switches and dimmers. Sadly, the 433 MHz devices does not send any confirmation when receiving commands, so you might find yourself in a situation where the actual state of a switch is not reflected correctly in the software.
Later I wanted to try out the Z-Wave protocol. It has two-way communication, mitigating the aforementioned problem of misalignment between the physical state and the state represented in the software. There are also some fancy sensors, like the Aeotec Multisensor 6. It senses motion, vibration, luminance, ultraviolet radiation, temperature and humidity. Sadly, I have found Z-Wave to be a bit finicky. I had some issues with having it all working every time, every day.
The IKEA Trådfri line of lightbulbs and motion sensors is affordable and stable. I have newer had an issue with my lightbulbs. One big gotcha to keep in mind: It is impossible to hook up a lightbulb with the gateway directly. It must be hooked up via a Trådfri Remote control. I learned this the hard way, which cost me an extra trip to my local pusher of Swedish flat packed furniture.
But I wanted more sensors. A lot more. Possibly to automate stuff more and better, but definitely to log stuff more and better.
Cue the Xiaomi Mi line of IoT-stuff. They have a broad line of sensors for a moderately low price. I have currently bought a handful of door and window sensors, a couple of temperature and humidity sensors as well as a motion sensor. And of course the Xiaomi Mi Home Gateway 2 to hook it all up.
And it works exceptionally well.
So well in fact that I have doubled down and bought a bunch more of all the sensors in addition to some new sensor types. Among those are a couple of plant sensors. Because plants need statistical love too.
I plan to write more about this
Since I love logs, statistics and graphs I have installed the magnificent log analysis tool Splunk at home. This took some tweaking to get working, even though Home Assistant has a Splunk component.
My biggest inspiration has been to look at other peoples setup. That revolves largely around their config files. My configs are not sanitized yet but this is something I am working on to make them shareable.
My Home Assistant instance is running in a Docker container on an Intel NUC. I might write some lines about that as well.
There is also the big elephant in the room: Why am I doing this and towards what end? Well, obviously because it’s a lot of fun. But I intend to automate and notify based on the steadily inclining fidelity of information about what’s going on in my home.