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

Triggers in scene dosen't work


Andyman

Question

Hi

After updating to ver 3.517 no scene with time or sunset trigger work. Everything worked fine in 1.047.

The scenes are build in blocks and testet, even converted to LUA and test but no diffrens.

I've read in other topic that blocks doesn't work in same way in new ver and that a solution was to convert to LUA and delete part of code after "else", I've tried it too but no improments.

Example of sunset in blocks and LUA. When Active it's not possible to switch off lamp at all.

Anybody that has an idea what to do?

--[[

%% autostart

%% properties

24 value

%% globals

--]]

local sourceTrigger = fibaro:getSourceTrigger();

if (sourceTrigger["type"] == "autostart") then

while true do

local currentDate = os.date("*t");

local startSource = fibaro:getSourceTrigger();

if (

( ((currentDate.wday == 1 or currentDate.wday == 2 or currentDate.wday == 3 or currentDate.wday == 4 or currentDate.wday == 5 or currentDate.wday == 6 or currentDate.wday == 7) and string.format("%02d", currentDate.hour) .. ":" .. string.format("%02d", currentDate.min) == fibaro:getValue(1, "sunsetHour")) )

and

( tonumber(fibaro:getValue(24, "value")) == 0 )

)

then

fibaro:call(24, "setValue", "15");

end

fibaro:sleep(60*1000);

end

else

local currentDate = os.date("*t");

local startSource = fibaro:getSourceTrigger();

if (

( (currentDate.wday == 1 or currentDate.wday == 2 or currentDate.wday == 3 or currentDate.wday == 4 or currentDate.wday == 5 or currentDate.wday == 6 or currentDate.wday == 7) )

and

( tonumber(fibaro:getValue(24, "value")) == 0 )

or

startSource["type"] == "other"

)

then

fibaro:call(24, "setValue", "15");

end

end

Please login or register to see this attachment.

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0
Guest Dennis

same problem here:

Please login or register to see this link.

Link to comment
Share on other sites

  • 0

I hope this will be solved in the next beta.

this basic block scene will be not triggered.

Please login or register to see this attachment.

Link to comment
Share on other sites

  • 0
Guest Dennis
Hi

After updating to ver 3.517 no scene with time or sunset trigger work. Everything worked fine in 1.047.

The scenes are build in blocks and testet, even converted to LUA and test but no diffrens.

I've read in other topic that blocks doesn't work in same way in new ver and that a solution was to convert to LUA and delete part of code after "else", I've tried it too but no improments.

Example of sunset in blocks and LUA. When Active it's not possible to switch off lamp at all.

Anybody that has an idea what to do?

ANDYMAN:

I think i solved it for you

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" /> (let me now if it works)

just copy pace. And let hope fibaro will fix this soon

Please login or register to see this code.

Link to comment
Share on other sites

  • 0
  • Inquirer
  • Hi Dennis!

    Thanks, your solution works fine!

    Strange that making scenes in block doesn't work anymore. Time to study LUA I Think but it's kind of hard finding documents on at least the specific Fibaro commands. Maybe they will finish the docs soon

    Please login or register to see this image.

    /emoticons/default_icon_smile.gif" alt=":-)" />

    Link to comment
    Share on other sites

    • 0
    Guest Dennis

    I still find many bugs in the Blok bluid. When will this be fixed ?

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