Any way to get a routine to dim to 15 percent?


(Mike Kelley) #1

It appears my only choices in dimming bulbs is in increments of 10 percent, but my LED lights go out at 10% and 20% is too bright. 15 percent works (which I can do via Alexa) but I can’t get a routine to do that. Anyway to do this that ends up in a routine? (I don’t want a SmartApp but just something I can activate via my Apple Watch, which is only the routines).


(Tim) #2

Use Rule machine to set up a rule, with mode as a condition. The have the routine change the mode.


(Jason "The Enabler" as deemed so by @Smart) #3

I’m not sure what you have access to on your watch, but I’m going to assume it’s just like the widget, it can only see routines.

To do this you will need a smart app AND a virtual switch.

Step 1) create the virtual switch.
Step 2) install the smartapp rule machine
Step 3) create this rule:

Condition - virtual switch on
Rule - virtual switch on
Action for true - dim bulb to 15%
Action for false - turn off bulb

Step 4) create this routine:

Name - light on
Turn On these lights or switches - choose the virtual switch

Step 5) create this routine (optional)

Name - light off
Turn off these lights or switches - choose the virtual switch

Need help?


(Tim) #4

I take back my comment about mode. Virtual switch is way better.


(Mike Kelley) #5

Thanks – actually both replies are helpful (the more choices the better, since you never know when one might be better under certain circumstances).

I assume creating a “rule” is something I do in the API (and thus something I’ll need to get experience with anyway). I’ll investigate this process.


(Jason "The Enabler" as deemed so by @Smart) #6

Follow the links in my post above to learn all about it.


(Mike Kelley) #7

Yeah, I’ll install the two rule thingees I need, but my question is still “where do I create the rule”" which I suspect is indeed in the API somewhere (IOW, I’m guessing that’s where I need to “run” it and then create a rule which I would “publish” to my system. Somehow).

But I’ll stumble along and see what happens.


(Mike Kelley) #8

Okay, now this long time (3 decades) programmer is feeling like an idiot.

I can get on the API, and I linked the GitHub thingee to my account, and I (sort of) see where you can enter code in, but I don’t see any easy way to go from the links in the Rule Machine post (which show the code) to getting them as an App in my own account. Do I just copy and paste the code into a new App I create?

(Boy, I didn’t have this much trouble with C# – then again, that was a decade ago and I haven’t programmed much except in Lua since).


#9

You will “publish” The rule machine custom code to your own account through the IDE (which I think is what you mean by API in this context) .

Once you have successfully published it there, The new smartapp will appear as a choice in the official SmartThings mobile app, and selecting it there will then open its UI, which is what you will use to create individual rules.

The following gives an overview of the process which should make things much clearer. Then follow the specific steps in the rule machine thread.


(Jason "The Enabler" as deemed so by @Smart) #10

Follow these links as well as what @JDRoberts wrote


(Mike Kelley) #11

Thanks – I needed the “Idiot’s Guide To Installing Stuff” that you posted last (but all links here are really helpful).

I like this kind of stuff, but it does make me wonder about people like… (I was going to say my mother but heck, I’m an old fart myself so really any of my friends who don’t have the IT background that I do). Clearly trying to automate things beyond a “turn on lights at dusk” is not for the non-technical types (heck, I’m basically phone support for all of my neighbors when it comes to even getting their cable to work :>).


(Jason "The Enabler" as deemed so by @Smart) #12

@Kelleytoons
There is a bit of learning curve when you go pay the basic app…

Actually it’s kind of a step curve… It starts just out of reach and go straight up!


(Mike Kelley) #13

I’ll say – I thought I did everything right and nothing worked.

Sigh – I’ll now have to go through the learning process of how to debug (I see I can tell the state of things in the browser site, so I’ll start there and see if I can tell what’s going – or not going – on).


(Jason "The Enabler" as deemed so by @Smart) #14

Post some screenshots of what you’ve got done and we can see where we can help.


(Mike Kelley) #15

I finally got the first part to work – that is, it at least seems to be turning on the light (not so sure it’s turning it to 15% but let’s stipulate it’s doing so).

For the false condition I thought I’d experiment with the delay option so I have it turn the light off after a 5 second delay. When I activate the test switch directly it works properly, but when I put it into a routine it does not work (putting the first part, turning to 15%, works fine in a routine).

So I’m kind of stuck here - the routine itself just turns the switch on or off (depending on the routine) and, as I said, this works fine “manually” (turning the switch on and off by going directly to it). Just not in a routine. Have no idea why.