Rule Machine - Get peer assistance here with setting up rules

then I get this:

Why are you doing this in the simulator, instead of in your system?

Ha, and now I understand what publish is for.

Private Boolean.

I get the logic but for some reason I can’t grasp how to apply this so physical button press disables motion off in a rule (vs. utilizing a virtual switch)

I believe the instruction comes from a trigger…from there I’m not putting it all together.

Does someone have an example?

Hi,

I would like to change one of my bulbs’ color according to weather state. More precisely, according to the rain possibility.
(not the temperature but weather state - like clear, rainy, cloudy etc.)

I already have weather station device in my setup.
But I don’t know how I can trigger a rule according to weather state.

Besides weather station, I have another custom app which I added some codes to get weather state from weatherunderground. But I don’t know how to set a bulb’s color (or trigger another event from there)

Can I do this with rule machine ?

No. Rule Machine does not support any weather conditions.

Hi, I’ve tried researching as much as I could but I still haven’t got this one figured out. If someone could help I’d really appreciate it.

I currently have a rule created that if the sensor detects motion between 12am-5am to set the lights to 10%. What’s happening is if I go into the room and manually increase to 100% it drops it back down to 10% once the motion sensor cycles after a minute or so. How can I cancel this rule temporarily just using the switch.

I’ve tried using switch to disable and selecting that switch but it seems to either cancel the rule completely or just not work. I am currently using a iris motion sensor and GE dimmer.
Thanks

Hi, can you post a screen shot if of your rule? But, I’m going to give this a shot because I’m pretty sure what’s wrong.

Oh, first, how long is the timeout on your motion sensor?

The reason I ask is this. When the motion sensor detects motion it sets the light to 10% from what ever it already was. When you manually adjust and then when the motion sensor times out you are the rule is reset to false. Well, when it detects you again, it just runs the actions for true and sets the lights to 10% again. This is what it is supposed toto do.

So, what you need is an override switch. Like you guessed.

Are your lights smart bulbs? An in wall dimmer? How are you adjusting them?

Ok, first you will need to create a virtual switch in the api. I would name it “whatever the room is override”.

When you tell me how your lights are controlled I can figure out how to set this up.

Are you using the Amazon echo in that room?
Do you have a Minimote?

Edit: duh! I totally missed the part about using the GE dimmer. When you installed this dimmer, does it use a neutral wire? Did it come in a box our a plastic blister pack?

@mrmrmrmr
If you know how to get the weather data that you want and are able to do something with it outside of Rule Machine, and if the subset of possible weather condition states is reasonably small, you may be able to do something with virtual switches.

e.g. If you know that you have 16 possible weather states (sunny, partly sunny, mostly sunny, cloudy, partly cloudy, mostly cloudy, clear (night), raining, sleeting, snowing, hailing, foggy, windy, t-storms, showers, other?), you could create 16 virtual switches, and name them accordingly for the naming convention in your HA environment.

This grouping of virtual switches will act as an input mechanism for getting weather data inside of Rule Machine. When the state changes, turn the virtual switch for the associated state to ON.

Then, configure rules in Rule Machine to monitor the ON/OFF state of the virtual switches (i.e. Rule Machine doesn’t care that the switch is just a switch. You, the user, know what state each virtual switch represents, and you’re the one making the rules), and do things based on those switch ON/OFF states; like your light bulb color changing scenario.

I know it leads to having bunches of virtual switches in your device list (especially if you use this same technique for other types of automations), but so what?

Pay no attention to the man behind the curtain. :slight_smile:

p.s. I assume the moment I post this, somebody will probably show why my idea sucks :slight_smile: and will give us a real solution, but in the meantime, I think this is at least feasible.

1 Like

I’ve solved my problem directly adding the color change function to weather forecast application.

But I am still interested in virtual switches and going to a solution with rule machine.
How can I create those virtual switches ?

I’d like to expand on this rule.

Turn on a light switch at sunset and keep it on until 10pm. If the TV is drawing power at 10pm leave the light switch on, otherwise turn it off. If the light switch stays on after 10pm because the TV is drawing power, turn off the light switch 10 minutes after the TV stops drawing power.

If the light switch is off after 10pm and a motion sensor deactivates motion turn the light switch on for 10 minutes. If during that 10 minutes the TV starts to draw power then leave the light on until the TV stops drawing power and then turn the light switch off 10 minutes later.

Thanks for looking into this,

This is in a bathroom and I do not have access to my echo in there, or a minimote unfortunately.

I am just using the GE dimmer from clamshell packaging without a neutral. The motion sensor is the Iris centrelite 2, and I believe the timeout is 1 minute. I’ve already gone ahead a created that virtual switch, I’m just unsure what to do with it.

Here is my current rule (I realize I could have written it a little more efficient but it was getting the job done)

Ok, I use several if these dimmers as well and they are very much a pain because of the lack of a neutral. They can sometimes take several minutes, if ever, to report to the hub what the current status is.

But. I know how to work around this and get as close as possible to what you want.

I have some questions:

  1. during the hours of this rule, how long are you normally keeping the light at a different level than the rule?
  2. I noticed in the rule there is not a turn off, do you physically turn off the light when you leave?

@mrmrmrmr
I have to take off for a while, but I think this may be the thread you need for learning how to create a virtual switch…

If you’ve poked around in the IDE at all yet, this will be super-easy.

If not, you’ll need to create an account here…
http://docs.smartthings.com/en/latest/getting-started/up-and-running.html#register

Then go log in here…
https://graph.api.smartthings.com/login/auth

Then follow the instructions in the first link.

Let me know how it goes…

1 Like

I’d say around 20 minutes and yeah we usually just turn them off manually in this time frame.

Ok. I’ll set this up for you. I’ll post detailed directions on how to set it up. It’s going to be a couple of hours, I’m on the interstate traveling right now.

No problem! I appreciate it!

I’m looking at a rule where, when a presence sensor arrives the hall light is switched on, if off. Then it stays on for a given period of time and then switches back off. If the light is already on then it stays on.

I’ve worked out the delayed off for when a light is motion activated, as when motion stops you can delay the ‘off’. However i can’t work out how to do this for when the presence has ‘arrived’

Create a conditional trigger.

Trigger - sensor arrives
Conditions - hall light off
Actions for true - turn on light, pending off
Actions for false - leave blank

1 Like

Thanks, I was unaware you could select 2 parameters in the ‘control switches, capture/restore’ section.

So i select the switch in the ‘turn on these switches’ at the top, then the delay and off is in the section 'Turn on or off these switches after a delay, pending cancellation(default is off). Is my understanding correct?