Rule machine advice - moving from webcore

I am currently trying to move my lighting from ST Webcore to Hubitat and wonder what is the best process.
Each of my webcore pistons has multiple actions based on time of day and mode etc using asynchronous execution...

An example of one piston as the following:

  1. Daytime lighting between 10am and 8pm if mode is Home
  2. Evening lighting between 8pm and 10pm if mode is Home
  3. Dimmed lighting from 10pm to 10am if mode is Home
  4. Night lighting if mode is Night
  5. Lights off after x minutes (this is used because i am activating Hue Scenes and need to turn of the physical bulb)

Can this be done with one rule rather than multiple different ones?

No, you will need multiple rules for this. We like to say around here...rules are free! Aside from the effort to set them up, there's no performance issues having multiple rules vs single.

That's fine as long as I know :slight_smile:

I'll get cracking on this then as moving more and more stuff away from ST...

If I want the rule to fire based on 3 conditions i assume i don't need this to be a triggered rule just a standard rule with 3 ANDs?

the conditions for example:

  1. if motion detected
  2. time is between x and y
  3. mode is home

I should clarify...if you set your time windows up as separate modes, you can use the "set dimmers per mode" functionality, and most of this can be done in a single rule. If you want time only and not modes, then multiple rules are needed.

I guess I could change my modes around so I have more of them!

i.e Morning, Afternoon, Evening etc could be created

Correct. A normal rule will subscribe to all of the conditions, so a change in any of the conditions will cause the rule to be evaluated. If you wanted the triggering device to be different than the condition, then you would want to go with a triggered rule. Hope that makes sense...I can describe in further detail if needed.

That's what I recently did. Used to just have Home, Night, and Away. Still have Night and Away, but split Home into Home - Morning, Home - Day, Home - Evening, and Home - Night to take advantage of the dimmers by mode ability. Now have things like this (using Motion Lighting). Same capability exists in Rule Machine as well.

2 Likes

Looks like that's the way I will go then. Currently I'm using virtual switches to mirror my ST location mode but will work on getting my presence sensors and modes moved over to Hubitat before I do the lighting I think!

The trickier bit will be moving my Bed and Night modes, bed is when 1 of us in bed and the other not, night is when we both go to bed. This is based on the power draw of zwave plugs for mine and my wife's phone chargers. I think I may now be able to crack this though as recently got power monitoring working in HE for the plugs we use :slight_smile:

1 Like

That's a cool system! If you can develop some logic to indicate your different charging configurations with virtual switches, you can manage your modes with the built in Mode Manager app.

That is do-able I'm sure. Having to think differently now as I was getting used to webcore...

Still I prefer the HE platform as it seems a lot more reliable that ST

2 Likes

Currently I'm using virtual switches to mirror my ST location mode but will work on getting my presence sensors and modes moved over to Hubitat before I do the lighting I think!

I hope I'm not getting too off topic, but can you expand on how you accomplished this?

I've been having issues with Life360 accurately reporting my presence, so I wouldn't mind using your system until the Hubitat mobile app is released.

Do you have Drive Detection turned on in the Life360 app? This improves presence detection for most.

Yes I do. I think the problem is actually within the built in app on HE (Life 360 Connector), since opening the app configuration and hitting Done seems to reset the presence detection to the correct location. But so far it hasn't been reliable for more than a couple days before I have to reset it again.

I am using Hub Link in HE which subscribes to events in ST.

And I then have a number of virtual switches called "ST Location Mode Away, ST Location Mode Home" etc

In WebCore (ST) I have automations that turn of all the unused switches and turns on the required one when the mode changes. i,e when the mode goes to Away all switches except "ST Location Mode Away" turns off. This is then mirrored in HE.

In HE i then have rules that show fire when one of those switches come on

Also as far as I can tell Life360 is proving pretty accurate in HE

Thank you, I created a new thread to avoid hijacking this one.