forked from robots/4dayforecast
-
Notifications
You must be signed in to change notification settings - Fork 0
mberzak/4dayforecast
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
4-day forecast and 5-day forecast ------------------------ Update: I have analyzed the 5-day forecast application and it uses the same getweather.php script. Thus the same set of scripts should work. This works with Weather station of this kind: http://www.evolveo.eu/cz/pilot This weather station uses windows "4-day forecast" application and external usb transmitter. Since the original asian server deciced to stop working for few days I have written my own implementation of the server. Original service was using "FORECA" as data source. This is highly commercial source of weather data. I deciced to implement it on top of openweathermap.org. It should be easy to change to any other service if you wish. Some things are not working yet, as the data is not contained in the forecast feed and it would be necessary to get data from different feed: - sunrise/sunset times - uv index - probability of percipitation Things that probably need improvement are weather codes. I tried my best to match the OWM codes to codes of the application. Mapping of city codes is magic - foreca and OWM use almost the same city codes. And i have tested it for few cities and it works. (just substract 10000000 from foreca city code to get OWM city code) Also this script implements data caching for at least 4 hours. 4-dat forecast application requests update every 4hours or so. If you find some problem tell me, pathches are welcome! Installation ------------------ On windows: Install apache server with php support. I used WAMP. (http://www.wampserver.com/en/). Place all php files into c:\wamp\www. Register on openweathermap, and retrieve api key. Place the api key into getweather.php script - in the api_key variable: $api_key = 'your key goes here'; Edit (as administrator): %systemroot%\system32\drivers\etc\hosts file. (on standard system C:\windows\system32\drivers\etc\hosts) and add line 127.0.0.1 server1.netinfostation.com save and exit. This will redirect all traffic to the original server to your local computer. Restart the "4-dat forecast" application and it should be done :-).
About
4-day weather forecast server
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- PHP 100.0%