Alarm

Over the last few years, there have been a couple of times when my home alarm has triggered. On both occasions my neighbour has phoned me to let me know and I have had to drive home, in the middle of the night, to sort it out. Every time I get home, the alarm is silent. Not because it has timed out, but because the driver chip has burned out. The first time this happened, I fitted an IC socket, and I keep a pack of spares just in case. But I’ve always felt the circuit wasn’t too great and maybe I could do better.

Recently I acquired a Raspberry Pi and realised that the GPIO ports and Ethernet adapter made this an ideal platform for a web enabled alarm system. The video shows what I came up with, and the next couple of web pages shows how I built the system.



11 Responses to Alarm

  1. hi can you email the steps as been tryung with no luck

    love this

    from peter

  2. Hello,

    I’ve installed the alarm software via the steps provided on github, but there is no alarm service that cannot be started or or listed in ‘service –status-all’. The installation seems to have completed fine, the Apache server is running and can be accessed, just nothing alarm related can be found or started.

    Mark.

  3. Hi Mark,

    I’ve not looked at this instalation for several months, so suspect something has changed with the install of one of the components. I’m aware that Apache2 has changed the names of the log files, which has broken the Fail2Ban component, and JQTouch seems to have been abandoned. Also the HomeKit install ( HAP-NodeJS ) was changing every few months, so that may need updating. But a quick check on RaspberryPi.org shows they have just brought out a new image a couple of days back ( July 2017 ) – this may have changed how services are controlled at start up ( ? ).

    I’ve been working on moving the GUI to JQuery Mobile as this framework has been kept current and is better documented. But its taken a lot longer than expected. So I’ll probably base the next release on the new Jessie Lite image.

    But to answer your question, the service just runs the shell script at start up. So try running the shell script manually, just log in as Pi, then…

    pi@DevPi:~ $ sudo /var/www/Scripts/alarm.sh
    20:08:23,(alarm),(RasPi),I2C Bus initialised
    20:08:23,(alarm),(RasPi),GPIO ports initialised for Raspberry Pi 2
    20:08:23,(alarm),(RasPi),Loading user credentials.
    20:08:23,(alarm),(RasPi),Settings: Restoring last session.
    20:08:23,(alarm),(RasPi),System restart – email sent
    20:08:25,(alarm),(RasPi),Cellar door closed

    This will also grab the service output and direct it to your console, so you should be able to see whats going on.

    Tony

  4. Hi Tony,

    I ran the command ‘sudo /var/www/Scripts/alarm.sh’ and the output is ‘sudo: /var/www/Scripts/alarm.sh: command not found’

    I opened up the GUI desktop in the PI and tried navigating to ‘/var/www/’ but there is no scripts folder.

    I created the Scripts folder myself in there and re ran the install script.

    After the restart, the folder disappeared the command did not succeed again.

    • There’s something really not right with that. Could you confirm the version of Raspbian image you are using, so I can try to re-create the issue ?

  5. Hi Tony,

    Running ‘cat /etc/os-release’ outputs:
    “PRETTY_NAME=”Raspbian GNU/Linux 8 (jessie)”
    NAME=”Raspbian GNU/Linux”
    VERSION_ID=”8″
    VERSION=”8 (jessie)”
    ID=raspbian
    ID_LIKE=debian ”

    Running ‘uname -a’ outputs:
    “Linux raspberrypi 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux”

  6. I’m running an earlier version ‘Linux DevPi 4.4.38-v7+ #938 SMP Thu Dec 15 15:22:21 GMT 2016 armv7l GNU/Linux’.
    I found an article on the raspberry Pi forum indicating not much has changed with the new release, so its probably not the OS, but one of the other components instead.
    I’ll try and set a build going here and get back to you, but not sure when I’ll be able to get around to it.

  7. Hi Tony,

    Thanks ever so much for your help and fast replies. I’ll download ‘raspbian-2016-11-29’ and re install and see if I can complete the install.

    Mark.

  8. Update: Working, using that version of Raspbian successfully worked, no user login logs but glad it’s working.

    Looking forward to the new update!

    I was lucky to have Pete Lomas as my guest speaker as my BSC graduation last Thursday!

    Mark.

  9. Now that is odd – there isn’t much info on the new Raspian release yet, but from what I have managed to find, it should just be minor changes. So it will be interesting to dig a bit deeper to see exactly what the difference is that breaks the current install.

    So, best mates with Pete Lomas is it ??? – tell him his I2C interface sucks ! 🙂

    ( and congrats on graduating )

Leave a Reply

Your email address will not be published. Required fields are marked *


nine − 4 =