There are multiple rules needed but this way offers a lot of flexibility
1 Start Rule
This is basically a trigger only that starts the process off. For me it is at a set time (5:15am), only on weekdays, and only when the mode is home. This way it wont trigger if we are away. It is set to have the lights come on at a certain colour at 5% brightness
the main Rule
Then there is the main rule: That has the following conditions:
Mode is Home (same reason as with the trigger)
Time is between 5:20 and 06:02 (this is the period of waking up that I am interested in)
Only on Weekdays (same reason as with the trigger)
Lights that I am interested in are on (this is the clever bit that ensures that if at some point in the sequence I turn the lights off manually, the Gentle wakeup is canceled)
and the only action
adjust the lights by x amount (10 in my case)
The increment rules
These re just increment rules that cause the rule above to be re-evaluated. So I make 10 of these spread across the time frame that I am interested in. Importantly all they do is have the above rule re-evaluated.
Trigger: the increment time
action: re-evaluated main rule
Thanks @AdamV for your method. I will try it out starting tomorrow morning. I really do like the idea that it is cancellable (WAF brownie points there!) and that it is so flexible. i guess the only drawback is that the dimming won’t be as smooth and gradual.
Also - just to add… I’ve made a further improvement (Good for WAF!):
For the start trigger I’ve set it to disable when an on/off tile (called “Gentle WakeUp Alarm”) button is off.
and I’ve linked that button to a Gentle Wakeup Alarm tile in Smarttiles. We have a tablet in the room with smarttiles for control of everything in the room. So in the rare event that we are going to sleep on a weekday and know that we wont need to get up early (on holiday / ill / whatever the reason) - just tap the button and the alarm is disabled. Once the our routine is back to normal wakeup - just tap the button again to re-enable the alarm
Ok @Jimxenus - I now have a much better way of doing this using Rule Machine. It only requires 2 rules - no increments… has all the same pro’s as the original method, but also, more importantly allows for smooth dimming:
Firstly you’ll need to make a virtual momentary button tile device. You can do this in the IDE or use one of the community Smartapps --> “Virtual device manager” or “Switchmania” to create it in app.
Start trigger rule. same as before no changes
Main Rule: Same as before + add a trigger which is your virtual momentary button being switched on + add an additional action which is to turn on the momentary button with a delay of 1min (or whatever increment you desire) + edit the dimming adjustment (as now it will be happening every minute)
Wow, even better! I really like what you’ve done. I will get this set up tonight. You know, you were right, I didn’t really notice the incremental dimming from your older method. However, this is so much better and can be used in more cases like a gentle reminder when it’s time to go to bed. You should put your method here for others to enjoy:
I just got the new method installed this weekend so I haven’t really fully tested it yet. I’m not sure, but I did have to add an action to the Start rule to turn on the virtual switch even though you said there should be no change, otherwise the Main rule never triggered. Am I missing something with your new method?
I can see how larger increments could be more effective on waking one up. Perhaps the larger differences in lighting stimulates the wake senses better. In any case, your new method works for that too so I’ll try it this week.
I’m not sure why it never triggered - I haven’t made a change to my start rule. My start rule still just turns on the lights at dim level 5% and then the other rule takes over a few minutes later. Which virtual switch are you talking about the momentary helper switch or the switch to disable the rule??
I did, but a bug in the Android app kept it from being published. The bug is fixed now and should go out with the next Android build. After that I’ll retest and publish it. Should be soon, sorry for the delay.
@steve_vlaminck thanks again for your great work on Gentle Wake Up. Your app is the reason I bought a hub in the first place! My wife and daughter rely on it to wake up now and definitely notice if it isn’t working. After about a year of solid performance and not touching the app, I un-installed and re-installed in a futile effort to fix some of the scheduling issues the platform as a whole has been experiencing. Here is the new problem. App crashes anytime I update completion actions. I can no longer set the light to turn on or off at a certain time. I’ve tried via app v1 & v2 both on ios9. I’ve tried multiple versions of your app including the latest from github. I don’t think it is a problem with your app or code since the same version worked fine previously. There is another thread where a few other folks have experienced the same problem. Do you have any insight you can add?
I have a PR open that removes style: "segmented" to prevent the iOS crash. I spoke to some people today, and I think we’re going to push my new version (including the segmented fix) to production soon. Unfortunately, that means Android users will experience some UI bugs for a little while. Sorry Android users, but crashes take precedence over UI ugliness.
I also have a PR open that fixes the crash in iOS. Unfortunately, it’ll be a little while before we submit to Apple, and then we have to wait for whatever wizardry they do during review. So the actual crash won’t be fixed until the next iOS version is in the App Store, but at least the SmartApp change will get around it.
None of this addresses the scheduling issues that Gentle Wake Up has been suffering from lately. I’ve been speaking to people about that and it’s being worked on, but it doesn’t sound like a quick or easy change. I’ll try to keep everyone here informed with what I find, but I might have to make drastic changes to Gentle Wake Up in the meantime. Unfortunately, that won’t be quick or easy either.
I spoke to some people yesterday about the scheduling issues, and a hotfix went out last night that seems to have made things better. You may need to update your SmartApp to reschedule it, but then it should work again. My Gentle Wake Up worked perfectly last night and this morning. I had to do update my morning SmartApp to force the initial schedule to get rescheduled, but then it worked fine.