Newb Automation help

Good Day.
Trying to set up my first rule and it's not working (obviously).
Ok. So I have a lifx bulb that I can control by Google Home (have installed the GH app). I've used the GoG driver and installed the Lifx as a virtual device.
I also have a Hue bulb (I've installed the Hue bridge integration app).

In Rule Machine I'm trying to set up, to no avail. Not sure exactly where I'm going..

if Lifx bulb on
if current time between sunset and sunrise
turn on hue bulb
else
turn hue bulb off
if Lifx bulb off
turn hue bulb off

Tried a number of params, like having the lifx a private bool, as a switch, etc. Any pointers would be appreciated. Thanks.

First thing to verify is that the virtual device actually reflects turning the bulb on/off with Google Home. Open the device page for it, and see if it actually tracks the Lifx bulb or not.

Yes, the Lifx lamp is working via GH and on it's Device page, the Current States "switch" toggles with GH actions.

OK, good.

In Rule Machine, set up a rule like this:

Condition: Lifx on
Rule: Lifx on (this will autofill)
Action for true: Turn on Hue
Action for false: Turn off Hue
Restrictions: Only between sunset and sunrise

Give that a try.

Hmm.
Apps -> Rule Machine [clicked]
Create New Rule...[clicked]
Define a Rule -> [clicked] Named the Rule
Select Conditions -> [clicked] No options for devices to be selected, only generic params (Dimmer level, HSM status, humidity, mode, motion...etc)

Here you click on what you want to eveluate.
Is ii a switch? If so select switch in condition 1.
image
The select what state you want to check. On or Off.

Etc.

Now select what you want for true or false conditions. Turn something on or off.
image

Here are the restrictions options when you expand restrictions.

image

Thanks Guys.
(I didn't enable the Restrictions so that I could test a bit).
GH will pretty instantly turn the Lifx on, but it takes just about 1 min for the Hue bulb to turn on.

Did I see somewhere that the polling for the Hue Bridge should be set at 1 min (less you run into issues with Phillips rate limiting you?) ?

Is this because it's still being done via Phillips (or Googles) cloud servers?

Did I read somewhere on community.hubitat about "local control".

GH will nearly instantly turn on/off Hue bulb.

Testing:
GH "turn on lifx", it turns on, and 50 sec later Hue bulb turns on. Ok. As designed (although wish quicker).
GH "turn off hue bulb" -- GH turns it off almost instantly.
GH "turn off lifx" -- turns off.
GH "turn on lifx" -- turns on -- but hue never turns on.
GH "turn on hue bulb" -- turns on
GH "turn off lifx" -- turns off, but hue bulb remains on

Something not quite right.

Can't help much here. Although I have a GH and I have discovered all my devices in the GH app, I don't use it to turn lights on and off.

Okay, your Google home commands will have nothing to do with your hubitat rule. So, stop referring to Google Home.
Please post a screenshot of the device you are using for the basis of your rule (the LIFX bulb) and the device you are trying to control, the Hue bulb from Hubitat, not from Google home.
It should look something like this:

Not sure I understand why GH wouldn't have an impact. When I talk to GH to turn the Lifx on, it's Current State in the Hubitat Device page toggles to on, and toggles to off when I tell GH (because I have a GH device sitting on my desk) to turn the lifx bulb off.

So, if the HE device page shows the Lifx device toggling, why wouldn't it run the rules?

Here's the Lifx Device followed by the Hue bulb:

Because it is whether the device is changing in HE that matters. You are just complicating things by talking about google home. Every time you mention turning it on with GH, you will have to also say that the GH status of the Light and the HE status of the light match. I don't know how you have the LIFX bulb connected to your GH, whether through the LIFX GH integration or through HE. So, lets focus on HE.

When you turn on/off both devices in HE via the device edit page, the device responds correctly? If not, then stop here, you have other problems. If they work correctly, read on.

So, are you trying to get these two bulbs to mirror each other in color, brightness, all that? Or just turn one on when the other is turned on? Because if you are trying to get them to act together, I would suggest using a group rather than a rule. That way, all of the components of the devices will match (color or color-temp, dimming level, switch status). When you create a group, a virtual group control device gets created. Then you would control that device whereever you want and both lights would do the same thing.

But if you want a rule to turn one on back on the other.

In new rule, select conditions, then under capability select Switch, then select your LIFX bulb then done.
Then in the actions for True select, control switches, select turn on these switches, and select your hue bulb. then select done till your back at the rule's main page.
Then select actions for false, control switches, turn off these switches, your hue bulb. Select done until you're all the way back at the apps main page.
Now turn on the LIFX bulb IN HUBITAT. The Hue light should turn on.

Not trying to mirror the two lights. The Lifx is just a white bulb, while the Hue is RGBW. During the day, I'll turn the Lifx on, but don't want the Hue on. If it approaches sunset, then I want the Hue to automatically turn on. If I turn the Lifx on when it's dark (between sunset and sunrise) I want the Hue to come on too. If the both are on, and the sun rises, I want the Hue to automatically turn off. Of course, there will be times when I want the Hue off, even when it's dark out, thus the need to individually control that light. So, I don't think that a group would work (unless I use Modes, but I'm not sure about that solving my isssue -- and I'm trying to learn the platform).

[Edit: sorry fast pinky hit enter and posted before done].

My rule is set up just as you state, that's why I suggested that something is amiss. As I noted above, it worked fine until I independently turned the Hue off (rather than letting a rule do it).

You are trying to set the same bulb to a color and a color temp. You can't do two things on the same device. Choose one or the other.
Plus, your false action is not turning the switch off. Did you even read what I wrote? The false action is not what I stated. It is changing the color but not turning it off.
What you are talking about is going to take about 4-6 rules. You're trying to do it all in one and it won't work.
And what you just said you want, about the hue turning on closer to sunset, doesn't really have anything to do with the Lifx, does it.
I suggest you try some simpler automations first to get your feet wet.

No, only one rule needed (with restrictions when I decide the rule is working). Yes, I was using "bulb" thinking I'd be controlling a bulb, and not a switch (as a noun rather than a verb).

When I toggle the Lifx in Hubitat Device Page, the rule fires and both lights toggle correctly. Also, works fine from a "switch" tile on the dashboard. However, the lag of the Hue bulb remains when I toggle the switch via Google Home Deivce "Ok Google, turn desk light [on|off]" (although no lag with the Lifx bulb).

And please, chill with the attitude, it's not appreciated.

Why do you think this can be done in one rule? Why are you arguing with someone trying to help you? Clearly you think you know better than I so good luck.

I'm not arguing. I completed it in one rule. Easy peasy. Guess my issue was Switch vs Bulb.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.