In this post I will be presenting a final wire up of the system I developed for Forget Me Not challenge. So now this is what I have at home. I have my raspberry pi hosting openHAB and running a couple of other scripts in my Living Room, beagle bone black at kitchen, Intel Galileo at bedroom and TI's Connected Launchpad for the outside devices.
Now the things are simple in openHAB. I have four pages in openHAB corresponding to each area. I have placed the enocean reed switches in the front door and the kitchen door as these are the only two doors providing access into the house. The enocean temperature sensors at living room and kitchen. Rocker switch is used as the universal remote control for each area, which adapts itself to control the devices in each area. Each room controller has two relays, one connected to switching main lamp in that room and other for the fan. In addition to that, raspberry pi in living room has an additional relay to switch the TV. Also BBB has a relay to control the exhauster fan at kitchen. OpenHAB has direct access to none of these devices. Whenever openHAB requires to switch one, it will send corresponding MQTT message to the room controller and room controller will in turn switch them on.
I tried to develop an android app for handling the MQTT based communication in the home network, but failed. I remember some body here saying - "Android can be hard!!". Anyway it was a good learning experience. For those who want to look in that direction, there is a bare bone code of an android app in Eclipse Paho project. So earlier this week I switched to my backup plan - to use "Notify My Android" App. OpenHAB has an addon to access NMA within your openHAB, so things were a lot more simple. Just setup the account in NMA, get the keys and use it with openHAB. I integrated only my reed switches to NMA system. When I'm away, if some one opens either front door or back door, I will receive a notification, except now I'm getting the notification 2 or 3 mins late. So testing this is really tough ( and boring too ).
For accessing my raspberry Pi from outside and hence my openHAB, first I tired to put yaler tunnel, but didn't get it working. So I switched back to simple port forwarding as it's much easier to setup though less secure. So now I have my home network online, I can connect to it by knowing it's IP address. But IP addresses change on every connection, or some times automatically on some days. So I have to find some other method for fixing this. I'll do that later.
Then came the challenge of using enocean gateway between my python script for rocker switch localization and getting readings from temperature sensor and reed switch. So I had to modify the python script to not only receive rocker switch radios, but also to put temperature and reed switch radios to MQTT messages and forward it to openHAB. As for those readings, I don't require a leader election, I can directly use those MQTT messages inside openHAB. With a slight hack with regular expression, now those sensor readings are in openHAN. Done!
Now for the forget me not part, I wanted to be get reminded if I left home turning on any of those lights. The question is how to detect the presence? I found some options like bluetooth and WiFi, but none of them appealed me as they are power hungry and I if I use that, then I may have to use another Forget Me Not App not to forget charging my phone. So decided to leave that as an open question. Anyway I have my raspberry pi online, so any time, I'll be able to check which are the devices are ON/OFF.
Regarding the builds, I don't have any specific hardware builds other than the relay circuits connected to room controllers. As all my room controllers are of 3v3 outputs, I used same design across all the controllers.
So that briefly covers what I developed for Forget Me Not Challenge.
Thanks folks for this wonderful journey,
vish