Skip to content

Collect weather data from Dark Sky API and store it to farmOS #99

@petteripitkanen

Description

@petteripitkanen

Accurately detecting weather warnings for rain, frost and drought depends on recent weather data (#2, #98). Make powerplant server to poll the Dark Sky API every 5 minutes and store the data by sending it to farmOS sensor listener interface.

For now the weather variables that we are interested in are temperature and rain. Temperature should be in celsius, that looks easier for frost detection. For now rain should be 0 if there is no rain and 1 if there is rain.

Include the timestamp property when sending temperature and rain to farmOS, when we are later processing the data it needs to be relevant to powerplant's clock.

Configure garden location in secrets.example.js in variables LATITUDE and LONGITUDE.

Easiest way to install farmOS seems to be with Docker, see https://farmos.org/development/docker/, for example on Debian:

$ apt-get install docker-compose
$ mkdir farmos; cd farmos
$ wget https://raw.githubusercontent.com/farmOS/farmOS/7.x-1.x/docker/docker-compose.development.yml
$ mv docker-compose.development.yml docker-compose.yml
$ sudo docker-compose up

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions