I'm currently in the design phase of my home automation program.
Here is the setup i'm thinking about:
- Raspberry pi: Tomcat & java - Arduino: Hardware (relays, ...)
My main issue is that i don't know which technologies i should use to make work what i have in mind.
This is what i have in mind.
The arduino is just a simple slave to the raspberry pi.
Whatever command the PI gives (over usb serial), the arduino executes.
The arduino also gives feedback to the pi (ex: when a hardware wall button is being pressed).
On the Pi part, i was considering to use JSF for the frontend stuff (with tomcat).
For the backend stuff (also on the pi) i'm not quite sure.
The backend handling should be a program that's constantly running and listening for data from the arduino. I'll call it the "background daemon" for now.
On the other side, JSF needs to be able to talk to this background daemon.
It is really important that this background daemon is running 24/7 to be up to date on the status of the house.
For the record, Jave EE is new to me.
In the past i have created a home automation program before (java SE), but this was much more scaled down.
It included it's own webserver (own code), but was hard to manage, therefore my intrest in tomcat and JSF.
I have done an home automation project before.
I was spending more time on making the http server to work then the actual controlling of the hardware.
I just don't want to bother with the http server party anymore.
Would something like WebIOPi work for you? It's a readymade sensor monitoring web application and is quite popular among Pi enthusiasts.
Also, I didn't quite understand why there is an Arduino. Are there some analog inputs involved here? A Pi is capable of receiving inputs from switches and sending outputs to relays without using an arduino.
Whatever you use, make sure it has high noise immunity since you are going to run it all over your house. Something like RS-485 would work. Nothing is worse than getting a design working and then having to do it all over because it was susceptible to noise. I had a nightmare scenario like that back when I was learning. It was in a restaurant where there were long runs and neon lights everywhere. There was many volts of noise on the runs.
I've done a lot of projects for the Raspberry Pi over the last year. The Pi+Arduino combo is very popular, although for simpler projects, the GPIO facilities built into the Pi can be useful and there are some good shields for it. For that matter, you can make a decent control panel with a shield that incorporates an LCD display and pushbuttons of which I think you can find several models.
My original Home Automation system is X10-based, but support for that platform is not very good anymore. The X10/web controller I bought was effectively useless, in fact, because among other things, the web interface was so slow and error-prone that it made X-10 itself look fast and reliable.
These days I've been looking more at ZigBee/XBee. There are several commercial Home Automation product lines using that as a basis and it's relatively easy to talk to them (I have an adapter board that provides USB-to-XBee communication). And it's easy to work with the XBee units themselves. A garage door monitor requires almost nothing more than an XBee, a battery, and a tilt switch.
As forum moderator for JSF, it's hardly becoming for me to discourage JSF, but I've never tried full-bore J2EE on the Pi myself. While basic Java obviously performs well (Minecraft!), J2EE can be more demanding, both in the completeness of the JDKs and in memory hunger. I'd probably consider using something like node.js or pythong/django as a web platform.
I'm going to be a "small government" candidate. I'll be the government. Just me. No one else.