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

Making a Scene automaticly activate part 2


Question

Posted

Hello again.. this seems to be a problem im having alot of the times now with my codes. But here goes anyway

 

I have created this scene to trigger automaticly when the power usage drops below 50w

 

Please login or register to see this code.

Problem is that I does not do it automaticly, I have to press start for it to send me a notification..

 

I also have the "same" problem with GPS.

 

Please login or register to see this code.

Nothing happens when I leave the house. ( the second scene I created with graphics blocks )

Please login or register to see this attachment.

11 answers to this question

Recommended Posts

  • 0
Posted (edited)

@imLiquid Try inserting

Please login or register to see this code.

Before 

Please login or register to see this code.

This should do it...

Edited by StefanS
  • 0
  • Inquirer
  • Posted

    @StefanS still does nothing ?

     

    Do I need to reboot the HC for it to work ?

    • 0
  • Inquirer
  • Posted

    So I'm still having problems with this script, not activating when the power is below 50.

    I added the 

    Please login or register to see this code.

     

    • 0
    Posted

    Hi @imLiquid ,

     

    this is properly made scene header:

    Please login or register to see this code.

    Power and value are the properties of devices so if you want scene to trigger on device property change then they must be placed after %% properties and not %% events. %% autostart you add to scene ONLY if you want it to be executed immediately after changing and Saving scene or when HC2 is rebooted.

     

    For GPS location services please see knowledge base: 

    Please login or register to see this link.

     

     

     

    • 0
  • Inquirer
  • Posted

    @Sankotronic Perfect explanation to the header. thank you. I will try it with the new header :)

    • 0
  • Inquirer
  • Posted

    Worked perfectly.

     

    Now how to I make it so it only triggers when the power goes from more than 50 to below. and not from 0 to 50 ?

    • 0
    Posted
    13 hours ago, imLiquid said:

    Worked perfectly.

     

    Now how to I make it so it only triggers when the power goes from more than 50 to below. and not from 0 to 50 ?

     

    Hi @imLiquid ,

     

    you can't do that. Scene will be ALWAYS triggered by power change, but you can use IF THEN ELSE in code to check power and decide which action will be taken or ignored.

    • 0
  • Inquirer
  • Posted

    @Sankotronic Ok, I will try to figure somethine out. thinking a valueble that turns 1 when the plug goes +50 and turns 0 when I accept the shutdown command

    • 0
    Posted

    This could work,

    if you trigger and the power is > 50 you start a loop and check at regular intervals the power  until the value goes below 50 before notifying.

    Please login or register to see this code.

     

    • Like 1
    • 0
    Posted (edited)

    Vey nice @jgab, really like your scenes. Always elegant and easy to read:)

    Learning a lot from your posts, takker

    Edited by MARCUSP.I.L
    • 0
  • Inquirer
  • Posted

    Ended up going with variables in 2 scrips :

     

    Push notification :

    Please login or register to see this code.

     

    Variable change when pc turnes on :

    Please login or register to see this code.

     

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