Git Product home page Git Product logo

xiaomi-mi-air-purifier's Introduction

verified-by-homebridge

Control and monitor your Xiaomi Mi Air Purifier purifier with HomeKit.

Features

  • Air Purifier Accessory
    • Turn on/off
    • Control Fan Speed
    • Toggle Child Lock
    • Change Mode (Auto/Manual)
    • Filter Live Level
    • Filter Change Warning
  • Air Quality Sensor
    • Air Quality
    • PM2.5 Density
  • Temperature Sensor
  • Relative Humidity Sensor

Prerequisites

Installation

Install using npm:

npm install -g homebridge-xiaomi-mi-air-purifier

Or, search for homebridge-xiaomi-mi-air-purifier in Plugins.

Note that it might be neccessary to enter the search string inside double quotes i.e. "homebridge-xiaomi-mi-air-purifier" in some Homebridge UI variants (such as Hoobs) in order to find it among the plethora of similarly named plugins.

Configuration

Configure the plugin in the GUI / Homebridge Config UI X (highly recommended), otherwise head over to Manual Config

Getting a Token

Use Xiaomi Cloud Tokens Extractor to get a token for your device.

Manual Config

Add this to your homebridge config.json file.

{
  "accessories": [
    {
      "name": "Air Purifier",
      "address": "<YOUR_DEVICE_IP_ADDRESS>",
      "token": "<YOUR_DEVICE_TOKEN>",
      "enableAirQuality": true,
      "enableTemperature": true,
      "enableHumidity": true,
      "filterChangeThreshold": 5,
      "enableFanSpeedControl": true,
      "enableChildLockControl": true,
      "accessory": "XiaomiMiAirPurifier"
    }
  ]
}

HomeKit pairing

  1. Open the Home app on your device.
  2. Tap the Home tab, then tap .
  3. Tap Add Accessory, and select I Don't Have a Code or Cannot Scan.

xiaomi-mi-air-purifier's People

Contributors

cbrunnkvist avatar dependabot[bot] avatar torifat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

xiaomi-mi-air-purifier's Issues

Mi Air Purifier 3H does not respond anymore

Describe The Bug:

The Mi Air Purifier 3H stopped working for some reason. The device does not respond in Homebridge. It was working perfectly before. I assume it could have changed with an update of homebridge or another plugin.

To Reproduce:

Whenever I boot up Homebridge

Expected behavior:

Device responds :)

Logs:

[homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Target Air Purifier State' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.

--Same goes for all the other values--

Plugin Config:

    {
        "name": "NAME",
        "address": "IP",
        "token": "TOKEN",
        "enableAirQuality": true,
        "enableTemperature": true,
        "enableHumidity": true,
        "filterChangeThreshold": 5,
        "enableFanSpeedControl": false,
        "enableChildLockControl": false,
        "accessory": "XiaomiMiAirPurifier"
    }

Screenshots:

None

Environment:

  • Plugin Version: 2.0.2
  • Homebridge Version: 1.4.0
  • Node.js Version: 16.13.1
  • NPM Version: 8.1.2
  • Device: Xiaomi Air Purifier 3H
  • Operating System: Raspbian

Is this abandoned?

No updates for latest Xiaomi air purifiers (4, 4 Pro, MAX, etc.) nor promised enhancements (Quiet/Sleep mode, separate tiles in Home app…) for over a year. What gives?

Needs to launch an action twice to make it really works

Hi! I created some scenarios to automatically change the fan speed when I want to (with 3 different speeds). Somehow I have to launch these scenes twice before it actually works. Same to turn the purifier on/off. I have this issue when I tap on a scenario (on all of my devices), and with Siri too.

I tap the button of a scene (including a different fan speed than the actual one) in the Home app, or ask Siri to launch a scene or turn the purifier on/off. The scene fails to launch, or Siri says that the purifier is not responding. Then I do this again a few seconds later and the purifier seems to have woken up and it works.

Logs:

[5/12/2021, 1:28:00 PM] [homebridge-xiaomi-mi-air-purifier] Characteristic 'Active': SET handler returned write response value, though the characteristic doesn't support write response. See https://git.io/JtMGR for more info.
[5/12/2021, 1:28:00 PM] [homebridge-xiaomi-mi-air-purifier] Error: 
    at Active.Characteristic.characteristicWarning (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2038:105)
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1663:22
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:9:18
    at /usr/local/lib/node_modules/homebridge-xiaomi-mi-air-purifier/src/with-device.ts:30:26
[5/12/2021, 1:28:01 PM] [homebridge-xiaomi-mi-air-purifier] Characteristic 'Target Air Purifier State': SET handler returned write response value, though the characteristic doesn't support write response. See https://git.io/JtMGR for more info.
[5/12/2021, 1:28:01 PM] [homebridge-xiaomi-mi-air-purifier] Error: 
    at TargetAirPurifierState.Characteristic.characteristicWarning (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2038:105)
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1663:22
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:9:18
    at /usr/local/lib/node_modules/homebridge-xiaomi-mi-air-purifier/src/with-device.ts:30:26
[5/12/2021, 1:28:01 PM] [homebridge-xiaomi-mi-air-purifier] Characteristic 'Rotation Speed': SET handler returned write response value, though the characteristic doesn't support write response. See https://git.io/JtMGR for more info.
[5/12/2021, 1:28:01 PM] [homebridge-xiaomi-mi-air-purifier] Error: 
    at RotationSpeed.Characteristic.characteristicWarning (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2038:105)
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1663:22
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:9:18
    at /usr/local/lib/node_modules/homebridge-xiaomi-mi-air-purifier/src/with-device.ts:30:26

Plugin Config:

{
    "bridge": {
        "name": "Homebridge ****",
        "username": "**:**:**:**:**:**",
        "port": *****,
        "pin": "***-**-***"
    },
    "accessories": [
        {
            "name": "Purificateur",
            "address": "IP",
            "token": "token",
            "enableAirQuality": true,
            "enableTemperature": true,
            "enableHumidity": true,
            "filterChangeThreshold": 1,
            "enableFanSpeedControl": true,
            "enableChildLockControl": false,
            "accessory": "XiaomiMiAirPurifier"
        }
    ],
    "platforms": [
        {
            "name": "Config",
            "port": ****,
            "auth": "form",
            "theme": "cyan",
            "tempUnits": "c",
            "lang": "fr",
            "platform": "config"
        }
    ]
}

Screenshots:

IMG_7676

Environment:

  • Plugin Version: v1.1.0
  • Homebridge Version: v1.3.4
  • Node.js Version: v14.16.1
  • NPM Version: v7.11.2
  • Operating System: macOS

This plugin slows down Homebridge.

Describe The Bug:
I use this plugin with a Xiaomi Mi air purifier 3H and I have the following log error :

Expected behavior:

No error log

Logs:

[11/10/2021, 14:07:23] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Active' was slow to respond! See https://git.io/JtMGR for more info.
[11/10/2021, 14:07:23] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Current Air Purifier State' was slow to respond! See https://git.io/JtMGR for more info.
[11/10/2021, 14:07:23] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Target Air Purifier State' was slow to respond! See https://git.io/JtMGR for more info.
[11/10/2021, 14:07:23] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Rotation Speed' was slow to respond! See https://git.io/JtMGR for more info.
[11/10/2021, 14:07:23] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Air Quality' was slow to respond! See https://git.io/JtMGR for more info.
[11/10/2021, 14:07:23] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'PM2.5 Density' was slow to respond! See https://git.io/JtMGR for more info.
[11/10/2021, 14:07:23] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Filter Life Level' was slow to respond! See https://git.io/JtMGR for more info.
[11/10/2021, 14:07:23] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Filter Change Indication' was slow to respond! See https://git.io/JtMGR for more info.
[11/10/2021, 14:07:23] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Current Temperature' was slow to respond! See https://git.io/JtMGR for more info.
[11/10/2021, 14:07:23] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Current Relative Humidity' was slow to respond! See https://git.io/JtMGR for more info.
[11/10/2021, 14:07:29] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Active' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.
[11/10/2021, 14:07:29] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Current Air Purifier State' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.
[11/10/2021, 14:07:29] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Target Air Purifier State' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.
[11/10/2021, 14:07:29] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Rotation Speed' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.
[11/10/2021, 14:07:29] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Air Quality' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.
[11/10/2021, 14:07:29] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'PM2.5 Density' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.
[11/10/2021, 14:07:29] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Filter Life Level' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.
[11/10/2021, 14:07:29] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Filter Change Indication' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.
[11/10/2021, 14:07:29] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Current Temperature' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.
[11/10/2021, 14:07:29] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Current Relative Humidity' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.

Plugin Config:

{
    "name": "Air Purifier",
    "address": "IP",
    "token": "Token",
    "enableAirQuality": true,
    "enableTemperature": true,
    "enableHumidity": true,
    "filterChangeThreshold": 5,
    "enableFanSpeedControl": true,
    "enableChildLockControl": false,
    "accessory": "XiaomiMiAirPurifier"
}

Environment:

  • Plugin Version: 1.1.0
  • Homebridge Version: 1.3.5
  • Node.js Version: 0.9.6
  • NPM Version: 7.14.0
  • Operating System: Raspbian

Lock Physical Controls, Filter Life Level and Filter Change Indication don't work

Describe The Bug:

Error in Config UI X.
Air Purifier 1: not responding in Home. Changing speed didn't work. Child Lock and Filter Level not available.
Air Purifier 3: Child Lock and Filter Level not available in Home App (only in e.g. Controller for Homekit)

To Reproduce:

  • Add devices
  • Restart Homebridge

Logs:

[18.11.2021, 11:41:35] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Lock Physical Controls': Unhandled error thrown inside read handler for characteristic: Cannot read property 'value' of undefined. See https://git.io/JtMGR for more info.
[18.11.2021, 11:41:35] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Filter Life Level': Unhandled error thrown inside read handler for characteristic: Cannot read property 'value' of undefined. See https://git.io/JtMGR for more info.
[18.11.2021, 11:41:35] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Filter Change Indication': Unhandled error thrown inside read handler for characteristic: Cannot read property 'value' of undefined. See https://git.io/JtMGR for more info.
[18.11.2021, 11:54:29] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Lock Physical Controls': Unhandled error thrown inside read handler for characteristic: Cannot read property 'value' of undefined. See https://git.io/JtMGR for more info.
[18.11.2021, 11:54:32] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Lock Physical Controls': Unhandled error thrown inside read handler for characteristic: Cannot read property 'value' of undefined. See https://git.io/JtMGR for more info.
[18.11.2021, 11:54:32] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Lock Physical Controls': Unhandled error thrown inside read handler for characteristic: Cannot read property 'value' of undefined. See https://git.io/JtMGR for more info.
[18.11.2021, 11:54:46] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Lock Physical Controls': Unhandled error thrown inside read handler for characteristic: Cannot read property 'value' of undefined. See https://git.io/JtMGR for more info.

Plugin Config:

{
            "name": "Oczyszczacz Stary", // zhimi.airpurifier.m1
            "address": "192.168.0.***",
            "token": "TOKEN",
            "enableAirQuality": true,
            "enableTemperature": true,
            "enableHumidity": true,
            "filterChangeThreshold": 5,
            "enableFanSpeedControl": true,
            "enableChildLockControl": true,
            "accessory": "XiaomiMiAirPurifier"
        },
        {
            "name": "Oczyszczacz Nowy", // zhimi.airpurifier.mb3
            "address": "192.168.0.***",
            "token": "TOKEN",
            "enableAirQuality": true,
            "enableTemperature": true,
            "enableHumidity": true,
            "filterChangeThreshold": 5,
            "enableFanSpeedControl": true,
            "enableChildLockControl": true,
            "accessory": "XiaomiMiAirPurifier"
        }

Environment:

  • Plugin Version:
  • Homebridge Version: 1.3.5 and 1.3.6
  • Node.js Version: 14.18.0
  • NPM Version: 6.14.15
  • Operating System: Raspbian
  • Air Purifier: model zhimi.airpurifier.m1 (Firmware: 1.4.3_100) and model zhimi.airpurifier.mb3 (Firmware 2.0.8.0017)

2s not able to change speed and always set to Auto when switch on

Hi
I'm unable to change speed on my 2s device and when switch on the device is set to Auto mode every time.

Here's my Logs :

[02/02/2022, 20:18:08] [homebridge-xiaomi-mi-air-purifier] **This plugin threw an error from the characteristic 'Rotation Speed': Unhandled error thrown inside write handler for characteristic: device.changeFanSpeed is not a function. See https://git.io/JtMGR for more info.**
[02/02/2022, 20:18:08] [homebridge-xiaomi-mi-air-purifier] TypeError: device.changeFanSpeed is not a function
    at RotationSpeed.setHandler (/usr/local/lib/node_modules/homebridge-xiaomi-mi-air-purifier/src/characteristics/air-purifier/rotation-speed.ts:35:20)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Plugin Config:

    "accessories": [
        {
            "name": "Air Purifier",
            "address": "1xxxxx",
            "token": "xxxxxxx",
            "enableAirQuality": true,
            "enableTemperature": true,
            "enableHumidity": true,
            "filterChangeThreshold": 5,
            "enableFanSpeedControl": true,
            "enableChildLockControl": false,
            "accessory": "XiaomiMiAirPurifier"
        }

Environment:

  • Plugin Version: 2.0.2
  • Homebridge Version: <4.42.0 -->
  • Node.js Version: <v16.13.2>
  • NPM Version: <v8.3.1>
  • Device: <!-- Xiaomi Air Purifier 2s
  • Operating System: <!-- Raspbian>

Please help
Thank you

Buttons for Auto/Nightmode

Im Missing this Feature with all Plugins for Homebridge. Is there a way to implement the Automode so you can switch between manual control and the auto mode?

Support for Pro H

Hi,

I can connect my Pro H using your plugin. It works to turn on/off, child lock and manual/auto. However, it does not work to control the fan speed (i.e. in manual)

The model is zhimi-airpurifier-vb2

It works flawlessly for my 3H.

Thank you.

No response

So far your plugin doesn't work for 2h and 3h for me... Nut i'm hoping to use it in the future :)

Impossible to control my Mi Air Purifier 2S

After having setup my device, it's impossible to control it or get temperature, air quality information

Device: Mi Air Purifier 2S
zhimi.airpurifier.mc1
133073972
cn

Environment:

  • Plugin Version: homebridge-xiaomi-mi-air-purifier v2.0.2
  • Homebridge Version: v1.5.1
  • Node.js Version: v16.16.0
  • Device: Mi Air Purifier 2S
  • Operating System: macOS

Does it work with the Xiaomi Purifier 3C?

The purifier appears in te home app but as No response, so I cannot use it.
I have used the token extractor windows app to get the token.

Homebridge logs:

[Air Purifier] Initializing XiaomiMiAirPurifier accessory...
HAP Warning: Characteristic 000000AB-0000-1000-8000-0026BB765291 not in required or optional characteristics for service 0000008D-0000-1000-8000-0026BB765291. Adding anyway.
HAP Warning: Characteristic 000000AC-0000-1000-8000-0026BB765291 not in required or optional characteristics for service 0000008D-0000-1000-8000-0026BB765291. Adding anyway.
[05/01/2021, 13:00:56] [Air Purifier] Air Purifier finished initializing!
[05/01/2021, 13:00:57] [Air Purifier] Connected to "Air Purifier" @ 192.168.1.211!

The plugin says connected but No response in Home app.
I can use Xiaomi app to control it but not with HomeKit.

Environment:

  • Plugin Version: homebridge-xiaomi-mi-air-purifier v1.0.0
  • Homebridge Version: 1.1.7
  • Node.js Version: 14.15.0
  • NPM Version: 6.14.8
  • Operating System: Raspbian

Update to support new models

Hello, I have put the Air Purifier 4 model zhimi.airp.mb5 to my parents and I have tried to use this plugging and even though it is seen in Apple Home, it says that it is out of service. I would like to know if it would be possible to update these models so that they can be used within Appel Home.

Thank you for your work.

Mi air purifier 2 partially works

Hi! Thanks for your work. I have the mi air purifier 2 and the fan speed is not working. I can see temperature/humidity and turn it on/off. Can you take a look? Thanks.

Plugin not working anymore

The plugin doesn't work anymore; here's the error message:

This plugin slows down Homebridge. The read handler for the characteristic 'Active' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.

Logs:

This plugin slows down Homebridge. The read handler for the characteristic 'Active' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.
[Xiaomi Mi Air Purifier 3H] Connected to "Xiaomi Mi Air Purifier 3H" @ IP ADDRESS
[homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Filter Life Level': Unhandled error thrown inside read handler for characteristic: Cannot read properties of undefined (reading 'value'). See https://git.io/JtMGR for more info.
[04/02/2022, 14:13:01] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Filter Change Indication': Unhandled error thrown inside read handler for characteristic: Cannot read properties of undefined (reading 'value'). See https://git.io/JtMGR for more info.
[04/02/2022, 14:13:01] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Filter Life Level': Unhandled error thrown inside read handler for characteristic: Cannot read properties of undefined (reading 'value'). See https://git.io/JtMGR for more info.
[04/02/2022, 14:13:01] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Filter Change Indication': Unhandled error thrown inside read handler for characteristic: Cannot read properties of undefined (reading 'value'). See https://git.io/JtMGR for more info.
[04/02/2022, 14:13:01] [homebridge-xiaomi-mi-air-purifier] This plugin generated a warning from the characteristic 'PM2.5 Density': characteristic was supplied illegal value: null! Home App will reject null for Apple defined characteristics. See https://git.io/JtMGR for more info.
[04/02/2022, 14:13:01] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Current Temperature': Unhandled error thrown inside read handler for characteristic: Cannot read properties of null (reading 'value'). See https://git.io/JtMGR for more info.
Plugin Config:

{
        "name": "Xiaomi Mi Air Purifier 3H",
        "address": "x.x.x.x",
        "token": "token",
        "enableAirQuality": true,
        "enableTemperature": true,
        "enableHumidity": true,
        "filterChangeThreshold": 5,
        "enableFanSpeedControl": false,
        "enableChildLockControl": false,
        "accessory": "XiaomiMiAirPurifier",
        "_bridge": {
            "username": "bridge",
            "port": 34473

Environment:

  • Plugin Version:
  • Homebridge Version: 1.4.0
  • Node.js Version: 16.13.2
  • NPM Version: 8.3.1
  • Operating System: Raspbian

Error with the latest update

I'm on the latest plugin version. my logs show the below errors. I'm on 1.3.4 for Homebridge too

my Node JS and NPM version
Node.js Version v14.16.0
Npm Version v6.14.11

[11/22/2021, 9:50:29 AM] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Filter Life Level': Unhandled error thrown inside read handler for characteristic: Cannot read property 'value' of undefined. See https://git.io/JtMGR for more info.
[11/22/2021, 9:50:29 AM] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Filter Change Indication': Unhandled error thrown inside read handler for characteristic: Cannot read property 'value' of undefined. See https://git.io/JtMGR for more info.
[11/22/2021, 9:50:29 AM] [homebridge-xiaomi-mi-air-purifier] This plugin generated a warning from the characteristic 'PM2.5 Density': characteristic was supplied illegal value: null! Home App will reject null for Apple defined characteristics. See https://git.io/JtMGR for more info.
[11/22/2021, 9:50:29 AM] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Current Temperature': Unhandled error thrown inside read handler for characteristic: Cannot read property 'value' of null. See https://git.io/JtMGR for more info.
[11/22/2021, 9:50:29 AM] [homebridge-xiaomi-mi-air-purifier] This plugin generated a warning from the characteristic 'Current Relative Humidity': characteristic was supplied illegal value: null! Home App will reject null for Apple defined characteristics. See https://git.io/JtMGR for more info.

Mi air purifier 3C

Hi. Plug in not working at all.

tried everything. Always showing no response on HomeKit.

Mi 3H

Hi please can you expose the LED control and the Buzzer for these models in home app. Great work thus far. In the Mi app it's called "notification sound" and "Light".
311F2BE3-7C18-4756-9142-48923CDA8373

Child lock and Filter life don't work in 2H and Pro H

Child lock and Filter life don't work in 2H and Pro H. They throw Cannot read properties of undefined (reading 'value').

20/11/2021, 19:08:09] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Lock Physical Controls': Unhandled error thrown inside read handler for characteristic: Cannot read properties of undefined (reading 'value'). See https://git.io/JtMGR for more info.
[20/11/2021, 19:08:09] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Filter Life Level': Unhandled error thrown inside read handler for characteristic: Cannot read properties of undefined (reading 'value'). See https://git.io/JtMGR for more info.
[20/11/2021, 19:08:09] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Filter Change Indication': Unhandled error thrown inside read handler for characteristic: Cannot read properties of undefined (reading 'value'). See https://git.io/JtMGR for more info.

Version is homebridge-xiaomi-mi-air-purifier v2.0.0
NPM 8.1.4
Node 16.13

Affected Devices

  • Xiaomi Air Purifier 2H
  • Xiaomi Air Purifier 2S
  • Xiaomi Air Purifier Pro H

Reported by @Dane03 in #226 (comment)
Reported by @guesq in #226 (comment)

Fanspeed doesn't work on zhimi.airpurifier.v6

All advertised features work on zhimi.airpurifier.v6 except Fan Speed. which gives this error in HomeBridge log:

[12/25/2021, 6:17:12 PM] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Rotation Speed': Unhandled error thrown inside write handler for characteristic: device.changeFanSpeed is not a function. See https://git.io/JtMGR for more info.
MiioDevice {
model=zhimi.airpurifier.v6,
types=miio:air-purifier, sensor, miio, air-purifier,
capabilities=fan-speed, miio:buzzer, miio:led-brightness, miio:switchable-led, pm2.5, relative-humidity, temperature, switchable-mode, mode, switchable-power, restorable-state, power, state
}

Using the fanspeed slider in Homekit gives above error in HomeBridge and Homekit says "No Response"

Expected behavior:

Simple fan slider

Logs:

Show the Homebridge logs here, remove any sensitive information.

[12/25/2021, 6:17:12 PM] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Rotation Speed': Unhandled error thrown inside write handler for characteristic: device.changeFanSpeed is not a function. See https://git.io/JtMGR for more info.
MiioDevice {
model=zhimi.airpurifier.v6,
types=miio:air-purifier, sensor, miio, air-purifier,
capabilities=fan-speed, miio:buzzer, miio:led-brightness, miio:switchable-led, pm2.5, relative-humidity, temperature, switchable-mode, mode, switchable-power, restorable-state, power, state
}

Show your Homebridge config.json here, remove any sensitive information.

Screenshots:

Environment:

  • Plugin Version: homebridge-xiaomi-mi-air-purifier v2.0.2
  • Homebridge Version: homebridge -v1.3.8
  • Node.js Version:
  • NPM Version:
  • Device: zhimi.airpurifier.v6 (as stated in token extractor
  • Operating System: Docker

No Support for XIAOMI Smart Air Purifier 4 Pro

Hello, just tried to add my new Smart Air Purifier 4 Pro Device and bring it to Homebridge.
But there is no connection, I am afraid this model is not supported.

Is it possible to bring it to run ? Can I do something ?
This is th offial MODEL Type / Code : zhimi.airp.vb4

Thank you for your work! (Network Connection is fine and I already have the correct cloud token).

Log:
[1/20/2022, 8:07:09 PM] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Active': Unhandled error thrown inside read handler for characteristic: device.power is not a function. See https://git.io/JtMGR for more info.
[1/20/2022, 8:07:09 PM] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Current Air Purifier State': Unhandled error thrown inside read handler for characteristic: device.power is not a function. See https://git.io/JtMGR for more info.
[1/20/2022, 8:07:09 PM] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Target Air Purifier State': Unhandled error thrown inside read handler for characteristic: device.mode is not a function. See https://git.io/JtMGR for more info.
[1/20/2022, 8:07:09 PM] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Rotation Speed': Unhandled error thrown inside read handler for characteristic: device.fanSpeed is not a function. See https://git.io/JtMGR for more info.
[1/20/2022, 8:07:09 PM] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Air Quality': Unhandled error thrown inside read handler for characteristic: device.pm2_5 is not a function. See https://git.io/JtMGR for more info.
[1/20/2022, 8:07:09 PM] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'PM2.5 Density': Unhandled error thrown inside read handler for characteristic: device.pm2_5 is not a function. See https://git.io/JtMGR for more info.
[1/20/2022, 8:07:09 PM] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Filter Life Level': Unhandled error thrown inside read handler for characteristic: device.filterLifeLevel is not a function. See https://git.io/JtMGR for more info.
[1/20/2022, 8:07:09 PM] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Filter Change Indication': Unhandled error thrown inside read handler for characteristic: device.filterLifeLevel is not a function. See https://git.io/JtMGR for more info.
[1/20/2022, 8:07:09 PM] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Current Temperature': Unhandled error thrown inside read handler for characteristic: device.temperature is not a function. See https://git.io/JtMGR for more info.
[1/20/2022, 8:07:09 PM] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Current Relative Humidity': Unhandled error thrown inside read handler for characteristic: device.rh is not a function. See https://git.io/JtMGR for more info.

Device not responding in Homekit

Describe Your Problem:

I created on/off automations in the Xiaomi app. When the device is turned off, I get error messages in Homebridge and the device shows as not responding in Homekit. In the Xiaomi I can still see device status and air quality, also the Air purifier is still singable.

Logs:
This plugin slows down Homebridge. The read handler for the characteristic 'PM2.5 Density' didn't respond at all!.

Show the Homebridge logs here, remove any sensitive information.

This plugin slows down Homebridge. The read handler for the characteristic 'PM2.5 Density' didn't respond at all!.
Plugin Config:
"name": "Xiaomi Mi Air Purifier 3H",
"address": "192.168.30.151",
"token": "xxxxxxx",
"enableAirQuality": true,
"enableTemperature": true,
"enableHumidity": true,
"filterChangeThreshold": 5,
"enableFanSpeedControl": true,
"enableChildLockControl": false,
"_bridge": {
"username": "0E:01:3D:BC:37:DC",
"port": 34473
},
"accessory": "XiaomiMiAirPurifier"

Show your Homebridge config.json here, remove any sensitive information.

Screenshots:

Environment:

  • Plugin Version:
  • Homebridge Version: 1.5.0
  • Node.js Version: v16.15.1
  • NPM Version: 8.11.0
  • Operating System: Raspbian

Can modify fan speed or modes on Smartmi Air Purifier

Device does not respond to Homekit request. Can't change the fan speed or turn on modes. Sensors are ok, I can see Air Quality (but as good or bad), humidity in % and temperature. Did I do something wrong in the device configuration?

Unhandled error thrown

Hi, connected my xiaomi air purifier 2H and here are errors.
Accessory is not responding.
Nothing is working.. please help.

Logs:
[12/4/2021, 7:39:26 PM] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Active': Unhandled error thrown inside read handler for characteristic: device.power is not a function. See https://git.io/JtMGR for more info.
[12/4/2021, 7:39:26 PM] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Current Air Purifier State': Unhandled error thrown inside read handler for characteristic: device.power is not a function. See https://git.io/JtMGR for more info.
[12/4/2021, 7:39:26 PM] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Target Air Purifier State': Unhandled error thrown inside read handler for characteristic: device.mode is not a function. See https://git.io/JtMGR for more info.
[12/4/2021, 7:39:26 PM] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Air Quality': Unhandled error thrown inside read handler for characteristic: device.pm2_5 is not a function. See https://git.io/JtMGR for more info.
[12/4/2021, 7:39:26 PM] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'PM2.5 Density': Unhandled error thrown inside read handler for characteristic: device.pm2_5 is not a function. See https://git.io/JtMGR for more info.
[12/4/2021, 7:39:26 PM] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Filter Life Level': Unhandled error thrown inside read handler for characteristic: device.filterLifeLevel is not a function. See https://git.io/JtMGR for more info.
[12/4/2021, 7:39:26 PM] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Filter Change Indication': Unhandled error thrown inside read handler for characteristic: device.filterLifeLevel is not a function. See https://git.io/JtMGR for more info.
[12/4/2021, 7:39:26 PM] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Current Temperature': Unhandled error thrown inside read handler for characteristic: device.temperature is not a function. See https://git.io/JtMGR for more info.
[12/4/2021, 7:39:26 PM] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Current Relative Humidity': Unhandled error thrown inside read handler for characteristic: device.rh is not a function. See https://git.io/JtMGR for more info.

Disable switches (silent, etc)

My air purifier has several switches (favorites, silent, auto) and a fan entity (percentage) in HomeKit.

I only need the fan entity. Otherwise Siri just switches on all switches, which makes no sense. Especially because switching off always fails. Setting it back to 100%.

Just renaming the switches and ungrouping doesn’t help.

How can I do this?

The plugin not working at all

Hello.

Since day one the plugin never works, always showing in Homekit "Air Purifire No Response" , i tried to delete and reinstall and restart 3 times, the IP Address and the Token correct 100% , but never works .

i need this plugin to works for me .

Below the Logs :

[10/30/2022, 1:24:30 PM] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Air Quality': Unhandled error thrown inside read handler for characteristic: device.pm2_5 is not a function. See https://homebridge.io/w/JtMGR for more info.
[10/30/2022, 1:24:30 PM] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Current Temperature': Unhandled error thrown inside read handler for characteristic: device.temperature is not a function. See https://homebridge.io/w/JtMGR for more info.
[10/30/2022, 1:24:30 PM] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Current Relative Humidity': Unhandled error thrown inside read handler for characteristic: device.rh is not a function. See https://homebridge.io/w/JtMGR for more info.

Below the Config :

"accessories": [
{
"name": "Air Purifier",
"address": "192.168.1.100",
"token": "daaf1e10981dac238f140b0ca195f29b",
"enableAirQuality": true,
"enableTemperature": true,
"enableHumidity": true,
"filterChangeThreshold": 5,
"enableFanSpeedControl": true,
"enableChildLockControl": true,
"accessory": "XiaomiMiAirPurifier"

Plugin Version v2.0.2
Homebridge Version v1.5.1
Operating System macOS

No response in HomeKit fan speed

On Mi air purifier 2S, when changing fan speed in HomeKit it gives no responses! Otherwise great plug-in! Running it on Hoobs.

This plugin slows down Homebridge. The read handler for the characteristic 'Active' was slow to respond!

I have an Xiaomi Air Purifier 3H and it was working just fine until the latest update.

Plugin: homebridge-xiaomi-mi-air-purifier v2.0.1

Please help, with instructions.

[12/3/2021, 3:36:13 PM] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Active' was slow to respond! See https://git.io/JtMGR for more info.
[12/3/2021, 3:36:13 PM] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Current Air Purifier State' was slow to respond! See https://git.io/JtMGR for more info.
[12/3/2021, 3:36:13 PM] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Target Air Purifier State' was slow to respond! See https://git.io/JtMGR for more info.
[12/3/2021, 3:36:13 PM] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Rotation Speed' was slow to respond! See https://git.io/JtMGR for more info.
[12/3/2021, 3:36:13 PM] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Lock Physical Controls' was slow to respond! See https://git.io/JtMGR for more info.
[12/3/2021, 3:36:13 PM] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Air Quality' was slow to respond! See https://git.io/JtMGR for more info.
[12/3/2021, 3:36:13 PM] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'PM2.5 Density' was slow to respond! See https://git.io/JtMGR for more info.
[12/3/2021, 3:36:13 PM] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Filter Life Level' was slow to respond! See https://git.io/JtMGR for more info.
[12/3/2021, 3:36:13 PM] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Filter Change Indication' was slow to respond! See https://git.io/JtMGR for more info.
[12/3/2021, 3:36:13 PM] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Current Temperature' was slow to respond! See https://git.io/JtMGR for more info.
[12/3/2021, 3:36:13 PM] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Current Relative Humidity' was slow to respond! See https://git.io/JtMGR for more info.
[12/3/2021, 3:36:19 PM] [Nuki] Nuki_Bridge_366229EC: set Last Updated from "Fri Dec 03 2021 15:35:18" to "Fri Dec 03 2021 15:36:18"
[12/3/2021, 3:36:19 PM] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Active' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.
[12/3/2021, 3:36:19 PM] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Current Air Purifier State' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.
[12/3/2021, 3:36:19 PM] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Target Air Purifier State' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.
[12/3/2021, 3:36:19 PM] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Rotation Speed' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.
[12/3/2021, 3:36:19 PM] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Lock Physical Controls' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.
[12/3/2021, 3:36:19 PM] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Air Quality' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.
[12/3/2021, 3:36:19 PM] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'PM2.5 Density' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.
[12/3/2021, 3:36:19 PM] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Filter Life Level' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.
[12/3/2021, 3:36:19 PM] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Filter Change Indication' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.
[12/3/2021, 3:36:19 PM] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Current Temperature' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.
[12/3/2021, 3:36:19 PM] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Current Relative Humidity' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.

Separate Accessories tile

In Homekit, some accessories are able to be separated into multiple tiles instead of bundling into one single tile. Is it possible to get a feature like that for this?

I got the error like this:

I got the error like this:
How to fix it?

[11/18/2021, 11:12:58 PM] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Active': Unhandled error thrown inside read handler for characteristic: device.power is not a function. See https://git.io/JtMGR for more info.
[Removed rest of the log because they don't provide any additional value. - Rifat]

My thoughts

Setting fan speed to 0% turns off device, then why we need on/off switch? I would prefer to have option to set fan to 0% while keeping device running so I can read temperature etc. Also built in modes (Auto, Night, 1, 2, 3, Manual) are useless because there is no way to access them.

I think that there should be:

  1. on/off switch
  2. screen on/off switch
  3. parental controls on/off switch
  4. mode selection (buttons just like in Mi Home app)
  5. fan speed control (active only on manual mode, 0% just turns off the fan)

Also UI via Homebridge ui feels really laggy. When I turn on device it takes like 10 seconds to show up that device is on.

My ultimate goal is to make my own "Automatic" mode. Because built in auto mode is cranking up the fan way too late. I would like just to set simple rules like: 1-3 -> 0% fan, 3-5 -> 10%, 5-10 -> 30%, 10-20 -> 50% etc. It's a shame that something that simple requires setting up so many things. If there is a way to override somehow built in auto mode with my own settings that would be awesome.

Multiple Errors at startup of Homebridge

When I start homebridge , I see a lot of these messages:

[06/03/2021, 09:09:52] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Active' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.
[06/03/2021, 09:09:52] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Current Air Purifier State' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.
[06/03/2021, 09:09:52] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Target Air Purifier State' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.
[06/03/2021, 09:09:52] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Rotation Speed' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.
[06/03/2021, 09:09:52] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Lock Physical Controls' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.
[06/03/2021, 09:09:52] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Air Quality' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.
[06/03/2021, 09:09:52] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'PM2.5 Density' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.
[06/03/2021, 09:09:52] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Filter Life Level' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.
[06/03/2021, 09:09:52] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Filter Change Indication' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.
[06/03/2021, 09:09:52] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Current Temperature' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.
[06/03/2021, 09:09:52] [homebridge-xiaomi-mi-air-purifier] This plugin slows down Homebridge. The read handler for the characteristic 'Current Relative Humidity' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.

Environment:

  • Plugin Version: homebridge-xiaomi-mi-air-purifier v1.1.0
  • Homebridge Version: v1.3.2
  • Node.js Version: v14.16.0
  • NPM Version: v7.6.1
  • Operating System:

Issue with parental lock in homekit

Describe The Bug:

The parental lock didn't work in homekit.

To Reproduce:

Open Setting for device (Air Purifier) and toggle parental lock (Locked to unlocked and unlocked to locked).

Expected behavior:

The parameter should be changes without error and button on device should be locked or unlocked for changing settings.

Logs:

[12.01.2022, 11:58:26] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Lock Physical Controls': Unhandled error thrown inside write handler for characteristic: . See https://git.io/JtMGR for more info.
[12.01.2022, 11:58:31] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Lock Physical Controls': Unhandled error thrown inside write handler for characteristic: . See https://git.io/JtMGR for more info.

Plugin Config:

{
            "name": "Oczyszczacz Stary",
            "address": "192.168.0.xxx",
            "token": "xxx",
            "enableAirQuality": true,
            "enableTemperature": true,
            "enableHumidity": true,
            "filterChangeThreshold": 5,
            "enableFanSpeedControl": true,
            "enableChildLockControl": true,
            "accessory": "XiaomiMiAirPurifier"
        },

Environment:

  • Plugin Version: 2.0.2
  • Homebridge Version: 1.3.8
  • Node.js Version: 14.18.0
  • NPM Version: 6.14.15
  • Device: Xiaomi Air Purifier 1
  • Operating System: Raspbian

Mi Air Purifier MAX2 does not connect

Xiaomi Max Air filter (zhimi.airpurifier.sb1) does not work.

To Reproduce:

Standard installation process using gui

Expected behavior:

Mi Air Purifier MAX2 (Living Room) should work like the Mi Air Purifier 2 (Hallway)

Logs:

Attached as
homebridge.log.txt

Plugin Config:

{
    "bridge": {
        "name": "Homebridge E7D1",
        "username": "",
        "port": ,
        "pin": ""
    },
    "accessories": [
        {
            "name": " Entrance",
            "address": "192.168.1.23",
            "token": "",
            "enableAirQuality": true,
            "enableTemperature": true,
            "enableHumidity": true,
            "filterChangeThreshold": 5,
            "enableFanSpeedControl": true,
            "enableChildLockControl": true,
            "accessory": "XiaomiMiAirPurifier"
        },
          {
            "name": "Living Room",
            "address": "192.168.1.112",
            "token": "",
            "enableAirQuality": true,
            "enableTemperature": true,
            "enableHumidity": true,
            "filterChangeThreshold": 5,
            "enableFanSpeedControl": false,
            "enableChildLockControl": false,
            "accessory": "XiaomiMiAirPurifier"
        }
    ],   "platforms": [
        {
            "name": "Config",
            "port": 8581,
            "platform": "config"
        }
    ]

Screenshots:
image

Environment:

  • Plugin Version: v2.0.2
  • Homebridge Version: homebridge-vm
  • Node.js Version: v16.14.0
  • NPM Version: v8.3.1
  • Device: Mi Air Purifier MAX2
  • Operating System: Windows 11, running homebridge-vm in hyper-v

Move to node-mihome from miio

Currently, I'm using a fork of miio where support for miot devices were added. It's really hard to add support for new devices without owning them. I found node-mihome project which seems a lot more feature complete with more device support.

Ability to configure air quality ranges

Would be good to have a custom configuration for air quality ranges

function pm2_5ToAqi(aqi: number) {
  if (!aqi) {
    return 0; // Error or unknown response
  } else if (aqi <= 25) {
    return 1; // Return EXCELLENT
  } else if (aqi > 25 && aqi <= 50) {
    return 2; // Return GOOD
  } else if (aqi > 50 && aqi <= 75) {
    return 3; // Return FAIR
  } else if (aqi > 75 && aqi <= 100) {
    return 4; // Return INFERIOR
  } else if (aqi > 100) {
    return 5; // Return POOR (Homekit only goes to cat 5, so the last two AQI cats of Very Unhealty and Hazardous.
  } else {
    return 0; // Error or unknown response.
  }
}

As a user I want to be able to set another ranges to have more flexible automation at the Apple Home

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.