Very happy to report a successful morning run for both turning on at 6:45a and turning off at 7:20a. Next step is making sure it does not turn on May 28th and does turn on May 29th. Thanks for all the help. So far so good.
Lights on in morning but only during school days
Does your school offer a google calendar of school events that you can link to your personal google calendar?
If so, you could use IFTTT and webhooks to trigger your piston for school dates.
Or you could enter all the dates in you calendar manually and use IFTTT that way, or use gcal search to do the âweb hookingâ for you by creating a virtual open/close sensor and use that as a trigger for dates not in school
I love that idea on automating the calendar. Iâll have to look into it. At the moment the calendar Iâve been using is a pdf file they put online. Even if I find a more dynamic calendar, I wouldnât be sure how to automate the data integration anyway but Iâd love to make something like that work. At the moment I just resigned to have to update it manually once a year.
Iâm trying to do this. Iâm going to add google calendar appointments at 5:30am every morning that its a no school day since I keep their school hours and activities in a google calendar anyway. Then hook up a momentary button in ST (that is connected to an âoff schoolâ routine via smartapp alexa helper) to google calendar start when activity with search starts via IFTTT.
Most schools publish their school calendar as a shared ICS. I simply linked it to my google account and used the GCal SmartApp to look for âNO SCHOOLâ events (which is how our school marks days off). That triggers a simulated presence sensor and in turn the webcore piston fires in the morning and checks the presence sensor as a condition.
The beauty of it is that GCAL resets the presence sensor when the searched for phrase is no longer found which makes the entire process completely automated.
GCal is pretty flexible and combining with presence sensors is a good way to add dynamic logic to pistons
I tried to duplicate your piston but its not working. Donât mind the run time. Adjusting it to see if it make a difference. What am I missing?
5/30/2019, 12:39:59 PM +82ms
+1ms âReceived event [Home].time = 1559245200000 with a delay of -918ms
+111ms âRunTime Analysis CS > 18ms > PS > 57ms > PE > 36ms > CE
+114ms âRuntime (45932 bytes) successfully initialized in 57ms (v0.3.10c.20190522) (113ms)
+115ms ââExecution stage started
+125ms ââComparison (time) 45599204 happens_daily_at (time) 45600000 = true (1ms)
+127ms ââTime restriction check passed
+128ms ââCancelling condition #18's schedules...
+129ms ââCondition #18 evaluated true (7ms)
+131ms ââCancelling statement #18's schedules...
+135ms ââRequesting time schedule wake up at Fri, May 31 2019 @ 12:40:00 PM PDT
+154ms ââComparison (date) 1559199600000 is_not_between (date) 1558940400000 .. (date) 1558985413206 = false (13ms)
+155ms ââCondition #4 evaluated false (17ms)
+157ms ââCondition group #1 evaluated false (state did not change) (35ms)
+160ms ââExecution stage complete. (45ms)
+161ms âSetting up scheduled job for Fri, May 31 2019 @ 12:40:00 PM PDT (in 86400.758s)
+169ms âEvent processed successfully (169ms)
Turns out I had to read the full list of responses. Modified the dates so if it was one day from 5/27/19 and 5/27/19 to 5/27/19 and 5/28/19
Working Piston