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
wospital 2
Goodmorning i am trying to created a script but i don't know whats wrong.
--[[
%% properties
%% weer
747 CentralSceneEvent
%% events
%% globals
--]]
if (fibaro:countScenes()>1) then
fibaro:abort();
end
local startSource = fibaro: getSourceTrigger ();
local button = startSource ["event"] ["data"] ["keyId"];
local keyAttribute = startSource ["event"] ["data"] ["keyAttribute"];
fibaro: debug ('key' ..button .. 'en' ..keyAttribute .. 'was ingedrukt');
if (keyAttribute == 'Pressed' and button == 1) then
fibaro:call(685, "turnOn");
fibaro:debug('turn on central lights...');
elseif (keyAttribute == 'Pressed' and button == 2) then
fibaro:call(688, "turnOn");
fibaro:debug('turn on dressing lights...');
elseif (keyAttribute == 'Pressed' and button == 3) then
fibaro:call(731, "close");
fibaro:call(736, "close");
fibaro:debug('closing all blinds...');
elseif (keyAttribute == 'Pressed' and button == 4) then
fibaro:call(726, "close");
fibaro:debug('closing overflow blinds...');
elseif (keyAttribute == 'HeldDown' and button == 1) then
fibaro:call(685, "turnOff");
fibaro:debug('turn off central lights...');
elseif (keyAttribute == 'HeldDown' and button == 2) then
fibaro:call(688, "turnOff");
fibaro:debug('turn off dressing lights...');
elseif (keyAttribute == 'HeldDown' and button == 3) then
fibaro:call(731, "open");
fibaro:call(736, "open");
fibaro:debug('opening all blinds...');
elseif (keyAttribute == 'HeldDown' and button == 4) then
fibaro:call(726, "open");
fibaro:debug('opening overflow blinds...');
end
thanks a lot for your help.
3 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.