In rc.local, I have:
Code: Select all
echo 24 > /sys/class/gpio/export
echo 25 > /sys/class/gpio/export
echo in > /sys/class/gpio/gpio24/direction
echo in > /sys/class/gpio/gpio25/directionCode: Select all
/sys/class/gpio/gpio24/value IN_MODIFY date > /var/alarm/motion
/sys/class/gpio/gpio25/value IN_MODIFY date > /var/alarm/tamperHowever, when I "cat /sys/class/gpio/gpio24/value" I get a "1" when theres no motion, and "0" when theres motion.
And when I do "cat /sys/class/gpio/gpio25/value", I get a "1" when the cover on the motion detector is closed, and "0" when the cover is open.
So what im doing wrong? The file "value" in the folder "/sys/class/gpio/gpio24/" (and gpio25) IS CHANGED so why aren't incrontab executing the command I told it to execute?
Also verified that the command "date > /var/alarm/motion" does work.