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


  • 0

Simple Timer - LUA


Acho

Question

Hi,

      can you pls support on how to create a simple VD which would switch off a device after defiend time, which would be set by the buttons "+" and "-" directly in the VD ? Or any ready made solution available I could easily modify ?

 

 

Thanks for help

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

I attach simple example, to count down from given value - just add action for device to the button, i kept it really simple, so no protection against running it 2 times etc.

Please login or register to see this link.

Link to comment
Share on other sites

  • 0
  • Inquirer
  • Im getting error message in debug, btw how to implement multiple running protection and where to place the device to be switched off after defined time pls ?

     

     

    [ERROR] 16:27:01: line getSelfId()..."]:5

     

     

     EDIT: error was related to not defined time, so my fault, how about the multiple running protection please ?

    And one more - Ild like to have half an hour ( + ) feature, showing then the countdown HH:MM

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • correct, the "0" was the issue, but how to avoid its running multiple times please ?

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • anyone can help how to avoid it will run twice if by chance activted twice ?

     

    Thanks a lot

    Link to comment
    Share on other sites

    • 0

    I was talking about the protection against 2nd run. I attach changed device.

    Please login or register to see this link.

    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
    Answer this question...

    ×   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...