Having trouble getting Schedule() to work


I’ve been using Codersaur’s Fibaro Dimmer 2 DTH for some time but it appears to not function correctly with new Fibaro DImmer’s that have been added since the classic app was retired (Codersaur’s DTH was written for Classic). So I’ve been trying to adapt the current stock DTH provided by ST to add in the couple of features missing that I want; force brightness level and night mode.

I’ve got force brightness working fine but I’m having no end of issues getting a version of night mode to work. From what I can see, Codersaur’s version simply created some new attributes to store start and end date in along with target brightness and then basically just changed parameter 19 as the switch was clicked to set the desired brightness. It used states to store information such as previous brightness level and whether nightmare was active or not. The whole lot was run locally on the device using schedules which I really liked.

No matter what I do I cannot seem to get a schedule to work using schedule(). Nothing I add to the schedule using schedule() or even runIn() seems to execute. Do these functions even still work in ST? The documentation I’ve found on them is clearly for the Classic app but I’ve been struggling to find anything more up-to-date on it.

Alternatively, can anyone think of some other way that doesn’t turn the light on to set the brightness, or doesn’t incur any kind of lag while cloud scripts are run when the switch is clicked? I’d happily use a Webcore Piston to set parameter 19 between certain hours if the light didn’t turn on by doing so! would scenes be a possibility?

Thanks in advance :slight_smile:

You may want to start thinking about Edge Drivers at this point. Groovy Device Handlers are going to cease when ST ends support for groovy on the platform. Webcore will also cease so Routines or Rules API should be consider as it’s replacement.

Check out this Edge Driver to see if it is compatible with your model of the Fibaro dimmer.

1 Like


I’ve already tried that driver but it’s missing both the functions I want. I did comment in that thread and seems forced brightness might get added later this year. Until then I’m happy to continue using Groovy DTH’s because there isn’t any indication on when they will be retired yet.

1 Like

Yes they work just fine, what’s the specific issue you’re facing?