Don’t forget to jumper the pins so you can take advantage of the Mega’s hardware serial port. I know how you do this as pictured below. I don’t know why
If you’ve managed to load the app and device handler software correctly, and published all three to yourself, you should see Lutron Gateway when you go to the Marketplace under “My Apps”
Select the the app and you’re greeted with this screen.
Simple enough, just fill in the blanks and get going right? Well, let’s see. The gateway should be right there since you’ve loaded the code but it might not be if you didn’t publish it to the actual Smartthing device.
And now it gets tricky.
When you select the Remove Button, any momentary switches are listed. This concerned me because I had no idea what this was used for. (I still don’t but was able to calm my superstitious howling by creating a virtual momentary switch in the IDE then selecting that.
OK hyperbolic crisis avoided.
Now the section titled “How many Lutron devices?” seems easy enough. And this is where the madness began. You see I have a habit if selecting the “Done” in the top right corner. When you enter the number of devices, and press that done you get the classic red bar of “You’ve Made A Mistake”
In the interest of saving someone all sorts of time let me tell you. If you’re thinking about pressing the blue “Done”, don’t. The only “done” you should be selecting is the one that shows up on your virtual keyboard. When you press the keyboard “done” it triggers the app to build the rest of the screen that gives you the fields to fill in.
I’m not proud of the fact that it took me two days to, out of desperation, try the keyboard “done” but I reveal this fact for any other RadioRa folks looking to set this up.
Once you hit the right done, you’re presented with a set of fields for each.
Lutron Command and Device name #x
Note, Lutron knows you want to set a dimmer level when it receives the serial characters SDL and for a switch it is expecting SSL.
The actual formats for the serial strings are:
For a dimmer SDL,NN,XXX where N is the device number and X is the brightness level from 0 to 100.
For a switch SSL,NN,YYY where N is the device number and Y is either the word OFF or ON
In “Lutron Command,” you’re going to enter “SDL,” and the number of the device you are working on. So for device 1, you’d enter “SDL,1” and “SDL,2” for device 2 and so on. If device 3 is a swtich, you will enter “SSL,3”
You’ll see in the example below how the numbers correspond.
If you fill these in and you have less than 32 dimmers and switches, you’re done. Enjoy the coolness that is “Alexa turn on kitchen cabinets” or whatever you’ve called your lutron lights. You’ve been waiting for this for a long time and it’s awesome.
Next up, modifying the code to handle a second system.