How can VisualWeather be used to get data from a weather station to a website?

There are three steps for transferring data from a weather station to the Web:

  1. Collect the data from the weather station.
  2. Format the data into reports and screens.
  3. Move the formatted screens and reports to a location that can be accessed using the Internet, such as a website.

Step 1 (collecting the data) is accomplished when the station is created in VisualWeather. The last screen in the setup process is the Scheduled Collection screen. There is a checkbox for enabling scheduled collection and a place to indicate the scheduled collection interval. If the box is checked and the VisualWeather program is running, once every interval the software will access the station, collect the data, and store it in the VisualWeather database.

Step 2 (formatting the data) is done automatically. When data is collected, the Passive Monitoring screen is automatically updated with the new values. If batch reports are generated on a schedule, those are also done automatically.

Step 3 (moving the formatted data) is a little more complicated because several elements are required. The first needed element is a place–a location on a web server–where files can be put for later access via the Internet. This requires two things:

  1. There must be a location–disk space on a server–where the VisualWeather program can send the report and screen files. The server will be the host for the files. When Internet users browse to the website’s URL address and request the files, the server will provide them.
  2. There must be an account on the server. VisualWeather sends files to a server using FTP (File Transfer Protocol), which requires that the program have an account with permission to put files on that server. The FTP process requires:
    • the URL (the address) of the server where the space is
    • the user ID of an account that has FTP access to the website (often this can be anonymous)
    • the password for the account
    • the FTP protocol that VisualWeather should use to transfer the files via FTP
    • the destination folder (or the remote folder) on the server where the VisualWeather files will be stored

After obtaining a location on the server to put the website files and an account on the server to transfer the files via FTP, the next step is to set up the remote location and the VisualWeather program so that they can operate automatically.

Setting up the remote location requires the transfer of some files via FTP from VisualWeather to the remote location. This process only needs to be done once. The VisualWeather Help describes it this way: “Note:  In order to set up the web page, the user will initially need to copy default.htm and the working directory\Web\yui directory to the FTP location. These will not be copied automatically.”

For example, if the working directory on a computer is C:\Campbellsci\VisualWeather\, the files that need to be sent to the remote site (the “yui” folder and the “default.htm” file) are stored at C:\Campbellsci\VisualWeather\Web\.

The yui directory contains all of the javascripting called by the default.htm file used to set up the page on the website and to handle the page features (such as menus and tabbing). Note: It may be helpful to rename the default.htm file to index.htm on the website so that it loads automatically when visitors browse the site.

After the default.htm file and yui folder are copied to the website, the javascripting contained in them will automatically handle the display and formatting each time the data is collected.

The final step is to get the web output enabled and the FTP process going. This can be done using the Web Output Options screen:

  1. On the main VisualWeather screen, click the Tools menu and select Web Output Options….
  2. Check the Web Output Enabled box. This will cause VisualWeather to create the components for use in the website screens, such as chart and report images.
  3. Do not change the default location listed in the Local Output Folder field.
  4. Under Output Images Of, select Station Data Screens.
  5. On the lower half of the screen, check the FTP Enabled box. Fill in the address of the website and the ID and password needed to transfer the data from the local output folder to the website via FTP.
  6. Click the OK button.
  7. When exiting the Web Output Options screen, there will be a message indicating that the window needs to remain active for the transfer to work.
  8. Do not close the VisualWeather and data screen; however, they can be minimized.

Este foi útil

FAQs Início