After the successful pairing of the RFID reader with the Home Center 2 control unit it is necessary to set the RFID reader so that it is able to recognize the correct RFID key case and to set the respective PIN code, there can be only one or more codes.
First it is important to find out the code (chain) of the RFID tag / PIN Code. To do it just push the Home or Away button and put the RFID Tag key to the RFID reader or enter PIN Code and confirm by Enter button. In the dialogue window of the Fibaro system this chain is displayed and it looks like this [143,56,144,13,1,32,2,128,0,0]. Try to remember this chain.
For PIN Code 1234, the string loks like this [49,50,51,51,0,0,0,0,0,0].
Then it is necessary to create a new LUA scene and enter the code into it.
This script frees 5 places in the register to write 5 various chains of the RFID key cases. After the modification of the LUA script it is necessary to run this scene. Then it is necessary to wake up the RFID reader. The Wake-Up of the RFID reader is dine by using the Home or Away buttons and by putting the RFID key case or by pushing the button tamper under the cover.
--[[ %% properties %% events %% globals --]] local ID = 72 -- ID RFID Citacky fibaro:call(ID, "getUserCode", 1); fibaro:call(ID, "getUserCode", 2); fibaro:call(ID, "getUserCode", 3); fibaro:call(ID, "getUserCode", 4); fibaro:call(ID, "getUserCode", 5);
This script will write you if the first five places in the register to write 5 different chains of the RFID key case are free. After the modification of the LUA script and its saving it is necessary to run this scene.You can see this in the debugging window.
[DEBUG] 15:55:26: [{"id":0,"name":"","status":"Available"},{"id":1,"name":"","status":"Available"},{"id":2,"name":"","status":"Available"},{"id":3,"name":"","status":"Available"},{"id":4,"name":"","status":"Available"},{"id":5,"name":"","status":"Available"},
--[[ %% properties %% events %% globals --]] local ID = 72 -- ID RFID Citacky local usersStatus = fibaro:getValue(ID, "userCodes"); print(usersStatus);
Using this script you can set a specific RFID key case for the first user (1st place in the register). In the scene you must change the "chain" of the RFID key case. After the modification of the LUA script and its saving it is necessary to run this scene. Then it is necessary to wake up the RFID reader. The Wake-Up of the reader is carried out by pushing the Home or Away button and by putting the RFID key case or by pushing the tamper button under the cover.
--[[ %% properties %% events %% globals --]] local ID = 72 -- ID RFID Citacky fibaro:call(ID, "setUserCodeDec", 1, "143,40,31,11,1,32,2,128,0,0") -- Rovnako je mozne pridat dalsiu klucenku
-- fibaro:call(ID, "setUserCodeDec", 2, "143,56,144,13,1,32,2,128,0,0")
Setting of the PIN code is in fact very similar to the setting of the RFID key case. It is necessary to gradually run all the LUA scripts.
Tento skript uvoľní 5 miest registra pre zápis 5 rôznych reťazcov. Po upravení Lua skriptu a jeho uložení je potrebné Spustiť túto scénu. Následne je potrebné spraviť wake up RFID čítačky. Wake up RFID čítačky sa robí stlačením tlačidla Home alebo Away a priložením RFID kľúčenky alebo stačením tamper tlačidla pod krytom.
--[[ %% properties %% events %% globals --]] local ID = 72 -- ID RFID Citacky fibaro:call(ID, "getUserCode", 1); fibaro:call(ID, "getUserCode", 2); fibaro:call(ID, "getUserCode", 3); fibaro:call(ID, "getUserCode", 4); fibaro:call(ID, "getUserCode", 5);
This script will write you if the first five places in the register to write 5 different chains of the RFID key case are free. After the modification of the LUA script and its saving it is necessary to run this scene.You can see this in the debugging window.
[DEBUG] 15:55:26: [{"id":0,"name":"","status":"Available"},{"id":1,"name":"","status":"Available"},{"id":2,"name":"","status":"Available"},{"id":3,"name":"","status":"Available"},{"id":4,"name":"","status":"Available"},{"id":5,"name":"","status":"Available"},
--[[ %% properties %% events %% globals --]] local ID = 72 -- ID RFID Citacky local usersStatus = fibaro:getValue(ID, "userCodes"); print(usersStatus);
Using this script you can set a specific PIN code for the third user (3rd place in the register). In the scene you must change the "PIN code" of the RFID key case. After the modification of the LUA script and its saving it is necessary to run this scene. Then it is necessary to wake up the RFID reader. The Wake-Up of the reader is carried out by pushing the Home or Away button and by putting the RFID key case or by pushing the tamper button under the cover.
--[[ %% properties %% events %% globals --]] local ID = 72 -- ID RFID Citacky
fibaro:call(ID, "setUserCodeDec", 3, "49,50,51,52,0,0,0,0,0,0"); -- prve 2 cisla v registri su obsadene RFID klucenkami, preto je tam nastavena 3
After the definition of the RFID key case and the PIN code you can use this LUA script to start the scenes that enable/disable the alarm in the particular devices. It is necessaryto make a change in line 3, to change the number 1324 to the ID of your RFID reader.
--[[ %% properties 1324 value %% events %% globals --]] local trigger = fibaro:getSourceTrigger() local rfid_value_status = '' Debug = function ( color, message ) fibaro:debug(string.format('<%s style="color:%s;">%s', "span", color, message, "span")) end if (trigger['type'] == 'property') then fibaro:debug('RFID Scena sa spustila.') local rfid_ID = tonumber(trigger['deviceID']) local rfid_value = tonumber(fibaro:getValue(rfid_ID, 'value')) if (rfid_value == 1) then rfid_value_status = 'Away' Debug('red', 'Status ' ..rfid_value_status.. ' nastaveny.') fibaro:startScene(12) --spustenie sceny na aktivaciu alarmu elseif (rfid_value == 0) then rfid_value_status = 'Home' Debug('green', 'Status ' ..rfid_value_status.. ' nastaveny.') fibaro:startScene(11) --spustenie sceny na deaktivaciu end end
5 Comments
Stanislav Vrhel 04/30/2018 Reply
Dobrý den,lze na zipatu spustit zvukovou notifikaci, že je zakódováno?
Děkuji s pozdravem Vrhel
SmarterHOME 04/30/2018 Reply
Dobrý deň,áno, príklad nastavenie sa nachádza na našom fóre tu:
https://smarterhome.sk/sk/forum/topic/nastavenie-zvukovej-notifikacie-pri-zakodovani-2.html
Michal 02/2/2018 Reply
ten váš skript 3 by ste fakt mohli upravit...SmarterHOME Team 02/5/2018 Reply
Dobrý deň,v našom blogu sme vychádzali s oficiálnych informácií od spoločnosti Fibaro uvedených na fóre:
https://forum.fibaro.com/index.php?/topic/22280-zipato-rfid/
Ďakujeme za upozornenie, ktoré pomôže aj ostatným používateľom.
Jakub 10/11/2016 Reply
LUA skript č. 3 pro nastavení kódu na klávesnici mi nefunguje. Kód na klávesnici jsem musel zadat stejně jako v případě RFID čtečky.Ta Zipato klávesnice totiž po zadání kódu na klávesnici na klávesnici vyšle podobný kód, ne-li stejný kód jako RFID tag.