Jump to content

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


Search the Community

Showing results for tags 'keypads'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • FIBARO Community
    • FIBARO Portal and Forum policy
    • FIBARO
    • Say hello!
    • Off-topics
  • FIBARO Update
    • FIBARO System Update
    • FIBARO Mobile Update
  • FIBARO Community Support
    • Scenes and Interface
    • FIBARO Products
    • FIBARO Mobile
    • FIBARO HomeKit
    • FIBARO Assistant Integrations
    • Other Devices / Third-party devices
    • Tutorials and Guides
    • Home Automation
    • Suggestions
  • FIBARO Społeczność
    • FIBARO
    • Przywitaj się!
    • Off-topic
  • FIBARO Aktualizacja
    • FIBARO System Aktualizacja
    • FIBARO Mobile Aktualizacja
  • FIBARO Wsparcie Społeczności
    • Sceny i Interfejs
    • FIBARO Urządzenia
    • FIBARO Mobilnie
    • FIBARO HomeKit
    • Integracja z Amazon Alexa i Google Home
    • Urządzenia Firm Trzecich
    • Poradniki
    • Automatyka Domowa
    • Sugestie

Categories

  • Scenes
  • Virtual Devices
  • Quick Apps
  • Icons

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Facebook


Google+


Skype


Website URL


WhatsApp


Country


Gateway/s


Interests

Found 2 results

  1. I messed up some code tags so re-posting... Hi Here is my small tutorial on the alarm system code i use to complement the rfid keypad system. Firstly you need to create an 'ALARM' variable with at least 2 values. one variable will be OFF second variable will be FULL (or whatever name you want to give) you could if you wanted create many more variables for different zone eg i have a 3rd called DOWN you then programme the keypads (or any other scene) to change the variable to the alarm mode you want --[[ %% properties 145 value 146 value 159 value 160 value %% events %% globals --]] local alarm = fibaro:getGlobal("alarm") local kpof = fibaro:getValue(145, 'value') local kpon = fibaro:getValue(146, "value") local bkon = fibaro:getValue(159, "value") local bkof = fibaro:getValue(160, "value") if ( ((kpon == '1') or ( bkon == '1')) and (alarm == 'off') ) then fibaro:setGlobal("alarm", "down") end if ( ((kpon == '1') or (bkon == '1')) and (alarm == 'down') ) then fibaro:setGlobal("alarm", "full") end if ( (bkof == '1') or (kpof == '1') ) then fibaro:setGlobal("alarm", "off") end From above i have 2 keypads. I have put triggers under the properties for both ON and OFF when i press the 'ON' button once it changes the VARIABLE to PART, if i then press again it changes the VARIABLE to FULL. If you wanted you could continue this for more zones but it can get a bit complicated...... Finally if either of the OFF buttons are pressed the VARIABLE is set to OFF. Next part is the actual setting of the alarm.. --[[ %% properties %% events %% globals alarm --]] if (fibaro:countScenes() > 1) then fibaro:debug('NO!') fibaro:abort() end fibaro:sleep(12*1000) -- set delay time here mine is 12 seconds local alarm = fibaro:getGlobal("alarm") local downArmIds = {} -- set ID's for DOWN mode local fullArmIds = {} -- set ID's for FULL mode local deviceIds = {} -- leave blank as it will auto fill -- single 'alarm' variable with multiple arguments -- in one place (lists above) if (alarm == 'full') then deviceIds = fullArmIds elseif (alarm == 'down') then deviceIds = downArmIds elseif (alarm == 'off') then fibaro:abort() end local unsafeDevices = {} -- will add unsafe devices to this empty list local statusMessage = "" -- will get changed to push message depending on outcome below -- below loops through all devices to check device values are safe, i.e. '0' -- otherwise adds the devices to unsafe list in preparation for push message local armStatus = 'safe' for i, id in ipairs(deviceIds) do if (fibaro:getValue(id, "value") == '0') then deviceStatus = 'safe' else deviceStatus = 'unsafe' table.insert(unsafeDevices, id) armStatus = 'unsafe' end print("Id: " .. id .. " " .. fibaro:getName(id) .. " is " .. deviceStatus) end print("\nArm status is " .. armStatus) -- if unsafe, then formulates the push message, otherwise sets the device to arm if (armStatus == 'unsafe') then -- loops each device in unsafeDevices list to specify the all the names of device to be -- included in push message for i, id in ipairs(unsafeDevices) do statusMessage = statusMessage .. fibaro:getName(id) .. " ; " end statusMessage = statusMessage .. " unsafe to arm.\nAlarm not set" fibaro:setGlobal("alarm", "off") --[[ Example message... "Front Door; Living Room Motion; Studio Door Lock; unsafe to arm. Alarm not set" ]]-- else -- loops devices to set them to arm status for i, id in ipairs(deviceIds) do fibaro:call(id, "setArmed", "1") end statusMessage = "Alarm set to " .. fibaro:getGlobal("alarm") --[[ Example message... "Alarm set to full" or "Alarm set to part" ]]-- end fibaro:call(319, 'sendPush', statusMessage) -- push message to me change 319 accordingley -- add any other code here that you want to run eg turn lights off or heating off etc print(statusMessage) -- prints in debug window this looks big but you only need to add the device ID's of your FULL mode, DOWN mode and any other message once the alarm has been set. Remember to separate your ID numbers with a comma The code is triggered by a change in the global variable called 'alarm'. This then starts the scene. The time delay gives you time to press again for different modes and also to leave the house and make sure that all sensors become safe. (i have set my motion sensors to show as being safe after 5 secs, the default is around 15 secs). After the time delay it checks which variable is set, then it only checks those sensors to make sure they are all SAFE. If they are SAFE then it proceeds to ARM those sensors and then sends you a push message that the alarm has been set and will run any additional code you have added eg turn off the lights, heating etc If they are UNSAFE then it aborts the arming procedure and sends you a message that 'a named sensor is unsafe to arm', you can then investigate and make sure it is safe before starting again. examples include if a door was left ajar or window is left open etc Next part is the ACTIVATION code: --[[ %% properties 25 value 85 value 95 value 148 value 90 value 171 value 176 value 166 value 32 value 45 value %% events %% globals --]] function activation() local trigger = fibaro:getSourceTrigger() --fibaro:debug(trigger) local device = fibaro:getName(trigger['deviceID']) fibaro:debug(device) local subject = 'alarm activated' local message = 'alarm activated ' fibaro:call(2,'sendEmail',subject,message..device) -- ID of user '2' is always admin fibaro:call(319,'sendPush',message..device) -- ID of my phone end local alarm = fibaro:getGlobal("alarm") local downArmIds = {} local fullArmIds = {} local deviceIds = {} if (alarm == 'full') then deviceIds = fullArmIds elseif (alarm == 'down') then deviceIds = downArmIds elseif (alarm == 'off') then fibaro:abort() end for i, id in ipairs(deviceIds) do if ( (fibaro:getValue(id, "value") == '1') and (fibaro:getValue(id, "armed") == '1') and (alarm ~= 'off') ) then activation() -- this is function above fibaro:call(123, "turnOn") -- code for turning siren on fibaro:sleep(10*60*1000) -- 10 min delay change to what you want fibaro:call(123, "turnOff") -- code for turning siren off -- plus any other code you want to add end end firstly you need to enter the ID numbers of all your sensors in the properties section as triggers except the entry zonesalso the fullArmIds and downArmIds need to match the previous arming code except for the entry doors we have a separate entry code to give us a time delayed entry1st block is the function activation(), this basically tells me via push message and email which sensor triggered my alarm2nd block checks to see which mode the alarm is in and therefore will only monitor those specific ID's3rd block will cause the alarm to trigger if our 'armed' devices are breached and run the activation code Entry code is below this as name suggests gives us a defined time to enter property and switch off alarm before it activates: --[[ %% properties 82 value 83 value %% events %% globals --]] local fda = fibaro:getValue(82,'armed') -- front door armed local fdv = fibaro:getValue(82,'value') -- front door value local bda = fibaro:getValue(83,'armed') -- back door armed local bdv = fibaro:getValue(83,'value') -- back door value local alarm = fibaro:getGlobalValue("alarm") function activation() local trigger = fibaro:getSourceTrigger() --fibaro:debug(trigger) local device = fibaro:getName(trigger['deviceID']) fibaro:debug(device) local subject = 'alarm activated' local message = 'alarm activated ' fibaro:call(2,'sendEmail',subject,message.. device) fibaro:call(319,'sendPush',message.. device) end if ( ( (fda == '1') and (fdv == '1') and (alarm~='off') ) or ( (bdv == '1') and (bda == '1') and (alarm~='off') ) ) then fibaro:sleep(30*1000) -- 30 sec delay local alarm = fibaro:getGlobalValue("alarm") if (alarm == 'off') then fibaro:abort() else activation() fibaro:call(123, "turnOn") fibaro:sleep(10*60*1000) fibaro:call(123, "turnOff") end end to start with set the ID of your entry zones under properties, and update the ID 82 and 83 with your own. If you have just 1 then delete accordingley and more than 2 then just add the extra as needed the function is same as before the final block checks if the doors have been opened if they are armed and the alarm is NOT set to off it then starts a 30 sec timer. Just amend 30 to whatever time you need. once the timer has counted down it will check the variable again and if you have turned alarm off then code aborted. if alarm not switched off then activation procedure starts just as before and sends push message, email and siren activates for 10 mins. Final part is turning the alarm off --[[ %% properties %% events %% globals alarm --]] local alarm = fibaro:getGlobal("alarm") local deviceIds = {} if ( alarm == 'off' ) then fibaro:call(319, "sendPush", "Alarm Off") -- my phone fibaro:call(123, "turnOff") -- siren -- any other code for i, id in ipairs(deviceIds) do fibaro:call(id, "setArmed", "0") end end fill the deviceIds with the values of ALL YOUR SENSORS - incl entry sensors the trigger for this is the global variable alarm if its in the 'off' setting then it will send me a push message and send an 'off' command to siren (just in case it was activated) it will then go through the sensors 1 by 1 and disarm them all I hope this helps all of you and any questions and feedback and comments please feel free to leave them thanks
  2. Hi All There have been a number of threads going back a while on scene controllers/masters. These are mainly wireless zwave devices such as the latest Remotec ZRC90, GE 45631 Zwave controller keypad or the cooper aspire keypad, anything that is available with the europe frequency. (excluding remotes lime the octan nodon, minimote, philio button and swipe for now) The post is an invitation for people to share their experience (good, bad and downright ugly) with these types of devices. hopefully we can get to a list of devices like we have IP cameras and other HA devices. Now - who wants to go first Thanks -Frank
×
×
  • Create New...