Official Site | Support | Changelog
This script is used by OpenSprinkler Unified Firmware to update the water level of the device. It also provides timezone information based on user location along with other local information (sunrise, sunset, daylights saving time, etc).
server.js is the primary file launching the API daemon.
routes/*.js contains all the endpoints for the API service. Currently, only two exists for weather adjustment and logging a PWS observation.
Installating a Local Weather Service
If you would like to choose between different Weather Providers (currently OpenWeatherMap and DarkSky are supported) or use your local PWS to provide the weather information used by OpenSprinkler then you can install and configure the Weather Service on a device within your own local network.
You will need a 24x7 "always on" machine to host the service (this can be a Windows or Linux machine or even a Raspberry Pi device) provided it supports the
For detailed instructions on setup and configuration of a local Weather Service running on a Raspberry Pi then click here
Connecting a Personal Weather Station to a Local Weather Service
If you are running a local instance of the Weather Service then you may be able to send the data directly from your PWS to the Weather Service avoiding any "cloud" based services. The weather data can then be used by the Weather Service to calculate Zimmerman based watering levels.
Options for PWS Owners
1 ) PWS supporting RESTfull output
Some PWS allow the user to specify a
GET request to send weather observations onto a local service for processing. For example, the MeteoBridge Pro allows for requests to be specified in a custom template that translates the PWS weather values and units into a format that the local Weather Service can accept. If available, the user documentation for the PWS should detail how to configure a custom GET request.
For more information on the RESTfull protocol click here
2 ) Networked PWS that support Weather Underground
Many PWS already support the Weather Underground format and can be connected to the user's home network to send data directly to the WU cloud service. For these PWS, it is possible to physically intercept the data stream heading to the WU cloud and redirect it to the Weather Service server instead.
To do this intercepting, you place a physical device - such as a Raspberry Pi - in-between the PWS and the home network. It is this "man-in-the-middle" device that will look for information heading from the PWS toward the WU cloud and redirect that information to the local Weather Service.
For more information on configuring a Raspberry Pi Zero W to act as a "Man In The Middle" solution click here
3 ) PWS Supported By WeeWX
The WeeWX project provides a mechanism for OpenSprinkler owners to capture the data from many different manufacturer's PWS and to both store the information locally and to publish the data to a number of destinations. OpenSprinkler owners can use this solution to send their PWS weather observations onto a local Weather Service server.
For more information on the "WeeWX Solution" click here
4 ) Solutions for Other PWS
- Davis Vantage: a solution for this PWS has been kindly provided by @rmloeb here