Skip to content

Latest commit

 

History

History
72 lines (52 loc) · 2.33 KB

Configuration.md

File metadata and controls

72 lines (52 loc) · 2.33 KB

Configuration

Below is a typical configuration for a setup with two sensors. It outputs to the same Domoticz instance, each on their own virtual sensor Idx:

devices = [
  {
    device = ttyUSB0
    type = SDS011
    interval = 90

    domoticz {
      host = domoticz.local
      port = 8181
      pm25Idx = 1
      pm10Idx = 2
    }

    luftdaten {
      id = fijnstof-12345
    }
  },
  {
    device =  ttyUSB1
    type = MHZ19

    domoticz {
      host = domoticz.local
      port = 8181
      co2Idx = 3
    }
  }
]

device

On Linux, serial devices on USB are typically named ttyUSB0, ttyUSB1. On Raspberry Pi, when connecting your sensor to the GPIO header's Rx/Tx pins (pins 10 and 8 respectively), you'll need to use device ttyAMA0. This is the device you need to select. Also, connect ground (GND) and +3.3V connectors,

On Mac, the USB adapters that come with the SDS011 / SDS021 sensors need an additional driver installed. After installation and reboot, you can hopefully see an additional serial device, something like cu.wchusbserialfd130 under /dev. Using the specified driver, set the device value to cu.wchusbserialfa130 or cu.wchusbserialfa120, whatever showed up.

On Windows, this would probably be something like COM4.

type

This should be SDS011 for either SDS011 or SDS021, or MHZ19 for MH-Z19 or MH-Z19B.

interval

The amount of seconds to aggregate measurements and send as one. The average of the collected measurements is taken. Time interval is best effort, don't count on precision.

domoticz

See Domoticz for configuration of Domoticz itself.

  • host, port IP address or hostname and port of the running Domoticz installation
  • pm25Idx, pm10Idx, co2Idx The IDX of the virtual sensors that you added in Domoticz

luftdaten

See Luftdaten for information about Luftdaten.

Set this element (including the curly braces) to send PM2.5 and PM10 values to Luftdaten.

  • id is optional, if you want to override the generated ID, or if no ID gets generated. Check lhe logging for the generated ID.