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
RobVeenis 0
Community,
I use a keypad with tags with a Fibaro binary senso to switch mij alarm on and off.
Somebody made me a LUA script for that.
When I present a tag the alarm will switch on or off.
This is the script:
--[[
%% properties
245 value
%% weather
%% events
%% globals
--]]
local startSource = fibaro:getSourceTrigger();
-- 2 streepjes is commentaar
fibaro:debug(fibaro:getGlobalValue("Alarmstatus"))
if (
( tonumber(fibaro:getValue(245, "value")) > 0 ) -- keypad activated
and
( fibaro:getGlobalValue("Alarmstatus") == "uit" )
)
then
fibaro:setGlobal("Alarmstatus", "aan");
elseif (
( tonumber(fibaro:getValue(245, "value")) > 0 ) -- keypad activated
and
( fibaro:getGlobalValue("Alarmstatus") == "aan" )
)
then
fibaro:setGlobal("Alarmstatus", "uit");
end
fibaro:debug( fibaro:getValue(245, "value"))
fibaro:debug(fibaro:getGlobalValue("Alarmstatus"))
fibaro:sleep(3500)
fibaro:abort()
My problem is that I get "too many instances".
I guess I need to include the following line:
"maxRunningInstances": 2,
But I have no clue how and where.
Is there anybody that could and would tell me how to do so?
It would be highly appreciated!
Please login or register to see this attachment.
Link to comment
Share on other sites
9 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.