The weather forecast service for the Oregon Scientific I600 station hasbeen discontinued as of February 2014, rendering the I300 and I600 weatherstations useless. This article describes how data is being exchangedbetween the Weather OS Windows application and the weather servers. It alsoprovides some hints on howto build your own weather server so you can bringyour I600 station back to life.
1. Abstract
Weather Station Software at AmbientWeather.com. Buy weather stations, wireless weather stations, emergency radios, barometers, hygrometers, lightning detectors. Ambient Weather WS-1001-WiFi, WS-1002-WiFi Download Center. Ambient Weather WS-50 Firmware Download Center. Ambient Weather WS-2000 Download Center. Customer Care.
2. Service Discontinued
My Oregon Scientific I600 weather station has been providing me with weatherforecasts for years. By the end of 2013, however, the service became veryunreliable and instead of fixing the problem, Oregon Scientific issued astatement in February 2014 that the service would be discontinued:
OS Weather Server Discontinuation Notice
We would like to express our sincere apologies to OS Weather server users about the server erroroccurred lately. After investigation, we have diagnosed that there is an irreparable technicalproblem occurred with the server and we hereby regret to announce that OS weather server will bepermanently discontinued, with effective from 19th February 2014.
We are in the process of developing be a new PC Software for our WMR series (please refer to thebelow model list) that will be go on-live on 21st February 2014. Related user can visit our OS weatherwebsite (http://weather.oregonscientific.com/support.asp) for the new PC software download andmore product information.
Frequently Asked Questions
We apologize for any inconvenience caused.
So, if you own an I600 weather station like I do, your only remaining option isto throw it out and buy a new unit. Or is it?
Before Oregon Scientific permanently stopped the service, I did some reverse engineering tofind out how the Windows application communicates with the weather server toretrieve the weather forecast data for the selected cities.
Once you know how data is being exchanged, it is fairly easy to build yourown small web service that provides data to the Window WeatherOS applicationto be uploaded to the I600 unit.
3. Communication Protocol
After some network tracing and packet sniffing on my local network, I found outthat the Weather OS application communicates with http://www.os-weather.com to retrieveconfiguration information and weather data. This server stopped providing forecast data in January 2014. As of April 2014, the server appears to be down permanently.
3.1 Application Startup
When the Weather OS application is launched, it launches the following queries:
http://www.os-weather.com/mds/client_software_info
The client_software_info query is launched at startup or when you select '>Update' from the main window's menu. The following data is returned:
<?xml version='1.0' encoding='UTF-8'?>
None of these download links seem to work anymore. The os-weather.comwebsite is also offline, but part of the content can stillbe seen in the Wayback Machine Internet Archive(the software download links haven't been archived by the Wayback Machine).
The wxfcstsquery retrieves weather data for five specified StationIDs. These correspondto the cities you selected in the 'City' tab in the application's 'Settings...' window.
3.2 Application Configuration
When 'Settings...' is selected and the 'City' tab in the Settings window is displayed,the application retrieves all Region, Country/Area, and City/US Zip data:
Get the region list:
For each selected region, get the country list (e.g. '6' is the region number for Europe):
http://www.os-weather.com/mds/country_area_list/6
For each selected country, get the list of available cities (e.g. '6100' is the country number for Belgium):
When you finally click on 'OK' or 'Apply', the application will have thelist of selected StationIDs for the wxfcsts queries.
3.3 Normal Operation
Every 10 minutes, the Weather OS application queries the weather server fornew forecast data:
http://www.os-weather.com/mds/wxfcsts/14071,16927,1028,4400,6455
4. Data Format
The weather server provides forecast data in XML format. The complete DTD can be found here.
4.1 region_list query
When a region_list query is sent:
The following data is returned:
<?xml version='1.0' encoding='UTF-8'?>
4.2 country_area_list query
When a region has been selected, the region code is sent using the country_area_list query inorder to obtain a list of available countries.
For example: for region code '3' (South America)
The following data is returned:
<?xml version='1.0' encoding='UTF-8'?>
4.3 station_list query
Finally, for each selected country, the countryarea code is sent using the station_list queryin order to obtain a list of available cities in that country.
For example, for countryarea code '3100' (Chile):
The following data is returned:
<?xml version='1.0' encoding='UTF-8'?>
Once we have selected a list of 5 cities, we can now retrieve the weather forecast data.
4.4 weather forecast query wxfcsts
The I600 weather station can display a 5-day weather forecast for up to 5 cities. This datais retrieved using the wxfcsts query. This query accepts multiple stationIDs (as a comma-separated list). To keep things simple,the following example shows the data that is returned for only one stationID (note: '14071' is the stationID for Uccle, near Brussels/Belgium):
The following data is returned:
<?xml version='1.0' encoding='UTF-8'?>
This one requires some more explanation:
4.5 error handling
When an error occurs, the following data structure is returned:
<?xml version='1.0' encoding='UTF-8'?>
5. Build your own Weather Server
Now that we know how the WeatherOS application retrieves forecast data fromthe Oregon Scientific weather server, we can start providing our ownforecast feed by pointing the PC application to our own webserver, whichcontains a collection of scripts mimicking the same behavior.
5.1 Point the WeatherOS application to your own server
To point the WeatherOS application to your own server, open the followingfile on your PC:
C:Program FilesOregon Scientific Weather OSConfig.ini
And look for the entry
Change this to point to your own server, for example:
(server)=myserver.mydomain.com
5.2 Provide your own versions of the Weather Server scripts
To provide the XML structures described in the previous section, you haveto implement the following server commands:
![]()
Generating the XML structures is fairly easy, but you still need someactual weather forecast data. I chose to use the Yahoo Weather RSS Feed.
5.2.1 Compile the list of Cities
The following information is required for a city for which the applicationwill have to provide a forecast:
I have compiled a list of this data for each city that was supportedby the Oregon Scientific WeatherOS application. This list can bedownloaded here. Note to developers: each entrycontains 10 fields, separated by a '@'-sign. This file serves as a datastorethat will be queried by my protoype weather server scripts.
5.2.2 Create the Weather Server scripts
Back when I was researching how the communication between theWindows application and the weather server was working, I createda prototype weather server, consisting of a set of Unix shellscripts that are launched from an Apache webserver.
You can find copies of these scrips below, but first somewarnings:
So here are the scripts and files:
This file contains the datastore with the city information. It goesin directory /var/local/os-weather on your Linux server. The weatherserver scripts all expect to find it there. If you want to put the fileelsewhere, you will have to change the scripts.
This script goes in directory /var/www/mds. Make sure the scriptis executable so it can be started from the apache server. Also,this script writes debug info to the /var/local/os-weather/osweather.debugfile, so make sure that file is writable by your apache user.
Also goes in directory /var/www/mds, must be executable, and writesdebug info to /var/local/os-weather/osweather.debug.
Again, goes in directory /var/www/mds, must be executable, and writesdebug info to /var/local/os-weather/osweather.debug. The extra argument(i.e. the region code for which the script has to provide the listof countries) is passed from the Apache web server to the script viathe Unix environment variable PATH_INFO.
Same remarks as for the previous script: goes in /var/www/mds, mustbe executable, writes debug info to /var/local/os-weather/osweather.debugand takes its additional argument from the PATH_INFO environmentvariable.
The previous scripts just generate lists of region, country/area,and city info so you are able to select your favorite cities in theWeather OS application on your PC.
This script will actually retrieve weather forecast data fromthe Yahoo Weather RSS Feed for each of the 5 cities you selected. Asususal, the scripts goes in /var/www/mds, must be executable, writesdebug info to /var/local/os-weather/osweather.debug and takes itsadditional arguments from the PATH_INFO environment variable, but youknow this already by now.
There are a few things to notice in this script:
5.2.3 Configure your Apache web server
When the scripts are installed in your /var/www/mds directory, and thedatastore file and debug file are available in the /var/local/os-weatherdirectory, the last thing to do is to configure your Apache web serverto make the scripts available:
ScriptAlias /mds/ '/var/www/mds/'
Note: if your Linux server is reachable from the Internet, you mightwant to replace 'Allow from all' with something more restrictive.
5.2.4 Adding your own Cities
The datastore file contains information for all the cities thatwere supported by the Oregon Scientic weather service. I generatedthis file based on the latitude and longitude of each city.
So if you want to add your own city, all you need is its latitudeand longitude and feed them to this generate-entryscript. The script will lookup the associated WOEID and try to compilethe other fields. It will use the first available stationID greateror equal to 20000. For example, my home town:
unix$ generate-entry 50.86 4.69
If no WOEID exists, or if some other information cannot befound, the script will tell you so. If all goes well, you will geta valid entry that can be added to the datastore file.
5.2.5 Things still to do
There are a few things that I didn't investigate yet:
5.3 The result
It took me a couple of afternoons to implement the prototype serverscripts and to get all the mappings between the Oregon ScientificstationIDs and the Yahoo WOEIDs right. I also had to create a mappingbetween the Yahoo weather forecast icons and the Oregon Scientificforecast icons. It's not a straightforward 1-on-1 translation, butI think I got most of it right.
The ultimate goal should be to write a 'real' weather server that canrun as a standalone application on the same Windows system that alsoruns your WeatherOS application. Or use a LAMP or WAMP stackto implement a decent and robust weather server, with the City data sittingin a MySQL database and with the XML data being generated by PHP-scripts.Unfortunately, I will probably never get around to doing that, mainlybecause of a general lack of time, but also because the shell scriptprototype works just fine for me at this moment.However, if somebody wants to take on the challenge to write aweather server for Windows, I hope that the information providedhere will be helpful.
And finally, to prove that the shell script prototype actually works, hereis a picture of what my WeatherOS display looks like again:
Yes, that's a Los Angeles Intl Airport weather forecast for Monday, April 14th, 2014 !
Version 8 Now Available!
![]() Web Camera with Current Weather Uploaded by WV32
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |