Even before I was a home owner I wanted to automate the house and monitor energy usage, to the extent that it drove my parents mad. So when I bought a house a couple of years ago, I called my Energy provider and practically begged them to give me priority placement for a SmartMeter.
A little history
Fast forward two weeks later, and I was all set to start my automation / monitoring project. Being the geek that I am, combining all my electronic gadgets makes for a somewhat large energy footprint, so not only monitoring, but reducing energy usage was an interesting topic for me.
I already had a Raspberry Pi to tinker with, so I installed Domoticz as an easy and well-supported Home Automation package. Using a P1 to USB cable it was easy to get my SmartMeter data in Domoticz.
I added some CoCo (or KaKu in Dutch; Click On, Click Off) switches as well, to be able to control some of my lighting. To support the 433 Mhz signals used by CoCo I needed some additional hardware, but other than that, it worked really well!
Recently I thought: I’m a Mendix Consultant, working with IoT and BigData. Wouldn’t it be awesome to create my own custom dashboard, combining Mendix and Domoticz? And voilà! DoMenticz was born!
Since I mainly wanted to have insight in my energy consumption, my first step was getting my Smart Meter data in Mendix: mapping the data to create a graph and maybe show my current Gas and Energy usage for the day so far.
Using Mendix I was able to quickly consume an API created in Domoticz, which returns my current Energy or Gas usage. Without too much trouble (I only had to deal with some authentication issues to get my data) I retrieved my data, and was able to map it in Mendix to populate a graph. Next, it was easy enough to create some nice looking cards to create my desired overview.
Within a day (or night, rather) I was able to read my Smart Meter data in Mendix and show it in a graph. Most of that time was figuring out how the Domoticz API worked. The data is even refreshed every minute, to make sure I see the latest data possible!
Now that I figured out how the Domoticz API works, I can add some new features to my Dashboard, create some fancy styling and make the app more interactive. Once I have added some additional devices (lights and heating for example) I’ll be sure to create a new blogpost to keep you updated! Ideally I want to put up a tablet on a wall in our living room with this app on it and manage my entire house from there! One (important!) thing to keep in mind when working on home automation is the WAF (Wife Acceptance Factor) which can bring your entire project to its knees if not managed correctly 😉
Lastly, I cannot tell you all about my effort, and not show you a bit of the results, right? So here it is!