Light sensor with analog (ADC) interface for Homebridge: https://github.com/nfarina/homebridge"
npm install homebridge-lightsensor-analogAnalog light sensor service for Homebridge
Reads from an analog-to-digital SPI chip using mcp-spi-adc,
and represents the value as an ambient light sensor light level.
npm install -g homebridgenpm install -g homebridge-lightsensor-analogConnect an MCP SPI ADC chip to your computer, and a photodiode or other analog light sensor
to one of the channels of the ADC.
accessory: "LightSensorAnalog"name: descriptive namechip: one of: MCP3002, MCP3004, MCP3008, MCP3202, MCP3204, MCP3208, or MCP3304channel: channel number of ADC chip to read fromoptions: options for mcp-spi-adcscale: value to multiply the raw 0.0 - 1.0 analog value withoffset: value to add to the raw 0.0 - 1.0 analog valueHomebridge expects a value in lux, you can adjust scale and offset
to calibrate the analog sensor value (currently only linearly) empirically.
Example configuration:
``json``
"accessories": [
{
"accessory": "LightSensorAnalog",
"name": "Kitchen",
"chip": "MCP3304",
"channel": 7,
"options": {
"speedHz": 20000
},
"scale": 500,
"offset": 0
}
]
* 10der/homebridge-LightSensor: currently blank (in progress?), created 2016/09/17
* lagunacomputer/homebridge-CurrentAmbientLightLevel: plugin for I2C-based bh1750 digital light sensor
MIT