Luup Configuration File

From MiOS
Revision as of 16:51, 12 June 2009 by Micasaverde (Talk | contribs)

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

Often times plugins 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, and the i/r transmitter to use. This configuration data is never written into your plugin since that would mean the plugin needed to be modified for each user. Rather, the plugin defines what type of configuration data it needs, and the Luup user interface let's 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. Use 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