readKey cleans out my installation

Discussions about RaZberry - Z-Wave board for Raspberry computer
Post Reply
jstaffon
Posts: 80
Joined: 29 May 2015 04:47

readKey cleans out my installation

Post by jstaffon »

I'm running Wheezy on my Raspberry Pi along with Z-Way v2.2.2. On startup or reboot, a script in /etc/init.d called readKey is hanging and looping through a server start and server stop. Therefore, I don't get my z-way-server script to startup. If I kill the readKey process, I can manually start the z-way-server script and begin to add devices and use the system. If I reboot, the readKey process cleans out the /opt/z-way-server directories (particularly the automation/userModules directory) where I manually add javascripts.

Can someone explain what "readKey" does and why it's cleaning out my directories? Thanks in advance!
jstaffon
Posts: 80
Joined: 29 May 2015 04:47

Re: readKey cleans out my installation

Post by jstaffon »

UPDATE: I've traced the readKey problem/culprit to the GPIO Pin 4 value/variable. Pin 4 seems to be the GPCLK0. The script looks for this value to change from "0" to another value...I'm assuming "1". I modified the readKey script so while looping through I print the value out to the console, the value never changes to a nonzero value. What is suppose to make it change? As long as it stays "0", it will perform a Factory Reset and remove everything from the .../automation/storage and .../automation/userModules directories/folders...amongst other things. Can anyone help? What is suppose to make it change to a nonzero value? ... or is the script wrong? I've even tried emailing the creator of the script....no response as of yet.
Moto
Posts: 2
Joined: 16 May 2016 21:45

Re: readKey cleans out my installation

Post by Moto »

from /etc/init.d/readKey:

# Description: Read key on RaZberry plate. 0.5 sec press = activate webif, 5 sec press = factory reset
jstaffon
Posts: 80
Joined: 29 May 2015 04:47

Re: readKey cleans out my installation

Post by jstaffon »

Sorry my friend....that doesn't help much. I've seen the description in the script but I don't understand how the script works or what it's suppose to do. It appears as if GPIO pin 4 gets exported and then the value for /sys/class/gpio/gpio4/value is tested but never changes so it eventually performs a factory reset. I'm looking for someone to help me understand what this script was designed to do and what action changes the "value" variable to kick it out of the "if" check. Thanks.
User avatar
PoltoS
Posts: 7649
Joined: 26 Jan 2011 19:36

Re: readKey cleans out my installation

Post by PoltoS »

Please disable this script (or delete it). We have found that on some boxes it results in infinite loop of start-stop
Post Reply