Convert Your Wired Alarm System into a SmartThings Smart Home Monitor System for Under $25 with NodeMCU ESP8266 (2017)

The device uses your WiFi internet connection to communicate to SmartThings over a secured (HTTPS) API whenever the state of one of your sensors changes.

Would I be correct in assuming, no Internet = no security system?

Unfortunately, that’s correct. I’ve programmed it so that if there’s a drop in the internet connection, the ESP device will continuously retry until it can communicate with SmartThings again, so intermittent drops shouldn’t be too much of a problem. But if your internet is totally out then ST would not be able to receive updates from your sensors.

Yes, that is correct. No Internet = No Security system.

However, I look at it from a similar perspective as many others… If you currently have no security system (or an old non-functional one), having a SmartThings based security system that is available ~98%-99% of the time is much better than none at all.

It’s a Risco system that’s about 10 years old. I had been considering moving to the Risco Lightsys which will let me keep my sensors, but frustratingly the Risco system is closed and I’m not sure that I can integrate with ST. Any ideas @jakclark?


first of all, great job…!

  1. does it work with monitoring station after implementing this way ?? or its only for controlling and getting notified from smarthings on mobile ?
    2.can i branch the wire from sensors to connect to the NodeMCU so that it works both with smartthings and key pad?

Thank you

I’m not sure what you mean by “monitoring station”

There is some discussion in the original thread about connecting it in parallel with the alarm panel system. This isn’t really what I had intended with this project, so it requires some small modifications to the code and bit more complexity on the wiring side with resistors and stuff. I know at least one person was able to do it.

Do you need wireless devices? If so- Texecom 24W Panel would work, with texecom ricochet door contacts and movement sensors. This system has 8 programmable outputs on the control panel that can be used to mimic 8 individual zones (you are limited to only 8 outputs). These outputs can then trigger 12vdc relays which will give you a dry contact ( C, NO, NC) to be able to use @heythisisnate’s method.

@heythisisnate im assuming that each input needs an alarm circuit? Ie C + NC and not a 0v trigger?

Hmm, I don’t think so. I believe you’ll fry the ESP8266 with 12V.
The GPIO pins of the ESP8266 when configured with the internal pullup resistor output 3.3V to the door/window sensors.

I managed to get mine to work without disconnecting it from my alarm panel thus my alarm remain functional. With help from @ogiewon, I used resistors to drop my panels 5V to 3V for the NodeMCU and got some help from @heythisisnate to disable the internal pull-up resistor (you simply remove some code in applications file).


Thanks @jakclark. The idea was to re-use all my existing (wireless) sensors, so I don’t necessarily prefer wireless, it’s just what I have installed.

It sounds as if I may do better to start again from scratch…

Again, check if the control panel has programmable outputs on board as it may still be possible for you to do


If you use a programmable output ( that is configured to mimic the status if one of your wireless sensors) to trigger a relay ( £6 handy little relay on ebay) then you will have a volt free relay output that changes state when your device changes state.

BEWARE-Most wireless alarm movement sensors have a battery saving function where it stops transmitting movement if it detects a lot of activity!
Example would only really benefit if tot planning on using door contacts or vibration sensors.

I am receiving the error 500 posting problem. Seems to only happen with the smoke detectors. I even removed and re-added the cloudapp. I also removed and re-added the devices, same problem. I have this problem with two different devices, both smoke detectors. The top 3 in the picture that succeeded are contact sensors.

Usually this means the devices was not authenticated or the device ID is wrong, but I have checked this.

Have you tried opening your cloud sensor smart app in your ST mobile app and making sure the sensor devices are selected (authorized) on the smart app? I had the 500 error because one of my devices wasn’t authorized in the smart app.

Yes I have tried this also, I even remove/re-added them in the app with no success.

I receive the following error in the logs.

 java.lang.NullPointerException: Cannot get property 'id' on null object @ line 57

Edit: The thing is in the logs the device ID it is referencing with the above error does not exist.

If this hasn’t worked before, is it possible you got the device ids for the smoke sensors from the wrong place? Perhaps you grabbed the Network Device Id value instead of the id that’s in the URL when you show the device in the IDE?

Nope I am using the URL ID, and it worked fine with the contact sensors. In fact I was able to add another contact sensor without issues. Its only the smoke detector devices.

@raidflex could you post a screenshot of the smoke detector device page in the ST IDE that starts with e72e4f9e? The URL should be something like

Make sure the Version is set to “Self-Published”

Here you go.

I think I see the problem, @raidflex. It’s a bug in my SmartApp code :blush:

Try replacing line 55 with this:
def allSensors = contactSensors + motionSensors + smokeDetectors - null

This is needed because you don’t have any motion sensors configured, and for whatever reason SmartThings puts a null in there instead of making it an empty array. The above line should remove the nulls from the array.

Let me know if this fixes it and if so I’ll publish the update.

1 Like