Luup Configuration File

From MiOS
Revision as of 05:04, 13 April 2010 by Javier (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Plugins often need configuration data that is unique to each user. Generally I/O devices will have configuration data, such as the IP address if it's a network device, the baud rate and port number for a serial device, or the IR transmitter to use. This configuration data is never written into your plugin since that would mean having to modify the plugin for each user. Rather, the plugin defines what type of configuration data it needs, and the Luup user interface lets the user specify this information, which gets saved in the Luup configuration file.

You can view your configuration file by opening your web browser and going to the page:
http://myip:49451/data_request?id=user_data&output_format=xml
where "myip" is the IP address of your Vera. We recommend using the Firefox web browser since it has a built-in XML viewer. Alternatively you can change the 'xml' at the end to 'json' to view the configuration file in it's native JSON format, and the web site jsonlint.com will format the JSON data nicely so it's easy to read.

Vera's web-based user interface is the normal way the user specifies configuration data. When the user goes to the 'Devices' tab and adds a device, specifies what room it's in along with other options like the IP address, baud rate, etc., this is all stored in the configuration file. The configuration file also stores the current value of the UPnP variables, like the status of a light switch being on or off. Your Luup plugin has access to all the data in the configuration file.

The configuration file also contains any other user-specific information, like the list of rooms, users, scenes, events, timers, location, and so on.

Personal tools