Code: Select all
case "Somfy":
switch (N)
{
case "up":
WPi=14;
break;
case "stop":
WPi=13;
break;
case "down":
WPi=12;
break;
}
system("/opt/z-way-server/automation/storage/GPIO.sh " + WPi);
return Action;
}
/* SomfyScreen description
OpenRemote usage: http://raspberry_IP:8083/JS/Run/SomfyScreen/N
This function makes use the wiringPi module (http://wiringpi.com/)
It controls the physical connector header pins 19,21,23 that are accessible
next to the RaZberry device.
This function calls script GPIO.sh:
--------------
#!/bin/sh
PIN=$1
/usr/local/bin/gpio mode $PIN out
/usr/local/bin/gpio write $PIN 1
sleep 0.1
/usr/local/bin/gpio write $PIN 0
--------------
Make sure that GPIO.sh is executable (chmod +x GPIO.sh)
The parameter represents the WiringPi pin number (see http://wiringpi.com/pins)
The supported Action can be: up, down, stop
*/