Project: Cheap window or door security

Want to be able to monitor a window or door, and get a message on your phone when it is opened? And what about if you could do it for only $10? If you go “mmmm yesh”, or just nods slowly, read on. :smiley:

Not a lot of components is needed, only an ESP8266, power supply, and the switch to mount between the two things you don’t want to come apart unnoticed.

The parts needed
£4.17 http://www.ebay.co.uk/itm/311451344588
£0.99 http://www.ebay.co.uk/itm/291490269679
£1.91 http://www.ebay.co.uk/itm/191348603397

Be sure to always have the latest code from here

1 Like

Looks interesting… I currently use the “MySensors” stuff to monitor my garage doors to see if they are open or not. The only advantage of the MySensors is the notification is immediate rather than up to 60 seconds but I suspect this might not be an issue for people… How do you plan to power the sensor, batteries?

One thing I haven’t got working yet with MySensors is a pulse power meter that talks to OpenHAB, maybe you have this planned for somewhere on your journey? :smile:

I am planning on using the power supply I listed in the first post (http://www.ebay.co.uk/itm/191348603397) cheap, 5v, and is easy to plug into the nodemcu development board.

The notification of this is also within seconds, where did you get the “up to 60 seconds from”?

Not sure if I will make a pulse sensor for my power meter, but I am working on one using non-invasive sensors to snap around the wires of the different phases.

Ah, I see it now… I guess you didn’t read all of it. Because I both explain how it sends it every 60 seconds, AND also got it as a trigger. The trigger is immediate, and the timer is just to make sure the sensor and openHAB is synchronized.

The newest update I made today, is so it also use the lwt function, so if the sensor ran out of battery, or if it was disabled before the window/door was opened, a notification would still be send, because it stopped sending the keep-alive signal as expected.

I have a separate “clamp” type power sensor but I’m not confident the readings are good… When the house is “idle” my OpenHAB reports roughly the same Watts being used when compared with looking at the reading directly on the power meter. But if I switch on the over or something then OpenHAB shows about 2000watts but the power meter shows about 3500watts…

Hence I’m investigating reading the pulse that is put out by the power meter so I can get OpenHAB showing exactly what the power meter is reporting.

How are you reading from the current transformer? If you made your own with a microcontroller and some resistors, it needs to be calibrated properly, and the voltage needs to be measured too, to be able to calculate it.

I’m reading the power usage using a “Current Cost” power meter so I’ve always assumed it was accurate but now I’m not so sure…

Most accurate thing (related to what you pay for), would be to keep an eye on the led flashing on the power meter from the electricity provider… on mine I got a led flashing 10.000 times for each 1 kwh, could set a sensor on that, and calculate use by measuring the time between each pulse

Does the sensor you use on the window also give you a notification if it unexpectedly disconnects?