I want to use the Pi for standalone home automation.
As such, the Pi must boot up automatically and run a Java program.
I am running Debian Wheezy hardfloat.
I have little Linux experience, what is the best way of doing this?
Also, how safe is the sd card if the power supply fails?
What is the best way to shutdown safely?
-
8Your last question is answered here. Also, your question seems to be composed of three different problems - how to run java application on RaspberryPi (answered here), how to run application at bootup (answered here) and if it's safe for SD card to turn device off. Am I missing something?Krzysztof Adamski– Krzysztof Adamski2012年10月15日 10:58:35 +00:00Commented Oct 15, 2012 at 10:58
3 Answers 3
Z-Wave looks like a good choice now, and there are many ways to use it with Pi . Everyone is building some Z-Wave enabled device so you can now interface almost anything in your home. It's something like an enhanced wireless version of good old X10. Protocol can be found here , devices can be Pi controlled via USB sticks, and you can make your own devices if you need to (modules can be bought for example on Digikey, but chip is not open design).
Here are some Raspberry Pi examples:
- http://conradvassallo.com/2012/06/29/open-zwave-on-raspberry-pi
- http://www.agocontrol.com
- http://sourceforge.net/projects/homegenie
X10 upgrade project example is here .
-
Got another link for the protocol available? :) Your link is broken.Dave– Dave2013年02月08日 15:14:59 +00:00Commented Feb 8, 2013 at 15:14
-
It seams that site is dead for some time. You can browse it's old version here: web.archive.org/web/20120716054304/http://www.digiwave.dk/en/…. Links with more Z-Wave info: code.google.com/p/open-zwave, github.com/ekarak/Thrift4OZW, razberry.zwave.me/hardware.phpavra– avra2013年02月12日 11:17:07 +00:00Commented Feb 12, 2013 at 11:17
I am working exactly on that ! Had the same question, could not find a good answer, so I made my own Java API (called Hans Java API), which makes it very use for a Java application to implement home automation using FS20, HMS and FHT based devices - you can see more details here: www.paulo-lima.org/hans
To run an application at boot-time, you can use crontab. Add a line like:
@reboot pi java /home/pi/myapp.jar
This will run the command java /home/pi/myapp.jar
at reboot as the user pi
.