This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

FB Editor Staircase Lighting Function
#2
You need to add 'Filter' Filtr On-On / Off-__ between the outbut from your 'Lock out' and the input of your Stairase lighting function.
When you use this it only sent a 1 and never sent a 0.

the help says about input 1:
Start of the module by a telegram with the value not equal to zero. Output 1 has a one for the duration. If this input receives a zero, then Output 1 switches to zero.

i did made a script and do the same, but it also checks if the doors are closed, it all the doors are closed, then it goes off, if not, it stay on.
*at my script, more doors enable the lights, but not at all doors are the check if it is closed.

but it is a script, not blockly like you used.

Code:
--Read current status/value deur_berging = grp.getvalue('14/0/57')            --'Deur Berging' Garage_loopdeur = grp.getvalue('14/0/65')        --'Garage Loopdeur' Poort = grp.getvalue('14/0/45')                --'Poort Buiten' Schemering = grp.getvalue('5/0/9')            --'Schemering' Buitenlamp_achterdeur = grp.getvalue('1/4/162')        --'B verl. Achterdeurlamp (tm)'     --if one of these go open, set light on if (deur_berging or Garage_loopdeur or Poort == true)         and Buitenlamp_achterdeur == false         and Schemering < 200 then grp.checkwrite('1/1/162', true)            --'B verl. Achterdeurlamp (s)' end os.sleep (300)                        --wacht voor 300 seconden (5 minuten) repeat    -- repeat all below till 'Buitenlamp_achterdeur' is off         --Read current status/value (find because update time, doenst work with getvalue deur_berging =         grp.find('14/0/57')            --'Deur Berging' Garage_loopdeur =     grp.find('14/0/65')            --'Garage Loopdeur' Poort =         grp.find('14/0/45')            --'Poort Buiten' --calculate the time differents between now and last time of a true now = os.time()                                -- current timestamp in seconds delta_deur_berging    = now - deur_berging.updatetime         -- last object update relative time delta_Garage_loopdeur     = now - Garage_loopdeur.updatetime         -- last object update relative time delta_Poort         = now - Poort.updatetime             -- last object update relative time --Read current status/value get_deur_berging =     grp.getvalue('14/0/57')            --'Deur Berging' get_Garage_loopdeur =     grp.getvalue('14/0/65')            --'Garage Loopdeur' get_Poort =         grp.getvalue('14/0/45')            --'Poort Buiten' Buitenlamp_achterdeur = grp.getvalue('1/4/162')            --'B verl. Achterdeurlamp (tm)'             --if all is closed for set time turn light off if         delta_deur_berging >    (1 * 60 ) -- minuten        -- controleer of de PIR niet meer actief is geweest voor de laatste 1 minuut         and     delta_Garage_loopdeur >    (1 * 60 ) -- minuten        -- controleer of de PIR niet meer actief is geweest voor de laatste 1 minuut         and     delta_Poort >        (1 * 60 ) -- minuten        -- controleer of de PIR niet meer actief is geweest voor de laatste 1 minuut         and get_deur_berging == false         and get_Garage_loopdeur == false         and get_Poort == false                 and Buitenlamp_achterdeur == true then    grp.checkwrite('1/1/162', false)            --'B verl. Achterdeurlamp (s)' end os.sleep (120)                        --wacht voor 120 seconden (2 minuten) Buitenlamp_achterdeur = grp.getvalue('1/4/162')        --'B verl. Achterdeurlamp (tm)'     until (Buitenlamp_achterdeur == false)
Reply


Messages In This Thread
RE: FB Editor Staircase Lighting Function - by Dré - 11.09.2022, 15:37

Forum Jump: