1.0.14 • Published 11 months ago

homebridge-influxdb2-air v1.0.14

Weekly downloads
-
License
ISC
Repository
github
Last release
11 months ago

Homebridge Influxdb2 Air Static Badge

Homebridge InfluxDB2 Air is a plugin that exposes temperature, humidity, battery level from sensors stored in an InfluxDB v2 database.It collects the latest values using the topic and field as filters in the InfluxDB query, making this data available for integration with Homebridge. This allows for seamless monitoring and control of your sensor data within your smart home ecosystem.

Initially,it was developed to expose SONOFF SNZB-02P sensors, making this data available for integration with Homebridge

logo


Install

Install the plugin using:

npm i -g homebridge-influxdb2-air

Configure

Add to the accessories field of your Homebridge config.json file (default location at ~/.homebridge/config.json) :

{
  ...
  "platforms": [
    {
      "platform": "InfluxDBMultiSensor",
      "name": "InfluxDB Sensor",
      "url": "http://your-influxdb-url",
      "token": "your-influxdb-token",
      "organization": "your-influxdb-organization",
      "bucket": "your-influxdb-bucket",,
      "globalValues": {
        "manufacturer": "Your Manufacturer",
        "serialNumber": "1234567890",
        "model": "Sensor"
      },
      "sensors": [
        {
          "name": "Temperature Room1",
          "fields": [
              "temperature",
              "humidity",
              "battery"
          ],
          "topic": "zigbee2mqtt/Sensor_Room1"
      }
       # Add more sensors here 
      ]
    }
  ]
 } 

Learn more at config_sample.json.

Influx request

from(bucket: "${this.platform.config.bucket}")
        |> range(start: 0)
        |> filter(fn: (r) => r["topic"] == "${this.sensorConfig.topic}")
        |> filter(fn: (r) => r["_field"] == "${this.sensorConfig.field}")
        |> last()
    `;
1.0.14

11 months ago

1.0.13

11 months ago

1.0.11

11 months ago

1.0.10

11 months ago

1.0.9

11 months ago

1.0.8

11 months ago

1.0.7

11 months ago

1.0.6

11 months ago

1.0.5

11 months ago

1.0.4

11 months ago

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago