For a long while ive been eyeing the arduino coming up with thoughts and what i want to do.
what kept me away from arduino is the one too many variants and requiring to orient into its own dev environment.
thus, i prefer basic well know linux. in comes raspberry pi.

so for a while ive been planing of getting the RPI, it took a while cause every time i wanted to order, the delivery time was in weeks.
so this time i didnt mind that and placed in an order, it arrived in two days!

so what to do and where to start from since i was still lacking some cables and adapters which i ordered in from hongkong.
well, what i did was disasembled my nussance desktop (i needed the hdmi cable and network cable).

I plugged the RPI and powered it up. during my first day, i was able to crash it a half a dozen times. all seemed to be due to the low power usb port. so i quickly ordered a suitable powered usb hub from hongkong. i cant wait for the stuff to arrive.

what am i going to do with the RPI? well some home automation and media stuff (xbmc/image gallery).

at this point i recalled that i had an unused zeemote js1. perfect! a perfect small "remote" that i can use with the RPI since i do not plan to plugin a mouse or a keyboard, just the monitor. after going thru my collection of tech junk. i found a suitable bluetooth adapter.
i plugged it and installed the bluez utils. now i was able to scan and find my zeemote to connect to. it wasnt long before i had
a bluetooth connection. i was unable to use the zeemote since i was missing the drivers, so after some googling, i found the driver and presto! compiled, installed, loaded and my zeemote was working! next thing, hack lightdm to use zeemote.
the steps for connecting to the zeemote:

sudo apt-get install libbluetooth-dev
wget http://www.harbaum.org/till/maemo/zeemoted.tgz
tar xvzf zeemoted.tgz
cd zeemoted-1.0/
make
sudo make install
sudo modprobe uinput
zeemoted

at this point you should have your zeemote working as a bluetooth joystick on linux (thats all i've done).

then to get it working as a mouse:

sudo aptitude install joystick xserver-xorg-input-joystick
sudo nano /etc/X11/xorg.conf

add this bit, modify the jsX number

Section "InputDevice"
Identifier "Joystick"
Driver "joystick"
Option "Device" "/dev/input/js0"
Option "SendCoreEvents" "true"
EndSection

add this within server layout

Inputdevice "Joystick"

so what next? well, now i have to wait for my order to arrive in the mail. the main component that i am still missing is the IRP (motion sensor). what for? well the initial idea is to let raspberry run xbmc or the image gallery and use the motion sensor to turn on the monitor when a user walks by (energy saving). so basically, RPI would run the image gallery, and IRP would sense motion and activate the screen.

so more to share once i receive the missing components (i dont want to tear my sons teddy bear to use the IRP in it so i have to be patient...)


once this is ready, next thing is to combine a home automation adapter to place in each room. the intention is to include:
- light switch control
- IRP (motion sensor)
- humidity and room temperature measurement
- smoke detector
- audio stream

the idea is to replace a poweroutlet or a switch in the wall with an adapter thus being able to centrally control light and audio and remotely monitor motion, temperator, smoke. etc.
Will do the same thing with my new house, we have made it preconfigured for home automation , cables etc..

Example : (inspired by) http://pluggy.is-a-geek.com/arduino/index.html

Pretty awesome! : http://pluggy.is-a-geek.com/index.html (live monitoring online)

The same with additions.

Setup materials:

-Arduino Mega or PIC32
-Buffalo WBMR series, the only ADSL modem/router that supports DDWRT
-Flexible potentiometer magantic slider. (for measuring water storage/tanks)
-Proximity sensors for measuring Kw/# electric meter... (using the rotating ring marked with a black strip)
-Light sensors in every room and outside, pre-wired while constructing the house...
-X10 outlet controllers (that answers your question) http://en.wikipedia.org/wiki/X10_(industry_standard)
-Garage door controller for time scheduling, status etc...
-Optional: Mini Weather station at the roof. (wind , temp, humidity)

The main controller is the modem/router, the router will communicate with both the Arduino and the RPi...
RPi for multimedia, door side camera, else, considering SmartTvs...
Alternative to Arduino may be the PIC-32 microcontroller. So you gain running a TFT LCD. The Arduino/microc. should be mounted in the corridor. Displaying ever sensor status + local location based weather (optional)
The arduino/microcontroller and the RaspberriPi communicated over the local network for status etc, it can also be controlled online (VPN)... (The aim of a ddwrt router)
Every room has an ethernet input to the central, its ideal to add extra things (arduino etc) that can communicate using the ethernet...
Using X10 communication through electricity, you can achieve access to other microcontrollers without using ethernet. (Humidity, smoke detector...)

Electronic door lock (dial pad pin) + Pressure sensitive matte. Together would form a secured door. If the electronic door is bypassed, walking on the matte would alarm using SMS (again by the arduino + ddwrt router scripted)...

Hope this helps...

EDIT: You should take a note regarding the powerline frequency before buying an X10, 50 hz or 60 hz. In Lebanon, its 50hz... (Unless your generator produces 60hz, that would be a problem)
you are going further than what i want to do. i do not have the need for all the bells and whistles :)
i am aware of the x10, there are things in regards to it that make me differ on whether to deploy or not.
maybe i will. taking baby steps cause i dont have much extra time to initiate a larger project. hell i would be realy
happy to have the xbmc with a motion sensor setup within a timely fashion. I still havent decided where to place the screen :P

actually at times ive been thinking of using a projector instead of a screen.
a month later
I'm glad you posted the steps to setup your zeemote, BashLogic. They were quite helpful so thank you!

I also had an unused Zeemote laying around and I wanted to use it to control my Pi. I have Raspbmc installed on the Pi and, thanks to you and a lot of googling, I have a bluetooth dongle working on it.

Now I can get the Pi to scan for the Zeemote and I can connect to the Zeemote as well using the zeemoted program. After that, however, I am quite at a loss for how to proceed. I have been unable to get the Zeemote to do anything after connecting. I am starting to think I may have to get some of the python scripts that people have written for other bluetooth controllers like the wiimote and try to modify them. But I will tell you now that I am quite new to Linux and the Pi so chances that I will succeed at that any time soon are quite low... still, I won't give up.

Have you actually been able to get your Pi to register button presses or joystick movements from the Zeemote? If so, would you please share what you did to do so?
Are you having issues playing 720p/1080p videos on a raspbmc?
@ Samer:

I have not encoded videos above 1.5 Mbps because I have not seen the need to. I can say that my Pi running Raspbmc has never had any issues running the videos I have encoded at 1.5 Mbps and running them over an hdmi cable. I think the picture quality is very clear and playback is flawless. But I understand the Pi is capable of much more. I would be willing to encode something at a higher rate and let you know how it goes if you tell me what kind of rate you want tested.
Thanks for your reply I Like Pi.
How about something above 1900 kbps?
@Samer: OK. I encoded at 3072 kbps and the Pi didn't have any issues. The picture was excellent and the movie played smoothly and at full speed. I did this test on the scene in Harry Potter 2 where they are playing Quidditch, so it was a pretty fast-paced action scene. Have you had problems with Raspbmc playing high definition videos?

@everyone: Also, on my original problem of trying to get the Zeemote to control Raspbmc: I finally got the Pi to recognize when I pressed buttons and the joystick on my Zeemote! :) Unfortunately, it has only worked in the command line terminal so far. I had to set the Zeemote to emulate a keyboard (I did this through SSH via Putty on windows):

sudo modprobe uinput
zeemoted -k -c 4:1&

(To break down that last line, zeemoted starts the Zeemote program, -k tells it to emulate a keyboard instead of a joystick, -c 4:1 is assigning the "A" button on the Zeemote to be the "escape" key on a keyboard. And the "&" at the end of the line tells linux to run the zeemoted program in the background so you can continue to enter commands in the command line.)

Now wait for the Zeemote to connect and then exit XBMC:

sudo initctl stop xbmc

Then when xbmc stopped I was able to press the "A" button on the Zeemote (which was now set to be an "escape" key) and the Pi reacted as though I had pressed escape and entered the command line terminal. While in the terminal, every button or joystick movement caused characters to be printed onscreen.

Eureka! The first step!! Now I just have to figure out how to get the XBMC program to recognize and respond to the Zeemote. I believe I need to set up the EventServer on XBMC specifically for the Zeemote, so that is where I am investigating now.

If anyone has any insight or has made more progress on this problem, please don't hesitate to speak up. I could really use your help. It will take me a long time to muddle my way through this. But I will keep posting any progress I make.