instruction manual i!-Weather i n t e g ra t i o n ! S o l u t i o n s
Software Warranty Agreement GRANT OF LICENSE. AMX Corporation grants to you the right to use the enclosed i!-Weather software program (the SOFTWARE) on a single central processing unit (CPU). This license is for object code only and does not convey any rights to use of the source code. This Agreement does not authorize you to distribute the SOFTWARE. COPYRIGHT. The SOFTWARE is owned by AMX Corporation, and is protected by United States copyright laws and international treaty provisions.
Table of Contents Table of Contents Introduction ...............................................................................................................1 Supported Operating Systems .......................................................................................... 1 Minimum PC Requirements .............................................................................................. 1 Installing i!-Weather......................................................................................
Table of Contents Notification Channels ............................................................................................................. 18 Status Only Channel .............................................................................................................. 19 Commands...................................................................................................................... 19 i!-Weather Virtual Device SEND_COMMANDS .....................................................
Introduction Introduction i!-Weather™ is an application that allows you to retrieve and display current weather with 5-day forecasting from AMX’s weather provider.
Introduction Installing i!-Weather 1. In Explorer, double-click i!-WeatherSetup.exe from the directory window where you downloaded the i!-AgendaPlus install program. 2. After reading the License Agreement, select I Agree and Next to proceed. 3. The Welcome To i!-Weather Setup dialog appears, reminding you to close all Windows programs before going any further. Click Next to proceed. 4.
Introduction i!-Weather Engines i!-Weather is comprised of the following: i!-WeatherEngineMod.tko: This i!-WeatherEngine module is provided to allow custom NetLinx programs to retrieve weather data in a structured programmable format. i!-WeatherEngineTest.axs: NetLinx sample code provided to demonstrate the usage of the i!-WeatherEngine module.
Introduction 4 i!-Weather
Using i!-Weather Using i!-Weather Configuring i!-Weather For Subscription Information Contact AMX At: 800-932-6993, option 3. Entering Location by Zip Code To enter a location by Zip code: 1. Navigate to the "i!-Weather Select Location" page. 2. Select Enter Zip Code. 3. Enter the 5-digit zip code. 4. Press Done. This will return you to the "i!-Weather Select Location" page and display the corresponding city in the "current location" field.
Using i!-Weather Saving Presets After you have selected a location, it is retrieved immediately. To save it as a preset: 1. On the "Select Location" Page, select Save. 2. Select the preset location to save to. The selected preset will now display the city, state / city, country. If you select a previously used preset while save is flashing, it will be overwritten. Changing Temperature Units To change temperature units: 1. Navigate to the "i!-Weather Select Location" page. 2. Select Fahrenheit or Celsius.
Programming i!-Weather Programming i!-Weather i!-Weather is comprised of the following files: i!-WeatherApplicationTest.axs (Application Test/Implementation) i!-WeatherApplicationMod.tko (Application Module Definition) i!-WeatherEngineTest.axs (Engine Test/Demo) i!-WeatherEngineMod.tko (Engine Module Definition) i!-WeatherApplicationTest.axs / i!-WeatherApplicationMod.tko Define Module The entire application functionality of i!-Weather is contained in the i!-WeatherApplicationMod.tko file.
Programming i!-Weather UI_FORMAT_BUTTONS, UI_AUTO_REFRESH_BUTTONS, UI_LIST_SELECT, UI_LIST_CONTROL, UI_LIST, UI_LIST_STATION, UI_BROWSE_METHOD, UI_SCROLLBAR_LEVEL, UI_LIST_INFO, UI_INDEX_FILE_UPDATE, UI_INDEX_FILE_UPDATE_PROGRESS cWEATHER_DATA_ENCODED_BUFFER) Where: mdlWEATHER is a unique module name. i!-WeatherApplicationMod.tko Module Parameters dvWEATHER_IP_CLIENT The device of an available IP port on the NetLinx Master for updating i!-Weather data.
Programming i!-Weather i!-WeatherApplicationMod.tko Module Parameters (Cont.) UI_CURRENT_WEATHER A variable text integer array for displaying weather data to touch panels.
Programming i!-Weather i!-WeatherApplicationMod.tko Module Parameters (Cont.) UI_PRESET_BUTTONS An integer array for the i!-Weather location presets (Var Text & Channel Codes). • 1 - PRESET 1 • 7 - PRESET 7 • 2 - PRESET 2 • 8 - PRESET 8 • 3 - PRESET 3 • 9 - PRESET 9 • 4 - PRESET 4 • 10 - PRESET 10 • 5 - PRESET 5 • 11 - SAVE PRESET (Channel Code Only) • 6 - PRESET 6 UI_FORMAT_BUTTONS An integer array for the i!-Weather conversion formats (Channel Codes).
Programming i!-Weather i!-WeatherApplicationMod.tko Module Parameters (Cont.) UI_LIST_INFO An integer array for the i!-Weather browse info fields (Var Text Codes). • 1 - List Displaying ## of ## Info Field • 2 - Listbox Message Prompt Field • 3 - Listbox Scrollbar Tooltip UI_INDEX_FILE_UPDATE An integer array for the i!-Weather browse list update buttons (Channel Codes).
Programming i!-Weather i!-WeatherEngineTest.axs / i!-WeatherEngineMod.tko To create a custom NetLinx application for use with i!-Weather, you will need to include the i!-WeatherEngine module in your program. The included i!-WeatherEngineTest.axs file demonstrates how to integrate the i!-WeatherEngine module into a program. Define Module The i!-WeatherEngine module is distributed as a pre-compiled NetLinx module.
Programming i!-Weather Structures The following structures contain all the detailed weather data elements retrieved by i!-WeatherEngine module. Any of these elements can be accessed by your program after weather data has been received and decoded.
Programming i!-Weather Request New Weather Data To request new weather data, your program simply needs to specify the zip code or station code, and then generate a PUSH notification on the virtual weather device (vdvWEATHER). The i!-WeatherEngine module receives the request notification, attempts to connect the weather provider, and gets new weather data.
Programming i!-Weather Receive New Weather Data Once the i!-WeatherEngine module receives new weather data, it will send a notification on the virtual weather device. Upon receiving this notification, your program can take the chSTRUCTURE_ENCODED_BUFFER and decode it using the STRING_TO_VARIABLE function to your local weather structure. An example is provided below: //CHECK IN STRUCTURE TO SEE IF QUERY WAS SUCCESSFUL IF(sWEATHER.
Programming i!-Weather A source code example is provided below to demonstrate how to read a particular format: //Read i!-Weather Temperature Format from i!-WeatherEngine IF([vdvWEATHER,VIRTUAL_CHANNEL_TEMP_FARENHEIT]) { nTEMP_FORMAT = TEMP_FARENHEIT } IF([vdvWEATHER,VIRTUAL_CHANNEL_TEMP_CELSIUS]) { nTEMP_FORMAT = TEMP_CELSIUS } Weather data formats can also be changed via the virtual weather device command interface (Refer to the Commands section on page 19).
Programming i!-Weather Channels i!-Weather Virtual Channel Map //Request Channels (DO_PUSH) VIRTUAL_CHANNEL_QUERY_BY_ZIPCODE VIRTUAL_CHANNEL_QUERY_BY_STATION = 1 = 2 //Status & Request Channels VIRTUAL_CHANNEL_TEMP_FARENHEIT VIRTUAL_CHANNEL_TEMP_CELSIUS VIRTUAL_CHANNEL_SPEED_MPH VIRTUAL_CHANNEL_SPEED_KPH VIRTUAL_CHANNEL_SPEED_KNOTS VIRTUAL_CHANNEL_PRESSURE_INCHES VIRTUAL_CHANNEL_PRESSURE_TORR VIRTUAL_CHANNEL_PRESSURE_MILIBAR //Debug Channel VIRTUAL_CHANNEL_DEBUG = = = = = = = = 10 11 13 14 15 17 18 19
Programming i!-Weather Notification Channels The i!-WeatherEngine notification channels are used by the i!-WeatherEngine to send a notification to the parent program that information has been received, or an error has occurred. Upon detecting a PUSH event on these notification channels, your program can decode the weather data structure, or process the error received.
Programming i!-Weather Status Only Channel The status of these i!-WeatherEngine virtual channels can be read, but are only set by the i!-WeatherEngine. Commands i!-Weather Virtual Device SEND_COMMANDS The following SEND_COMMANDS can be sent to the i!-WeatherEngine virtual device (vdvWEATHER) either in the NetLinx code or via a terminal session. A response string will be generated back on the i!-WeatherEngine virtual device (vdvWEATHER).
Programming i!-Weather Examples To retrieve New York’s weather by zip code: SEND_COMMAND vdvWEATHER," ’WEATHER BY ZIP-10101’ " To set the i!-WeatherEngine speed format to knots: SEND_COMMAND vdvWEATHER," ’SPEED-KNOTS’ " To request the i!-WeatherEngine’s temperature format: SEND_COMMAND vdvWEATHER," ’TEMPERATURE’ " The i!-WeatherEngine will respond by sending a STRING on the vdvWEATHER device: SEND_STRING vdvWEATHER, " ‘TEMPERATURE-FARENHEIT’ " Any command unrecognized by the i!-WeatherEngine module wil
Appendix A Appendix A Error Codes The i!-Weather data structure returned contains an ERROR_CODE field. This field can help determine if an error was encounted and whay type of error it is. Error Codes: E01 - Subscription Invalid (Expired) E02 - Zip Not Found E03 - Station Not Found E04 - System Status is Down I01 - System Maintenance W01 - Subscription Expiring Soon W02 - Unregistered Master (DEMO MODE) The first byte in the Error Code detmines the error type. 'E' : Error - no not process weather data.
Appendix A 2 i!-Weather
Appendix A i!-Weather 3
033-004-2618 8/05 ©2005 AMX Corporation. All rights reserved. AMX, the AMX logo, the building icon, the home icon, and the light bulb icon are all trademarks of AMX Corporation. AMX reserves the right to alter specifications without notice at any time. *In Canada doing business as Panja Inc. AMX reserves the right to alter specifications without notice at any time.