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


  • 0

[SOLVED]hc2 i zipato mini rfid


tefil

Question

udalo sie komu polaczyc klawiaturke zipato z hc2?

 

na innym forum znalazlem podpowiedz ale cos nie dziala, stworzylem dwie sceny jedna ktora rozpoznaje kody z czytnika itp, oraz druga tora powinna uzbrajac rozbaraja alarm, niestety ta druga nie dziala prawidlowo

 

scena 1

 

--[[
%% properties
%% events
%% globals
--]]
local ID = xxx -- 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); 


--[[
%% properties
%% events
%% globals
--]]
local ID = xxx -- ID RFID Citacky 
local usersStatus = fibaro:getValue(ID, "userCodes");
print(usersStatus);


--[[
%% properties
%% events
%% globals
--]]
local ID = xxx -- ID RFID Citacky
fibaro:call(ID, "setUserCodeDec", "1", "Occupied", "00000000000000", "name_arg_is_optional");
-- Rovnako je mozne pridat dalsiu klucenku
fibaro:call(ID, "setUserCodeDec", "2", "Occupied", "00000000000000", "name_arg_is_optional");
fibaro:call(ID, "setUserCodeDec", "3", "Occupied", "00000000000000", "name_arg_is_optional");
fibaro:call(ID, "setUserCodeDec", "4", "Occupied", "00000000000000", "name_arg_is_optional");
fibaro:call(ID, "setUserCodeDec", "5", "Occupied", "00000000000000", "name_arg_is_optional");

 

Scena 2

 

--[[
%% properties
00000000000000 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(x)
  
    fibaro:call(xxx, "turnOn")--spustenie sceny na aktivaciu alarmu

      elseif (rfid_value == 0) then
    rfid_value_status = 'Home'
    Debug('green', 'Status ' ..rfid_value_status.. ' nastaveny.')
    fibaro:startScene(x) 
    fibaro:call(xxx,"turnOn")--spustenie sceny na deaktivaciu
end
  end
 

 

 

moze ktos znajdzie jakis blad? rozwiazanie?
 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0
  • Inquirer
  • ok, dzieki za  podpowiedz, 

    udalo sie skonfigurowac choc nie wszystkie parametry i nie dokonca tak jak to sobie wyobrazalem, ale njawazniejsze ze dziala

    Link to comment
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...