Delayed overnight switch


#1

1) Give a description of the problem
I’m trying to turn on a plug on and off in the middle of the night, but only when called by an alexa routine, and not on a regular schedule.

2) What is the expected behaviour?
Alexa routine is called, virtual switch turns on to trigger the routine, actual plug turns on at 2am and off at 6.30

3) What is happening/not happening?
Alex routine turns on the switch, but the routine doesn’t trigger, and I end up with cold uncooked breakfast.

4) Post a Green Snapshot of the pistonimage

5) Attach logs after turning logging level to Full
26/01/2022, 15:04:21 +106ms
+2ms ╔Received event [My home].test = 1643209461104 with a delay of 1ms
+51ms ║RunTime Analysis CS > 25ms > PS > 7ms > PE > 19ms > CE
+59ms ║Runtime (37158 bytes) successfully initialized in 7ms (v0.3.113.20210203) (54ms)
+62ms ║╔Execution stage started
+82ms ║║Comparison (enum) off is (string) on = false (2ms)
+84ms ║║Condition #2 evaluated false (17ms)
+85ms ║║Condition group #1 evaluated false (state did not change) (18ms)
+90ms ║╚Execution stage complete. (28ms)
+91ms ╚Event processed successfully (91ms)

No other logs than those from when I just tested the routine. Its not run for 2 nights now.

REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.


#2

Is there an actual log of it that’s not using the ‘Test’ button?


#3

No, appears not. Its not firing at all.


#4

Oh, ok, uhm ST or Hubitat? If on ST, I think there was some discussion about virtual switches issue with Alexa… not sure if this is related to that.


#5

It is on smart things. This was a virtual switch made in the new Edge thing. I’d had one before using the old simulated alexa switch thing through the groovy IDE but I thought I’d best update it. Maybe I’ll have to go back to it. Thanks

Theres nothing fundamentally wrong with my piston is there? That should work as intended right?


#6

It looks like it should work. Only thing I’d change is move line 28-down into its own timer statement maybe?

Time happens at sunrise
  with Switch 8
    Turn off

#7

Could do. Is there a functional benefit to that?


#8

I’m just not sure how that part of the statement will behave with it being inside the first trigger statement with no testing.