Jump to content

Outdoor Gate Sensors


CPrince

Recommended Posts

For a long time I have wanted to put gate sensors on my outdoor yard gates.  I finally figured it out with a little help from Google too.  With the use of a 2843-222, a overhead door contact https://www.amazon.com/gp/product/B00LYD8CRK/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1 and a outdoor box https://www.amazon.com/dp/B08MCZ17HW?ref=ppx_yo2ov_dt_b_product_details&th=1 it is possible .  This really works great.  I check for a daily heartbeat to check battery and sound an alarm when the gates are opened.

Anybody have an easy way to shut the gate sensors down when I am doing yard work or want to open the gates?  I was thinking RFID tags and IfTTT (if ISY can support) or double tapping a switch.  I know I can disable the program in ISY.

Link to comment

You acknowledge that you know you can disable the program, you do realize it can be disabled (and/or enabled) by another program.

I have several of the hidden door sensor (2845) hidden outside as pushbuttons.  (Under a deck rail for example, or one i drilled into a dead space on the bottom of a light fixture--you don't see it you must know where to stick your finger to push the button.) these do various things, like open an overheard door in the fenced back yard or activate a specific irrigation zone that only has hose bibs.   The programs that detect the button presses only work if the $sAway variable is set that we are home (it's changed by geofence, but can also be locked to not change).   There's no more 2845's (except ebay or the like), but perhaps you did like i did when the 2843's were cheap and bought extra's-- if so add a pushbutton.  There's also z-wave equivalents that are even smaller.

Another idea... if the gate sensor is opened and closed 3 times in 5 seconds.... disable the alarm program, wait X hours or minutes and re-enable it.   The program that sounds the alarm could be delayed 5 seconds so that the if the disable programs are activated the alarm program gets stopped.  Counting button presses tho might be problematic if your Insteon system has a lot of regular traffic (like devices in query loops).

Link to comment

@MrBillI really like your door sensor idea.  I never saw a use for these.  Too late now.  I can buy a steak and dozen eggs, a Raspberry Pi or one of these sensors on eBay all for about the same price.  I didn't buy enough 2843's either.  I will just keep an eye out on eBay.

For the time being I am just doing a "Fast On" and off at the front door.

Link to comment

Gate sensors are working fine as for sensors.  Some other anomalies have come up.  Heartbeat detection doesn't seem to work.  I have plagiarized the leak sensor program from "The ISY994i Home Automation Cookbook".  I have tuned it for the 2421 open close sensor.  Since I am actually using the leak sensor program, I looked at the leak sensor program variables, in the last changed column and noticed they have not been updated in 28 days.  So it seems to be my heartbeats are not being detected. My gate sensors have not changed in 3 days.  So maybe I am not detecting heartbeats correctly?  I am thinking that if the heartbeat never changes state, then it will never run the then.

North Gate - Variable Control 2 - [ID 0080][Parent 006C]

If
        'Outside / North Gate - Heartbeat' is switched On
     Or 'Outside / North Gate - Heartbeat' is switched Off
 
Then
        $sNorthGate  = 1
        Wait  25 hours 
        $sNorthGate  = 2
 
Else
   - No Actions - (To add one, press 'Action')

 

Next, issue is my siren, 2868, output.   I can make it chime, but not alarm.  According to the guide chime is supposed to 100db and alarm 115db.  Chime seconds don't seem to work correctly either.  The number of seconds is directly related to how many chimes you get.  I have tried messing with Armed Home and Armed Away before triggering the alarm.  No difference.

North Gate - [ID 0081][Parent 0001]

If
        (
             'Outside / North Gate - Open' is switched On
         And $sGateAlarmOnOff is 1
        )
 
Then
        Set 'Outside / Rear Deck Light' On
        Wait  2 seconds
        Set 'Outside / Front Porch Light' On
        Repeat 10 times
           Set 'Kitchen Area / 53.28.E9.1 Siren Trigger Home' On for 2 seconds
           Wait  2 seconds
 
Else
   - No Actions - (To add one, press 'Action')
 

Link to comment

A couple of comments on heartbeats, with the style programing that you are using you should see a solid green folder in the program tree next to the program image.png.c8e9f2b15d649011bd93d873d741d303.png(assuming that you have "detailed" status icons turned on in the program tree: image.png.fa92fff33c39605df8bfb973c34d180b.png)

The solid green icon indicates that the THEN block is running, if the Icon isn't green then the program is not in that 25 hour wait state, which it should be 99.99999% of the time.

Second, here is the heatbeat program I use for all insteon battery sensors:

hb.FrontDoor - [ID 0066][Parent 0072]

If
        'Door Switches / Front Door / Front Door- Heartbeat' is switched On
     Or 'Door Switches / Front Door / Front Door- Heartbeat' is switched Off
 
Then
        Wait  24 hours      (wait 24 for 2845 Hidden door sensor, wait 25 for 2421 Surface Mount, or Water Detection)
        $iDoor.FrontDoor.HBmissed += 1
        $iDoor.FrontDoor.HBmissed Init To $iDoor.FrontDoor.HBmissed
        Wait  2 seconds
        Resource 'NotificationNS.DoorTrouble.FrontDoor'
        Run Program 'hb.FrontDoor' (Then Path)
 
Else
   - No Actions - (To add one, press 'Action')
 

It's similar to yours but doesn't set a state variable for another program to deal with.  I do increment a counter because especially 2421's it's common for a missed heartbeat occasionally.

NOTE especially, the last line which RUNS the then block again, if the heartbeat is missed.  You're current program lacks a re-trigger or repeat.  If the heart beat fails yours just stops until another heartbeat is received.  (perhaps whatever program deals with $sNorthGate  = 2 has a nag feature.)

The resource called sends a notification thru the Notification node server that looks like this:

IMG_5932.thumb.jpeg.39f7f638d81df78f007a1011bb922ade.jpeg

(this particular 2421 has the most trouble with heartbeats, but it never misses an open/close in normal use or tests after a failed heartbeat).

the program that counts transmissions is:

FrontDoor - [ID 005B][Parent 0033]

If
        'Door Switches / Front Door' is switched On
     Or 'Door Switches / Front Door' is switched Off
     Or 'Door Switches / Front Door / Front Door- Heartbeat' is switched On
     Or 'Door Switches / Front Door / Front Door- Heartbeat' is switched Off
     Or 'Door Switches / Front Door / Front Door- Low Bat' is switched On
     Or 'Door Switches / Front Door / Front Door- Low Bat' is switched Off
 
Then
        $iDoor.FrontDoor.TransCount += 1
        $iDoor.FrontDoor.TransCount Init To $iDoor.FrontDoor.TransCount
 
Else
   - No Actions - (To add one, press 'Action')
 

The battery counter is just +1 to each sensors integer variable at 12:12:12 am every morning.  So for each sensor there are 3 integer variables:

image.png.33c8873e322020b6bc36b62e84a521f1.png

---

Don't have any input for your siren issue, I don't own one.

Link to comment

@MrBillso I typed the message above yours, double tapped my front porch light (so as to turn off off the gate alarm program), opened and kept open my south gate to do yard work and went out to do yard work.  An hour later I closed the gate.  During the time I was doing yard work, I received a heartbeat and the variable , last changed, recorded the new time.  Go figure.  So just for fun I put one of my leak sensors in communications mode (holding the set button 3 seconds) and I got a heartbeat time update too.

Let me set up some programs based on your logic and see what happens.  I like the way you keep track of battery days and actual heartbeats missed.  Eventually I could migrate some of the knowledge into the motion sensors.  They have a battery % level.  However this information is only available when plugged in of communications mode.  Batteries just die with no warning.

 

Link to comment

I can tell you that in my experience 2421's are the worst of all the model for skipping heartbeats.  Most of the time I just go test the sensor when a heartbeat misses, and it doesn't the next day.... if I get them two or three days in a row from the same sensor then either i remove the battery and reinsert it which will get the heartbeats going again,,, or if it's an older battery (day) and/or has high transmission counts.. then I'll just change the battery. 

It's never been stated, at least officially that I've come across, but my personal belief is that it's designed so that once heartbeats stop there's still enough battery left to send open/close transmissions for awhile.

I also have an ISY program for each sensor, that I trigger manually from a Home Assistant Dashboard to reset the counters when the battery is changed:

FrontDoor.reset - [ID 01A4][Parent 01B5]

If
   - No Conditions - (To add one, press 'Schedule' or 'Condition')
 
Then
        Resource 'NotificationNS.DoorTrouble._resetCountersBegin'
        Wait  1 second
        Resource 'NotificationNS.DoorTrouble.FrontDoor'
        Wait  2 seconds
        $iDoor.FrontDoor.HBmissed  = 0
        $iDoor.FrontDoor.HBmissed Init To $iDoor.FrontDoor.HBmissed
        $iDoor.FrontDoor.BatteryDays  = 1
        $iDoor.FrontDoor.BatteryDays Init To $iDoor.FrontDoor.BatteryDays
        $iDoor.FrontDoor.TransCount  = 1
        $iDoor.FrontDoor.TransCount Init To $iDoor.FrontDoor.TransCount
        Wait  2 seconds
        Resource 'NotificationNS.DoorTrouble.FrontDoor'
        Wait  1 second
        Resource 'NotificationNS.DoorTrouble._resetCountersComplete'
        Run Program 'hb.FrontDoor' (Then Path)
 
Else
        Resource 'NotificationNS.DoorTrouble.FrontDoor'

The four notifications it send end up looking like this:

(read from the bottom up)
 

IMG_5934.thumb.jpeg.be68b255c80650bc7ed3b64e2f793075.jpeg

Sends 4 notifications, a start announcement,  counters before the reset, counters that have been reset, and a complete announcement.  The purpose is once or twice I've reset the wrong counter on accident-- this way I don't lose totals and can manually change the variables to put them back if i need to.   In this case that sensor is a 2845 and sends low battery, that's why it was getting changed--given the day and transmission count I suspect that wasn't a fresh battery in the battery stash-- but the sensor did send low batt, so I changed it.

Link to comment

@MrBillI have been trying to digest this.  My first hangup was "Resource 'NotificationNS.DoorTrouble.FrontDoor'".  What the heck is Resource?  Afte a few days I finally figured it out by accident.  So in this case "Resource 'NotificationNS.DoorTrouble.FrontDoor'" is a call to your HA?  Is there any documentation  for "Network Resources"?  Looks like a lot can be done here.  Since I don't know what this is I changed it to a Notify.

Second:  Is this a continus loop?  Does it ever exit?  Does it stop when it sees another hearbeat on or off?

image.png.c10be34e7a9cdf42b15cde5105e8ef07.png

Back to the program I am messing with for heartbeat, it does work.  I don't have to put the sensor in communication mode.  The variable does not update the time/date becase it does not change.  I think it always send a heartbeat on when working correctly.   I pulled a battery out, 6 hours later I received a heart beat missed.  I put the baterry back in and I received an all clear 12 hours later.  In this case the time/date did update.  It did becase it went from a 1 to a 2 and back to a 1.

I am definatly going to be recording battery days for all my sensors.

 

Link to comment
31 minutes ago, CPrince said:

I have been trying to digest this.  My first hangup was "Resource 'NotificationNS.DoorTrouble.FrontDoor'".  What the heck is Resource?  Afte a few days I finally figured it out by accident.  So in this case "Resource 'NotificationNS.DoorTrouble.FrontDoor'" is a call to your HA?  Is there any documentation  for "Network Resources"?  Looks like a lot can be done here.  Since I don't know what this is I changed it to a Notify.

It's actually a network resource, that publishes to the Node server named "Notificiation". Notification in turn re-publishes the message to Pushover.net which sends Push notifications to phones. 

It's fine to use Notify instead.  In the end tho Pushover is the fastest and most reliable.  I've tried every which way possible on notifications.  Pushover can also be used without the Node server middleman, we did it this way before node servers.

Pushover service is a 30 day free trial and a one time $4.95 charge for the app, otherwise free.

Network resources are tedious to create if you have lots of devices.  I use an excel spreadsheet to concatenate text so that the "body" portion of the NR is just a paste.  If you'd like it have a copy I'll send it to you.

54 minutes ago, CPrince said:

Second:  Is this a continus loop?  Does it ever exit?  Does it stop when it sees another hearbeat on or off?

The thing that you have to remember is that as soon as the IF body is satisfied AGAIN the currently running copy of the program (that is sitting in "wait 25 hours" state) ceases to exist and a new copy of the program begins to run... that's alot of words to say "the wait restarts when a heartbeat arrives."

The purpose of the "loop" or adding the "Run Program 'hb.FrontDoor' (Then Path)" as the last line is to add a repeating nag.  In theory, the program never gets to that line... it only gets there when a heartbeat is missed.

Normally, the first heartbeat arrives..  the program immediately begins waiting 24 hours.  As long as the next heartbeat arrives during that wait... the first program vanish and a new one starts -or- the wait restarts.  the only time the lines under the wait line come into play is when the wait expires, at which time we add one to the missed counter, bounce out a notification, and then loop back to the top of the then body, so that this program never stops. 

Prior to adding that line to the program what would happen is a door would miss a heartbeat and I'd be (occupied, not home, etc) and I'd forget about it..  eventually I'd discover the sensor has a dead battery so ultimately I added the missed counter and the loop so that it was impossible to forget.   for the most part this works great, because the sensors quit sending heartbeats before they are completely out of battery.  After the heartbeat stops the sensor will still send Open/Close or On/Off for the door itself for quite awhile actually.. so when heartbeats stop it's not a battery emergency...the sensor will still do it's job, but it's time to replace the battery before the battery is dead.   (btw, I noticed when i scrolled up the heartbeat program has 24 hours in the wait... I don't know if I mentioned but with the surface sensors use 25 or 26 hours for the wait, 24 is too short for those.) 

1 hour ago, CPrince said:

I am definitely going to be recording battery days for all my sensors.

In my setup, each battery sensor has 3 integer variables.  Missed heartbeats, battery days, and total transmission count.   All are reset when the battery is changed.  at one point I combined missed heartbeats and battery days into one variable by adding 1 for missed heartbeat and adding 1000 the same variable for each day... so that 245002 as the value meant 245 days and 2 missed heartbeats, but since they are only integer variables and not state variables I simplified and just used 3 variables.

Link to comment

 I have a couple of 2843-222 I wanted to use on my mailbox and package box. I really liked the waterproof boxes you got. Has anyone had problems with batteries exploding in the winter? I had one blow up one winter and the battery acid ate though the sensor board. I was using a lithium ion battery. It did happen in a especially cold winter in Indianapolis.

Link to comment
4 minutes ago, Dishboy007 said:

 I have a couple of 2843-222 I wanted to use on my mailbox and package box. I really liked the waterproof boxes you got. Has anyone had problems with batteries exploding in the winter? I had one blow up one winter and the battery acid ate though the sensor board. I was using a lithium ion battery. It did happen in a especially cold winter in Indianapolis.

I have several insteon battery devices in unheated places.  I use plain of alkaline batteries and they do just fine in Missouri winters (including feb 2021 when we had that week of -10 avg with a low of -26).

Link to comment
  • 2 weeks later...
1 hour ago, CPrince said:

@MrBill I would like to see more information on the newtork resources.  Thanks for the tip on Pushover.

I assume this request is in regards to this:

On 5/16/2022 at 11:03 AM, MrBill said:

Network resources are tedious to create if you have lots of devices.  I use an excel spreadsheet to concatenate text so that the "body" portion of the NR is just a paste.  If you'd like it have a copy I'll send it to you.

I'll PM a copy of the Excel Spreadsheet I use.

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...