[quote=“tb001, post:57, topic:177995”][quote=“Ramias, post:56, topic:177995”]dev_ludl is just a variable name commonly used for the device number in Vera. On the advanced tab for the device get the device number and use that for dev_ludl.
Then go to Apps\Develop Apps\Test Luup code (Lua) and you can test your code and it should trigger your button press.
What app are you referring to with low/med/high?[/quote]
Thanks! I can see I’m going to need to do some searching and play around with lua a bit to get the hang of it–I need to better understand the basics of the nomenclature. I clearly should have tested, as I’ve somehow managed to globally screw up my device settings so they read at 100% and on, when off, and read as off when they are on… After spending the morning setting everything up–arghhh!
On the app, I’m just watching the fan settings on the lutron iOS app as I ramp it through vera. When set up as a dimmer, at 0% in vera, the fan reads off in the app. When I ramp to 10% through vera, the fan moves very slowly and increases in speed with the vera setting, but the iOS app has no reading. If I hit 25%, the app will then read ‘low’.
ETA:
Reading through things and I’m thoroughly confused. I wanted to set up several phantom buttons in Lutron and be able to trigger them from vera either using a virtual switch or motion sensor. I’d ideally like to have more than 6, so don’t think setting up my main repeater as a keypad will work, correct?
In lieu of setting up a keypad on vera, I’m trying to directly send a command to the repeater to activate the button using lua. In this case, would I have a vera device number? If so, would it be the virtual switch device number?
In my scenario, the main repeater is device 1, the phantom button is 5 and I want to turn it on, so I think I should use 3. The device ID for the virtual switch to turn on/off is 180. Does this look correct, or am I totally off base?
luup.call_action(“urn:schemas-micasaverde-com:serviceId:LutronRA2Telnet1”,“SendCommandButton”,{CommandList=“device,1,5,3”},180)
Sorry for all of the dim questions–after managing to flip the signal on all of my lutron devices, I’m wary of just testing random things I think should work![/quote]
It does take a while to get it all figured out. Others were patient with me :).
So think of it this way:
- Your Lutron repeater has a Vera device ID.
- Your Fan (configured as a Dimmer) has a Vera ID.
- They both of RA2 Integration ID’s which are separate (and probably different) than the Vera IDs.
You can use the Virtual Switch to call a scene that runs Luup code. But set all that side for now. We want to make sure you get it working with a single line of code from the test code window and develop apps.
With the phantom buttons, you are having Vera send a signal to the RA2 repeater that will press a phantom button. That is all.
So your code would be like this:
luup.call_action("urn:schemas-micasaverde-com:serviceId:LutronRA2Telnet1","SendCommandButton",{CommandList="device,1,5,3"},[i]veraIDofLutronRepeater[/i])
Vera is sending a command string to the Lutron repeater. That is it. The repeater then figured it out. The command you are sending the repeater is “on device 1 (the repeater itself) with button 5, do action 3 (press)”.
All commands are sent to the repeater by Vera (that is what the “veraIDofLutronRepeater” number is for). But a different command could be something like output,6,1,60 which might mean “Lutron device with Lutron integration ID6, turn on and set the dimmer at 60%”
So once you get that code working in the test window and have it turn your fan on/off (use a button press for a different phantom button to turn the fan off) then create a scene with that code in the Scene Luup code window (don’t forget to save LUA at the bottom). Then you can assign that scene to a virtual switch.