Home automation with Remoht.us
Remoht.us is a demo I created that parallels in many ways the work I do during my day job: push-based device control and telemetry. Remoht.us a web app and client software that let you monitor environmental sensors (in this case temperature, light and occupancy) and also allows toggling relays. It also uses technology that is accessible to the average joe: Google AppEngine for the UI, the Raspberry Pi as the hardware gateway and the Arduino for the low-level sensor control. (I am tempted to also add XBee support for multiple sensor clusters but that will wait for now.)
There are two particularly interesting things about this project: (1) the main UI runs in the cloud, which makes it easily accessible without static IPs, firewall rules and NAT traversal, that you would typically need if you ran a UI directly on the Raspberry Pi, and (2) it is entirely push-based, from cloud to device and vice-versa.
Here's a block diagram of the system:
There are a couple technologies that I'm leveraging to accomplish the "push" features of the application. First, AppEngine's Channel API allows me to send real-time telemetry from the cloud to the client. Second, I'm using AppEngine's XMPP support to allow the cloud app to push commands to the Raspberry Pi without it needing to poll the server. When I click to toggle one of the relay buttons, the response is nearly instantaneous. And if I cover the ambient light sensor or wave my hand in front of the PIR, it updates on the client UI immediately.
Finally, the app also takes advantage of Google's built-in authentication. So the account you login to on remoht.us is the same account that would use for the Google Talk (XMPP) credentials on the Raspberry Pi, which makes setup considerably easier. Conceivably, anyone could use the actual app running at http://remoht.us since they will only see their own devices. In practice though, I don't really expect that to happen long term since AppEngine's resource limits for their free tier aren't tremendously high :)
Check out the code, including schematics for the Arduino sensors on Github!
(Comments are closed)
4 Comments
Coolest thing about the RFBee is, if you already have a regulated power source, you could re-use the ATMega uC on the RFBee for both the data collection and transmission. But the RFM12b is a great low-cost option when paired with a 'duino. Actually I'm a bit surprised nobody has made a custom Arduino with a drop-in slot for an rfm12b (similar to this.)
The rfm12b 'duino integration should be greater!
Fortunately, there are fellows like Nathan, that designed an awesome breakout board for that matter, and I personally can attest that they fit like a glove.