MyNixOS website logo
option

services.mqtt2influxdb.points

Points to bridge from MQTT to InfluxDB.

Declarations
Type
list of (submodule)
Default
[
  {
    fields = {
      value = "$.payload";
    };
    measurement = "temperature";
    tags = {
      channel = "$.topic[3]";
      id = "$.topic[1]";
    };
    topic = "node/+/thermometer/+/temperature";
  }
  {
    fields = {
      value = "$.payload";
    };
    measurement = "relative-humidity";
    tags = {
      channel = "$.topic[3]";
      id = "$.topic[1]";
    };
    topic = "node/+/hygrometer/+/relative-humidity";
  }
  {
    fields = {
      value = "$.payload";
    };
    measurement = "illuminance";
    tags = {
      id = "$.topic[1]";
    };
    topic = "node/+/lux-meter/0:0/illuminance";
  }
  {
    fields = {
      value = "$.payload";
    };
    measurement = "pressure";
    tags = {
      id = "$.topic[1]";
    };
    topic = "node/+/barometer/0:0/pressure";
  }
  {
    fields = {
      value = "$.payload";
    };
    measurement = "co2";
    tags = {
      id = "$.topic[1]";
    };
    topic = "node/+/co2-meter/-/concentration";
  }
  {
    fields = {
      value = "$.payload";
    };
    measurement = "voltage";
    tags = {
      id = "$.topic[1]";
    };
    topic = "node/+/battery/+/voltage";
  }
  {
    fields = {
      value = "$.payload";
    };
    measurement = "button";
    tags = {
      channel = "$.topic[3]";
      id = "$.topic[1]";
    };
    topic = "node/+/push-button/+/event-count";
  }
  {
    fields = {
      value = "$.payload";
    };
    measurement = "tvoc";
    tags = {
      id = "$.topic[1]";
    };
    topic = "node/+/voc-lp-sensor/0:0/tvoc";
  }
]