Phone Notification with Response


#1

1) Give a description of the problem
I have an idea for a piston but I’m not sure how to configure it, or if there is a way to do so.

I often fall asleep watching TV or something with my lights on in my bedroom or living room. Currently I simply have a timer set up that shuts off all my lights and sets my hub to “Night” at about 1 am. Sometimes, especially on the weekends, I am still awake when this happens. Is there a way to send a notification to my phone with a prompt like, “Are you still awake?” and if i do not reply within 10 minutes or so then it goes to night mode and shuts off all my lights? And if i do reply within the timeframe, it puts it tries again in like a half hour? Sort of like a reverse snooze?


#2

People are doing this but it involves Tasker and th JOIN API and is only available for Android Phone. I actually requested instructions form the guy who posted about it on the Hubitat Forum. I’ll post back with instructions when I get them.


#3

Are you on Android or iOS?


#4

You could get a little creative with a nearby light “asking” the question…

Every day at 1 AM
    Flash NearbyLight blue for 5 seconds
    Turn Off "I am awake"  (Simulated Switch)
END every

Every day at 1:10 AM
    IF "I am awake" is Off
        Then turn off the whole house
        Set mode to Night
    END IF
END every

This way, when you see the blue light flash, you have ten minutes to “Turn on the SimSwitch”. Otherwise, your house will shut down at 1:10.

If you are still awake, it can be toggled by any phone / tablet / voice command.
(such as, “Alexa, turn on I am awake”)


The snoozing aspect can simply be a carbon copy of the above with new times.


#5

Ok, here is another option. I am including a sample piston for you to try by downloading it into your webcore instance. You just need to fill in the variable ‘pistonUrl’ and the phone number that sms notification is being sent too.

It is set up for 1:00 am as you referred too. It will send you the text message with a link to your piston. From that message, when you click on the link, it will run the piston. When it does that, it will reset the timer to a new 1 minute countdown. I also put in a follow up message to see if you had fallen asleep since last message, this will keep I put in log to console commands that you would replace with the desired actions you want to complete.

You can modify as needed.

To get the piston url , reference this image to find it in webcore. Copy that address into the piston variable ‘pistonUrl’

Here is the working piston that you can import and play with.

Enjoy!


#6

Wow thanks everyone for the responses. I will have to try out your suggestions, especially @Gopack2 's sample piston. FYI i have an iphone and ipad.


#7

Just an FYI. Don’t share PISTON url’s with just anyone, or they will have the ability to control it anytime they wish, or until you change/delte the piston and the url changes. LOL nothing worse than someone trying to be funny and you trying to find out why something keeps firing.


#8

Update: I think I have the final version of this piston. I have integrated Alexa Speaks and the following Ask and Answer routine to complete this. WebCoRE asks a question, my voice response determines the action

At midnight (or 1am or whatever time I choose), webcore determines if im in my room or in my living room. Then the Alexa dot in the specified room asks if I’m still awake. If I answer “Alexa, yes” within 15 seconds, it waits 30 minutes and asks again. If I dont answer, all my lights turn off and mode is set to night.


#9