PDA

View Full Version : Girder 5 Manual



JohnHind
June 11th, 2007, 05:48 AM
I'm working on an update of the Girder Manual and help files for Girder 5. Since many of you involved in the Beta will have more experience than me, I wanted to share "work in progress" so you can help me with positive criticism, comments about anything I've missed and need to cover etc. Also this should help new people coming aboard the beta with an early view of the documentation.

To get started here is a draft of the "quick start" section for the Component Manager:

Component Manager

The new Component Manager in Girder 5 replaces the Automation features of Girder 4. It provides a generalised system for interacting with automation devices connected to your computer and with data sourced from the internet. You tell Girder about the devices you want to control, giving them names which mean something to you, and Girder automatically generates control panel web pages on its built-in web server. Girder “abstracts” the way information and controls on different types of device are represented making it a lot easier to customise your own control panels and automation systems.

Quick Start

To demonstrate the power and general concepts of the Component Manager, we will use an example that will work on most setups. The only external requirement is a working internet connection.

Start by bringing up the Settings dialog (File|Settings), select the General item in the Main list and the Location tab. In most cases Girder will have determined your approximate location from your IP address. This may be the location of your Internet Service Provider rather than your own location, but usually it will be close enough. If not, press Edit and enter your ZIP code (in the US) or else enter the latitude and longitude directly (you can obtain this using a GPS unit or Google Earth).

Next bring up the Plugins section (also on the Main list) and select the Plugins tab. Ensure that the WebServer plugin is checked in the list of plugins. Next visit the WebServer tab and ensure that the WebServer Enabled is checked and that the Port remains at the default, 80.

Leave the Settings dialog open and select the Device Manager item from the Automation list. Now open the Component Manager dialog as well (File|Component Manager on the Girder main menu). In the Component Manager list, select Component Manager. Look down the Installed Components list and highlight the SunClock component. Press the Enable button. Notice that Enabled Components list now contains both the SunClock component and the SunriseSunset component. This is because the SunClock component informed Girder that it requires the SunriseSunset component to work. You can enable the SunriseSunset component without SunClock, but not the other way around.

Next check back on the Settings dialog, Device Manager. In Select Device, select Girder\SunClock. Press the Edit button and overtype Girder in Location with World and then press OK. Notice the Controls list – this lists the variables provided by the device, in this case four tables containing images of various sizes. You can get more information about the controls by pressing the Print button and viewing the result in the Interactive Lua Console.

Return to the Component Manager dialog and select the SunClock item from the Miscellaneous list. The SunClock is a data provider component which serves up continually updated maps of the earth with areas of night and day shown according to the current time and date. A sample is shown on this page. You can set the interval at which the images are updated and you can also set the range of different sized images that will be served, up to a maximum width of 2047 pixels (you need to execute Tools|Reset Lua Scripting Engine to see changes to the list of image sizes).

Start you favourite web browser and navigate to http://localhost/dmex/. At the top right of the page, click on the All Locations link and select World. Click on the home tab at the top left of the page. You should now see the sun clock in the various different sizes. The clock updates in real-time and you can see the world rotate through night and day (with patience!).

On the Girder main window (if you have not already done so, execute View|Switch to Expert Mode) create a new GML file or add a Group to the current one. Drag a “Device Manager|Generic” action from the Actions list onto the group. In Select Device, select the World\SunClock device. Notice that the image sizes are all available for selection in Select Control, but because they are read-only controls there are no actions available for them. Other Devices provide writable controls and the Generic action can be set to change these. The Device Manager actions group also provides some more specific actions suited to particular types of Device. There are also Device Manager events available for use in the tree in the Lua:Device Manager event device.