Hi,
currently setting up some kind of timelapse for an indoor garden and thought I will use pimatic instead of “bare” shell to have some more comfort for using it as it will also get some sensors and stuff.
Problem 1:
I created a rule which should trigger every hour to take a picture. I then edited and saved it again.
This morning I saw that no picture was taken and the rule was not executed
I checked the logs but there was nothing indicating a problem. Any ideas how something like this could happen?
Condition was every 60 minutes
–> After a restart and changing it to every 5 minutes
for testing its running fine.
Problem 2 (main problem):
When will a rule with the condition every 5 minutes
executed?
The rule is this:
set $last_picture_filename = "{date("YYYY_MM_DD_hh_mm_ss")}.jpg" and execute "raspistill -t 1 -vf -hf -n -o /home/pi/bilder_gewaechshaus/{$last_picture_filename} && curl -s -T /home/pi/bilder_gewaechshaus/{$last_picture_filename} ftp://gewaechshaus:XXXXX@XXXXX.local/bilder_gewaechshaus/"
What happen is that a new picture is taken every five minutes but it is using the filename for the last picture…
So at 10:40 I get the picture for 10:35 (at least the filename)
Option 1:
Variable is not updated before shell execute is run and thus old value is used.
Option 2:
Variables get evaluated but execution is hold back until the 5 minutes are over.
Would be great if I could get some insight here @sweetpi