Hi, I’m new here and try to learn how to write luup to make some advanced scenes. After read some posts and the wiki page, I’m able to use call_action to turn on/off my dimmers. Then I found some optional actions and arguments in the S_Dimming1.xml like the StartRampToLevel which has 2 args newLoadLevelTarget and newRampTime. I thought it is about the dimmer level and how long it gonna take to reach that light level. But when I tried to use the call_action to do that, nothing happened. Maybe it is because the optional actions and args are not properly enabled or some syntax issue? Need some help here and any examples are even better. Thanks!
Is this question too simple to answer…
Service files are common to a number of different device types. The fact that an action is defined does not mean that it is implemented for every device. The basic ones shown here generally work though.
The form of various action requests is shown in Luup Scenes Events. Generally it follows this format:
luup.call_action(“”, “”, {= “”},)
Example: luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "50"},123)
The Variable=Value table can contain multiple elements separated by commas. The biggest challenge is usually getting the ServiceID, Action and Variable names correct. These must be exact including case. The lowercase l in newLoadlevelTarget in the example has caught many people. You may find Service IDs, Variables & Actions helpful.