Stores wheather forcecast data from darkskyapi into a influxdb database
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Stores weather forcecast data from Dark Sky Api into a influxdb database.
Powered by Dark Sky

This information can by used to display forecast data with grafana.

Tip: This blogpost describes the installation and setup for a personal weather chart using influxdb and grafana and step-by-step.


Getting Started

Clone repository git clone


Node and npm

Node and npm are required. See Test your version by

node -v
npm -v

Get the latest npm version with npm install npm@latest -g

Dark Sky API Key

Get your here.
Please note that only the first 1000 API requests you make every day are free of charge.


Please follow the official installation documentation


If you want to visualise the data in a chart I can hardly reccomend grafana.
You can find my dashboard for import in grafana\Weather - Forecast-Dashboard.json.


  1. Enter cloned directory: cd darksky2influxdb and install dependencies npm install
  2. Configure config/default.yml file

Here is an example of default.yml

  debug: true
  cron: '*/15 * * * *'
  key: abcdefghiklmnopqrstuvwxyz1234567
  units: auto
  longitude: -123.41670367098749
  latitude: 47.20296790272209
  database: weather
  username: darkskyimport_user
  password: supersecretpassword!?
Option Description
debug Enables Debug mode and provides additional informations

Type: booleon
Possible values: true,false
cron Programm is repating itself in a given period

Type: string
Possible values: '*/15 * * * *' - every 15 minutes,
'' - running only once
darksky - key get your darksky key here

Type: string
Possible values: abcdefghiklmnopqrstuvwxyz1234567
darksky - units Return weather conditions in the requested units. See

Type: string
Possible values: auto,ca,uk2,us,si
darksky - longitude and latitude Coordinates of forecast location (in decimal degrees).

Type: float
Possible values: latitude: 47.20296790272209 and longitude:-123.41670367098749
influxdb - host Server your influxdb is running

Type: string
Possible values: localhost ,
influxdb - database Name of your Database the forecast data is stored.

Type: string
Possible values: weather , forecast
influxdb - username User with writing privileges on the database
influxdb - password Password of user with writing privileges on the database

Running the Import

Start the import with node importForecast.js If you have given a valid cron interval in the configfile the programm will repeat the import automaticly.


This is coded and tested on a RaspberryPi 3


See also the list of contributors who participated in this project.


This project is licensed under the MIT License - see the file for details


  • This code is originally based on ErwinSteffens project darksky-influxdb. Many thanks to him!