Create a small, flexible and reliable home automation system with alarm integration for less than $150
Components
Hardware
- 1x Raspberry Pi
- 1x AD2Pi Adapter
- Audio device speaker preferably whole house speaker system
- 1x Elk 800 Audio Amplifier
- 2x Elk 73 speakers enough to cover the whole house
Software
- raspbian
- misterhouse
- ser2sock
- festival speech engine
Install
- install raspbian on a flash disk for the Raspberry Pi
- Login to the system via ssh or with keyboard and monitor and become root
Linux raspberrypi 3.6.11+ #538 PREEMPT Fri Aug 30 20:42:08 BST 2013 armv6l The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Fri Dec 20 17:27:11 2013 from 192.168.33.33 pi@raspberrypi ~ $ sudo su root@raspberrypi:/home/pi#
- install necessary packages
root@raspberrypi:/home/pi# aptitude install libgd-gd2-perl libgd-text-perl The following NEW packages will be installed: libgd-gd2-perl libgd-text-perl 0 packages upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 243 kB of archives. After unpacking 683 kB will be used. Get: 1 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libgd-gd2-perl armhf 1:2.46-3 [200 kB] Get: 2 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libgd-text-perl all 0.86-8 [42.4 kB] Fetched 243 kB in 4s (54.3 kB/s) Selecting previously unselected package libgd-gd2-perl. (Reading database ... 66931 files and directories currently installed.) Unpacking libgd-gd2-perl (from .../libgd-gd2-perl_1%3a2.46-3_armhf.deb) ... Selecting previously unselected package libgd-text-perl. Unpacking libgd-text-perl (from .../libgd-text-perl_0.86-8_all.deb) ... Processing triggers for man-db ... Setting up libgd-gd2-perl (1:2.46-3) ... Setting up libgd-text-perl (0.86-8) ... root@raspberrypi:/home/pi# #Install problem Audio::Mixer no /dev/mixer
- install misterhouse
root@raspberrypi:/home/pi# mkdir /opt/misterhouse root@raspberrypi:/home/pi# cd /opt/misterhouse root@raspberrypi:/opt/misterhouse# git clone https://github.com/hollie/misterhouse mh Cloning into 'mh'... remote: Counting objects: 25182, done. remote: Compressing objects: 100% (8974/8974), done. remote: Total 25182 (delta 16439), reused 24570 (delta 15864) Receiving objects: 100% (25182/25182), 15.64 MiB | 977 KiB/s, done. Resolving deltas: 100% (16439/16439), done. Checking out files: 100% (4232/4232), done. root@raspberrypi:/opt/misterhouse# cd mh root@raspberrypi:/opt/misterhouse/mh# git checkout master # Note this may be unstable Branch master set up to track remote branch master from origin. Switched to a new branch 'master' root@raspberrypi:/opt/misterhouse/mh# cd .. root@raspberrypi:/opt/misterhouse# mkdir code data sounds web root@raspberrypi:/opt/misterhouse# # cd /home/pi
- unpack the AlarmDecoder MH driver
root@raspberrypi:/home/pi# tar xvf AD2USB_all_wg.tar -C / opt/ opt/misterhouse/ opt/misterhouse/web/ opt/misterhouse/web/my_mh/ opt/misterhouse/web/my_mh/ademco.pl opt/misterhouse/web/my_mh/ademco.css opt/misterhouse/web/my_mh/index.html opt/misterhouse/web/my_mh/menu.html opt/misterhouse/mh.private.ini opt/misterhouse/mh/ opt/misterhouse/mh/lib/ opt/misterhouse/mh/lib/AD2USB.pm opt/misterhouse/code/ opt/misterhouse/code/AD2USB.pl opt/misterhouse/code/armedalert.pl opt/misterhouse/code/recordonalarm.pl opt/misterhouse/code/zmtrigger.pl opt/misterhouse/code/garagemonitor.pl
- edited your the private.ini you provided and added to the top.
- code_dir = /opt/misterhouse/code
- data_dir = /opt/misterhouse/data
- sound_dir = /opt/misterhouse/sounds
- adjust the connection settings for the AlarmDecoder as serial or ser2sock
- test run misterhouse
root@raspberrypi:/home/pi# cd /opt/misterhouse/mh/bin root@raspberrypi:/opt/misterhouse/mh/bin# export mh_parms=/opt/misterhouse/mh.private.ini root@raspberrypi:/opt/misterhouse/mh/bin# ./mh -tk 0 Command: mh -tk 0 Pgm path : . Pgm version: develop-ref Build 121 (b51e33d) Last updated: 2013-12-18 16:30:41 -0800 Perl version: 5.014002 OS version: linux linux Other : user=root pid=12118 box= cpu=- This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Read parameter files: ./mh.ini ./mh.private.ini /opt/misterhouse/mh.private.ini Code Directories: - /opt/misterhouse/code - ./../code/common Loading other modules Starting setup - using simple Text distance function - read 2 trigger entries - reading previous log files - archiving previous /opt/misterhouse/data/logs/*.log files .... - creating http on tcp 8080 buffered - creating server mhsend on tcp 8084 buffered - creating server telnet on tcp 1234 raw - creating xap_send on udp 3639 send - creating xap_listen_core on udp 49152 listen - creating xpl_send on udp 3865 send - creating xpl_listen on udp 49352 listen - initializing state tracker ... - process id 12118 written to /opt/misterhouse/data/mh.pid - external command file (xcmd_file): ./../house_cmd.txt - HTML file : ./../web/ia5/index.shtml Warning: password_file /opt/misterhouse/data/.password not found. Run mh/bin/set_password Done with setup 12/21/13 09:14:23 AM Reading /opt/misterhouse/mh.private.ini and mh.ini html_alias alias /rrd dir does not exist, dir=/opt/misterhouse/data/rrd html_alias alias /tv dir does not exist, dir=/opt/misterhouse/data/tv html_alias alias /email dir does not exist, dir=/opt/misterhouse/data/email html_alias alias /photos dir does not exist, dir=/opt/misterhouse/data/photos html_alias alias /photos_big dir does not exist, dir=/opt/misterhouse/data/photos Voice names: Microsoft Mary, Microsoft Mike, Microsoft Sam Read 4 entries from ./../data/pronouncable_words.list Error, could not find the caller id file /opt/misterhouse/data/phone/phone.caller_id.list: No such file or directory Reading code_dirs: /opt/misterhouse/code ./../code/common 12/21/13 09:14:23 AM Reading 19 code files 12/21/13 09:14:23 AM Evaluating user code 12/21/13 09:14:23 AM Starting ADEMCO panel interface module 12/21/13 09:14:23 AM Registering Child Object 7 on zone 7 12/21/13 09:14:23 AM Registering Child Object 6 on zone 6 Good code saved 12/21/13 09:14:23 AM running: play ./../sounds/sound_click1.wav Restoring object states sh: 1: play: not found Object states restored Activating voice commands Starting monitor commands loop Latitude: 44.0817, Longitude: -92.5038, Time Zone: -6 sunrise=7:42 AM sunset=4:34 PM sunrise twilight=7:09 AM sunset twilight=5:08 PM The moon is Three-Quarter Waning, 86% bright, and 18 days old The next full moon is on Thursday, January 16th 12/21/13 09:14:41 AM !Welcome to AlarmDecoder GUI 12/21/13 09:14:41 AM !Client 192.168.3.71 has connected 12/21/13 09:14:41 AM !RFX:0951214,a0 12/21/13 09:14:41 AM !RFX:0951214,20 12/21/13 09:14:41 AM Rereading .menu code files. 12/21/13 09:14:41 AM Organizer: Calendar matches target schema and does not require upgrading 12/21/13 09:14:41 AM Organizer: Todo matches target schema and does not require upgrading 12/21/13 09:14:41 AM Organizer: Reading updated organizer calendar file now 12/21/13 09:14:41 AM Evaluating code organizer_events 12/21/13 09:14:41 AM Organizer: Reading updated organizer todo file 12/21/13 09:14:41 AM Evaluating code organizer_tasks 12/21/13 09:14:43 AM [1000000110000000----],008,[f700008f1008001c28020000000000]," DISARMED CHIME Ready to Arm " 12/21/13 09:14:44 AM !RFX:0951214,a0 12/21/13 09:14:45 AM !RFX:0951214,20 12/21/13 09:14:53 AM [1000000110000000----],008,[f700008f1008001c28020000000000]," DISARMED CHIME Ready to Arm " 12/21/13 09:15:00 AM: Saving object states ... done 12/21/13 09:15:03 AM [1000000110000000----],008,[f700008f1008001c28020000000000]," DISARMED CHIME Ready to Arm " ^CExiting 12/21/13 09:15:07 AM: Saving object states ... done Bye Bye