Skip to content

[Bug] This plugin generated a warning from the characteristic 'Current Ambient Light Level' #235

Description

@scootec

First of all, thankyou for the fantastic plugin! The following bug does not seem to be causing usability issues, but is filling the HB log. Reporting here just in case others have the same issue.

Describe the bug
The following error is repeatedly appearing in the HomeBridge log:
[17/07/2021, 7:43:24 pm] [homebridge-z2m] This plugin generated a warning from the characteristic 'Current Ambient Light Level': characteristic was supplied illegal value: number 0 exceeded minimum of 0.0001. See https://git.io/JtMGR for more info.

From what I can tell functionality is not affected, since the device in question is reporting current light level of 0.0001 lux in the home app.

Related devices
Bug relates to Xiaomi RTCGQ11LM. It may happen with others but I believe this message from the device is the source:
{"battery":100,"illuminance":0,"illuminance_lux":0,"linkquality":255,"occupancy":false,"temperature":13,"voltage":3015}

To Reproduce

  1. Have a device report an illuminance_lux level of 0.

Expected behavior
No log message.

MQTT messages
If possible (and applicable), please provide the following:
Device Entry

Click to expand!
{
"date_code": "20170627",
"definition": {
  "description": "Aqara human body movement and illuminance sensor",
  "exposes": [
      {
          "access": 1,
          "description": "Remaining battery in %",
          "name": "battery",
          "property": "battery",
          "type": "numeric",
          "unit": "%",
          "value_max": 100,
          "value_min": 0
      },
      {
          "access": 1,
          "description": "Indicates whether the device detected occupancy",
          "name": "occupancy",
          "property": "occupancy",
          "type": "binary",
          "value_off": false,
          "value_on": true
      },
      {
          "access": 1,
          "description": "Measured temperature value",
          "name": "temperature",
          "property": "temperature",
          "type": "numeric",
          "unit": "°C"
      },
      {
          "access": 1,
          "description": "Voltage of the battery in millivolts",
          "name": "voltage",
          "property": "voltage",
          "type": "numeric",
          "unit": "mV"
      },
      {
          "access": 1,
          "description": "Measured illuminance in lux",
          "name": "illuminance_lux",
          "property": "illuminance",
          "type": "numeric",
          "unit": "lx"
      },
      {
          "access": 1,
          "description": "Measured illuminance in lux",
          "name": "illuminance",
          "property": "illuminance",
          "type": "numeric",
          "unit": "lx"
      },
      {
          "access": 1,
          "description": "Link quality (signal strength)",
          "name": "linkquality",
          "property": "linkquality",
          "type": "numeric",
          "unit": "lqi",
          "value_max": 255,
          "value_min": 0
      }
  ],
  "model": "RTCGQ11LM",
  "supports_ota": false,
  "vendor": "Xiaomi"
},
"endpoints": {
  "1": {
      "bindings": [],
      "clusters": {
          "input": [
              "genBasic",
              "msOccupancySensing",
              "msIlluminanceMeasurement",
              "ssIasZone",
              "genPowerCfg",
              "genIdentify"
          ],
          "output": [
              "genBasic",
              "genOta"
          ]
      },
      "configured_reportings": []
  }
},
"friendly_name": "bedroom_motion",
"ieee_address": "0x00158d0001fa3e8a",
"interview_completed": true,
"interviewing": false,
"model_id": "lumi.sensor_motion.aq2",
"network_address": 49257,
"power_source": "Battery",
"software_build_id": "3000-0001",
"supported": true,
"type": "EndDevice"
}

Status update from zigbee2mqtt/bedroom_motion

Click to expand!
{"battery":100,"illuminance":0,"illuminance_lux":0,"linkquality":255,"occupancy":false,"temperature":18,"voltage":3025}

Messages published by this plugin that might be related to your issue (can also be seen in the homebridge logs)
[17/07/2021, 7:43:24 pm] [homebridge-z2m] This plugin generated a warning from the characteristic 'Current Ambient Light Level': characteristic was supplied illegal value: number 0 exceeded minimum of 0.0001. See https://git.io/JtMGR for more info.

Versions used
Please provide the version of the following pieces of software:

  • This plugin: homebridge-z2m v1.3.0
  • Homebridge: 1.3.4
  • Zigbee2MQTT: 1.20.0
  • Homebridge Config UI X: homebridge-config-ui-x v4.41.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions