Piston State is Incorrect

piston_state

#1

1) Give a description of the problem
Maybe I’m misunderstanding Piston State, but I have a “check for offline devices” piston that works great. However, I ask that it update the Piston state to said offline devices, but it only ever seems to mention two old devices.

2) What is the expected behaviour?
I expect the piston state to show the offline devices.

3) What is happening/not happening?
The piston state shows: Porch L and Porch R offline. But I no longer have “Porch L” or “Porch R” lights - I had to reboot the lights and now call them Porch Left and Porch Right (and they are online).

I have enabled automatic piston state, then disabled it but the ghost devices still show.

**4) Post a Green Snapshot of the piston


Piston%20State

5) Attach logs after turning logging level to Full
8/29/2019, 8:34:45 PM +825ms
+1ms ╔Received event [My home].test = 1567125285825 with a delay of 0ms
+130ms ║RunTime Analysis CS > 19ms > PS > 21ms > PE > 90ms > CE
+133ms ║Runtime (50320 bytes) successfully initialized in 21ms (v0.3.10f.20190822) (132ms)
+134ms ║╔Execution stage started
+151ms ║║Comparison (time) 74085965 is_between (time) 32400000 … (time) 79200000 = true (9ms)
+152ms ║║Time restriction check passed
+154ms ║║Condition #33 evaluated true (15ms)
+156ms ║║Condition group #14 evaluated true (state did not change) (16ms)
+175ms ║╚Execution stage complete. (41ms)
+177ms ║Setting up scheduled job for Thu, Aug 29 2019 @ 9:17:35 PM EDT (in 2569.77s)
+207ms ╚Event processed successfully (207ms)


#2

The command:
Set piston state to "X and Y OFFLINE"
is found nowhere in your code.

It must be old and lingering from an earlier edit. As soon as the new code processes correctly, it will update the Piston state with either

  • Devices_not_responding (line 35) or
  • All devices are ONLINE at 10:00PM (line 37)

(pushing Test will not do anything with this piston)


Pro Tip:
You can speed up your testing by temporarily reducing line 28 to 2 minutes while testing…


#3

Yes, it’s all correct now. - thanks!! I’ve had this issue for a week now but only enabled/disabled automatic piston state tonight. Maybe that “reset” things? Speeding up the test let me see the piston state is updating correctly now.


#4

Happy to be able to help!