Author Topic: Scene to detect and alert on a door left open  (Read 633 times)

Offline karantezjegou

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Scene to detect and alert on a door left open
« on: February 14, 2017, 06:13:17 am »
I have desperetely tried to write a scene to alert me if the garage door outside the house is left open late at night. I frequently forget to close it ...

Several questions:
1/ I have fitted a VG8101 sensor but i made the wrong purchase - this sensor does not detect the state (open/closed) , only the movement. Comments welcome if you do not agree

2/ I have now fitted a standard Fibaro FGK 101 sensor on the door. I guess i can use this to get the "state" (open or closed) of the door, but  i am still not successful.

I am using UI7

I wish to create a scene using the assisted "scene" capability but everything i have tried does not work. Basically i want to express the fact that i need a "logical AND" between the time (11pm) and the status (OPEN) to be checked , then i get a notification
a/ not sure how i make the logical AND
b/ not sure how i retrieve the status of the sensor (open or closed) at a point of time. My understanding is that it can only report when it switches from open to close, or reverse. Not the status. It is key point.

I am getting the impression i have to get myself into Luup coding, but not sure. I wish to avoid it.

Can someone bring some guidance how i do this ?


Offline RichardTSchaefer

  • Master Member
  • *******
  • Posts: 9368
  • Karma: +704/-129
    • RTS Services Plugins
Re: Scene to detect and alert on a door left open
« Reply #1 on: February 14, 2017, 07:48:26 am »
For PLEG See:
Why use PLEG:
http://forum.micasaverde.com/index.php/topic,13802.0.html
And:
Getting Started with PLEG:
http://forum.micasaverde.com/index.php/topic,21603.0.html

If you want to use LUA see:
Conditional Scenes with LUA:
http://forum.micasaverde.com/index.php/topic,18679.0.html


There are many PLEG examples for checking garage door ... there are examples like you want, that notify after a fined amount of time, and that notify after a fixed amount of time that repeat at a specific interval.
« Last Edit: February 14, 2017, 07:50:57 am by RichardTSchaefer »

Offline Don Phillips

  • Hero Member
  • *****
  • Posts: 621
  • Karma: +13/-4
Re: Scene to detect and alert on a door left open
« Reply #2 on: February 14, 2017, 01:22:40 pm »
I use PLEG, a virtual switch, a timer, VeraAlerts, VeraMate, and a scene to notify me when the garage door is opened, and I get a notification every 10 minutes that it is still open, until the door is closed. I did not include a provision to disarm since I seldom putz around my garage with the door open. If I do, I can put up with a couple of notifications.
Vera 3, UI7 1.7.919, CT101 t-stat, Everspring motion detector, GE/Jasco switch, Leviton outlet, AeonLabs door sensor, Insteon garage control, Blue Iris, Sricam SP011, iPhone locator, APCUPSD, VeraMate, VeraAlerts, PLEG, House Modes, Countdown Timer, DVR, Virtual & Multi Switch, Weather, Sys. Mon.

Offline fitz2380

  • Sr. Newbie
  • *
  • Posts: 38
  • Karma: +3/-0
Re: Scene to detect and alert on a door left open
« Reply #3 on: February 14, 2017, 02:37:56 pm »
If you don't want to use PLEG, here is how I do it by using the Countdown Timer app.  In addition, I use VeraAlerts App as well to send text messages to my phone.

I use a Monoprice door sensor for the status of the gargae door. 
I create a timer from the timer app and label it Car Garage Door Timer
I have 3 scenes defined 1) Car Door Left Open, 2) Car Garage Door Closed 3) Car Garage Door Open

1) When garage door sensor opens, it triggers Car Garage Open Scene; This scene restarts and unmutes Garage Door Timer (30 minute timer)
2) If garage door sensor closes, it triggers Car Garage Door Closed; This scene mutes and stops the Car Garage Door Timer
3) If Car Garage Door Timer times out, it triggers Car Door Left Open scene; This scene restarts Garage Door Timer and includes Vera Alert message that car door has been left open; Every 30 minutes this will retrigger until the Garage Door is closed.










Offline gemini1971

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
Re: Scene to detect and alert on a door left open
« Reply #4 on: February 24, 2017, 12:34:01 pm »
I'm a newbie and i'm having a similar difficulty on controlling the status of my garage door... at present, i only receive notifications from vera when garage opens and closes.

i have a Fibaro magnetic door/window sensor.

Your idea sounds just like what i was looking for... is it posible you could detail it more (for newbies like myself?)

I've installed the countdown timer app but am lost on what to do next.

Thanks

[Edit] After reading again your post i finally understood the logic to it.. and it works!!!

Thank you very much fitz2380

If you don't want to use PLEG, here is how I do it by using the Countdown Timer app.  In addition, I use VeraAlerts App as well to send text messages to my phone.

I use a Monoprice door sensor for the status of the gargae door. 
I create a timer from the timer app and label it Car Garage Door Timer
I have 3 scenes defined 1) Car Door Left Open, 2) Car Garage Door Closed 3) Car Garage Door Open

1) When garage door sensor opens, it triggers Car Garage Open Scene; This scene restarts and unmutes Garage Door Timer (30 minute timer)
2) If garage door sensor closes, it triggers Car Garage Door Closed; This scene mutes and stops the Car Garage Door Timer
3) If Car Garage Door Timer times out, it triggers Car Door Left Open scene; This scene restarts Garage Door Timer and includes Vera Alert message that car door has been left open; Every 30 minutes this will retrigger until the Garage Door is closed.
« Last Edit: February 24, 2017, 03:01:04 pm by gemini1971 »

Offline ember1205

  • Sr. Member
  • ****
  • Posts: 338
  • Karma: +4/-19
Re: Scene to detect and alert on a door left open
« Reply #5 on: February 24, 2017, 07:35:39 pm »
I'm guessing you don't have the ability to control the door, just monitor it's status. So, to that end, you'll be able to do this very simply as follows (yes, it's going to take a little work to set up, but the experience will be WELL worth it):

- You'll need to open up the sensor's "Device" page and go to Advanced. Click on the Variables tab. Scroll down through the list and determine which one of them will show you whether the door is open or closed. It might be "Status", for example.
- Create a scene that runs every day at a set time. This will be the time that you want to check the door to see if it's open.
- Write LUA / LUUP code to poll the sensor, retrieve the value of the setting determined in step 1, and return a "TRUE" if it's set to the value that indicates that the door is open.
- Set the scene to alert you when it runs.
- Name it "Garage Door Still Open".


What will happen is that the scene will run every day at a specific time. It will poll the sensor to get its current state. If the value returned indicates that the door is open, you will get an alert.