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

notification when lights are one for one hour


Question

Posted

Hi All,

 

Maybe easy to answer. 

I would like to receive a (interactive) push notification when lights are on for one hour (left on at the attic). 

 

Is there an easy way to check the lights left on for a certain amount of time with scenes?

I tried the following scene (see attached screenshot), but that doesn't work). 

 

 

Please login or register to see this spoiler.

 

8 answers to this question

Recommended Posts

  • 0
Posted
1 hour ago, roelnic said:

 

Is there an easy way to check the lights left on for a certain amount of time with scenes?

I tried the following scene (see attached screenshot), but that doesn't work). 

 

 

 

If you want to keep using block scenes? Not very easy but certainly possible.

Create a variable per switch you want to monitor.

Create 1 timer scene (see screenshot below as example). Don't activate the triggers on top.

Create another block scene scene which is triggered by the variable. If the variable value is > a certain value, send the message.

Does this brief description helps you on the way forward?

Please login or register to see this spoiler.

 

  • 0
  • Inquirer
  • Posted

    thanx for your response. helps me further in the right direction.

    Is it more easy with for example magic (i cannot imagine :)) or LUA scenes?

    • 0
    Posted
    17 minutes ago, roelnic said:

    thanx for your response. helps me further in the right direction.

    Is it more easy with for example magic (i cannot imagine :)) or LUA scenes?


    Yes, it much more easy with Lua but you need to able to program or at least get several pieces of code together. 
    I can't write such a code myself in 2 minutes for your specific purpose because mine are based on timer scripts which you can find on this forum. Search for example on "simple timer".


    So, in case you can't use lua yet, you can use block.

    Create a block scene. Give it a name and mark the checkbox 'start when your homecenter 2 starts'.

    Next, create a scene like this. That should work.
    Be aware that this is not optimal use of resources of your HC2 if you create several of this kind of scenes.
    Certainly not if your time is in hours.

     

    Please login or register to see this spoiler.

     

    • 0
  • Inquirer
  • Posted

    thanx! you pointed my in the right direction!

    • 0
    Posted

    @roelnic, these two links can help you start your adventure with Lua. Some basic instructions and examples. 

    Please login or register to see this link.

    Please login or register to see this link.

    • 0
    Posted

    @roelnic all devices has LastModifed value. So simple check current state is 1 (on) and read LastModifed value and compare with os.time 

    if thisValue > 60 * 60 then

    push push push 

    end

    • 0
    Posted

    @10der It's not that simple, isn't it? If you explain how to compare against lastModified value is the easiest part.
    Next, you also need to explain how to run this scene each and every 5 minutes as a standalone scene.

    • 0
    Posted (edited)

    ok

     

    for example

     

    Please login or register to see this code.

     

    you can run this script every 5 min (for example)

     

    if you will use this script in VD please add

     

    Please login or register to see this code.

    at the bottom

    Edited by 10der

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