Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


Sleep Timer & Scheduler 1.4

   (0 reviews)

1 Screenshot

About This File

Initially it was supposed to be a simple Sleep Timer, similar to what we have in TV but later I added some new functions and now it is a simple Scheduler and Sleep Timer in one VD.

 

59f8e1c99dff4_Sleeptimervd.thumb.png.5848f184206ed8476986b1eca8e14c97.png

 

Features:

  • Sleep Timer - just set the time after which the device will be turned off or turned on
  • Scheduler - set the time when the the device should be turned on and the time when the the device should be turned off (or in the reverse order - first turn off and then turn on)
  • Filtering devices - you can choose only devices with turnOff action attribute
  • Filtering rooms - you can choose only rooms which have devices with turnOff action attribute
  • _ - change on/off setting time
  • ✔ - add device to schedule
  • - remove device from schedule; triple click to clear the schedule
  • Refresh button - you don't need to touch it. It's called programmatically
  • Displaying the current schedule
  • Logging the events to debug window: add, remove, turn on, turn off
  • automatic support for plugins with turnOff action attribute
  • support for custom virtual devices and plugins
  • instant turn on/off (VD and plugins also)
  • presenting the current device state ( when the device is on, and - when is off)

 

Customization:

  • change the VD labels to your own language
  • change the texts in the Refresh button code and in the main code:
local lT = {
  newLine = "<br/>", -- change to "\n" if you use this VD on iOS mobile mainly or " " for Android
  scheduledDevices = "Scheduled devices"
}

       Actually there is a problem with breaking lines in labels, so you can choose new line char. More details here.

 

  • add your own virtual devices or plugins in main loop code:

local extraDevices = {
-- deviceId,    commandOn,      parameterOn,  commandOff,     parameterOff
  ["335"] =  {  "pressButton",  "2",          "pressButton",  "3"  },
  ["339"] =  {  "setVolume",    "20",         "setMute",      ""   },
}

icons:

 

59dba6b6510a0_sleeptimer.png.afca4fa74cbd6e069b76ec44202ea138.pngtimer-128(4).png.a2a23e9ebe1a01b9def7d1e66fbb88b5.pngtimer-128(3).png.a0cf4cf3a0312abdf94c29c8d415d7a8.pngtimer-128(2).png.caadc2e516cde688b414dc3bd9120171.pngtimer-128(1).png.69a65d044c58e16e880c171e48ea72de.pngtimer-128.png.a191a87013d4f5b6beed34f9b5230b13.png

 

Enjoy...


What's New in Version 1.4   See changelog

Released

VERSION HISTORY:

  • 2017-10-09: v. 1.0 - first release
  • 2017-10-11: v. 1.1 - changed device filtering. Instead of power interface now is checked turnOff action attribute. Thanks @tampiss for helping to find the correct filter.
  • 2017-10-16: v. 1.1a - bug fix for the "Room ▶" button. It was checking power interface instead of turnOff action attribute. Thanks @Figlio for finding the bug.
  • 2017-10-18: v. 1.2 - plugins and VD support. Thanks @petr23 for idea and your code.
  • 2017-10-25: v. 1.3 - instant turn on/off buttons. Thanks @campos for good idea.
  • 2017-10-31: v. 1.4 - changed layout and button icons. Removed 2 rows to save some space. Thanks @Bodyart for good design.
  • Like 1

Other Files from szmyk


User Feedback

Recommended Comments

My bad, had a variable SleepTimer in the Variables Panel for a scene that was called SleepTimer. This was causing the error.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...