Now my 2nd Raspberry Pi has turned up I can (re)start work on my home automation project.
Previously I’ve setup a wireless sensor network (WSN) comprised of a number of jeenodes (http://www.jeelabs.org) using the RFM12B to connect back to central jeelink usb plugged into a repurposed orange livebox router (running http://www.homeautomationhub.com). Additionally I installed a number of CurrentCost individual appliance monitors (iams) and a EnviR energy monitor plugged into the home automation hub (hah) to monitor and log household and appliance level energy consumption. Refer to some old blog entries: https://tickett.wordpress.com/category/home-automation/. All of the data was being sent to pachube for logging.
I wasn’t too keen on the home automation hub as I didn’t really fully understand it and couldn’t push it where I wanted to go (although the community was really good and I imagine I will be seeking assistance from them in connection with the new project :)
In my new setup I intend to use a Raspberry Pi the "hub"- with a "full blown" linux distribution (debian?) I should hopefully be able to accomplish everything I am looking for. As python is the first language discussed in conjunction with the raspi I’ve started playing with that, but eventually may move to a LAMP solution (php with mysql backend for logging and apache web front end).
Here’s a high level summary of the steps I’ve covered:
- Prepare sd card with recommended debian squeeze raspi distribution
- Boot the raspi (I had concerns there might not be enough power for the jeelink but so far so good)
- Enable ssh: http://fusionstrike.com/2012/setting-ssh-ftp-raspberry-pi-debian
- Test serial communication using agett/screen: http://www.techrepublic.com/blog/opensource/learn-to-use-a-serial-console-on-linux/157 (I had to apt-get install screen)
- Install pyserial: http://www.doctormonk.com/2012/04/raspberry-pi-and-arduino.html
- Test serial communication using python: http://www.doctormonk.com/2012/04/raspberry-pi-and-arduino.html
The python example from the link above didn’t produce any output for me so I modified it slightly:
import serial, sys ser = serial.Serial('/dev/ttyUSB0', 57600) while 1 : sys.stdout.write(ser.readline())
That’s all I have time for now- watch this space.