Fork me on GitHub

pimatic-bh1750 by Jos Hendriks (circuitdb) | github | npm

pimatic-bh1750

Pimatic support for the bh1750 light intensity sensor

Drivers

I2C drivers need to be loaded in order to create the connection between the physical sensor and the rPI. You can load them from the terminal (or from the /etc/modules script).

sudo modprobe i2c_dev
sudo modprobe i2c_bcm2708

You might also need to uncomment the following line in /boot/config.txt

dtparam=i2c_arm=on

Example config

Add the plugin to the plugin section:

{ 
  "plugin": "bh1750"
}

Then add a sensor for your device to the devices section:

{
  "id": "my-sensor",
  "name": "bh1750 example",
  "class": "BH1750Sensor",
  "device": "/dev/i2c-0",
  "address": "0x23",
  "interval": 10000
}

Plugin Config Options

bh1750 plugin config options

Device Config Options

pimatic-bh1750 device config schemas

BH1750Sensor

BH1750Sensor config options
OptionDescriptionDefault
device
string
device file to use, for example /dev/i2c-0
address
string
the address of the sensor
interval
integer
10000
pimatic-bh1750 is written by Jos Hendriks (circuitdb)