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.

Disarming the system after Entering correct PIN
#1
Hello Everyone Please I'm trying to create a security system with scripting (Arming / Disarming after entering a specific PIN code), but I'm still a beginner, I used your script with the same steps mentioned here:

 https://openrb.com/example-allow-switch-...alization/
but I faced an issue when pressing the Enter button which has the following script : 


local value = dpt.decode(event.datahex, dt.bool)
if value then
  -- get current pin
  local pin = storage.get('pin', '')

  -- verify pin number
  if pin == '1234' then
    grp.write('1/1/7', 1)
  end

  -- reset pin
    storage.set('pin', '')
    grp.write(event.dst, false, dt.bool)
end


I noticed that only it get the current pin then rest PIN only without verifying the PIN code. 
so what should I do? 
Thanks for your time.
Reply


Messages In This Thread
Disarming the system after Entering correct PIN - by Shimaa - 17.02.2022, 12:58

Forum Jump: