In my previous post about GreenGoose I
described my initial experiences with this "Internet Of Things in a box"
product. Recently I've been trying their API and have integrated it into
my Home Automation System.
Click image to see it all.
The initial integration was easy, I used the new ASP.NET WebApi Core
Libraries (from Nuget) together with Newtonsoft Json.Net. GreenGoose's
datetime format is somewhat quirky but hopefully they'll move to a more
standard one soon. They are, however, also about to switch to OAuth so
it's going to require some more work when that happens.
Aside from a few simple WebAPI calls and some Json parsing the rest was
just a matter of connecting up the appropriate TimeSeries classes that I
use to track values that vary over time, declaring a few graphs, and
deciding what to log. With that in place I can now spin up a home
automation 'sensor' corresponding to any GreenGoose sensor Id and my
home automation system will add all of the relevant graphs and charts,
triggers and more for that device.
What's interesting is that a single sensor potentially serves a couple
of different purposes. The dog collar sensor for example polls regularly
back to the base station so it can potentially be used to sense both how
much exercise the dog has had but also simply whether the dog is at home
or not which could be really handy for anyone with a dog that's learned
to ignore the invisible fence! Each sensor can, through the TimeSeries
objects also offer additional data and triggers that can be used
elsewhere in the home, for example, an alert if the dog was walked less
than half and hour each day.
I've been working on home automation for over 15 years and I'm close to achieving my goal which is a house that understands where everyone is at all times, can predict where you are going next and can control lighting, heating and other systems without you having to do or say anything. That's a true "smart home".
An overview of the many sensors I've experimented with for home automation including my favorite under-floor strain gauge, through all the usual PIR, beam and contact sensors to some more esoteric devices like an 8x8 thermal camera.
Several years ago we did a major remodel. I did all of the finish electrical myself and supervised all of the rough-in electrical. I also put in all of the electrical system and water in our barn. I have opinions ...
An if-this-then-that style rules machine is insufficient for lighting control. This state machine accomplishes 90% of the correct behavior for a light that is controlled automatically and manually in a home automation system.