New to Rule Machine - need help room lights

How does this look? The only thing I can't seem to match perfectly (other than timings which I've adjusted) is in your third line

IF (Private Boolean... yours goes straight into "ON:" whereas mine has a "THEN ON:"

Also not sure if it matters, but your "Else" and "END-IF" are lined up with "Time" whereas mine is indented - why did this happen?

Overall, using modes or RM was much more complicated than I anticipated it would be. I'm sure that over time it will get easier.

So the private Boolean... is that the condition (if motion active and Time between X&Y) rolled into one term? If so, I guess that makes sense for if it is true to turn the lights on in the 3rd and 4th lines, but why at the end of each section do you have to "set" the boolean as false or true?

Thanks again for all of your help! Hope to one day be able to pay this forward.

Instead of if then use simple condition

Yes does matter it's because you didn't use a simple condition.

No it's literally working out if the light is on or off if it's off and the motion goes active turn on but if the light is on don't send another on. It's to keep the network working efficiently.

1 Like

Do you have mode manager installed and do you have presence devices?

  • can you explain the difference between IF THEN and a simple condition?
  • for future reference, the Boolean will check for the device listed in this rule to see whether it is on? I saw one of the options was to choose other rules - if those are selected what happens?
  • Efficient is good, thanks for showing me this!

Yes I have mode manager installed and I set
DAY - 630a
Evening - 6p
Night - 1130p

  • What do you mean by ā€œpresenceā€ devices? Like my phone? I have motion sensors if thatā€™s what you mean?
1 Like

Quite literally it means A simple condition, one condition to do one thing nothing complex is possible or allowed.

Where as IF THEN is infinite conditions with AND OR aswell as the rest of the logic gates then a infinite list of stuff to do under it if the condition falls true or else if it falls false.

In this case yes, if you follow the rule an imaging it running because of the Boolean only gets set to true if the OFF is sent it won't send a ON again until it has been turned off by the rule. This is how HE advise a rule like this to run but I have just spotted a pitfall with it. If you manually turn the light OFF the rule wouldn't send a ON until the detector timed out and the full timer elapsed. (This is a known issue with presence with a switch in the business) but if this isn't what you want you could just use the switch state as a condition (if light switch is OFF) ON switch. That would do the same thing.

Yeah. If you only use modes for stuff like this then doesn't matter but I send the mode to away when I leave and it returns to the correct mode depending on time of day when I arrive. This is because I want my light to turn off as well as my heating to go to away mode on nest to turn on the cameras.

THANK YOU SO MUCH!!
it's up and running, will be testing it out over the next few days!

For my next project, it will be similar but I'll want to add restrictions not to run on certain days of the week, what is the best way to do that?

EDIT

I used "Hubitat Simple Lighting" and set days of the week restrictions. Regarding the "switch to disable" On vs Off? Is that if I hit the designated switch "on" or "off" to disable the rule? And then how long is it disabled for?

Guys nothing for nothing but this is not an easy thing to accomplish anymore. I say this with the upmost respect as we are all here to help one another. But I've been trying to accomplish a similar thing with bathroom lighting and it doesn't seem like the most complex request yet its very difficult to pull off.
I am a wink refugee and have had hubitat for a year and still not set up correctly. Not even close. I used to use wink and stringify(and a few others alexia, google home, ect)and it seemed like I could get almost any automation i wanted super simple. But I just have not been able to "get it" since with hubitat. I haven't migrated to another platform because I know the potential of hubitat as a powerful hub. But it seems the learning curve is steep. I am not new to this as I had wink and stringify going for 4 years with no real limits for what I was doing and even less problems. But it seems here unless you have an understanding of coding you might have a difficult time. I guess I'm a bit frustrated and lost. Not to mention wife is understandably frustrated and she is sooooo patient with me and my smart home shenanigans.
Sorry to the OP I can't help here and for adding post that is not useful to the posted issue. But I do share your frustration and wish you the very best in getting your system squared away.

In post 6 above, I gave a few suggestions that might work without Rule Machine (which is definitely not where I'd consider starting most automations) as well as a couple pointers to the RM docs where you can find several motion-lighting-type examples if you are still interested in trying it that way instead. Otherwise, if you post with what you want to accomplish and what you have tried so far (maybe in a new thread), people here tend to be quite willing to help you out. Good luck!

3 Likes

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