Programs and rules

My network of about 50 devices is working well so move on and I have the jist of basic rules. Question is how would write a rule bathroom light on at 100% except after 10pm to 7am it should be 60% and do I have to setup a program say if its after 10pmonly 60% but if you push button it will turn to 100% are these separate programs or a flow in one? Next question if I have a 4 or 6 button scene controller how do I assign one button lets say its bedroom light to turn on if pressed, dim if single pressed and hold, and brighten if double pressed and hold? I see values you can put in if double pressed or single pressed but how do I use the dimming feature. Be happy to watch a video. Now for the sake of discussion a video link would help. Or a wiki. Im all about learning the new format and save good videos or pages for future.
Simple recap in case I wordered it wrong
go to bathroom all turn on 100%
if its after 10pm goto go and sleepy only 60%
Second scenario.
Soon to be wife has a 4 button scene controller next to bed she does not want to get up to disturb me so she has that 4 button controller next to bed no wires just wireless shes not ready to fall asleep but wants to dim lights not turn them off then when shes tired she can just push the button and there off.
This is how a need a example of a program that would work, I think I know enough to tweek it just need a example of something that would work
Thanks Rob

If you didn't discover our YouTube channel, I encourage you to check it out:

For your evening/night dimming, I would leverage the modes.

For setting up the button controller, check out this video:


It would help if you could separate your questions as it makes it easier to answer, I'll give it ago though.

You don't have to set up a rules but I would suggest you do, or at least use "modes" this way you can have a day mode and a night mode. I would assume that this are is not the only one and you will likely do something similar in other areas at the same time. This is where modes work well it's basically a global variable that allows you to say at this time of day your all going to act like X and Y. But at another time your act like Y and Z (will make sense in a bit).

So using mode manager you can say it's in X mode when this happens or at this time.

Then in depends on how your normally triggering it but let's say motion? Using room lighting you can say in room A in mode X trigger the light to 100% but in mode Y set to 60%. In room B (another room lighting instance) you can again do the same but at completely different values should you wish.

For now (as I don't have the app in front of me) you could then set up a basic rule that says when pressed set the light to 100%.

Watch Hubitat new YouTube video :+1:t2: use button controller app for this. Although not sure your device supports double tap and hold? Hubitat only supports double tap, single tap, hold and release. So your device would have to convert to that if it did support it.

1 Like

all well said and will do in morning my confusion is if a rule is created in basic rules then you use mode manager will it conflict or give more traffic or do I just use mode managers. This is where I get confused by so many apps. Do I create a ruel in basic app and refine it or do I use one specific app to do it all? When is a combo of apps necessary? Ill watch the videos but not sure how much they will have to do with programming and as stated earlier many of the videos are outdated as hubitat evolves so much . Which is a good thing!
Thanks Rob

Great question! There is no collision protection for conflicting apps, so that part falls on the user to be aware that conflicting instances could potentially have negative impact. Two apps turning off the same switches is not a problem - some apps only turn off devices if they are on (for example). Also traffic from multiple apps isn't an issue. A hub can have hundreds of rules with no real impact on hub's performance.

The trouble arises when one app will try to turn on a light at the same time another is trying to turn it off.

As for apps, I would start with Basic Rules and then expand to Room Lighting and later Rule Machine, when ready to build more complex automation. Many people use mostly Basic Rules and Room Lighting, and Rule Machine for those complex cases that Basic Rules or Room Lighting cannot accommodate. Mode Manger is the best app to change modes, as it is an app specialized for the task.


As @bobbyD mentions there is no protection for this BUT there is a very handy tool if you do make a mistake. At the bottom of the device in questions page there is a "in use by" section which will tell you what apps the device is connected too.

This is also why it's best to start with a few apps, basic rules is great as it's simple but when you need to move on you can import them to RM. This will give you the same rule but in the RM UI so will help you understand the differences and learn it. There is also ways for people to build you blank rules which you can import and just slot in your devices. (Many ways to skin a cat as they say).

The key thing here is don't try to have one app to rule them all, yes RM can do everything basically but it doesn't do it easily. It's not ment too, it's to get over the edge case where it's worth spending more time working it out and using it. If it can be done quickly and easily in a smaller basic app then use it, it's a lot easier to debug and see mistakes in smaller apps.

So rule of thumb examples, mode manager is designed to change modes how ever you wish, so use that for modes.

Basic rules is a miniature RM but has a "nice flow" so good for a lots of cases.

Room lighting is taking over motion lighting, mode lighting, groups & scene app combining them to one. It's great for basic to quite complex lighting or switch programming. It has a simple UI so easy to see, debug and expand as you wish.

Basically start low and grow as you need, don't run before you walk. The apps are now designed for this and allow you to upgrade the apps easily so there is no harm of extra work with starting smaller. It's just a good way of learning the system.

1 Like

With most button controllers, there are events generated for single press, double press, hold, etc. Those events can be used to turn lights on or off or set to as specific dim level. To my knowledge it's not possible to hold a button and have it dim up or dim down continuously until you release it (Sounds like your coming from the Insteon world, where this was a feature).

It's a standard ZigBee feature but you can do it with anything with a rule inside button controller.

"Hold" start raising or start lowering. (Or a while loop that increases or decreases the value every 0.5 second)

"Release" stop changing these lamps. (Or stop repeating actions on the rule above).

Hubitats new YouTube video just released by @Pete actually shows this exact example (ZigBee).

I am coming from insteon which is where im banging my head. Im so used to their flow, and when U get basic z-wave stuff done I get told theres another app I have to learn then another. Im just trying to come home to a smart home not get a degree in programing. I have so much stuff to do then figure out little stuff like dimming. Im also afraid of conflicts in such this app will not work with that one. or rule should have just been created by this app not other one. etc. eg. I dont want to use br to create a program then mode rule to restrict times then another app to dim because um not sure if they will cause a conflict and headache for me or they will play nicely. With 3 or 4 apps for one switch how will that impact traffic as I have about 50 switches to date. So its difficult to know which app to use for what without spending countless hours trial and error.

1 Like

It might seem overwhelming at first, because Hubitat has an answer for any type of automation you can think of. I wouldn't sweat over conflicting apps or learning every app that Hubitat offers. The Basic Rules app offers a more powerful rule engine than most other commercial platforms on the market, so if you are comfortable with logic based rules, IF this happens THEN do this, look no further than Basic Rules. Let the more advanced apps for much later when you are more comfortable. I can assure you that none of the apps require any "programing," but some of the more advanced apps like Rule Machine use less common workflow logic in order to accommodate more complex use cases.