How to Work With Light Detection¶
The light sensor in our device cannot tell you the precise lumens - although the sensor does indeed measure in lumens, other factors (mostly the fact that the sensor is sealed inside a IP68 device) prevent you from getting the precise values.
Good news is, you don't need them in 99% of cases. API 6 devices work with a light amount threshold you can set from 1% to 100%. The device will send you two events (Light detected and Darkness detected) when the threshold is breached up or down. The threshold settings depends entirely on the intended use case.
You can change the light threshold by downlink - important are registers 0x43 and 0x44.
The default value of the threshold register is 30% of daylight, so change that however you want. Generally, the darker the place, the more sensitive the sensor should be. Minimal working value is around 10%, anything less than that is too sensitive. With clients who want to monitor package opening in the dark (night), we've had success with values 12-15%. Hysteresis can be input in case the light will hover around the threshold but doesn't have to be changed necessarily.