Help me with my lighting logic? It's not that complicated I think, I'm just new 😅

Quick note: I'm actually going to implement this via webCoRE, as I believe it can implement the same logic as rules machine it seems, but just have different UI's essentially. And I do like the UI of webCoRE more after playing with it some. But my question is more about general logic / flow of creating these rules, so I thought it'd be fine to post here.

Hey all,

I'm just looking for some help determining what logic flow I should use to implement my light 'flows', as I'm fairly new to hubitat in general still, so I'm not aware of the breadth of options I have at my disposal.

These are the core things I'm trying to make occur:

  • Lights change at different parts of the day.
  • If I turn on a light, depending on the part of the day that it is, it will turn on to the appropriate level / temperature for that part of the day.
  • If I change the light's temperature or brightness, then it will not care about what part of the day it is for like an hour and a half or so. This is so if I want to make it brighter in some area of the house for an evening, it doesn't switch to any of the evening modes sometime in the next hour, so that I'd have to manually change it again.

So generally the first two seem straightforward. I can use modes and transition them during certain parts of the day using mode manager for bullet one. And then I can just make a rule for every light so that when the mode changes, they adjust brightness and temp. And then for bullet two, when a light turns on, they should already have the temp / brightness saved from the previous rule. So I'm just turning it on or off.

The third one is the one that I'm unsure about. If I change a light's temp or brightness, I guess I need to store a variable somehwere, to know that it's been changed from normal. And this should time out after an hour and a half or so. And I suppose this variable needs to be checked in the first rule above, so that when it goes to transition during the mode change, it checks this and might actually not transition as a result.

Any thoughts on accomplishing this? It seems like a lot of rules, as each light would need it's own variable that it would need to check against. I'm also not sure if I can store a variable with one rule, that is checked / read in another rule.

In general I'm curious about a solution using this sort of methodology as I think it would teach me more about rules machine. But I also am open and interested in other ways to accomplish this in ways that I simply don't know about yet.

For your first two, you should look at Room Lighting.

2 Likes

I use Virtual Prestaging ([PRERELEASE] Virtual Prestaging) by @mbishop to solve this problem. While I do use Rule Machine, it would work with webcore too. The basics is to manipulate a virtual bulb and its settings apply to actual bulbs when they are turned on. This would work for options 1 and 2. To help with option 3, you could develop scenes that activate on a switch. This switch could then disable the virtual bulb when "on." This would give you the new temporary settings as desired. To reset you would just need to turn off the scene switch and your bulbs would reset to whatever the current virtual bulb settings are. This would allow for the virtual bulb to continuously being modify such that if your scene happened during a mode change, the real life bulb would still be in the correct state after the scene was turned off.

1 Like