I’m trying to create a piston to write to a variable called “circadiantemperature” that I can use in other pistons to set the temp of my bulbs depending on a circadian pattern. I’ve devised an expression that should allow me to offset the times properly, and it references $sunrise and $sunset, so that as sunrise/sunset times change, the pattern changes proportionately. The expression I’m using is:
(($sunset-$sunrise)/1000000)*0.0825
where I change the multiplier at the end (see my screenshot attached)
The expression output looks good; I’ve set up my piston to Happen At Sunrise with offset “(($sunset-$sunrise)/1000000)*0.0825” seconds, which computes to Sunrise with offset 2000 seconds (or 33 minutes after sunrise)
I have a series of these which are supposed to work at other times, and the expressions all give me a number of seconds that makes sense (2000 seconds, 5000 seconds, 8000 seconds, etc.), but it’s not actually triggering at 2000/5000/8000 seconds after sunrise.
When I look at the Log, it say the next scheduled job is at sunset (4:54 pm). Any idea why the earlier instances aren’t triggering?
Logs
11/9/2017, 10:43:03 AM +967ms
+5ms ╔Starting piston… (v0.2.0fd.20171105)
+236ms ║╔Subscribing to devices…
+355ms ║╚Finished subscribing (123ms)
+812ms ║Setting up scheduled job for Thu, Nov 9 2017 @ 4:54:00 PM AST (in 22255.225s), with 12 more jobs pending
+836ms ╚Piston successfully started (833ms)
Thanks for any insight!