Omron D6T

Integration Key: omronD6t

The Omron D6T lineopen in new window of thermopile sensors measure a matrix of temperatures in front of their lenses and can be used to detect human presence, even when stationary. This is done by analyzing the temperature readings for localized peaks, i.e. certain spots have a notably higher temperature than the rest.

This integration will provide a sensor that contains a count of people in the room. It also includes their coordinates (relative to the sensor view) in the sensor attributes. Note that due to the low resolution of the D6T sensors multiple people can only be recognized as such if they are positioned at different ends of the sensor field of view.

Requirements

TIP

Omron D6T hardware needs to be hooked up with JST connectors, for which you cannot buy fitting pre-made cables that work with the GPIO pins found on most Linux boards. You will have to crimp your own cables to get this working - so don't forget to also buy the necessary parts for the cable when purchasing the sensor.

This integration only supports the D6T-44L-06 sensor at the moment. You will need to connect it to the I2C pins on your machine.

Running with NodeJS

To enable heatmap generation you may be required to install some additional system packagesopen in new window for compilation:

sudo apt-get install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
sudo npm i --global --unsafe-perm room-assistant

On Raspberry Pi devices the I2C interface also needs to be enabled using sudo raspi-config and then enabling the I2C option under Advanced Options.

Running with Docker

Your i2c device needs to be enabled on the host and mapped into the container as a device like shown below.

Example docker-compose.yml
version: '3'
services:
  room-assistant:
    image: mkerix/room-assistant
    network_mode: host
    volumes:
      - /var/run/dbus:/var/run/dbus
    devices:
      - /dev/i2c-1
    environment:
      NODE_CONFIG: >
        {
          "global": {
            "instanceName": "changeme",
            "integrations": ["omronD6t"]
          }
        }

Running with Home Assistant OS

You will need to enable the i2c interface by following the official Home Assistant OS guideopen in new window. The config.txt file that you create should also contain an additional option, leading to the following contents:

dtparam=i2c1=on
dtparam=i2c_arm=on
dtparam=i2c_baudrate=10000

Reboot after you imported your config in the supervisor.

Sensor placement

When placing your sensor you need to consider a few factors to get reliable results:

  • Don't face the sensor towards a source of heat that is less than 5 meters away, for example radiators or windows.
  • Make sure the sensor has a clear view of all areas that you want to track.
  • Consider the range of the sensor, the further away people are the harder it will be to reliably detect them. Up to 5 meters of detection radius are realistic.
  • Consider the field of view as stated in the datasheet.

Settings

NameTypeDefaultDescription
busNumberNumber1I2C bus number of your machine that the sensor is connected to.
addressNumber0x0aI2C address of the D6T sensor that you want to use.
deltaThresholdNumber1.5Minimum temperature difference between average and single temperature pixel in °C for it to be considered as human presence. Increase if you are seeing false positives, decrease if you are seeing false negatives.
heatmapHeatmapA number of options for configuring the heatmap output.

Heatmap

NameTypeDefaultDescription
enabledBooleantrueWhether the heatmap generation should be enabled or not. Turn this off if you notice very high CPU usage.
minTemperatureNumber16Temperature that will be considered the lower bound for the color scale in °C.
maxTemperatureNumber30Temperature that will be considered the upper bound for the color scale in °C.
rotationNumber0The amount of degrees that the heatmap output image should be rotated. Only 0, 90, 180 or 270 are supported as values.
drawTemperaturesBooleantrueWhether the actual temperature values should be drawn on the heatmap or not.
Example Config
global:
  integrations:
    - omronD6t
omronD6t:
  deltaThreshold: 2
  heatmap:
    minTemperature: 16
    maxTemperature: 30
    rotation: 90