Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This enables delaying the action for X minutes on Contact and Switch #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ljbotero
Copy link

I'm using this in order to trigger a speak event when the garage door is left open for 5 minutes. I bet there many other scenarios similar to this where a delay to the action is required.

Copy link
Owner

@rayzurbock rayzurbock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delayed response.
I'll review this in the next few days. I know this has been a requested feature. I hope to implement and give you acknowledgement for your contribution. Thanks for your contribution!

@rayzurbock
Copy link
Owner

rayzurbock commented Aug 9, 2018

I've reviewed. Again, thank you for your contribution. On the surface it looks like it could work. I do have a couple of questions.

  • Are you running this code now and is it working for you?
  • It appears that it can only handle 1 delay event per device type at a time. For example if contact1 opens and we wait for a delay of 5 minutes then contact2 also opens and we start a delay of 2 minutes, contact2 will alert in 2 minutes and will repeat at the 5th minute due to contact1's timer but the state variables hold only information about contact2.
    • Have you tried this scenario? Is this what you are seeing?

@ljbotero
Copy link
Author

ljbotero commented Aug 9, 2018

Hi, thanks for looking into my contribution. Here're the answers to your questions:

  • Are you running this code now and is it working for you? yes, I'm currently using it for the garage door. My kids tend to leave it open and this helps guarding that. It works pretty well. I've had no issues.
  • It appears that it can only handle 1 delay event per device type at a time. For example if contact1 opens and we wait for a delay of 5 minutes then contact2 also opens and we start a delay of 2 minutes, contact2 will alert in 2 minutes and will repeat at the 5th minute due to contact1's timer but the state variables hold only information about contact2.
    • Have you tried this scenario? Is this what you are seeing? I'm not sure about that, since in theory each instance of bigtalker2-child should have it's own state, but it's worth testing. Let me give it a try and I'll get back to you.

@rayzurbock
Copy link
Owner

I'm not sure about that, since in theory each instance of bigtalker2-child should have it's own state, but it's worth testing. Let me give it a try and I'll get back to you.

During analysis of the code, this is the conclusion that I came to on how it would operate.
True that each child will have it's own state, but within that child a person may have multiple contacts selected and would expect a delay, if configured, for each one. For example if I create a child/group for Door monitoring, I would likely have all of my exterior doors in the child app (group). If someone opens the front door and it remains open for 5 minutes, I would want to know that. What if someone also opens the back door and leaves it open. Both are configured in the same child app to monitor and report the exterior doors but I believe the code here is only expecting and tracking a single contact/door scenario.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants