"SmartGATE" - The ultimate Doorbell and Gate Logger!

#Welcome to SmartGATE!

The ultimate doorbell and gate counter/timer/logger for any home’s front gate!

See this post for latest updates on this project!

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



I have added email notifications if the gate if left open longer than 60 seconds (we have dogs).

When the gate or bell is rung it signals an alert mode on all the internal SmartLED systems I created around the house to flash/strobe as an early warning system. Great too when Im playing games with headphones on and can’t hear the bell sound.

I also want it to trigger the garden light system im building. Have it light up the path to the house during night hours.

When the video/image widget comes out I want to try and pull a screenshot from the security camera facing the gate when you click on the entry in the table.

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

8 Likes

Nice use of a table widget! And cool layout!

1 Like

Thanks! Would be cool if I could reverse the order of the table or have the ability to add negitive order via code (tried and doesnt work).
And I feel it is maybe 2 lines too tall.

Definitely a very cool project! I do like the flashing light idea. I’m trying to come up with something similar myself but I’m using a Passive Infrared sensor, which works really bad, lol. I still have to make a debounce for my doorbell. I was wondering how you have solved that issue? I can see how the light starts flashing, but am wondering about the gate and doorbell on the hardware side :slight_smile:

Thank you!
Yeah I like early warning systems in general. Something about knowning things will happen brings me peace :relieved:

Here is the code if you’d like to pick it apart. Its not finished yet. More features I want to add.

1 Like

GREAT use of the table widget! I’m starting to think about a doorbell project myself (thinking about building an Arduino/Blynk-based in lieu of monitoring existing system) and the table is a great use for this!

1 Like

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