Cannot set security state from code

On various Hardware and OS systems: pi / windows / routers / nas, etc

Moderator: leecollings

Post Reply
dhanjel
Posts: 102
Joined: Tuesday 05 August 2014 22:16
Target OS: Linux
Domoticz version: 3.5146
Location: Sweden
Contact:

Cannot set security state from code

Post by dhanjel »

I have tried both in regular Lua and with dzVents to set the security mode when I activate my Zipato keypad, but it does not work.
State is never changed. I am certain that the command below is executed. Any ideas? What might I have missed?

lua:

Code: Select all

 commandArray['Security Panel'] = 'Arm Away'
dzVents:

Code: Select all

 domoticz.sendCommand('Security Panel', 'Arm Away')
dhanjel
Posts: 102
Joined: Tuesday 05 August 2014 22:16
Target OS: Linux
Domoticz version: 3.5146
Location: Sweden
Contact:

Re: Cannot set security state from code

Post by dhanjel »

No one have any input?
Guess I need to "create" my own security state then and not use the internal one.
trixwood

Re: Cannot set security state from code

Post by trixwood »

I have a zipato keypad will try it out. hope I remember how the thing works again ;-) I totally forgot I had one :oops:

My zipato keypad is recognized as a Schlage Link Mini Keypad RFID in the hardware openzwave window.

I added one RFID tag using start user code enrolment.
Screen Shot 2016-08-03 at 14.43.49.png
Screen Shot 2016-08-03 at 14.43.49.png (243.13 KiB) Viewed 2598 times
I got these devices, the only one I am able to switch is the "RFID Alarm Level" which is Off at home, On when away.
RFID Switch does nothing... do not know what it does.
Screen Shot 2016-08-03 at 14.37.08.png
Screen Shot 2016-08-03 at 14.37.08.png (98.48 KiB) Viewed 2598 times
I seen in the log that when I open the device these changes:

2016-08-03 14:57:20.597 OpenZWave: Alarm Level: Tamper
2016-08-03 14:55:10.173 (ZWave) Light/Switch (RFID Alarm Type)
2016-08-03 14:55:10.625 (ZWave) Light/Switch (RFID Alarm Level)
2016-08-03 14:55:10.630 (ZWave) Light/Switch (RFID Burglar)

But RFID Burglar NEVER goes back to off after you closed the case NEVER (you have to do that manually).
Ow, it just send "On" on every opening of the case... (an off would be nice :cry: )
Same goes for: RFID Alarm Type will only send Off and RFID Access Control will only send On

2016-08-03 14:59:04.987 OpenZWave: Alarm Level: Secure
2016-08-03 14:59:04.987 (ZWave) Light/Switch (RFID Alarm Type)
2016-08-03 14:59:04.992 (ZWave) Light/Switch (RFID Alarm Level)
2016-08-03 14:59:04.997 (ZWave) Light/Switch (RFID Access Control)

Then setting away... i do not get why I get tamper it should be away
2016-08-03 14:59:54.733 OpenZWave: Alarm Level: Tamper
2016-08-03 14:59:54.733 (ZWave) Light/Switch (RFID Alarm Type)
2016-08-03 14:59:54.739 (ZWave) Light/Switch (RFID Alarm Level)
2016-08-03 14:59:54.744 (ZWave) Light/Switch (RFID Access Control)

The only thing that changes from on to off is RFID Alarm Level.

Anyway... after the break will look into security panel of domoticz... (i really forgot I had this thing)

Btw i'm working off,...
https://www.domoticz.com/wiki/Zwave#Usi ... Tag_Reader
https://www.domoticz.com/wiki/Alarm_Setup
https://www.zipato.com/wp-content/uploa ... l-v1.4.pdf

ANywy...

Stange behaviour when entering a wrong code (for either away/home)
2016-08-03 15:26:46.741 Error: OpenZWave: Received new User Code/Tag, but we are not in Enrollment mode!

So the switch to use is: RFID Alarm Level.

Code: Select all

-- Title: script_device_AlarmPanel.lua
-- Date: 3-8-2016 (updated)
-- this script switches the Alarm Status according to the (Zipato/Schlage Link Mini) RFID Keypad.
--
commandArray = {}
 if (devicechanged['RFID Alarm Level']) then
        if (otherdevices['RFID Alarm Level'] == 'On') then
                print('AlarmPanel Arm Away')
                commandArray['Domoticz Security Panel'] = 'Arm Away'
        else
                print('AlarmPanel Disarm')
                commandArray['Domoticz Security Panel'] = 'Disarm'
                commandArray['Keypad Ack'] = 'On'
        end
end
return commandArray

btw no idea what commandArray['Keypad Ack'] = 'On' does. It was in the original script, I just left it in.

So this seems to work... but the big question is if this really happened... commandArray['Security Panel'] = 'Arm Away'

(another thee break)

Ok, for some reason none of the event did anything... (after it worked for 2 seconds) anyway I did not have the security panel
in my switches but when I restarted domoticz it was there and it worked... (no idea how, I only fooled around with the security panel hoping I could set it up there)
Screen Shot 2016-08-03 at 16.13.54.png
Screen Shot 2016-08-03 at 16.13.54.png (20.79 KiB) Viewed 2588 times
Last edited by trixwood on Wednesday 03 August 2016 16:58, edited 1 time in total.
trixwood

Re: Cannot set security state from code

Post by trixwood »

Ok to test if everything work use this blocky!
Screen Shot 2016-08-03 at 16.44.51.png
Screen Shot 2016-08-03 at 16.44.51.png (31.86 KiB) Viewed 2584 times
So... it works!!!

(the only thing I do not get is where you can enter the pin for the domoticz security panel???, o well :-)

Code: Select all

2016-08-03 16:48:39.809 (ZWave) Light/Switch (RFID Alarm Type)
2016-08-03 16:48:40.265 LUA: AlarmPanel Disarm
2016-08-03 16:48:40.265 EventSystem: Script event triggered: Alarm RFID
2016-08-03 16:48:40.259 (ZWave) Light/Switch (RFID Alarm Level)
2016-08-03 16:48:40.265 (ZWave) Light/Switch (RFID Access Control)
2016-08-03 16:48:40.291 Is it disarmed?
2016-08-03 16:48:40.291 EventSystem: Event triggered: Check_2
2016-08-03 16:48:40.292 (Domoticz Internal) Security (Domoticz Security Panel)

Code: Select all

2016-08-03 16:50:03.975 OpenZWave: Alarm Level: Tamper
2016-08-03 16:50:04.420 EventSystem: Script event triggered: System HUE
2016-08-03 16:50:03.975 (ZWave) Light/Switch (RFID Alarm Type)
2016-08-03 16:50:04.429 LUA: AlarmPanel Arm Away
2016-08-03 16:50:04.429 EventSystem: Script event triggered: Alarm RFID
2016-08-03 16:50:04.423 (ZWave) Light/Switch (RFID Alarm Level)
2016-08-03 16:50:04.430 (ZWave) Light/Switch (RFID Access Control)
...
2016-08-03 16:50:34.626 Is it armed?
I think there is a 30 seconds delay before it triggers the blocky... which gives you time to leave your house ;-)

Anyway... hope this answers all.

My questions:

what commandArray['Keypad Ack'] = 'On' do?
where you can enter the pin for the domoticz security panel
why do i get this error when entering a wrong code on the zipato keypad,... I could like to detect (like fail2ban) multiple wrong logins...

Code: Select all

2016-08-03 17:04:08.223 Error: OpenZWave: Received new User Code/Tag, but we are not in Enrollment mode!
Somebody read the log file to get the codes, that is an option:

http://domoticz.com/forum/viewtopic.php ... 010#p93688
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest