Welcome to Smart Home Forum by FIBARO
Search the Community
Showing results for tags 'too many instances'.
Hi guys, I seem to be missing something very basic... And wonder if anybody could give me a pointer. I want to do something as simple as this. 1) When movement is detected: Turn on the light 2) When there has been no movement for x seconds: Turn off the light (where x will be different for the different areas, e.g. from 15 seconds to 5 minutes) So I create two scenes (using the graphic blocks) 1) Turn on lights, (IF motion == Breached 0s) THEN (Turn on Lights) 2) Turn off lights. (IF Motion == Safe 60s) THEN (Turn off lights) But very frequently in my log, I see "Too many instances of the turn-off scenes". Which got me thinking. If I understand correctly, a new instance of 2) will be started every the sensor triggers that motion stops. So If I'm in the scene, and then move again within 60 seconds, scene 1) will be triggered again (but doing nothing, as the light is already on). When I stop moving again, yet another instance of 2) will be started. And then eventually, the max number of triggers are reached, which causes the error. The longer the timeout is, the more possible instances of 2) may be running. So I guess I could increase the number of instances, but is this really a good idea? Or am I going about this the wrong way? Should I instead create a LUA (which I haven't tried yet, but have a lot of programming experience), with the following two scenes: 1) Scene motion (motion == breached) Set global variable motion = yes if (number of instances > 1) exit Turn on lights while (variable motion == yes) wait 10 seconds while end turn off lights 2) No-motion (motion == safe 60s) set global variable motion = no Thanks for any advice on this. John Erik
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!