Coder Social home page Coder Social logo

homebridge-influx-evm's Introduction

homebridge-influx npm

A Homebridge plugin that exposes temperature and humidity from an InfluxDB instance. It is collecting always the latest value from a measurement.

Install

Install the plugin using:

npm i -g homebridge-influx

Configure

Add to the accessories field of your Homebridge config.json file:

{
  ...
  "accessories": [
      ...
      {
        "accessory": "Homebridge-Influx",
        "name": "SomeName",  // Name for the sensors

        // Optional names for each sensor
        "sensor_names": {
          "temperature": "Temperature Sensor",
          "humidity": "Humidity Sensor"
        },

        // For influxDB queries
        "schema": {
          "temperature": {
            "field": "temperature",
            "measurement": "air"
          },
          "humidity": {
            "field": "humidity",
            "measurement": "air"
          }
        },
        "influx": {
          "host": "127.0.0.1",
          "database": "homeserver"
        }
      }
    ]
}

Note

The fields in sensor_names are optional. You however need to set at least 1. If you do not supply temperature for instance, no temperature sensor will be registered.

Influx config

The influx configuration object is passed as-is to the influx npm library, so you can use all the options it supports. See here

Influx 2

This plugin is also compatible with Influx 2, however in order to make it work, you need to do 2 things.

Configuration

In the influx part of the configuration, you need to parse in the token.

        "host": "yourHost.com",
        "port": "yourPort",
        "database": "someBucket", //type in the name of the bucket here
        "protocol": "http",
        "password": null,
        "options": {
            "headers": {
                "Authorization": "Token YOUR_TOKEN"
            }
        }

A bucket is mapped to a database. In order to make Influx aware of this mapping, you need to create it. You do this via terminal by running:

influx v1 dbrp create --db *BUCKET_NAME* --rp *BUCKET_NAME* --bucket-id *BUCKET_ID* --default

homebridge-influx-evm's People

Contributors

chileocat avatar

Watchers

 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.