What about if you rewrite your script to:
#!/bin/bash
DATE=$(date +"%Y-%m-%d_%H%M%S")
<path to>/fswebcam -r 640x480 /home/pi/webcam/$DATE.jpg
Thus with newlines and the full path to fswebcam
And is fswebcam executable?
Rule not executed
What about if you rewrite your script to:
#!/bin/bash
DATE=$(date +"%Y-%m-%d_%H%M%S")
<path to>/fswebcam -r 640x480 /home/pi/webcam/$DATE.jpg
Thus with newlines and the full path to fswebcam
And is fswebcam executable?
I seem to have found the culprit!
I also have this rule:
when pimatic is starting then execute "/home/pi/bin/resetlcd.sh& 2>/dev/null"
of which the script is:
#!/bin/sh pkill -f mylcd.py python /home/pi/python/mylcd.py&
mylcd.py on its turn (re)starts the info on my lcd screen. After disabling this my capture script is finally triggered.
Thanks, you guys are the best with all the suggestions, that’s why i love pimatic!
Although now offcourse i have another problem, how to make the lcd screen work
@fregger said in Rule not executed:
I seem to have found the culprit!
Sorry, I don’t get this! Why should the one rule affect the other?
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
@mwittig I haven’t figured that out yet.
@mwittig Could it be because the python script for the lcd screen runs in a loop?
@fregger said in Rule not executed:
I seem to have found the culprit!
I also have this rule:
when pimatic is starting then execute "/home/pi/bin/resetlcd.sh& 2>/dev/null"
of which the script is:
#!/bin/sh pkill -f mylcd.py python /home/pi/python/mylcd.py&
mylcd.py on its turn (re)starts the info on my lcd screen. After disabling this my capture script is finally triggered.Thanks, you guys are the best with all the suggestions, that’s why i love pimatic!
Although now offcourse i have another problem, how to make the lcd screen work
What kind of LCD screen? There is a LCD plugin for pimatic
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
@koffienl I know, but i understand that it’s only for an lcd screen with an i2c. My 16x2 lcd screen is directly connected to the gpio, without an i2c, so i guess i can’t use the plugin. Or can i?
Correct, I2C only
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
@fregger said in Rule not executed:
Could it be because the python script for the lcd screen runs in a loop?
Yes, indeed. This may have caused the troubles. Shell scripts are expected to terminate. You can do so by creating a wrapper script if it is not possible to rewrite the script so that it’ll terminate. We had a similar topic on this a couple of weeks ago. See https://forum.pimatic.org/topic/2699/solved-shell-switch-timeout/3
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
@mwittig Nice, i’ll try that!
Again: thanx for all the help guys!