Struggling with CodeDevice
Posted: 01 Sep 2015 20:22
Hi guys,
I am really new to this Z-Wave thing, however I want to do some little tests. I searched a couple of hours for a solution but I've found absolutely nothing, maybe some of you experienced guys can help me.
Following problem:
I definded a Code Device witch is called TestButton and it is a switchBinary.
Code for on: system('echo "1" > /sys/class/gpio/gpio19/value');
Code for off: system('echo "0" > /sys/class/gpio/gpio19/value');
Code for status <--- here the problem occurs,
if i write system('printf "on"'); the switch in the gui always turns to off and
if I write system('printf "off"'); the same behavior, gui shows off. (Tested also with echo but the other problem is the \n the echo command returns)...
So what am I doing wrong here? I want to switch a LED connected to gpio pin 19 on raspberri pi, the switching works flawlessly, can turn on and off with the code above, but the polling for the status doesn't work.
First attempt is to write something in this field to get always status on, for testing purposes), like the printf "on".
greets,
Patrick
I am really new to this Z-Wave thing, however I want to do some little tests. I searched a couple of hours for a solution but I've found absolutely nothing, maybe some of you experienced guys can help me.
Following problem:
I definded a Code Device witch is called TestButton and it is a switchBinary.
Code for on: system('echo "1" > /sys/class/gpio/gpio19/value');
Code for off: system('echo "0" > /sys/class/gpio/gpio19/value');
Code for status <--- here the problem occurs,
if i write system('printf "on"'); the switch in the gui always turns to off and
if I write system('printf "off"'); the same behavior, gui shows off. (Tested also with echo but the other problem is the \n the echo command returns)...
So what am I doing wrong here? I want to switch a LED connected to gpio pin 19 on raspberri pi, the switching works flawlessly, can turn on and off with the code above, but the polling for the status doesn't work.
First attempt is to write something in this field to get always status on, for testing purposes), like the printf "on".
greets,
Patrick