Capture and restore

Nice.
There might be a few more things to consider re the PB, but for now best to focus on the Hue-related elements.

This does not seem related at all; color is not "faked" in the drivers, only the prestaging commands as mentioned in that post (which are cached in the driver but not sent to the Bridge/device, as Hue does not support prestaging in this way, and maybe I shouldn't have included the commands in the first place...). There are unrelated issues with hs/xy color models, but that should not affect colors sent from Hubitat.

1 Like

Ah, thanks for clarifying that @bertabcd1234

Are you trying to get the bulbs to go back to their Hue scene and the scene has been brought into Hubitat via CoCoHue? If so, there is no need to capture and restore. Once the motion time is over, you can always reactivate the scene by “pushing” its button. Basically, just push button 1 of the CoCoHue scene and that would reactivate it and bring the lights back to their original color.

1 Like

I am trying to allow the 'scene' to be set by various routes either by Hubitat dependent upon the Mode but also it could be via the Hue app, where someone has decided to change it. So that I don't have to worry about the route for reestablishing the scene I thought I could capture how the lights were set, change them and then restore to their previous on/off, colour, dimming level of temperature. Otherwise I need to put in a set of logic to work out what scene I am in and to then recreate that scene at the end of the action. I want to use similar logic for things like doorbell visual warning, alarm notifications etc.

What you are trying to do might be very room or zone dependent. For your outdoor lights, if they have a baseline color most of the time and change only with motion, two scenes for that zone would work fine without needing to capture and restore. Just push buttons and everything will work.

The other option you could do is manipulate a virtual bulb via Hubitat and have that sync with a room/zone. This would solve the remembering last state issue of capture and restore along with any color conversion problems like listed in your other thread. You would fully use Hubitat to change the bulbs but have a switch that deactivates it went outside changes are made. It’s not a perfect thing for what you are trying to do, but I do something similar using [PRERELEASE] Virtual Prestaging.

So having tested tonight I captured the logs below, which unfortunately contains some noise entries (not connected to the activation);

What seems to be happening is that setting the colour outside Hubitat is flowing through to Hubitat, the bottom entries in the log seem to indicate that. I set the Front Garden Room to blue at 10% before setting motion off when they then went to daylight at 90%.

When the restore is done the dimming value is restored (moved from 90% to 5%) but the colour wasn't.

There are also two Multiple simultaneous rule execution errors highlighted in bold, which I am not sure about.

Notes

  • Front Garden Room contains Front Garden Wall Light (1*Hue CT) plus the Front Garden Stairs Zone.
  • Front Garden Stairs Zone contains Front Garden Stairs 1 (1Hue CT), Front Garden Stairs 2 (1Hue CT) and Porch Light(1*Hue CT)
    The Trigger is Garden Stair sensor, which is a Hue Outdoor Motion Sensor.

ev:702023-07-28 07:42:38.498 PMinfoFront Garden Room level is 5%

dev:712023-07-28 07:42:38.483 PMinfoFront Garden Stairs Zone level is 5%

dev:662023-07-28 07:42:38.462 PMinfoAll Hue Lights level is 5%

dev:522023-07-28 07:42:38.445 PMinfoFront Garden Stairs 1 Light level is 5%

dev:532023-07-28 07:42:38.432 PMinfoFront Garden Stairs 2 Light level is 5%

dev:582023-07-28 07:42:38.419 PMinfoPorch light level is 5%

dev:712023-07-28 07:42:38.406 PMinfoFront Garden Stairs Zone level is 90%

dev:522023-07-28 07:42:37.466 PMinfoFront Garden Stairs 1 Light colorName is Polar

dev:522023-07-28 07:42:37.463 PMinfoFront Garden Stairs 1 Light colorTemperature is 6536K

dev:712023-07-28 07:42:37.454 PMinfoFront Garden Stairs Zone level is 5%

dev:532023-07-28 07:42:37.448 PMinfoFront Garden Stairs 2 Light colorName is Polar

dev:532023-07-28 07:42:37.443 PMinfoFront Garden Stairs 2 Light colorTemperature is 6536K

dev:582023-07-28 07:42:37.415 PMinfoPorch light colorName is Polar

dev:582023-07-28 07:42:37.413 PMinfoPorch light colorTemperature is 6536K

dev:712023-07-28 07:42:37.301 PMinfoFront Garden Stairs Zone colorName is Polar

dev:712023-07-28 07:42:37.299 PMinfoFront Garden Stairs Zone colorTemperature is 6536K

app:332023-07-28 07:42:37.248 PMinfoAction: END-IF

app:332023-07-28 07:42:37.245 PMerrorMultiple simultaneous rule execution error

app:332023-07-28 07:42:37.241 PMinfoAction: END-IF

app:332023-07-28 07:42:37.237 PMerrorMultiple simultaneous rule execution error

app:332023-07-28 07:42:37.223 PMinfoAction: Set Private Boolean(false) True

app:332023-07-28 07:42:37.163 PMinfoAction: Restore: Front Garden Stairs Zone

app:332023-07-28 07:42:37.149 PMinfoDelay Over: Delay 0:03:00

dev:442023-07-28 07:42:30.901 PMinfoFront Garden Decking Sensor temperature is 65.2°F

dev:452023-07-28 07:42:30.788 PMinfoFront Garden Stairs Sensor temperature is 66.5°F

dev:252023-07-28 07:42:30.259 PMinfoHall Sensor: illuminance is 3

dev:452023-07-28 07:42:15.928 PMinfoFront Garden Stairs Sensor temperature is 66.56°F

dev:442023-07-28 07:42:12.355 PMinfoFront Garden Decking Sensor temperature is 65.3°F

dev:422023-07-28 07:42:01.174 PMinfoBack Garden Passage Sensor illuminance is 140lux

dev:272023-07-28 07:41:57.219 PMinfoSpare Sonoff Motion Sensor is active

dev:272023-07-28 07:41:56.895 PMinfoSpare Sonoff Motion Sensor is inactive

dev:422023-07-28 07:41:56.239 PMinfoBack Garden Passage Sensor illuminance is 252lux

dev:252023-07-28 07:41:30.093 PMinfoHall Sensor: illuminance is 3

dev:442023-07-28 07:41:15.246 PMinfoFront Garden Decking Sensor motion is inactive

dev:442023-07-28 07:41:05.306 PMinfoFront Garden Decking Sensor motion is active

app:332023-07-28 07:41:01.016 PMinfoAction: END-IF

app:332023-07-28 07:41:01.014 PMinfoAction: END-IF (skipped)

app:332023-07-28 07:41:01.012 PMinfoAction: Set Private Boolean(false) True (skipped)

app:332023-07-28 07:41:01.006 PMinfoAction: Restore: Front Garden Stairs Zone (skipped)

app:332023-07-28 07:41:01.003 PMinfoAction: Delay 0:03:00 (skipped)

app:332023-07-28 07:41:01.000 PMinfoAction: Set color: Front Garden Stairs Zone Daylight Level: 90 (skipped)

app:332023-07-28 07:41:00.996 PMinfoAction: Set Private Boolean(false) False (skipped)

app:332023-07-28 07:41:00.987 PMinfoAction: Capture: Front Garden Stairs Zone (skipped)

app:332023-07-28 07:41:00.985 PMinfoAction: IF (Private Boolean(false) is true(F) [FALSE]) THEN (skipped)

app:332023-07-28 07:41:00.979 PMinfoAction: IF (Illuminance of Front Garden Stairs Sensor(143) is < 500(T) AND Front Garden Stairs Sensor motion active(F) [FALSE]) THEN (skipping)

dev:422023-07-28 07:41:00.975 PMinfoBack Garden Passage Sensor temperature is 65.0°F

app:332023-07-28 07:41:00.957 PMinfoTriggered: Front Garden Stairs Sensor motion changed

app:332023-07-28 07:41:00.939 PMinfoEvent: Front Garden Stairs Sensor motion inactive

dev:452023-07-28 07:41:00.905 PMinfoFront Garden Stairs Sensor motion is inactive

dev:712023-07-28 07:41:00.730 PMinfoFront Garden Stairs Zone saturation is 10

dev:712023-07-28 07:41:00.727 PMinfoFront Garden Stairs Zone hue is 11

dev:712023-07-28 07:41:00.723 PMinfoFront Garden Stairs Zone colorName is Moonlight

dev:712023-07-28 07:41:00.720 PMinfoFront Garden Stairs Zone colorTemperature is 3676K

dev:702023-07-28 07:41:00.611 PMinfoFront Garden Room saturation is 10

dev:702023-07-28 07:41:00.606 PMinfoFront Garden Room colorName is Orange

dev:702023-07-28 07:41:00.603 PMinfoFront Garden Room hue is 11

app:332023-07-28 07:41:00.600 PMinfoAction: END-IF

app:332023-07-28 07:41:00.597 PMinfoAction: END-IF

app:332023-07-28 07:41:00.595 PMinfoAction: Set Private Boolean(false) True (skipped)

app:332023-07-28 07:41:00.587 PMinfoAction: Restore: Front Garden Stairs Zone (skipped)

app:332023-07-28 07:41:00.584 PMinfoAction: Delay 0:03:00 (skipped)

app:332023-07-28 07:41:00.582 PMinfoAction: Set color: Front Garden Stairs Zone Daylight Level: 90 (skipped)

app:332023-07-28 07:41:00.578 PMinfoAction: Set Private Boolean(false) False (skipped)

app:332023-07-28 07:41:00.570 PMinfoAction: Capture: Front Garden Stairs Zone (skipped)

app:332023-07-28 07:41:00.567 PMinfoAction: IF (Private Boolean(false) is true(F) [FALSE]) THEN (skipping)

app:332023-07-28 07:41:00.563 PMinfoAction: IF (Illuminance of Front Garden Stairs Sensor(143) is < 500(T) AND Front Garden Stairs Sensor motion active(T) [TRUE]) THEN

app:332023-07-28 07:41:00.537 PMinfoTriggered: Front Garden Stairs Sensor motion changed

app:332023-07-28 07:41:00.516 PMinfoEvent: Front Garden Stairs Sensor motion active

dev:452023-07-28 07:41:00.454 PMinfoFront Garden Stairs Sensor motion is active

dev:522023-07-28 07:41:00.315 PMinfoFront Garden Stairs 1 Light saturation is 10

dev:522023-07-28 07:41:00.311 PMinfoFront Garden Stairs 1 Light hue is 11

dev:522023-07-28 07:41:00.307 PMinfoFront Garden Stairs 1 Light colorName is Moonlight

dev:522023-07-28 07:41:00.305 PMinfoFront Garden Stairs 1 Light colorTemperature is 3676K

dev:532023-07-28 07:41:00.266 PMinfoFront Garden Stairs 2 Light saturation is 10

dev:532023-07-28 07:41:00.259 PMinfoFront Garden Stairs 2 Light hue is 11

dev:532023-07-28 07:41:00.197 PMinfoFront Garden Stairs 2 Light colorName is Moonlight

dev:532023-07-28 07:41:00.193 PMinfoFront Garden Stairs 2 Light colorTemperature is 3676K

dev:272023-07-28 07:40:56.945 PMinfoSpare Sonoff Motion Sensor is active

dev:272023-07-28 07:40:56.631 PMinfoSpare Sonoff Motion Sensor is inactive

dev:442023-07-28 07:40:54.842 PMinfoFront Garden Decking Sensor motion is inactive

dev:422023-07-28 07:40:48.285 PMinfoBack Garden Passage Sensor temperature is 64.94°F

dev:442023-07-28 07:40:44.905 PMinfoFront Garden Decking Sensor motion is active

dev:252023-07-28 07:40:29.950 PMinfoHall Sensor: illuminance is 3

dev:432023-07-28 07:40:00.983 PMinfoBack Garden Sensor illuminance is 121lux

dev:712023-07-28 07:40:00.725 PMinfoFront Garden Stairs Zone saturation is 100

dev:712023-07-28 07:40:00.721 PMinfoFront Garden Stairs Zone hue is 70

dev:712023-07-28 07:40:00.704 PMinfoFront Garden Stairs Zone colorMode is CT

dev:712023-07-28 07:40:00.702 PMinfoFront Garden Stairs Zone colorName is Polar

dev:712023-07-28 07:40:00.699 PMinfoFront Garden Stairs Zone colorMode is CT

dev:702023-07-28 07:40:00.589 PMinfoFront Garden Room level is 90%

dev:582023-07-28 07:40:00.496 PMinfoPorch light colorMode is CT

dev:582023-07-28 07:40:00.493 PMinfoPorch light colorName is Moonlight

dev:582023-07-28 07:40:00.491 PMinfoPorch light colorTemperature is 3676K

dev:582023-07-28 07:40:00.488 PMinfoPorch light colorMode is CT

dev:522023-07-28 07:40:00.307 PMinfoFront Garden Stairs 1 Light saturation is 100

dev:522023-07-28 07:40:00.303 PMinfoFront Garden Stairs 1 Light hue is 70

dev:522023-07-28 07:40:00.299 PMinfoFront Garden Stairs 1 Light colorMode is CT

dev:522023-07-28 07:40:00.297 PMinfoFront Garden Stairs 1 Light colorName is Polar

dev:522023-07-28 07:40:00.292 PMinfoFront Garden Stairs 1 Light colorMode is CT

dev:532023-07-28 07:40:00.254 PMinfoFront Garden Stairs 2 Light saturation is 100

dev:532023-07-28 07:40:00.250 PMinfoFront Garden Stairs 2 Light hue is 70

dev:532023-07-28 07:40:00.233 PMinfoFront Garden Stairs 2 Light colorMode is CT

dev:532023-07-28 07:40:00.231 PMinfoFront Garden Stairs 2 Light colorName is Polar

dev:532023-07-28 07:40:00.227 PMinfoFront Garden Stairs 2 Light colorMode is CT

dev:442023-07-28 07:39:58.216 PMinfoFront Garden Decking Sensor motion is inactive

app:332023-07-28 07:39:54.661 PMinfoAction: END-IF

app:332023-07-28 07:39:54.658 PMinfoAction: END-IF (skipped)

app:332023-07-28 07:39:54.655 PMinfoAction: Set Private Boolean(false) True (skipped)

app:332023-07-28 07:39:54.645 PMinfoAction: Restore: Front Garden Stairs Zone (skipped)

app:332023-07-28 07:39:54.643 PMinfoAction: Delay 0:03:00 (skipped)

app:332023-07-28 07:39:54.641 PMinfoAction: Set color: Front Garden Stairs Zone Daylight Level: 90 (skipped)

app:332023-07-28 07:39:54.636 PMinfoAction: Set Private Boolean(false) False (skipped)

app:332023-07-28 07:39:54.622 PMinfoAction: Capture: Front Garden Stairs Zone (skipped)

app:332023-07-28 07:39:54.619 PMinfoAction: IF (Private Boolean(false) is true(F) [FALSE]) THEN (skipped)

app:332023-07-28 07:39:54.614 PMinfoAction: IF (Illuminance of Front Garden Stairs Sensor(143) is < 500(T) AND Front Garden Stairs Sensor motion active(F) [FALSE]) THEN (skipping)

app:332023-07-28 07:39:54.593 PMinfoTriggered: Front Garden Stairs Sensor motion changed

app:332023-07-28 07:39:54.573 PMinfoEvent: Front Garden Stairs Sensor motion inactive

dev:452023-07-28 07:39:54.531 PMinfoFront Garden Stairs Sensor motion is inactive

dev:442023-07-28 07:39:48.294 PMinfoFront Garden Decking Sensor motion is active

dev:442023-07-28 07:39:45.572 PMinfoFront Garden Decking Sensor motion is inactive

dev:702023-07-28 07:39:37.697 PMinfoFront Garden Room level is 69%

dev:662023-07-28 07:39:37.673 PMinfoAll Hue Lights level is 69%

dev:522023-07-28 07:39:37.631 PMinfoFront Garden Stairs 1 Light level is 90%

dev:532023-07-28 07:39:37.613 PMinfoFront Garden Stairs 2 Light level is 90%

dev:582023-07-28 07:39:37.600 PMinfoPorch light level is 90%

dev:522023-07-28 07:39:37.339 PMinfoFront Garden Stairs 1 Light colorMode is RGB

dev:522023-07-28 07:39:37.337 PMinfoFront Garden Stairs 1 Light saturation is 10

dev:522023-07-28 07:39:37.333 PMinfoFront Garden Stairs 1 Light colorMode is RGB

dev:522023-07-28 07:39:37.330 PMinfoFront Garden Stairs 1 Light colorName is Orange

dev:522023-07-28 07:39:37.327 PMinfoFront Garden Stairs 1 Light hue is 11

dev:532023-07-28 07:39:37.312 PMinfoFront Garden Stairs 2 Light colorMode is RGB

dev:532023-07-28 07:39:37.310 PMinfoFront Garden Stairs 2 Light saturation is 10

dev:532023-07-28 07:39:37.306 PMinfoFront Garden Stairs 2 Light colorMode is RGB

dev:532023-07-28 07:39:37.303 PMinfoFront Garden Stairs 2 Light colorName is Orange

dev:532023-07-28 07:39:37.300 PMinfoFront Garden Stairs 2 Light hue is 11

dev:582023-07-28 07:39:37.285 PMinfoPorch light colorMode is RGB

dev:582023-07-28 07:39:37.283 PMinfoPorch light saturation is 10

dev:582023-07-28 07:39:37.279 PMinfoPorch light colorMode is RGB

dev:582023-07-28 07:39:37.276 PMinfoPorch light colorName is Orange

dev:582023-07-28 07:39:37.273 PMinfoPorch light hue is 11

dev:712023-07-28 07:39:37.258 PMinfoFront Garden Stairs Zone level is 90%

dev:712023-07-28 07:39:37.244 PMinfoFront Garden Stairs Zone colorMode is RGB

dev:712023-07-28 07:39:37.242 PMinfoFront Garden Stairs Zone saturation is 10

dev:712023-07-28 07:39:37.239 PMinfoFront Garden Stairs Zone colorMode is RGB

dev:712023-07-28 07:39:37.230 PMinfoFront Garden Stairs Zone colorName is Orange

dev:712023-07-28 07:39:37.227 PMinfoFront Garden Stairs Zone hue is 11

app:332023-07-28 07:39:37.114 PMinfoAction: Delay 0:03:00

app:332023-07-28 07:39:37.061 PMinfoAction: Set color: Front Garden Stairs Zone Daylight Level: 90

app:332023-07-28 07:39:36.939 PMinfoAction: Set Private Boolean(true) False

app:332023-07-28 07:39:36.910 PMinfoAction: Capture: Front Garden Stairs Zone

app:332023-07-28 07:39:36.907 PMinfoAction: IF (Private Boolean(true) is true(T) [TRUE]) THEN

app:332023-07-28 07:39:36.899 PMinfoAction: IF (Illuminance of Front Garden Stairs Sensor(143) is < 500(T) AND Front Garden Stairs Sensor motion active(T) [TRUE]) THEN

app:332023-07-28 07:39:36.830 PMinfoTriggered: Front Garden Stairs Sensor motion changed

app:332023-07-28 07:39:36.766 PMinfoEvent: Front Garden Stairs Sensor motion active

dev:452023-07-28 07:39:36.629 PMinfoFront Garden Stairs Sensor illuminance is 143lux

dev:452023-07-28 07:39:36.600 PMinfoFront Garden Stairs Sensor motion is active

dev:442023-07-28 07:39:36.587 PMinfoFront Garden Decking Sensor illuminance is 74lux

dev:442023-07-28 07:39:35.574 PMinfoFront Garden Decking Sensor motion is active

dev:432023-07-28 07:39:30.868 PMinfoBack Garden Sensor illuminance is 147lux

dev:432023-07-28 07:39:30.821 PMinfoBack Garden Sensor illuminance is 121lux

dev:582023-07-28 07:39:30.416 PMinfoPorch light saturation is 100

dev:582023-07-28 07:39:30.408 PMinfoPorch light hue is 70

dev:582023-07-28 07:39:30.397 PMinfoPorch light colorName is Sodium

dev:582023-07-28 07:39:30.395 PMinfoPorch light colorTemperature is 2000K

dev:272023-07-28 07:39:29.844 PMinfoSpare Sonoff Motion Sensor is active

dev:252023-07-28 07:39:29.798 PMinfoHall Sensor: illuminance is 3

dev:712023-07-28 07:39:00.881 PMinfoFront Garden Stairs Zone saturation is 100

dev:712023-07-28 07:39:00.878 PMinfoFront Garden Stairs Zone hue is 70

dev:712023-07-28 07:39:00.867 PMinfoFront Garden Stairs Zone colorName is Polar

dev:712023-07-28 07:39:00.865 PMinfoFront Garden Stairs Zone colorTemperature is 6536K

dev:702023-07-28 07:39:00.632 PMinfoFront Garden Room saturation is 100

dev:702023-07-28 07:39:00.629 PMinfoFront Garden Room colorName is Blue

dev:702023-07-28 07:39:00.625 PMinfoFront Garden Room hue is 70

dev:522023-07-28 07:39:00.324 PMinfoFront Garden Stairs 1 Light saturation is 100

dev:522023-07-28 07:39:00.319 PMinfoFront Garden Stairs 1 Light hue is 70

dev:522023-07-28 07:39:00.298 PMinfoFront Garden Stairs 1 Light colorName is Polar

dev:522023-07-28 07:39:00.292 PMinfoFront Garden Stairs 1 Light colorTemperature is 6536K

dev:532023-07-28 07:39:00.240 PMinfoFront Garden Stairs 2 Light saturation is 100

dev:532023-07-28 07:39:00.231 PMinfoFront Garden Stairs 2 Light hue is 70

dev:532023-07-28 07:39:00.204 PMinfoFront Garden Stairs 2 Light colorName is Polar

dev:532023-07-28 07:39:00.189 PMinfoFront Garden Stairs 2 Light colorTemperature is 6536K

The rule is running multiple times which is why you are getting the error. From the documentation:

If the rule re-triggers while the delay is pending and the conditional action is reached again, you may see a "Multiple simultaneous rule execution error" in Logs (and the rule actions will not run as intended). Solutions include restricting execution of the rule while the delay is pending (e.g., with a required expression), cancelling the delay earlier in the rule, or using a "Wait for events: elapsed time" action instead if you want the timer to be cancelled on re-trigger of the rule.

Basically, your motion sensor is triggering again during your delay. You’ll want to either make your delay cancelable or change that section to a wait for motion sensor to go inactive and stay that way for three minutes (based on your delay in the rule).

As for the color not being restored correctly, I think it relates to changing the Room to Blue, but Hubitat not having enough time to poll the bridge to get the correct color of the Zone (which your rule captures). It looks like the dimming percentage got updated via the Eventstream in CoCoHue, but setting the Room versus Zone is why the color did not. I'd suggest fixing the multiple rules issue first then testing again, but setting the Zone the correct color (rather than the Room).

The other thing to test is does the rule capture and restore correctly when you set the color of the Zone via Hubitat. One thing I can suggest is to potentially only use the Hue App to configure Rooms, Zones, and Scenes. Then import all of them via CoCoHue into Hubitat and let Hubitat control. Especially for color changes, have either Hubitat set the color of the bulbs or utilize Hue scenes. If you want manual control of stuff, look to button devices or voice activation (Google, Alexa, Siri) rather than the app.

@bertabcd1234 might have some other ideas as well that can help with both this rule and "best practices" with Hue devices.

So I have done a number of modifications to the code and will know later if the two errors are resolved or not but are not seeing any issues yet.

I have also been doing some simple tests. I have set the lights for the Front Garden stairs zone from within Hubitat, to violet. I then created a test routine to capture, turn those lights red and then restore. That does not seem to be doing the restore the lights end up a shade of white. I have run this routine a number of times all with the same result.

I also tried setting the zone in the Hue application and watched the status of the zone in Hubitat. After 10 mins the zone had still not changed the attributes for the new colour and lights ended up a shade of white.

The test routine is shown below

An output is shown below.

Front Garden Stairs Sensor

Test Switch

dev:712023-07-29 05:26:24.588 PMinfoFront Garden Stairs Zone saturation is 31

dev:712023-07-29 05:26:24.583 PMinfoFront Garden Stairs Zone hue is 63

dev:522023-07-29 05:26:24.227 PMinfoFront Garden Stairs 1 Light saturation is 31

dev:522023-07-29 05:26:24.222 PMinfoFront Garden Stairs 1 Light hue is 63

dev:1002023-07-29 05:26:16.890 PMinfoSpare Fibaro Sensor 4: motion is inactive

dev:1002023-07-29 05:25:46.524 PMinfoSpare Fibaro Sensor 4: motion is active

dev:702023-07-29 05:25:44.761 PMinfoFront Garden Room saturation is 100

dev:702023-07-29 05:25:44.756 PMinfoFront Garden Room colorName is Red

dev:702023-07-29 05:25:44.746 PMinfoFront Garden Room hue is 0

dev:702023-07-29 05:25:44.735 PMinfoFront Garden Room level is 100%

dev:582023-07-29 05:25:44.652 PMinfoPorch light saturation is 100

dev:582023-07-29 05:25:44.641 PMinfoPorch light hue is 0

dev:582023-07-29 05:25:44.629 PMinfoPorch light level is 100%

dev:522023-07-29 05:25:44.466 PMinfoFront Garden Stairs 1 Light level is 100%

dev:532023-07-29 05:25:44.428 PMinfoFront Garden Stairs 2 Light saturation is 100

dev:532023-07-29 05:25:44.420 PMinfoFront Garden Stairs 2 Light hue is 0

dev:532023-07-29 05:25:44.406 PMinfoFront Garden Stairs 2 Light level is 100%

dev:712023-07-29 05:25:44.266 PMinfoFront Garden Stairs Zone level is 100%

dev:1122023-07-29 05:25:44.049 PMinfoTest Switch was turned off

dev:712023-07-29 05:25:25.071 PMinfoFront Garden Stairs Zone saturation is 91

dev:712023-07-29 05:25:25.066 PMinfoFront Garden Stairs Zone hue is 78

dev:712023-07-29 05:25:25.050 PMinfoFront Garden Stairs Zone colorMode is CT

dev:712023-07-29 05:25:25.045 PMinfoFront Garden Stairs Zone colorName is Polar

dev:712023-07-29 05:25:25.040 PMinfoFront Garden Stairs Zone colorMode is CT

dev:702023-07-29 05:25:24.935 PMinfoFront Garden Room level is 45%

dev:582023-07-29 05:25:24.782 PMinfoPorch light saturation is 91

dev:582023-07-29 05:25:24.777 PMinfoPorch light hue is 78

dev:582023-07-29 05:25:24.773 PMinfoPorch light colorMode is CT

dev:582023-07-29 05:25:24.768 PMinfoPorch light colorName is Polar

dev:582023-07-29 05:25:24.764 PMinfoPorch light colorMode is CT

dev:582023-07-29 05:25:24.759 PMinfoPorch light level is 45%

dev:522023-07-29 05:25:24.571 PMinfoFront Garden Stairs 1 Light saturation is 91

dev:522023-07-29 05:25:24.563 PMinfoFront Garden Stairs 1 Light hue is 78

dev:522023-07-29 05:25:24.556 PMinfoFront Garden Stairs 1 Light colorMode is CT

dev:522023-07-29 05:25:24.536 PMinfoFront Garden Stairs 1 Light colorName is Polar

dev:522023-07-29 05:25:24.515 PMinfoFront Garden Stairs 1 Light colorMode is CT

dev:522023-07-29 05:25:24.506 PMinfoFront Garden Stairs 1 Light level is 45%

dev:532023-07-29 05:25:24.459 PMinfoFront Garden Stairs 2 Light saturation is 31

dev:532023-07-29 05:25:24.438 PMinfoFront Garden Stairs 2 Light hue is 63

dev:532023-07-29 05:25:24.433 PMinfoFront Garden Stairs 2 Light colorMode is CT

dev:532023-07-29 05:25:24.427 PMinfoFront Garden Stairs 2 Light colorName is Polar

dev:532023-07-29 05:25:24.395 PMinfoFront Garden Stairs 2 Light colorMode is CT

dev:532023-07-29 05:25:24.390 PMinfoFront Garden Stairs 2 Light level is 45%

dev:522023-07-29 05:25:24.356 PMinfoFront Garden Stairs 1 Light colorMode is RGB

dev:522023-07-29 05:25:24.351 PMinfoFront Garden Stairs 1 Light saturation is 100

dev:522023-07-29 05:25:24.345 PMinfoFront Garden Stairs 1 Light colorMode is RGB

dev:522023-07-29 05:25:24.314 PMinfoFront Garden Stairs 1 Light colorName is Red

dev:522023-07-29 05:25:24.290 PMinfoFront Garden Stairs 1 Light hue is 100

dev:532023-07-29 05:25:24.265 PMinfoFront Garden Stairs 2 Light colorMode is RGB

dev:532023-07-29 05:25:24.238 PMinfoFront Garden Stairs 2 Light saturation is 100

dev:532023-07-29 05:25:24.233 PMinfoFront Garden Stairs 2 Light colorMode is RGB

dev:532023-07-29 05:25:24.212 PMinfoFront Garden Stairs 2 Light colorName is Red

dev:532023-07-29 05:25:24.201 PMinfoFront Garden Stairs 2 Light hue is 100

dev:582023-07-29 05:25:24.134 PMinfoPorch light colorMode is RGB

dev:582023-07-29 05:25:24.115 PMinfoPorch light saturation is 100

dev:582023-07-29 05:25:24.110 PMinfoPorch light colorMode is RGB

dev:582023-07-29 05:25:24.106 PMinfoPorch light colorName is Red

dev:582023-07-29 05:25:24.101 PMinfoPorch light hue is 100

dev:712023-07-29 05:25:24.073 PMinfoFront Garden Stairs Zone level is 45%

dev:712023-07-29 05:25:24.050 PMinfoFront Garden Stairs Zone colorMode is RGB

dev:712023-07-29 05:25:24.045 PMinfoFront Garden Stairs Zone saturation is 100

dev:712023-07-29 05:25:24.028 PMinfoFront Garden Stairs Zone colorMode is RGB

dev:712023-07-29 05:25:24.022 PMinfoFront Garden Stairs Zone colorName is Red

dev:712023-07-29 05:25:24.009 PMinfoFront Garden Stairs Zone hue is 100

dev:1122023-07-29 05:25:23.701 PMinfoTest Switch was turned on

dev:452023-07-29 05:25:04.901 PMinfoFront Garden Stairs Sensor temperature is 72.6°F

dev:712023-07-29 05:25:04.698 PMinfoFront Garden Stairs Zone colorMode is CT

dev:712023-07-29 05:25:04.693 PMinfoFront Garden Stairs Zone colorName is Polar

dev:712023-07-29 05:25:04.688 PMinfoFront Garden Stairs Zone colorMode is CT

dev:582023-07-29 05:25:04.477 PMinfoPorch light colorMode is CT

dev:582023-07-29 05:25:04.472 PMinfoPorch light colorName is Polar

dev:582023-07-29 05:25:04.465 PMinfoPorch light colorTemperature is 6536K

dev:582023-07-29 05:25:04.461 PMinfoPorch light colorMode is CT

dev:522023-07-29 05:25:04.273 PMinfoFront Garden Stairs 1 Light colorMode is CT

dev:522023-07-29 05:25:04.268 PMinfoFront Garden Stairs 1 Light colorName is Polar

dev:522023-07-29 05:25:04.264 PMinfoFront Garden Stairs 1 Light colorMode is CT

dev:532023-07-29 05:25:04.227 PMinfoFront Garden Stairs 2 Light saturation is 31

dev:532023-07-29 05:25:04.222 PMinfoFront Garden Stairs 2 Light reachable is true

dev:532023-07-29 05:25:04.215 PMinfoFront Garden Stairs 2 Light hue is 63

dev:532023-07-29 05:25:04.209 PMinfoFront Garden Stairs 2 Light colorMode is CT

dev:532023-07-29 05:25:04.199 PMinfoFront Garden Stairs 2 Light colorName is Polar

dev:532023-07-29 05:25:04.194 PMinfoFront Garden Stairs 2 Light colorMode is CT

dev:1002023-07-29 05:25:03.517 PMinfoSpare Fibaro Sensor 4: motion is inactive

dev:522023-07-29 05:24:48.106 PMinfoFront Garden Stairs 1 Light hue is 78

dev:532023-07-29 05:24:48.078 PMinfoFront Garden Stairs 2 Light hue is 78

dev:582023-07-29 05:24:48.047 PMinfoPorch light hue is 78

dev:712023-07-29 05:24:48.018 PMinfoFront Garden Stairs Zone hue is 78

dev:522023-07-29 05:24:47.568 PMinfoFront Garden Stairs 1 Light colorMode is RGB

dev:522023-07-29 05:24:47.563 PMinfoFront Garden Stairs 1 Light saturation is 91

dev:522023-07-29 05:24:47.558 PMinfoFront Garden Stairs 1 Light colorMode is RGB

dev:522023-07-29 05:24:47.553 PMinfoFront Garden Stairs 1 Light colorName is Violet

dev:522023-07-29 05:24:47.549 PMinfoFront Garden Stairs 1 Light hue is 77

dev:532023-07-29 05:24:47.543 PMinfoFront Garden Stairs 2 Light colorMode is RGB

dev:532023-07-29 05:24:47.538 PMinfoFront Garden Stairs 2 Light saturation is 91

dev:532023-07-29 05:24:47.533 PMinfoFront Garden Stairs 2 Light colorMode is RGB

dev:532023-07-29 05:24:47.528 PMinfoFront Garden Stairs 2 Light colorName is Violet

dev:532023-07-29 05:24:47.524 PMinfoFront Garden Stairs 2 Light hue is 77

dev:582023-07-29 05:24:47.517 PMinfoPorch light colorMode is RGB

dev:582023-07-29 05:24:47.512 PMinfoPorch light saturation is 91

dev:582023-07-29 05:24:47.508 PMinfoPorch light colorMode is RGB

dev:582023-07-29 05:24:47.503 PMinfoPorch light colorName is Violet

dev:582023-07-29 05:24:47.499 PMinfoPorch light hue is 77

dev:712023-07-29 05:24:47.477 PMinfoFront Garden Stairs Zone colorMode is RGB

dev:712023-07-29 05:24:47.472 PMinfoFront Garden Stairs Zone saturation is 91

dev:712023-07-29 05:24:47.465 PMinfoFront Garden Stairs Zone colorMode is RGB

dev:712023-07-29 05:24:47.458 PMinfoFront Garden Stairs Zone colorName is Violet

dev:712023-07-29 05:24:47.453 PMinfoFront Garden Stairs Zone hue is 77

dev:442023-07-29 05:24:44.965 PMinfoFront Garden Decking Sensor temperature is 70.1°F

dev:432023-07-29 05:24:44.924 PMinfoBack Garden Sensor temperature is 75.5°F

dev:712023-07-29 05:24:44.666 PMinfoFront Garden Stairs Zone saturation is 100

dev:712023-07-29 05:24:44.661 PMinfoFront Garden Stairs Zone hue is 74

dev:712023-07-29 05:24:44.655 PMinfoFront Garden Stairs Zone colorMode is CT

dev:712023-07-29 05:24:44.650 PMinfoFront Garden Stairs Zone colorName is Polar

dev:712023-07-29 05:24:44.645 PMinfoFront Garden Stairs Zone colorMode is CT

dev:702023-07-29 05:24:44.533 PMinfoFront Garden Room level is 100%

dev:582023-07-29 05:24:44.457 PMinfoPorch light saturation is 100

dev:582023-07-29 05:24:44.452 PMinfoPorch light hue is 74

dev:582023-07-29 05:24:44.447 PMinfoPorch light colorMode is CT

dev:582023-07-29 05:24:44.442 PMinfoPorch light colorName is Sodium

dev:582023-07-29 05:24:44.438 PMinfoPorch light colorMode is CT

dev:582023-07-29 05:24:44.433 PMinfoPorch light level is 100%

dev:522023-07-29 05:24:44.283 PMinfoFront Garden Stairs 1 Light saturation is 100

dev:522023-07-29 05:24:44.278 PMinfoFront Garden Stairs 1 Light hue is 74

dev:522023-07-29 05:24:44.273 PMinfoFront Garden Stairs 1 Light colorMode is CT

dev:522023-07-29 05:24:44.269 PMinfoFront Garden Stairs 1 Light colorName is Polar

dev:522023-07-29 05:24:44.265 PMinfoFront Garden Stairs 1 Light colorMode is CT

dev:522023-07-29 05:24:44.260 PMinfoFront Garden Stairs 1 Light level is 100%

dev:532023-07-29 05:24:44.231 PMinfoFront Garden Stairs 2 Light saturation is 31

dev:532023-07-29 05:24:44.222 PMinfoFront Garden Stairs 2 Light hue is 63

dev:532023-07-29 05:24:44.218 PMinfoFront Garden Stairs 2 Light colorMode is CT

dev:532023-07-29 05:24:44.214 PMinfoFront Garden Stairs 2 Light colorName is Polar

dev:532023-07-29 05:24:44.195 PMinfoFront Garden Stairs 2 Light colorMode is CT

dev:532023-07-29 05:24:44.190 PMinfoFront Garden Stairs 2 Light level is 100%

1 Like

The log indicates why the end result was a white color. Right before your test switch flipped, the zone was reading CT with a color name Polar. I’m guessing this is the color that the was captured and restored. It looks like Hubitat is seeing your bulbs as White Ambiance rather than Color. What type of hue bulbs are you using?

As a test to make sure capture and restore are working properly, try setting the color temperature via number in Hubitat. Set the lights to 2500 and have the rule change them to 6500. This should work the way you want. Assuming that works, we can troubleshoot color next.

Thanks I will try that. My bulbs are Hue Uk e27 bulbs so nothing fancy. There was no obvious change in the physical light colour before it turned Red.

Thanks really helpful, having taken your suggestion I created another test rig that set the lights to 2500, captured them, set them to 6500 and then restored. I ran it a few times and that worked as I would expect in that the restore went to the correct temperature and dimming level.

I then substituted the set colour temperature for set colours (Blue and Red) and that consistently didn't work, giving me a white colour at the original dim level.

As you say the system seems to be interpreting my bulbs as white ambiance.

So I looked at my settings for the bulbs and they are all CocoHue RGB Bulbs and yet the status says colorMode : CT. is that correct?

Current States

  • colorMode : CT
  • colorName :Incandescent
  • colorTemperature :2500
  • effect : none
  • hue : 12
  • level : 50
  • lightEffects :{"0":"None","1":"Color Loop"}
  • reachable : true
  • saturation : 66
  • switch : off

In the HUE app it shows the bulbs as being

Two are:

Light type Hue Color lamp
Manufacturer Signify Netherlands B.V.
Model LCA001
Hardware Platform 100b-112
Software 1.104.2

and

One is
Light type Hue Color lamp
Manufacturer Signify Netherlands B.V.
Model LCT015
Hardware Platform 100b-10C
Software 1.101.2

Yes, "CT" means "color temperature," and id you just set them to 2500, that is the correct mode for them to be in (as opposed to RGB id you did a setColor()).

Thanks for the feedback, that status info was after I set the colour to blue and then red, though. If the system is treating my bulbs as white ambiance can that be changed or is a restriction?

How are you setting them to red? But yes, this would explain what is being captured regardless.

I have tried a few different ways.

In Hubitat I have used both the “set colour” command at the zone level and the colour wheel accessed from the zone button on the dashboard to set the colour.

I have also set the colour for the zone by calling a scene setup in the hue app and bought in via Cocohue and also by using the hue app colour wheel.

The most reliable for reporting in Hubitat is going to be setting things from Hubitat via "Set Color" (or "Set Color Temperature " or similar color commands) on the specific device you are trying to capture. By this, I mean not a room or zone the device is in unless the device you're capturing is that room or zone (there is nothing wrong with that).

If you make changes from outside Hubitat, you'll need either the experimental v2/eventstream API option enabled or to wait for the next poll to happen (the default interval is 1 minute). Alternatively, you can run a "Refresh" command on the Bridge device (not the actual light) and avoid the wait.

As long as your bulbs report hue/saturation or CT, that should work. I've seen Hue not repot this in a few cases, scene recall being one (one reason I recommended setting things directly from Hubitat). Debug logs from the device in question will show the actual data it's working with from a poll/refresh or eventstream data and would be the most helpful thing for figuring out more if none of the above helps.

Thanks Bert, so I modified my test rig and ran a number of different scenarios, your suggestion/advise is the only one which seems to work.

So I have concluded that the initial scene has to be created by each individual light being set to the required colour using the set colour command in Hubitat, it then works.

The colour it changes to can be set at the zone level and the capture and restore can also be done at a zone level the important thing is how the scene being captured and restored are initially set. Working with Rooms or Zones does not seem to work.

I also could not get refreshing the bridge to work the colour restores back to a shade of white.

The reason I was trying to do things at a zone level was to make it easier if I wanted to add devices (just add into the zone via Hue). The reason I wanted Hue scenes was to make it easier to allow my wife to modify those scenes in the future (without me coding) and the ultimate flexibility was to be able to set a unique scene in the hue app for a special event.

I now need to think through and potentially modify my approach. Do you know if the apps such as 'Room Lighting' set scenes at a zone or individual device level, as I believe they allow current scenes to be grabbed (I assume to be then setup in the app) that could potentially provide a midpoint?