merdok / homebridge-miot

Homebridge plugin for devices supporting the Xiaomi miot protocol
MIT License
395 stars 63 forks source link

issue with water level zhimi.humidifier.ca4 #270

Closed manfilof closed 2 years ago

manfilof commented 2 years ago

Describe the bug Added water level as an additional property. image image

Expected behavior Expected to see the water level on additional plate, I got it but it shows the information like this is light sensor in lux.

  1. It should show in %
  2. The number I'm getting is wrong. It shows 21 lux, but real water level is 16%.

image

Your config.json "devices": [ { "name": "Humidifier", "ip": "192.168.1.123", "token": "XXX", "deviceId": "XXX", "model": "zhimi.humidifier.ca4", "pollingInterval": 10, "deepDebugLog": false, "buzzerControl": false, "ledControl": false, "childLockControl": true, "modeControl": false, "propertyMonitor": [ { "property": "humidifier:water-level", "name": "Water level" } ], "fanLevelControl": true, "screenControl": false

Debug log Provide a snippet of a debug log when the issue occurs. Ideally with the deepDebugLog property enabled.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context homebridge-miot v1.1.3 - the latest

merdok commented 2 years ago

Hi, so this is currently the expected behavior. Right now property monitor will show the values as plain values straight from the device without any conversion and not knowing what kind of value that this, hence the value in your case will be displayed as 21 (which most probably means 21ml water left). But since you have a zhimi.humidifier.ca4 and this is humidifier accessory, the water level should actually already be on the accessory itself, isn't that the case? Or why do you try to add that as a property monitor?