larsks/gpio-watch

Event script not running

lbendlin opened this issue · 3 comments

Setting up gpio-watch with

 /home/pi/gpio-watch/gpio-watch -D /home/pi/gpio-watch -e both 25

When the event is triggered (reed switch on pin 25) I get an error message

run_script:105 pin 25: event script exited with status = 255

the "25" script is verified executable, and should run

echo "door status changed to $2"

It works when I execute it manually.

Hi, thanks for the report! I'm going to be travelling a bit before I have a chance to look into this in detail. Does your script start with #!/bin/sh?

Hi,

I actually ran it from the regular shell for now (after logging in as user pi). Not sure if that makes a difference. I can try running it from a script.

By the way, I checked the code and adjusted the folder parameter from –D to –s (the documentation seems to be a bit out of date)

Lutz

From: Lars Kellogg-Stedman [mailto:notifications@github.com]
Sent: Friday, October 30, 2015 4:28 PM
To: larsks/gpio-watch gpio-watch@noreply.github.com
Cc: Lutz Bendlin lutz@bendlin.us
Subject: Re: [gpio-watch] Event script not running (#1)

Hi, thanks for the report! I'm going to be travelling a bit before I have a chance to look into this in detail. Does your script start with #!/bin/sh?


Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-152643700.

This might be a permissions thing on the file in /etc/gpio-scripts/25

I ran into an issue myself and when I chmod 777 /etc/gpio-scripts/23 (I was using a different pin) I could than run both manually and by pushing the button I plugged into my GPIO.

777 isn't really the correct permissions, but it quickly found the issue for me.