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
Question
Andyman 0
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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.