Code Monkey home page Code Monkey logo

docker-telegraf-netatmo's Introduction

Netatmo script for telegraf

This repository contains a script for retrieving data of a netatmo weather station for use with telegraf.

First obtain API keys and refresh token from the Netatmo developmer website:

https://dev.netatmo.com/

Dependencies

The script requires ruby 2.0 or newer.

Usage

Usage: netatmo [options]
    -c, --config=PATH                Path to configuration file

Example

Here is an example what data is read from the station (with one outdoor sensor):

$ ruby ./netatmo  | json_pp
{
   "station" : {
      "indoor" : {
         "Noise" : 40,
         "Humidity" : 70,
         "Temperature" : 18.7,
         "CO2" : 615,
         "AbsolutePressure" : 982.3,
         "Pressure" : 1017.6,
         "AbsoluteHumidity" : 11.2
      },
      "outdoor" : {
         "Temperature" : 12.8,
         "Humidity" : 98,
         "AbsoluteHumidity" : 10.97
      }
   }
}

The AbsoluteHumidity values are calculated by the script.

Configuration

The script reads credentials from the /etc/netatmo.yml configuration file:

---
client_id: <hex-value>
client_secret: <hex-value>
refresh_token: <refresh-token>
device_id: <station MAC>

Telegraf configuration

You need to configure a exec input in your telegraf.conf:

[[outputs.influxdb]]
  urls = ["http://influxdb:8086"]
  database = "telegraf"

[[inputs.exec]]
  commands = [""/usr/local/bin/netatmo -c /usr/local/bin/netatmo.yml""]
  interval = "10m"
  timeout = "15s"
  data_format = "json"
  name_suffix = "_netatmo"

docker-telegraf-netatmo's People

Contributors

benningm avatar scarletstar avatar dynek avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.