Lua Script Zipato mini RFiD TagKey reacts not good.

Moderator: leecollings

Post Reply
VeldmDomo
Posts: 5
Joined: Wednesday 16 January 2019 16:40
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Netherlands
Contact:

Lua Script Zipato mini RFiD TagKey reacts not good.

Post by VeldmDomo »

Dear form members,
I'm running into the next problem. I am working on an alarm system in domoticz.
To enable and disable this, I want to use the Zipato mini RFiD keypad reader with tag.
As a basis for the configuration, I used the following article on the internet:
https://nl.hardware.info/reviews/7925/w ... t-domoticz ( Dutch site)
I have registered the Zipato RFiD on the domoticz's Zwave controller.
Image
I also configured the divices of the Zipato RFiD.
Image
Then I put a lua script into domotics that must ensure that when AlarmRFIDpanel switch goes off or on, it converts it into Disarmed or Armed Away.
Image
Here, however, it goes wrong. When I switch Away (Armed Away) on the Zipato RFiD I see in the logging:
Status: LUA: ### SecPanel: status changed to Disarmed.
When I switch Home (Disarmed) on the Zipato RFiD, I see the same thing again in the logging:
Status: LUA: ### SecPanel: status changed to Disarmed
When I switch Away it must change to Armed Away. This does not happen, however.
Image
I have reed other posts, but seems not exactly the problem I have.
Can someone help me to solve the problem?
Droll
Posts: 43
Joined: Sunday 28 December 2014 23:50
Target OS: Linux
Domoticz version: 2024.7
Location: Norway
Contact:

Re: Lua Script Zipato mini RFiD TagKey reacts not good.

Post by Droll »

Try this one, this if the one I am using , and it does work :-)
It's mainly from the wiki here onsite...

Code: Select all

commandArray = {}
 if (devicechanged['AlarmRFIDpaneel']) then
        if (otherdevices['AlarmRFIDpaneel'] == 'On') then
                print('AlarmPanel Arm Away')
                commandArray['Security Panel'] = 'Arm Away'
                        else
                print('AlarmPanel Disarmed')
                commandArray['Security Panel'] = 'Disarm'
                
                
        end
end
return commandArray
Arne K
VeldmDomo
Posts: 5
Joined: Wednesday 16 January 2019 16:40
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Netherlands
Contact:

Re: Lua Script Zipato mini RFiD TagKey reacts not good.

Post by VeldmDomo »

Hi Arne,
Thanks for your script.
I tried this, and in the logging I saw Arm Away and Disarmed when it was switched on.
A big stap forward.
However, the alarm did not actually start.
After some searching on the internet I put the following command: commandArray ['Keypad Ack'] = 'On'
This ensured that the Arm Away and Disarm command was actually accepted in domoticz.
What I also found out was that if there is an alarm, it could not be switched off by deactivating the alarm.
I solved this by placing the command: commandArray ['AlarmSituationUitV0.1'] = 'Off'.

Code: Select all

commandArray = {}
 if (devicechanged['AlarmRFIDpaneel']) then
        if (otherdevices['AlarmRFIDpaneel'] == 'On') then
                print('AlarmPanel Arm Away')
                commandArray['Domoticz Security Panel'] = 'Arm Away'
                       else
                print('AlarmPanel Disarmed')
                commandArray['Domoticz Security Panel'] = 'Disarm'
                commandArray['AlarmSituatieUitV0.1'] = 'Off'
                commandArray['Keypad Ack'] = 'On'
                
                
        end
end
return commandArray
Image

Alex.
Raspberry:
Raspberry Pi 4 Model B Rev 1.1 4Gb
Zwave Controller:
Aeotec Z-Pi 7 ZWA025 GPIO board
Z-Wave SDK: 7.11.0 or later
Domoticz:
Version 2021.1 (April 17 2021) Stable
OpenZwave version: 1.6-1911-gc6a420ef
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest