Home Security

A few years ago, when we started on the home renovation project, I installed an alarm system.  It’s got sensors in several rooms, switches on some doors, a keypad by the door for arming and disarming and a loud bell on the wall outside.  Occasionally someone comes in and forgets the code but on the whole it works.

 

There are a couple of things that became obvious to me while I set it up:

  • It’s really simple – it’s clearly nothing more than a cheap microcontroller and some fairly simple software to ring a bell if a circuit gets broken.
  • It’s not very useful – having the blinking light on the box outside might deter the casual thief but if someone actually does break in all it can do is ring a bell and annoy the neighbours.

So let’s build a better one.

Ideally one that:

  • Tells us if someone breaks in – no matter where we are.
  • Give us a chance to cancel a false alarm before it starts to annoy the neighbours.
  • Lets us set and unset it from our phones
  • Send us a message if someone goes out without closing all the doors (instead of displaying a cryptic message on an LCD and a slightly different pattern of beeps).
  • Will arm itself if everyone goes out without remembering to do it.
  • Has a night mode that doesn’t wake everyone up when it’s set and unset.
  • Will run for a few days without mains electricity.
  • Doesn’t completely rely on my home internet connection.

Looking around on the internet there are a few projects which will allow you to hook up a few switches to something that sends you a message – but nothing that does all the above or works as a drop in replacement for a the existing system.  If you know of anything please let me know.

Right now my plans revolve around a raspberry pi hooked up via the I2C or SPI bus to a few ADCs that can measure the resistance of the sensor circuits.
Twitter, email or sms messages can be sent & received via my home internet connection. A 3G USB stick can act as a backup internet connection.
The existing alarm runs off a 12v lead-acid battery when the power fails so the new one can do the same.

One more thing – it has to have some way to control it if all our phones are flat and there’s no internet connectivity or mains electricity.  This means it has to have some sort of keypad that everyone can use. I can’t find anything that easily plugs into a raspberry pi via 10m of alarm wire and looks good enough to permanently install next to the front door. Ideally I could re-use the existing one but I have no idea how to interface to it.

IMG_0316

8 thoughts on “Home Security”

  1. Been working on the same sort of thing but the other way around, An ESP8266 or ESP32 connected to the serial bus of the alarm system that can detect alarm events and send out messages, log events, set and unset the G4

    Like

    1. Hi Tim, how did you get on with controlling the G4 with an ESP8266 or ESP32. I want to do the same but am struggling with knowing how to send the messages via RS485 comms bus to sat(arm) and unset(disarm) the alarm. I can get the status of the Alarm (ringing or not) from Bell – Trigger connection and whether it is set or unset from the Set connection, so just need to read whether high oir low. But not having used RS-485 I am not sure how to send the messages via the bus and how the 9th mark bit works?
      Any suggestions would be welcomed.

      Like

    1. My UART breakout has arrived so will start the build, also have an add on (ADE simple set) that can set and unset the system over the serial bus without the need for the codes so the arming and disarming will be a lot easier. Sends a Keys 60 then 183…..

      Like

  2. Hi Mike, thanks for responding to my question above on connecting to the RS485 bus on the Honeywell LCD Keypad and Alarm Panel. Because RS485 was mentioned as the protocol on the comms bus I thought an easy way to connect would be to use a USB to RS485 converter to talk to the comms bus. I bought a couple and connected two Windows 10 computers together over RS485 and it works very well. With these devices you can send and receive from either machine all managed in the python serial code manager with just a few lines of code. So I though this is looking good. Then I realised that the converters communicate over two wires with a normal signal on one and an inverted signal on the other. They will not work with only one wire connected, say the normal signal only. If I could get them to communicate with the comms bus my project would be very easy to complete as the python code is pretty straight forward with these devices. But I have no idea how I can connect a two wire system to a single wire bus. If you have any ideas I would greatly appreciate them on how to do this.

    I could use the same device as you used to connect to the Bus, namely the SC16IS750, but wasn’t sure how you connected it to the Pi. I am afraid I need pretty explicit instructions.

    I can see the circuit to connect the RX and TX pins of the SC16IS750 to the bus and assume the RX and TX on this board are the ones that link to the circuit for connecting to the bus. But how it the SC16IS750 connected to the Pi. It looks like there are connections to the SC16IS750 to I2C -SPI, SCL -SCK, SOA-USS and there looks like another lead connecting to it but I can’ see where that is connecting. Then where on the Pi do these connections go?
    Sorry to be so longwinded but I would really like to connect my Pi to the comms bus but I think my current method using the USB to RS485 converters is unlikely to work.

    Any direction would be most welcome.

    Like

    1. USB to RS485 sounds like a much simpler solution. If the signal wires are floating with respect to ground you may be able to ground one of them, or have the keypad ground separate from the rest. Otherwise it should be possible to build an adaptor but not something I could do without access to the devices and a fair amount of time.
      The UART connects to the pi via ground, and the I2C SCL and SDA pins. The Pi has similar pins on the header – pins 3 & 5 I think but it was a long time ago.

      Like

Leave a comment