Goodnight Home with lights off delay

At the 10/15 developer’s conference call, I believe someone said that Goodnight Home would soon have an option for turning off lights after a specified delay. Any word on that?

1 Like

I have a shared smart app called Goodnight Ubi which kinda does this already. Granted, it’s designed to work with Ubi, but it should be pretty easy to modify it to respond to a different trigger or even a hello home state change.

What my app does right now is when I say “Goodnight” to Ubi, that turns on a Virtual on/off tile. That tile sets the Goodnight Ubi smartapp into motion which does four things:

  1. Check that all selected doors and windows are closed. If there are any that aren’t, this information is sent to Ubi and announced. It all doors and windows are closed, it sends a message to Ubi saying that everything is ready for night.

  2. (Optionally) turns ON selected lights (for me, this is Kitchen and Upstairs hallway. This way we can see as we head to bed.

  3. (Optionally) turns off selected lights after a specified delay.

  4. (Optionally) changes Hello Home modes.

2 Likes

@Ben is there any update for @Tim ? If he sends in another support ticket about this I’m going to stick Q-Tips in my ears until I hear a ‘pop.’

3 Likes

Check the mobile app tomorrow.

@ben I am interested in this too. Did you guys make some sort of change in the mobile app today? Where should I be looking?

I don’t see an option for delaying actions (like turning off lights after a period of time) in this either. @Ben, am I missing something here?

Sorry guys - this SmartApp did not get published as scheduled. Looking to get it for next week

I have created an app to do this. It is designed so that when i change my mode to “asleep” it will set a timer for the specified amount and then turn off my tv.

This is great. However, I am using a virtual switch to run a Hello Home and I need a time delay attached to that. Any ideas how I can accomplish that one?

Is there a mode change involved with the hello home?

In this particular case, no. I am turning ON my tv via the Harmony Hub Remote, which then turns On a virtual switch, which then runs a Hello Home Mode which turns off my night table lamp, but does not actually do any mode changes in this case. I would like to have the light turned off with a 5 minute delay as I usually come into the bedroom at night and turn on the tv and get changed and still would like light for a few more minutes.

1 Like

You can try this

@Mbhforum let me know if it does what you need.

Thanks! Seems to have worked. My only question is what does the Turn it ON or OFF mean? When I turn the tv off (thus turning off the Virtual switch), I was nervous that the light would turn back on because I saw in the logs below. Fortunately, it did not turn the light on after 5 minutes. I am curious though why it shows a schedule being set though.

c520ab61-e69d-44ab-9481-8d38fcbd43c9 3:09:24 PM: trace Scheduling ‘turnOnOffAfterDelay’ for InstalledSmartApp: c520ab61-e69d-44ab-9481-8d38fcbd43c9
c520ab61-e69d-44ab-9481-8d38fcbd43c9 3:09:24 PM: trace Deleting scheduled job ‘turnOnOffAfterDelay’ for InstalledSmartApp: c520ab61-e69d-44ab-9481-8d38fcbd43c9
c520ab61-e69d-44ab-9481-8d38fcbd43c9 3:09:16 PM: info Turning off.

@Mbhforum the on or off setting will allow the delay to turn something off or on, which ever you prefer.

I am not sure about the schedule, give me a sec, and i will see if i cannot fix that.

In my case, I want to turn the light off when the virtual switch is turned ON. Should I leave the “Turn it On or Off” enabled? It is now and seems to be working even though the log entries show some sort of schedule when I turn the Virtual Switch off too.

Yes, the virtual switch code was just added to accommodate your needs. the on or off is whether you want it to turn something on or off after a delay. i will clean it up some more and we will give it another go.

Thanks. So the default behavior is to “turn off” the switch and by enabling that option, it gives the ability to turn “on or off”?

So when the virtual switch is toggled either on or off, it causes a time delay to be scheduled. When the time is up, it will execute the selection (on or off) for the device chosen. If you need it to be just when the virtual switch is toggled on, let me know, i can do that too.

That is definitely what I need. However, it seems to be working fine the way it is now, so not sure why you would need to modify the code further?