Code Monkey home page Code Monkey logo

weewx-influx's Introduction

influx - weewx extension that sends data to an influx data server
Copyright 2016-2017 Matthew Wall
Distributed under terms of the GPLv3

===============================================================================
Installation

1) run the installer:

wee_extension --install weewx-influx.tgz

2) enter parameters in weewx.conf:

[StdRESTful]
    [[Influx]]
        host = HOSTNAME
        database = DATABASE

3) restart weewx:

sudo /etc/init.d/weewx stop
sudo /etc/init.d/weewx start


===============================================================================
Configuration

A minimal configuration requires only a host and database.

Use host and port, or server_url to specify the influx server.

A username and password are required if authentication is enabled on the
influx server.

Here is a complete enumeration of options.  Specify only those that you need.

[StdRESTful]
    [[Influx]]
        database = DATABASE
        port = 8086
        host = example.com                         # specify host OR server_url
        server_url = https://example.com:443       # specify server_url OR host
        username = USERNAME
        password = PASSWORD
        tags = station=A,field=C                   # optional
        line_format = (multi-line | single-line)   # default is single-line
        obs_to_upload = (all | none)               # default is all
        append_units_label = (True | False)        # default is true
        augment_record = (True | False)            # default is true
        unit_system = (US | METRIC | METRICWX)     # default is database system
        [[[inputs]]]                               # optional
            [[[[observation1]]]]
                units = degree_F                   # optional for each obs
                name = label                       # optional for each obs
                format = %.2f                      # optional for each obs
            [[[[observation2]]]]
                units = degree_F                   # optional for each obs
                name = label                       # optional for each obs
                format = %.2f                      # optional for each obs


===============================================================================
Line formats

Influx defines two line formats, multi-line and single-line.

The first form is multi-line:

name0[tags] value=x ts
name1[tags] value=y ts
name2[tags] value=z ts
...

The second form is single-line:

record[tags] name0=x,name1=y,name2=z ts

[StdRESTful]
    [[Influx]]
        line_format = multi-line # options are multi-line or single-line


===============================================================================
Input map

When an input map is specified, only variables in that map will be uploaded.
The 'units' parameter can be used to specify which units should be used for
the input, independent of the local weewx units.

[StdRESTful]
    [[Influx]]
        database = DATABASE
        server = localhost
        port = 8086
        tags = station=A
        [[[inputs]]]
            [[[[barometer]]]]
                units = inHg
                name = barometer_inHg
                format = %.3f
            [[[[outTemp]]]]
                units = degree_F
                name = outTemp_F
                format = %.1f
            [[[[outHumidity]]]]
                name = outHumidity
                format = %03.0f
            [[[[windSpeed]]]]
                units = mph
                name = windSpeed_mph
                format = %.2f
            [[[[windDir]]]]
                format = %03.0f

weewx-influx's People

Contributors

matthewwall avatar

Watchers

 avatar  avatar  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.