Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fanspeed doesn't work on zhimi.airpurifier.v6 #260

Open
wifiovermybody opened this issue Dec 25, 2021 · 3 comments
Open

Fanspeed doesn't work on zhimi.airpurifier.v6 #260

wifiovermybody opened this issue Dec 25, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@wifiovermybody
Copy link

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
@wifiovermybody wifiovermybody added the bug Something isn't working label Dec 25, 2021
@vitaliy-kozlov
Copy link

same issue with 2S

@dominikszewczyk
Copy link

same for 1

@szkocot
Copy link

szkocot commented Jan 27, 2022

After some trial and error, got it working with https://github.com/merdok/homebridge-miot.

All controls including fan speed, mode, led/buzzer control, humidity/temp sensors are working fine. I was finally able to get rid of xiaomi app.

Be aware, that your mi purifier may not be registered on a server in China, so it may get the wrong token from your login/password. Also, I've had to switch to config json, because miot config WebUI was unstable for me.

I've used https://github.com/PiotrMachowski/Xiaomi-cloud-tokens-extractor to get token for de server.
Here's my config:

{
    "platforms": [
        {
            "name": "Config",
            "port": 8581,
            "platform": "config"
        },
        {
            "devices": [
                {
                    "name": "Air Purifier 2",
                    "ip": "secret",
                    "token": "secret",
                    "deviceId": "secret",
                    "model": "zhimi.airpurifier.m1",
                    "pollingInterval": 7,
                    "deepDebugLog": false,
                    "micloud": {
                        "timeout": 10000,
                        "username": "secret",
                        "password": "secret",
                        "forceMiCloud": false,
                        "country": "de"
                    },
                    "buzzerControl": true,
                    "ledControl": true,
                    "showTemperature": true,
                    "screenControl": true,
                    "fanLevelControl": true,
                    "modeControl": true
                }
            ],
            "platform": "miot"
        }
    ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants