Luup Requests

From MiOS
Revision as of 16:26, 22 January 2010 by Guessed (Talk | contribs)

Jump to: navigation, search

In addition to sending requests using standard UPnP, you can also do most things using a simple HTTP requests. Use the built-in URL data_request, and pass the following on the URL:

  • id the id of the request,
  • output_format the format in which you want a response as json, xml or text.

Not all requests support all output_format options. Here is a list of requests:

Contents

user_data

Example: http://ipaddress:49451/data_request?id=user_data&output_format=xml

This returns the configuration data for Vera, which is a list of all devices and the UPnP variables which are persisted between resets as well as rooms, names, and other data the user sets as part of the configuration.

user_data2

Example: http://ipaddress:49451/data_request?id=user_data2&output_format=xml

Similar to user_data.

lu_status

Example: http://ipaddress:49451/data_request?id=lu_status&output_format=xml

Or for a specific device: http://ipaddress:49451/data_request?id=lu_status&output_format=xml&UDN=uuid:4d494342-5342-5645-0002-000000000002 or http://ipaddress:49451/data_request?id=lu_status&output_format=xml&DeviceNum=6

This returns the current status for all devices including all the current upnp variables and the status of any active jobs.

lu_actions

lu_device

This returns all the XML with all the UPNP device description documents. Use: http://ipaddress:49451/data_request?id=lu_device&output_format=xml&DeviceNum=x or &UDN=y to narrow it down. Then when you see the service URL's, like <SCPDURL>/luvd/S_HVAC_UserOperatingMode1.xml</SCPDURL>, you can view them with: http://ipaddress:49451/luvd/S_HVAC_UserOperatingMode1.xml

lu_file

lu_lua

lu_action

Example: http://ipaddress:49451/data_request?id=lu_action&output_format=xml&DeviceNum=6&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=1

Sends a UPnP action.

lu_variableset

http://ip:49451/data_request?id=lu_variableset&DeviceNum=6&serviceId=urn:micasaverde-com:serviceId:DoorLock1&Variable=Status&Value=1

lu_variableget

http://ip:49451/data_request?id=lu_variableget&DeviceNum=6&serviceId=urn:micasaverde-com:serviceId:DoorLock1&Variable=Status

lu_reload

Resets the Luup engine with any new configuration settings.

lu_alive

Return OK if the engine is running.

lu_finddevice

Return the device id, UDN, device type of the first device that matches all the parameters passed on the URL: devtype, ip, id

lu_childdevices

Returns a list of child devices in the form devicenum=id\n ... Pass DeviceNum on the URL for the parent device

Personal tools