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
alkorsi 1
Hi experts,
I created my first LUA based scene to trigger a light on by clicking a remote control. But unfortunately it doesn´t work as expected! If I press a button on the remote control the corresponding value is send to the HC2. But unfortunately this doesn´t trigger my coding! Only if I press "Start"/Run the scene it is ececuted once and evaluates once the value:
Here is my small coding:
--[[
%% properties
117 sceneActivation –Change this to The ID of the Keyfob!!
%% globals
--]]
local id= 117;
if ( tonumber(fibaro:getValue(id, "sceneActivation")) == 11) -- button 1, single press
then
fibaro:call(102, "turnOn");
end
My expectation was that this scene is "always" running and as soon as I press a button on the remote control the scene evaluates the value returned from "id". What do I miss? Or do I have to trigger the execution of this scene by using a different one that will be triggered as soon as the remote control is activated/on....????
Many thanks for help!!!
kind regards,
alkorsi
6 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.