Feliz Navidad!
Groovy is going away in 2021, so they aren’t going to spend time on this version. The new version using the new backend is available for Android users in the USA and Korea.
Hello Mariano,
Can you share the complete code you are using to get it to work? I’ve been fighting with it and cannot get it working.
Muchas gracias desde BCN
Hi Roger,
In this link. Try It.
Ya me dices si necesitas algo mas
Thnaks a lot.!!! Un abrazo
Hi Roger, @ericbarnes88 &@jonwhoward
I have seen how to create in the new app the virtual switch to control the start of a “Gentle Wake Up” schedule and to be able to schedule the progressive start from an automation or from the smartlighting app. This switch only works to start and stop the regulation, it does not give information on how much is left to finish. You can see that in the lamp that you are controlling.
Steps:
- copy the complete code in this link.
- Create, save and publish the samartapp “Gentle Wake Up” for you.
- Create, save and publish the DTH “Gentle Wake Up Controller” for you. Here is a link.
- Open smartthings app and in menu press smartapp
- Click on “+”. click on “Gentle Wake Up” and create the schedule for the light you want to control.
- Important: Write a unique name for this programming, that name is the one for the virtual switch will have that will control it manually, in automations and smartlighting app.
- Tap Done. You can say we’re having trouble connecting, but get the schedule right.
- You can create different schedules that you need.
- Push ON in virtual switch for start programmed regulation.
- If you want to manually carry the regulation to the end: Select go to the end in the app and on the device you are controlling press OFF. It will go to the end programmed by you.
- If you want to stop the regulation at the point it is: Press OFF on the virtual switch and the regulation will stop.
Thanks Mariano,
I am using the previous code you sent me and it is working good so far.
Roger
Ok Roger,
With the virtual switch you can do more things:
- Progressive start of lights at sunset or progressive off at sunrise, with automations or smartlighting app.
- Activate the routine without a fixed schedule, when you press the virtual switch.
As you want.
Un Abrazo!
Mariano,
That is great, thanks.
There is only one thing missing… that it turns on when the iPhone alarm clock turns on, but I guess that’s something we cannot do so far.
Thanks anyway for the code, I’ll try it !!!
Gracias
After several tests, I see that it does not reach the final% programmed. The longer time you program, the further you stop from the final%.
I correct the original code of “gentle wake up” that makes the Healthckeck() increment the step counter by 1 every minute and when it reaches the maximum number of steps to execute the regulation (100) the dimmer stops.
The links previous posted already have it corrected.
Tested with increasing, decreasing and executing manually, with automations and smartlighting app.
Tested manual stop dimming with virtual switch OFF.
Go to the end with switch device OFF, it is executed according to the original code, when it is between > 2% and <98% of the programmed regulation, in case someone seems to fail. I have left it that way.
Excuse me but, I don’t get it. Incrementing on 1 every minute you can only program the dimmer in a 100 minutes interval? How does it work if you program it to go from 0 to 99 in 10 minutes? It will only do 1 to 10?
Hola Roger,
It may not have explained me well. Any time and % variation can be programmed:
The app calculates the duration of each adjustment step by dividing the total programmed duration, in seconds, by 100 maximum steps to execute the regulation. “int stepDuration = (minutes * 60) / 100”.
if I schedule 20 minutes to regulate from 5% to 65%:
The app programs 100 steps of 12 seconds to execute the regulation. (65% -5%) / 100 steps = 0.6% increase in each step. So for any regulation you program.
The “increment ()” procedure has a counter that increments by 1 each step: “atomicState.runCounter = atomicState.runCounter + 1”
When the counter exceeds 100 steps, the regulation aborts and ends, because something has gone wrong.
But the Healthcheck () procedure runs every minute and ends up executing the “increment ()” procedure every minute, regardless of the duration of the scheduled steps.
In the previous example: The regulation exceeded 100 steps at 56% and 16 minutes of elapsed time.
What happened?: The Healthcheck () has increased 15 counter steps and the 0.6% has not been increased. (15 steps x 0.6% = 9%) 56% + 9% = 65%
Deleting line 405 in Healthcheck () procedure, call to increment (), regulates perfect in time and final %
You can see all steps of regulation procedure opening the live logging in IDE.
Try it
Un Abrazo
Detected a bug in the original procedure start (), of the “gentle wake up” app, which allows restarting the regulation once it has already started when another activation command arrives at the virtual switch from another app.
For example, smartlighting app sometimes send activation command up to 4 times in 1 minute when using sunset / sunrise shooting. This causes the regulation process to start again in “gentle wake up”.
I have seen that the smartlighting app does the same with any light not only with “gentle wake up”. I think it will be to secure the activation order …or work in cloud…
In this pictures, send activation 2 times in 7 sec:
Modified app already in the links of post 25
Thank you so much!
Its working perfectly, better then the original I was using.
I really appreciate the detailed step by step instructions. They helped a lot.
I try using your version (I grab it from your gitlab repo) and the device (switch) shows offline which is preventing me to create any “Automation” in ST.
Do you know why this is happening?
Thanks!
Diego
Hi @DiegoAntonino,
Did you also use the linked controller dth? It has a small modification with the original.
I don’t know why that happens to some people and then it works.
Try some of these things to see:
- If you did not use the dth of the link, use it.
- Make sure to use the dth that you create and publish, it appears at the end of the list. There is also the original with the same name, that does not work.
- If you used it, try selecting a simulated switch dth in ide and then reinstall the correct one.
- Delete the device in the app and in the SmartApp, select values again and save, it will recreate the device.
You will tell me
I could not find this right away. For those that are looking - click the menu tab, Labs, and then “Gentle wake-up” should be the first item.
My excitement for this was immediately squashed because it only triggers with a specific time. I really wanted this to work with a motion trigger.
Yes. And it looks like you can only have one instance of this? I have the old system setup so that I can chain four of them together, slowly increasing one light, then another, and so on. If all four lights come on at once, it’s just too bright.
Hi @Mariano_Colmenarejo, I followed your steps only at 4 I don’t have a option for “smartapp”?
So I can install your DTH and Smartapp but I don’t see anything in the SmartThings app to use this function?
If you already published the smartapp and the dth in your IDE.
- You have to open the smartthings App
- click on Automation actions menu
- Click + and Add Routine
- Click on Discover
- Swipe down and the Gentle Wake Up smartapp you published in IDE will appear
- Open and choose the dimmers and configure the smartapp according to the instructions.
- When you save the configuration, it will create a virtual device with the name you write, with which you can control the on, off and create routines to control dimmers or bulbs