Last year, we (finally) became home owners. Something I never really thought would happen, for many reasons (cost, desire to own, ability to live in one place for longer than 2 years and so on), but life changed, and it was the right thing to do.
So of course, I went all out with the “change everything” mindset that takes over when you move in to any new place, but more so knowing that it was mine, and I could do whatever I wanted to it (within reason).
I’d already been collecting a stash of “smart” devices, light bulbs, plugs etc. I thought it’d be quite cool to make a smart home hub that could run on any device to control all of these things, in one place, instead of having to install an app.
I knew it’d be running on an old android tablet I had, and that would be fixed to the wall via it’s magnetic wireless charger, at the bottom of the stairs (a nice central point on the ground floor), so I had a starting point in terms of design and user experience restrictions.
I had a list of requirements initially, but it grew somewhat after living here for a few weeks, so here’s what the home hub does now, and a list of the libraries etc I’ve used. It started very much as a technical light switch, but now it does a lot more!
Maybe I’ll release the code, but I fear it’s a bit too niche for anyone else to want (It’s PHP (Symfony), and a slim MySQL database behind it for the recipes, but that’s about it tech wise, very basic as it’s running on a Raspberry Pi in the loft). It just runs in Chrome, with some meta settings to ensure the viewpoint is correct and that it runs in full screen on the tablet.
Nothing. Much. At all.
So, at the moment, it does:
- Phillips Hue control
- Spotify Control (All speaker control for each room)
- Fan Heating in the bathroom
- Recipe planner
- Tide times (we live next to the sea, and it means we can check the tide times without getting to the beach and going “Crap, it’s high tide”
- Sunrise / Sunset
Here are some screenshots….
A big shout out to these folks, who, without your libraries, my home hub would be useless….
Spotify Web API (https://github.com/jwilsson/spotify-web-api-php)
TPLink Smart Plug (https://github.com/jonnywilliamson/tplinksmartplug)
Phillips Hue Client (https://github.com/sqmk/Phue)
The Met Office Datapoint API (http://datapoint.metoffice.gov.uk)
I think, to make it more usable by others, I’d need to create some kind of admin section where you can set the IP address of your devices, get access keys for Spotify etc, but right now, I don’t know if there’s any demand for that, so I won’t bother. Feel free to persuade me otherwise, though….!