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

Use of plugins in block scenes


Question

Posted

I feel as if the HC2 is not consistent at all. On one hand the interface is slick as hell, the marketing movies give people a sense that when you buy the box they can start being creative without the geeky programming and that the sky is the limit...

Then... reality!!!!!

Block scenes which would be the approach for the non-programming folks here, where absolutely everything is restricted, plugins can't be used at all and simple stuff like "movie lights go on in the livingroom when TV is powered but only after sunset, not when it's still light outside" is simply not possible without LUA-knowledge.

Please Fibaro, as it is, there's not a bit of flexibilty in the block scenes!!!

4 answers to this question

Recommended Posts

  • 0
Posted

it is still not finished, right now you can't control plugins by block scenes

  • 0
  • Inquirer
  • Posted

    That makes the virtual devices a much more viable option for the non programming folks out here. Even for guys that program it's a lot easier because they can see their code in the advanced tab of the VD.

    As for my other scenario: If TV turns on, turn the lights on, that's possible in blocks, but I really have no clue how you can add to not turn on the lights if there's still light outside. I guess that is just not possible to do in blocks, correct me if I'm wrong.

    • 0
    Posted

    Mechanize of plugins is still not finished right now you can only use LUA to control plugins from Virtual device/ scenes When it will work good we gonna add that option

    • 0
    Posted

    I think you can do it in blocks but you need a little bit of lua to set a variable of night time and day time

    Please login or register to see this image.

    /emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" /> add a global variable for daytime and nighttime then call the variable in blocks ie. and nighttime ==1

    Befor sunset and after sunrise set minutes before and after as it can still be dark. I think I found this script here on the forum and it's been insanely useful

    --[[

    %% properties

    %% autostart

    %% globals

    --]]

    local BeforeSunset = 30

    local AfterSunrise = 25

    while true do

    if (os.date("%H:%M", os.time()+BeforeSunset*60) >= fibaro:getValue(1, "sunsetHour"))

    or (os.date("%H:%M", os.time()-AfterSunrise*60) < fibaro:getValue(1, "sunriseHour"))

    then

    fibaro:setGlobal("nighttime", 1);

    fibaro:setGlobal("daytime", 0);

    fibaro:debug("Gooooooodnighttime home !! nighttime variable has been set to 1!");

    else

    fibaro:setGlobal("nighttime", 0);

    fibaro:setGlobal("daytime", 1);

    fibaro:debug("Gooooooodmorning home !! daytime variable has been set to 1!");

    end

    fibaro:sleep(600*1000);

    end

    Cheers,

    Al

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