Monitoring home alarm outputs

Here’s a fairly simple project: we have a standard home alarm system, and I wanted Home Assistant to know when it was armed.

I discovered that one of the several programmable outputs inside its control box is configured by default to show when the system is armed. Another shows whether an intruder is detected, and I thought it would be fun to add that as well. These are the kinds of outputs designed to flash lights, ring bells or lock doors, not really to be connected to home automation systems.

So I made up a little board, which eventually I’m going to package up properly! At the moment, the components are just bolted to a bit of artist’s mounting board.

The basic idea is that an ESP8266 (in the form of a NodeMCU in the top right corner) will read the outputs from the alarm. These normally float at 12v or so, and are pulled low when there’s an output, so I needed to convert those into values the ESP8266 could read, and I wanted to keep reasonable isolation between the two systems to avoid either one doing something unfortunate to the other!

My friendly alarm guy pointed out, on his last visit, that the controller box has a 12v supply for auxiliary devices, so you can connect a relay between this and one of the outputs, and the relay will close when there’s a signal. OK - I had a couple of ideal small relay boards (the green things at the bottom), and, sure enough, they seemed to work fine.

Now, I also had to power the NodeMCU, and I wanted to do that from the alarm’s aux supply as well. I measured the supply, and it was giving more like 13V. The NodeMCU has a voltage regulator on board which can, in theory, take up to 20V, but they don’t recommend you run it at more than 12V, so I thought I’d put a regulator in so as not to stress anything. I already had some little LM2596-based voltage step-down modules, which I bought once because they were cheap (about £1.30) and looked as if they might be useful. I adjusted one to give about 6V, and that’s in the top-left, powering the NodeMCU.

Finally, I needed the signal inputs to the NodeMCU board to be at 3.3V. Fortunately, when you give the NodeMCU power, its on-board regulator will produce this on one of the pins. So each of the relays has its normally-open terminal connected to 3.3V and its normally-closed terminal connected to ground. The ‘common’ terminal of the relay switch therefore gets 3.3V when the alarm outputs a signal, and 0V when it doesn’t.

I then just used ESPHome to program the NodeMCU and sure enough, everything worked beautifully. This was my first experiment with ESPHome and I was thoroughly impressed. It won’t be my last!

Now when my wife asks, “Did you remember to set the alarm?”, I can reply with confidence!

IMG_0377

Hope that’s useful to someone!

Quentin

7 Likes

Nice one mate! ESPhome makes these little hacks so easy.

2 Likes

Very cool project!!!

Following up on this after some time…

I realised, in recent months, that having access to the alarm state was much more useful than simply being able to check on security remotely via Home Assistant.

We set the alarm every night – just for the ground floor – before we go up to bed. So the ‘Alarm armed’ state, if it switches after a certain time of day, is a very good indication that we’ve finished with everything downstairs.

So I now use it to turn off any remaining downstairs and outside lights, close any open window blinds, etc. It’s much more useful than I originally anticipated, because I thought it was just about monitoring security, and in fact it’s also about monitoring us!

2 Likes

Possible to show how you connect the alarm panel to the relay?

How you configure the esp home for the configuration?

The relay input is connected to the alarm panel’s programmable output, which is configured to trigger 12V out when the panel is in an armed state

@richieframe thanks. Only 1 connection need to connect to the programable output? Do I need to use the COM interface to the relay input?

This is what shown on my existing alarm panel.

PGM01

It depends a bit on your alarm system; have you got documentation for it? You could test it with a voltmeter.

In my case, the output floats high but goes to 0v when activated, so I connect the relay coil to the programmable output and to 12v. When the output is activated, I therefore get 12v across the relay and the contacts close. The contacts then supply either 3.3v or 0v to my NodeMCU board.

It’s possible that your output may work the other way: it may supply a voltage when activated, in which case your relay coil probably needs to be between the COM and PO1, but it would be useful to find some documentation if you can!

Quentin

@quentinsf I do not have a system documentation for this, only a system diagram at the board. Here are the snap shot that related to the PO1 and it remarks. Is there a good indicator which condition I shall follow?

If need full system do let me know I try to take a clearer picture as it is hard to focus on the dark area.

Apparently your system outputs 12V DC when locked or triggered. Hook up a relay, and attach that to your ESP/rpi/Arduino.

Alternatively you could use a shelly UNI, which has 2 separated digital inputs from 2.2-36V DC
https://shelly.cloud/knowledge-base/devices/shelly-uni/#tab_5fd9f6f169acf

Yes, unless the (-) means it’s inverted? You can experiment to see whether it’s 0 or 12V when the alarm is set.

If you have something which can take 12v inputs, like that Shelly, or indeed like the ESP8266 boards if you use resistors to drop it to a lower voltage, then you don’t need relays at all; I used them because I happened to have a couple and it meant the circuits were nicely isolated.

But @devastator is right, the Shelly UNI might be very nice for this…

@devastator thanks that is an option.
@quentinsf I do have NodeMCU laying around and some 2.2K (not sure if can be use as well without frying the board) resistors laying around, but wasn’t sure how it shall connect to my PO1 output. Does it go in the one D1 (assuming it program to take input) and to G from COM at the board?

I do not have voltmeter, guess have to get one see which is the case now. It say negatively triggered at the side of the diagram, does that mean anything useful?

You need a voltage divider of resistors. If you do so, you will need to connect the ground (-) of the NodeMCU with the one of your alarm panel. Pick your resistors big enough, so they limit the current. You do not want to generate a lot heat :slight_smile:

Or use a stepdown converter. I think the shelly is the most easy one :slight_smile:

Does that mean Ground from NodeMCU to the COM of the alarm panel? Or need to look for Ground of alarm panel?

Is 2.2K resistor sufficient for this?

Yea, if all out of option I will try to Shelly as suggested. I would need to read from the link on how to get it wired up as well and how to get it imported :slightly_smiling_face:

You need a multimeter to clarify this first. Typically the COM is the ground, but since your image puts a (-) on the other terminal, it kind of suggests its the other way arround. Put your black probe in COM (24) and your red one in 25. Read the voltage on your multimeter. If you measure a positive voltage, then COM is GND.

Depending on if the state if Normally Open or Normally Closed, you might have to arm/unarm the system so it outputs a voltage.

2.2K is enough, that will result in 0.05W. You will need multiple resistors though to create the voltage divider.

Ok I guess need to get a multimeter at local store.

How many resistors in that case enough for voltage divider? Sorry noob to this.

You need to bring 12V down to 3V, so you need to create something that needs to divide the voltage by 4. So for example 3x880 ohm + 880ohm which will be read by the GPIO pin.

You just need two resistors, one of which is three times the value of the other. Google is your friend :slight_smile:

https://learn.sparkfun.com/tutorials/voltage-dividers/all

The good thing is that really good multimeters are quite cheap on Amazon now compared to when I had to buy one as a kid…

It’s an essential tool for every thinkerer anyways :slight_smile:

Thanks @devastator @quentinsf. Will give a try once I got my multimeter to check. Will need to read up on the resistor and make do with what I have on hand now.

If this setup work, may see if I can get Shelly uni for cleaner setup