Delay Updating Status


#1

1) Give a description of the problem
I have a Philips Hue bulb. I’m trying to trigger a piston based on turning on or off the physical switch for the socket the bulb is in. How do I make the piston execute withouot waiting several minutes after flipping the switch?

2) What is the expected behavior?
When I turn on the switch and give power to the Hue bulb, a piston is triggered immediately. When I turn off the switch and remove power from the Hue bulb, a piston is triggered immediately.

3) What is happening/not happening?
The piston does work eventually, but it takes several minutes for the piston to trigger.

4) Post a Green Snapshot of the pistonimage

5) Attach any logs (From ST IDE and by turning logging level to Full)
I turned off the switch around 7:12am. Here are the logs from the piston when it finally triggered almost twenty minutes later:
10/6/2018, 7:29:41 AM +231ms
+2ms ╔Received event [Master Bathroom].DeviceWatch-DeviceStatus = offline with a delay of 99ms
+176ms ║RunTime Analysis CS > 23ms > PS > 99ms > PE > 54ms > CE
+178ms ║Runtime (40703 bytes) successfully initialized in 99ms (v0.3.108.20180906) (175ms)
+180ms ║╔Execution stage started
+191ms ║║Comparison (string) offline is (string) online = false (2ms)
+193ms ║║Cancelling condition #9’s schedules…
+194ms ║║Condition #9 evaluated false (8ms)
+196ms ║║Cancelling condition #1’s schedules…
+197ms ║║Condition group #1 evaluated false (state changed) (11ms)
+206ms ║║Comparison (string) offline is (string) offline = true (2ms)
+207ms ║║Cancelling condition #13’s schedules…
+209ms ║║Condition #13 evaluated true (8ms)
+210ms ║║Cancelling condition #10’s schedules…
+211ms ║║Condition group #10 evaluated true (state changed) (11ms)
+214ms ║║Cancelling statement #34’s schedules…
+2484ms ║║Executed virtual command executeRoutine (2267ms)
+2488ms ║╚Execution stage complete. (2309ms)
+2489ms ╚Event processed successfully (2489ms)


#2

Dimmer 2 is the hue bulb?


#3

I am under the impression that bulbs going online/offline are not registered instantly.

I mean, you are cutting power to it, so the bulb cannot report a status update. I think ST has a timeout period, and if a device is not heard from in that period, it assumes it is offline.

Ideally, a smart bulb needs power 24/7 to properly report back to the hub.


#4

Connected directly or through hue bridge? It’s going to take a while for the bulb to register offline. It’s not instant like with a switch.
I wouldn’t use a smart bulb this way. It’s going to take a while for it to come back online too.