"SmartGATE" - The ultimate Doorbell and Gate Logger!

Its only 1 of many uses I can think of…

History log (this one)
recall history (by use of clicking the rows)
A dynamic menu which makes use of the “clr” feature. (im actually working on this now)
and a secret idea im yet to work out :wink:

2 Likes

I recently updated my Surveillance Software and it now allows external triggers via HTTP requests.
So I used hte Webhook widget to send a GET request when ever the gate is opened and now it will trigger the two cameras at the front of the house to record for 60 seconds as well as capture 5 JPEG images over 5 seconds.
I hope to use the Video Widget to grab the snapshots or video from FTP and play it back on request when tapping on a table row.

2 Likes

some great integration ideas @Jamin - look forward to you possibly sharing your code etc? as I’m sure myself and many many others would learn a great deal from real life examples.

Hey @mars, cheers man!

Here is the latest code set up for my local server only. You will need to change a few things to make it work for you :slight_smile:

1 Like

Very good job, I recently installed a Hall effect sensor on my gate and added it to the ESP that controls the motor, I only have an LED widget showing the status, this may be a good option to expand it a little further.

On the Alarm I have an LDR to an ESP that send a tweet (via node.js due to local server).

1 Like

#Update Time!

Updates to hardware:

So this project is 6 months old now, but recently we had a huge rain storm and the button and electronics got soaked! And since then, the button and gate have been random setting themselves off. So annoying in the middle of the night or when we genuinly think someone has just come through the gate.

So I decided to order some new buttons. I got these blue LED ring buttons with the black finish and flush button (there is a huge range of non-flush and metal buttons too… latching or not).

I drilled the 16mm hole all the way through the post to mount the elecrtonics on the back, out of sight. You can see the holes from where it used to be mounted on the front.

Im not happy with the way the drill roughed up the edge around the button hole. I have ordered a metal plate form China which I will paint black to hide it.

I also upgraded to a hall sensor for the gate switch. Previously I used a micro switch. Pleased to have moved to non-contact as the water is what killed the old one.

The button is connected through a 3pin JST on the back of the black box through a hole. I used a common ground for the blue LED and bell button.

This is my first PCB… ever! I thought It was pretty good! But I forgot to allow room for oppisite screws to hold it in!

The unplugged blue JST connector is for an LED light which will face us on the inside letting us know if the gate is open of shut… but that was really for the old broken hardware… not sure if I need it for the new stuff.

https://easyeda.com/export_58a6d09637b04851bbcacdb6d79058d3/Main.png?type=1&width=0&penWidthIncrease=0&version=4.1.3&_t=1490491776364


Updates to code:

  1. Added Silent Mode silder.
  • Modes: Inactive, Bell Only, Gate Only, Bell & Gate.

  • CCTV Webhook to record.

  • Using Synology Surviellance Station which provides methods to create multiple triggers via a secure HTTP API and other methods.

  • Added Back Gate support for later when there is power at the back gate.

  • Notify delay slider for each gate.

  • 0 disables notifications.

  • Uses Bridge to trigger the Front House lights system.

  • Has a crude NightMode which is triggered when the front lights turn on via bridge, and then times out 10 hrs later when the sun is up. This means that if the front lights are off (after 1030pm), then its dark right? well open the gate during “nightMode” and it will turn the lights on for 1min (or defined in the dash of that lights app).

Code: https://github.com/jaminNZx/ESP8266-Blynk-Gate-Logger-And-Counter


5 Likes

I must be blind because I can’t find any download link for synology surveillance station :confused:

Edit:
Found the link for client… does it work without synology products?

Edit2: Apparently not… sigh, cant find any good “free” surveillance ^.^

Have you looked at Blue Iris? http://blueirissoftware.com/

It’s not “free”… but at $60 USD it is far more cost effective than anything else I had found.

I am currently running it on a Quad Core laptop with 8GB ram and 1TB HDD - 24/7 recording of 14 cameras consisting of IP Cams, repurposed Cell Phones, even Web Cams (some on other PC’s running http://www.yawcam.com/ streaming)

2 Likes

I’ll definitely evaluate it :smiley: I like one time payment options. Was thinking of iSpy but it’s a monthly sub, thanks for the tip!

Get something like the Synology-NVR216

Or a NAS which runs blynk server and node.js scripts easily too

https://www.synology.com/en-uk/products/DS116#spec

Synology pack Surveillance Station in for free, but you need to one-time purchase camera licences.

The one above comes with 2 free cam licences… so you buy it and hook up your cameras… and you have a free mobile app and full featured windows app (or web app in browser).

1 Like

#Updates

v1.0

  • Split the functions in to their own header files… wow compiles so much faster!
  • Changes the time format from “XX sec” to “XXm XXs” for those times when you want to see how many minutes the gate is open.
  • Updated the Gate Table time format to match “XXm XXs”
  • Fix: Fixed a notification bug where it would send on boot that the gate was left open 0 seconds and sometimes it would lopp badly.
  • Fix: Fixed the daily reset function to only trigger once now using difference in day() and var today
  • Fix: NightMode now functions as planned and also syncs at boot correctly.
  • Changed some terminal output text to fit a thinner terminal widget instead of dropping down a line

v1.1

  • Fix: Fixedclear table double action bug
  • Fix: Fixedsome formatting and added some help comments
  • New: Added nightTime time out timer and settings
  • Changes some function names to refelct their function

Download latest here: https://github.com/jaminNZx/ESP8266-Blynk-Gate-Logger-And-Counter/releases/latest

1 Like

v1.2

  • Added a bespoke function which works out the hour difference between current time and a set “end” time. This value is used to set a timer to disable nightMode at the same time every morning no matter when it was turned on.
  • Changed the active timer to output 1s… 2s… 3s… etc when counting up but only for the first 10 seconds. After that, once the first minute rolls over, it will show the time as 1m 01s… 1m 02s… etc
  • Changed some debugging messages that were annoying me for being too long and causing line breaks.

Latest: https://github.com/jaminNZx/ESP8266-Blynk-Gate-Logger-And-Counter/releases/latest

1 Like

Keen to give this a go? Once you have DSM (the syno Os) installed, you can just install Surveillance station from the Download Center app.

https://ahkhai.com/2016/02/09/installing-synology-nas-on-virtual-machine/

Thanks for the tip, a bit overwhelming for what I need tough :smiley: gonna try gunners tip first if there is an trial period, need to make sure it can handle my IP cameras. I tried xeoma but couldn’t get rtsp working with the same link that I’ve gotten success with in other apps and softwares :confused: think it’s due to rtsp over tcp.

1 Like

The face plate arrived today!
Looks pretty good!

Also including a photo of the back of the case and how I connect the button to the controller.


I’ve also updated the code to reflect some newly discovered SimpleTimer shorthand coding.

Get it here: https://github.com/jaminNZx/ESP8266-Blynk-Gate-Logger-And-Counter/releases/latest

1 Like

Cool project. Does it still work ? I’m having trouble compiling it

Compiles fine, what error is it giving you?

I’ve made it work than tried another version and can’t get it to work. Would it be hard to make it work with Arduino Ethernet ? And what does bell button do ?also I could swear I saw somwhere how to set it up but I can’t find it anywhere.

This version works for me. I have just recompiled a fresh WeMos D1 Mini now.

It’d litterally take 1min to change it in setup() and switch in the blynk libraries to match the hardware.
Refer to the Blynk connection documention.
I personally have never used Ethernet but Blynk supports it!

You may have only seen a mention in this thread or another thread of mine… SmartLED Controller

The bell basically sends out a Blynk Bridge command to another ESP on the network.

We wanted a silent bell in our house so we used lights as a inidcation someone is at the door/gate.

So if you use the SmartLED Controller with a WS2811 LED strip in your house, just enter its auth code in to the settings for the SmartGate and it will flash the lights like a strobe for 2 seconds when the gate is opened or the bell is pressed.

You could add an actual sound to make it a proper bell if you wanted or just make it notify your phone/send an email etc. Think of it as just an extension. You can disable it in settings.

@Zbx did you see my post above?