is there a way to find all the possible actions for a device? i hate having to dig through the forums to find what actions (luup.call_action) commmands a device will accept. i am certain there is a file somewhere that defines the functions i can call, but i cannot find them.
Yes, but you have to dig into the device user_data to find it out. Crazy, but that’s Luup for you.
The easiest way to do this is described here: http://wiki.micasaverde.com/index.php/Luup_Requests#invoke
Thus, for example, browsing this URL [tt]http://:3480/data_request?id=invoke&DeviceNum=7[/tt], gives me:
urn:micasaverde-com:serviceId:HumiditySensor1
-CurrentLevel
urn:micasaverde-com:serviceId:HaDevice1
Reconfigure
StressTest
Remove
Poll
ToggleState
SetPollFrequency (PollingEnabled,PollMinDelay)
AllowPairing (Seconds)
-Configured
urn:akbooer-com:serviceId:Netatmo1
urn:upnp-org:serviceId:altui1
SetDebug (newDebugMode)
RegisterPlugin (newDeviceType,newScriptFile,newDeviceDrawFunc,newStyleFunc,newDeviceIconFunc,newControlPanelFunc)
Reset
-DisplayLine1
The formatting is actually better on the browsed page. Failing this you can actually do it programmatically by decoding the JSON data from the HTTP request: [tt]http://:3480/data_request?id=user_data2[/tt]
that works great. since i fat fingered my device number, i founf out that by leaving out the device id it lists all the devices and you can then click them to get the actions.
http://<YOUR_IP>:3480/data_request?id=invoke
thank you so much!
You can also go into the Scene Editor or PLEG Actions editor … and go into the advanced mode …
They will both list the available Actions for any particular device.