ESP8266 into existing alarm sensors

We did this about 6 months ago. Our new construction home came pre-wired with contact sensors on each door, the furnace, and the A/C unit, and a PIR motion sensor in the entry. We were able to use an ESP8266 to tap into the wires coming into the alarm panel and pull the state of each sensor into HA while still retaining full functionality of the alarm system itself.

I think the process for doing this will vary a bit based on your alarm panel manufacturer, but I don’t think the instructable is too far off from what you’d be looking to do. Seems like there are some extra steps in that than we took, but we have a different panel from the one in that write up.

Do you know what brand/model your panel is?

The system I have is a Bosch ICP488, fairly generic. So you went through the same process as the link? Did you have to use the LM339 as well as voltage divider resistors?

Curious to know more about your setup if you’re willing to share?

We have a Honeywell Ademco panel, which made our setup different from the link actually. The concept is fundamentally the same, but we didn’t have to use the LM339 because we only have one sensor per zone and no voltage dividers like the Bosch needs.

Since you have the same panel as the instructable you’re probably best off following that method. @cwfchris2 can probably give you more detail than I, as he did all of our wiring :wink:

@talondnb, Brett’s right, but in talking about this, we’ve actually discovered a problem with our own design, so I suppose I owe you a thank you!

Our system is different because we only have one zone per pair of screw terminals in the panel. To answer your question for what we did, we used optocouplers (PC817s) in series with the sensors, and the other end of that hooked up to the ESP8266 to show us a change in state (logic high vs. low). It works great for our automation system, and we’ve had no issues at all with that, but we’ve noticed a problem with our actual alarm system where for some zones the keypad doesn’t give an indication of which zone has been triggered (it just beeps at us and says “Not Clear” - still sets off the alarm…). Our optocoupler solution evidently works well enough for some of the (lower-resistance?) circuits on our system, but for the others, the system probably thinks we’re trying to double up on our zones like your Bosch system because the optocoupler introduces a voltage drop that the panel doesn’t account for. Either because our panel’s zones aren’t set up like that, or because the voltage is at a strange enough level, the keypad doesn’t give a zone indication, probably just because it can’t tell which one’s been triggered.

Our system does seem to work really well on the home automation side, and hopefully once we go in and tweak a few things (resistor values maybe?) it’ll be up at 100% on the actual alarm side too. I’d be happy to report back on how we fix ours in the end if you’re interested, but rather than follow our example you might want to try that instructable’s approach :slight_smile:

Thanks for the replies guys, really appreciate it. I’ll probably go through and attempt the instructions on that link and see how things go.

I’d be keen to hear how you go in about resolving your issues too. I’m not a software guy unfortunately so hopefully the new esphomeyaml libraries will help!

I’ve managed to implement the above successfully. :slight_smile: It’s not pretty but works a charm. I had to use the LM339 as per the instructable link and so far an LM7805 with a heatsink isn’t hot at all, very mildly warm to touch.

39%20pm

I used the esphomeyaml library, so much easier to program. Here’s the alam.yaml file for anyone interested:

  name: alarm_panel
  platform: ESP8266
  board: nodemcuv2

wifi:
  ssid: 'xxx'
  password: 'xxx'
  manual_ip:
    static_ip: 192.168.0.x
    gateway: 192.168.0.x
    subnet: 255.255.255.0

mqtt:
  broker: 'x.x.x.x'
  username: 'xxx'
  password: 'xxx'

# Enable logging
logger:

ota:
  password: 'xxx'

binary_sensor:
  - platform: gpio
    pin:
      number: D1
      inverted: True
      mode: INPUT_PULLUP
    name: "Entry Motion"
  - platform: gpio
    pin:
      number: D2
      inverted: True
      mode: INPUT_PULLUP
    name: "Living Room Motion"
  - platform: gpio
    pin:
      number: D5
      inverted: True
      mode: INPUT_PULLUP
    name: "Master Bedroom Motion"
  - platform: gpio
    pin:
      number: D6
      inverted: True
      mode: INPUT_PULLUP
    name: "Garage Entry Door"
1 Like

Did you manage to fix your issue?

I’ve been adding more sensors to my setup (Xiaomi motion and door/window sensors) and have integrated the MQTT manual alarm component so I can use all of the currently attached sensors. This works fine but we arm the alarm system primarily from the keyfob, skipping HA.

Can anyone suggest how I can add alarm state sensing of my retrofitted panel to HA?

Do you have double zones?
Did you manage to add both zones on HA?

The link actually talks about double zones Z3,Z7 and Z4,Z8 but at the end only connects Z3 and Z4.

This is my setup
Untitled

Can anyone help how to integrade it to HA?

Have a read through the instructable in te first post, it explains how to handle two zones.

I did but I show that on D1 mini connects 4 zones. Shouldn’t be 6 zones according to the example?

How does tamper zone triggered?

If you are ok with disconnecting the sensor wires from the existing system, you might like this Another version of NodeMCU alarm for HA

I’ve finally gotten around to adding the files to github. Feel free to do with them as you wish. :slight_smile:

Hi, looks very interesting, are the PCBs available to purchase ?

No, but everything you need to have them manufactured is on github (gerbers files). It’s only around $20 shipped to get 5 made and usually delivered in less than a week.

Ok thanks, i’ll use a prototype board to start with, see if It works ok with my alarm

Hi. I’m not very experienced in electronics schemes development, can you please give me an advice.
I have an old hardwired alarm system with a wired door sensor and external status led.
I want to connect and read the status of the external led and door sensor with ESP8266 without disconnecting them from the alarm system.
What do I start from? Mesure voltage on the LED and sensor? What additional components do I need?

Every system will be different but you should first read through the link I posted in the original post:

The link explains everything you need to know about how to get the signal read by an ESP/D1.

If looking only for a non-invasive way of monitoring the led then you could use a LDR (https://www.aliexpress.com/item/32476463183.html) placed near the led of the alarm system.

For software there are multiple options with ESP modules: esphome (https://esphome.io), openmqttgateway (https://github.com/1technophile/OpenMQTTGateway), espeasy (https://www.letscontrolit.com/wiki/index.php?title=ESPEasy)

There are also ESP8266 boards with LDR already soldered (however, I didn’t yet use): https://www.aliexpress.com/item/32860254874.html

Something else that can be used instead of the ESP8266 board is an Arduino Uno/Mega flashed with OpenMQTTGateway and an ethernet shield so that it improves on the reliability of connection (however, it requires running ethernet cables…).

Also, I should mention that LDR does need a little tinkering with calibration until getting the correct values in HA as that module is analog.

What kind of door sensor you want to monitor (i.e wired/wireless; if wireless what technology: RF433Mhz/Zigbee/Zwave/Wifi/etc)?

I have 2 wired sensors connected in series directly to the alarm system. There is also a wire coming to the external LED on the front door.
I’m thinking, maybe I can use optocouplers to check sensors and led state?
Here are connections that i want to connect to.

You could use a hall effect sensor to measure voltage, however you need a voltage divider to be able to connect it to an Arduino/ESP board in order to have continuous readings.

Also, keep in mind that those wires are probably running 12 V thus, although not sufficient to cause direct electrical shock problems, an incorrect wiring can lead to damages to the alarm’s motherboard or even fire hazard.

Thus, I would totally advise against messing with the wiring if not an electrician.

Instead, if able to access the led that turns on when sensors trigger (I assume that, since the two sensors are connected in series, you don’t have multiple zones for the alarm to monitor), a LDR connected to Arduino/ESP is still a solid option as it doesn’t involve any invasive wiring. LDR readings are instantly sent to the MQTT broker and you only need to take care of HA’s logic.