Zipato Keypad Notification Sounds wrong

Discussions about RaZberry - Z-Wave board for Raspberry computer
Post Reply
RazPi678
Posts: 2
Joined: 11 Sep 2016 14:20

Zipato Keypad Notification Sounds wrong

Post by RazPi678 »

Referring to the ZIPATO Mini Keypad RFID / Z-Wave I have the following technical problem (not working properly):

Observation:
It seems to me that the notification sounds / acknowledgement sounds that are played do not match to the actual event (N) but correspond the last one (N-1). Can this be fixed?

Details:
I am using ZWAY Razberry on Raspberry Pi as ZWay Center. The Zipato Keypad is connected and I can read the status and configure the device via the HTTP API as well as with the ZWay Web GUI. The ZWave center accepts the set values of the configuration.

Configuration: Comman Class Configuration (0x70):
Parameter 2: value: 1 (feedback time seconds)
Parameter 3: value: 3 (feedback timeout seconds)
Parameter 4: value: 2 (feedback beeps per seconds)

I configured the ZWave Center so it always sends a notification (class 0x25 switch_binary: ON) on each event (new input from keypad).

You can see the problem in this sequence:
0. (past unknown event)
1. Known RFID Tag read -> (depending on past event)
2. Known RFID Tag read -> acceptance sound (two quick beeps)
3. Unknown RFID Tag read -> acceptance sound (two quick beeps)
4. Known RFID Tag read -> error sound (6 fixed beeps)
5. Unknown RFID Tag read -> acceptance sound (two quick beeps)
6. Unknown RFID Tag read -> error sound (6 fixed beeps)
7. Known RFID Tag read -> error sound (6 fixed beeps)
8. Known RFID Tag read -> acceptance sound (two quick beeps)
x. deactivation of notification acceptance message (after that only error sounds should be played)
9. Unknown RFID Tag read -> acceptance sound (two quick beeps)
10. Unknown RFID Tag read -> error sound (6 fixed beeps)

You see that at event (N) the device plays the sound of event (N-1).

How can this be fixed?
aivs
Posts: 68
Joined: 04 Mar 2011 15:26

Re: Zipato Keypad Notification Sounds wrong

Post by aivs »

Show your code.
RazPi678
Posts: 2
Joined: 11 Sep 2016 14:20

Re: Zipato Keypad Notification Sounds wrong

Post by RazPi678 »

I can successfully communicate with the Keypad and and ZWave siren. In spite of the irritating beep sounds of the keypad (as described above), the rest of the communication (message home, message away) is working. What is missing, is the sound notification if the PIN / RFID tag is accepted or not.

Code: Select all


#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
#
# Diese Datei: Kommunikation mit ZWAY API
# Simplified for demonstration

# Import other Libraries
import os
import time
import subprocess
import shlex

# Main zum Testen
def main():

	startup()
	
	while (1):
		status = readstatus_keypad()
		print status

	
	return 0


def startup():
	
	print "ZWave Startup"
	
	zwavehost = "localhost"
	zwaveusername = "xxxxx"
	zwaveuserpass = "yyyyy"
	
	# Einloggen in ZWave-Zentrale
	command = "curl -i -H \"Accept: application/json\" -H \"Content-Type: application/json\" -X POST -d '{\"form\": true, \"login\": \"" + zwaveusername + "\", \"password\": \"" + zwaveuserpass + "\", \"keepme\": false, \"default_ui\": 1}' " + zwavehost + ":8083/ZAutomation/api/v1/login -c zwavecookie.txt >/dev/null 2>&1"
	os.system(command)
	
	# Config ZWave Devices
	config_keypad() # Piepdauer etc.


def config_keypad():
	zwavehost = "localhost"
	zwave_keypad_id = "3"
	
	# Keypad konfigurieren (Command Class 0x70)
	# Parameter 2: Dauer des positiven Quittierungspiepsen
	parameternummer = 2
	wert = 1 # Dauer in Sekunden
	os.system("curl -g http://" + zwavehost + ":8083/ZWave.zway/Run/devices[" + zwave_keypad_id + "].instances[0].commandClasses[0x70].Set%28" + str(parameternummer) + "," + str(wert) + ",0%29 -b zwavecookie.txt >/dev/null 2>&1")

	# Parameter 3: Dauer bis Timeout und negativem Quittierungspiepsen, wenn keine Bestätigung kommt
	parameternummer = 3
	wert = 4 # Dauer, 0 = deaktiviert
	os.system("curl -g http://" + zwavehost + ":8083/ZWave.zway/Run/devices[" + zwave_keypad_id + "].instances[0].commandClasses[0x70].Set%28" + str(parameternummer) + "," + str(wert) + ",0%29 -b zwavecookie.txt >/dev/null 2>&1")	

	# Parameter 4: Bestätigungspiepse pro Sekunde
	parameternummer = 4
	wert = 2 # Anzahl
	os.system("curl -g http://" + zwavehost + ":8083/ZWave.zway/Run/devices[" + zwave_keypad_id + "].instances[0].commandClasses[0x70].Set%28" + str(parameternummer) + "," + str(wert) + ",0%29 -b zwavecookie.txt >/dev/null 2>&1")		

	
def readstatus_keypad():
	
	zwavehost = "localhost"
	zwave_keypad_id = "3"
	
	# Update-Zeit als Unix-Zeitstempel
	# http://raspberry:8083/ZWave.zway/Run/devices[3].instances[0].commandClasses[113].data[6].event.updateTime
	adress = "http://" + zwavehost + ":8083/ZWave.zway/Run/devices[" + zwave_keypad_id + "].instances[0].commandClasses[113].data[6].event.updateTime"
	command = "curl -g -s " + adress + " -b zwavecookie.txt"
	args = shlex.split(command)
	try:
		updatetime = float(subprocess.check_output(args))
	except:
		updatetime = 0
	
	#URL für Status: HOME = 6, Away = 5
	# http://raspberry:8083/ZWave.zway/Run/devices[3].instances[0].commandClasses[113].data[6].event.value
	adress = "http://" + zwavehost + ":8083/ZWave.zway/Run/devices[" + zwave_keypad_id + "].instances[0].commandClasses[113].data[6].event.value"
	command = "curl -g -s " + adress + " -b zwavecookie.txt"
	args = shlex.split(command)
	try:
		statuscode = int(subprocess.check_output(args))
	except:
		statuscode = -1 # wenn nach Neustart noch keine Eingabe am Keypad vorliegt
	if statuscode == 6:
		wobinich = "home"
	elif statuscode == 5:
		wobinich = "away"
	else:
		wobinich = "notknown"

	# Benutzer-ID
	# http://raspberry:8083/ZWave.zway/Run/devices[3].instances[0].commandClasses[113].data[6].eventParameters.value[0]
	adress = "http://" + zwavehost + ":8083/ZWave.zway/Run/devices[" + zwave_keypad_id + "].instances[0].commandClasses[113].data[6].eventParameters.value[0]"
	command = "curl -g -s " + adress + " -b zwavecookie.txt"
	args = shlex.split(command)
	try:
		userID = int(subprocess.check_output(args))
	except:
		userID = -1 # wenn nach Neustart noch keine Eingabe am Keypad vorliegt
	
	# Batterie-Level in Prozent
	# http://raspberry:8083/ZWave.zway/Run/devices[3].instances[0].commandClasses[128].data.last.value
	adress = "http://" + zwavehost + ":8083/ZWave.zway/Run/devices[" + zwave_keypad_id + "].instances[0].commandClasses[128].data.last.value"
	command = "curl -g -s " + adress + " -b zwavecookie.txt"
	args = shlex.split(command)
	try:
		batterylevel = float(subprocess.check_output(args))
	except:
		batterylevel = 999 # wenn nach Neustart noch keine Eingabe am Keypad vorliegt	
	
	gesamtstatus = [wobinich,updatetime,userID,batterylevel]
	
	return gesamtstatus


def send_approval(mode):
	zwavehost = "localhost"
	zwave_keypad_id = "3"

	# Piepser aktivieren / Stille Bestätigung aktivieren
	# mode = 1 : positives Piepsen
	# mode = 0 : still
	os.system("curl -g http://" + zwavehost + ":8083/ZWave.zway/Run/devices[" + zwave_keypad_id + "].instances[0].commandClasses[0x25].Set%28" + str(mode) + "%29 -b zwavecookie.txt >/dev/null 2>&1")				


if __name__ == '__main__':
	main()





Post Reply