OpenSprinkler / OpenSprinkler-Weather

OpenSprinkler weather service used to calculate watering scale for the OpenSprinkler Unified Firmware.
https://opensprinkler.com
63 stars 38 forks source link

Updated Local Weather Provider #82

Closed PeteBa closed 5 years ago

PeteBa commented 5 years ago

Given all of the updates to Weather Service, I've done a re-write of the Local service provider. This brings it into line with things like errCode. It also supports getEToData() and getWeatherData().

@rmloeb I have added an option process.env.LOCAL_PERSISTENCE that, if set, will periodically write the observation queue to disk and restore on restart. This provides a little bit of leeway for maintenance.

@salbahra I've added some tasks for vscode that I can back out if not needed.

rmloeb commented 5 years ago

Thank you very much. Kept me from messing up your superb code with my amateur JavaScript!