Git Product home page Git Product logo

homebridge-mi-humidifier's Introduction

homebridge-mi-humidifier

verified-by-homebridge version downloads donate

A Xiaomi Mi humidifier plugin for Homebridge.

⚠️ The config format was changed in version 2. See the configuration section for more details.

Installation

npm install -g homebridge-mi-humidifier

Configuration

Add the following part to the "platforms" section of your Homebridge config:

{
  "platform": "MiHumidifier",
  "devices": [
    {
      "name": "Humidifier",
      "address": "<ip>",
      "token": "<token>",
      "model": "zhimi.humidifier.v1",
      "updateInterval": 30,
      "disabled": false,
      "autoSwitchToHumidityMode": true,
      "disableTargetHumidity": false,
      "ledBulb": {
        "enabled": true,
        "name": "Humidifier LED"
      },
      "buzzerSwitch": {
        "enabled": true,
        "name": "Humidifier Buzzer"
      },
      "temperatureSensor": {
        "enabled": true,
        "name": "Humidifier Temperature"
      },
      "humiditySensor": {
        "enabled": true,
        "name": "Humidifier Humidity"
      }
    }
  ]
}

Platform

Key Description
platform Platform name. Has to be MiHumidifier
devices Array of devices configurations.

Device

Key Description Default value
name Name of the device. This will appear in your Home app. "Humidifier"
address IP address of the device.
token Device token. See obtaining token.
model One of:
- zhimi.humidifier.v1
- zhimi.humidifier.ca1
- zhimi.humidifier.cb1
- zhimi.humidifier.ca4
- deerma.humidifier.mjjsq
- deerma.humidifier.jsq2w
- deerma.humidifier.jsq1
- deerma.humidifier.jsq3
- deerma.humidifier.jsq4
- deerma.humidifier.jsq5
- deerma.humidifier.jsqs
- shuii.humidifier.jsq001
See supported devices section for more details.
updateInterval Device values update interval in seconds. This value affects how often data (humidity, temperature, etc.) from the device is updated. 30
disabled Disable the devices. Can be used to temporary hide the device when it is not required without removing it from config. false
autoSwitchToHumidityMode Automatically switches mode to "humidity" when target humidity is changed. Affects models:
- zhimi.humidifier.{ca1,cb1,ca4}
- deerma.humidifier.{mjjsq,jsq1,jsq001,jsqs,jsq3,jsq4,jsq5}
false
disableTargetHumidity Disables ability to control target humidity. In this case long press on device in Home.app will allow to control fan speed instead of target humidity. false
ledBulb.enabled Enables additional light bulb accessory which allows to control LED lights. false
ledBulb.name Name of LED lightbulb. This will appear in your Home app. "Humidifier LED"
buzzerSwitch.enabled Enables additional switch accessory which allows to control buzzer. false
buzzerSwitch.name Name of buzzer switch. This will appear in your Home app. "Humidifier Buzzer"
temperatureSensor.enabled Enables additional temperature sensor accessory. false
temperatureSensor.name Name of temperature sensor. This will appear in your Home app. "Humidifier Temperature"
humiditySensor.enabled Enables additional humidity sensor accessory. false
humiditySensor.name Name of humidity sensor. This will appear in your Home app. "Humidifier Humidity"
cleanModeSwitch.enabled Enables additional switch accessory which allows to control clean mode (only for zhimi.humidifier.ca4). false
cleanModeSwitch.name Name of clean mode switch. This will appear in your Home app. "Humidifier Clean Mode"

Supported devices

Smartmi Humidifier

Model: zhimi.humidifier.v1

Model №: CJJSQ01ZM

Smartmi Evaporative Humidifier

Model: zhimi.humidifier.ca1 / zhimi.humidifier.cb1

Model №: CJXJSQ02ZM, SKV6001EU

Smartmi Evaporative Humidifier 2

Model: zhimi.humidifier.ca4

Model №: CJXJSQ04ZM

Zero Fog Humidifier

Model: shuii.humidifier.jsq001

Model №: DWZF(G)-2100Z

Mijia Smart Sterilization Humidifier (S)

Model: deerma.humidifier.mjjsq / deerma.humidifier.jsq001

Model №: SCK0A45, ZNJSQ01DEM, MJJSQ03DY

Mi Smart Humidifier 2

Model: deerma.humidifier.jsq2w

Model №: MJJSQ05DY

Mijia Pure Smart Humidifier

Model: deerma.humidifier.jsq4

Model №: CJSJSQ01DY

homebridge-mi-humidifier's People

Contributors

azrael avatar bedrin avatar dependabot[bot] avatar ftp27 avatar goto100 avatar ildarmurzenkov avatar ileodo avatar leoneleone avatar nt0xa avatar numkovich avatar pietrolubini avatar shuangbing 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

Watchers

 avatar  avatar  avatar  avatar

homebridge-mi-humidifier's Issues

After Updating from v.1.3.0 to v.1.4.0

Error Message
Error: The requested accessory 'MiHumidifier' was not registered by any plugin.
at PluginManager.getPluginForAccessory (/usr/local/lib/node_modules/homebridge/src/pluginManager.ts:198:15)
at config.accessories.forEach (/usr/local/lib/node_modules/homebridge/src/server.ts:347:37)
at Array.forEach ()
at Server._loadAccessories (/usr/local/lib/node_modules/homebridge/src/server.ts:330:29)
at Server.start (/usr/local/lib/node_modules/homebridge/src/server.ts:156:12)
at cli (/usr/local/lib/node_modules/homebridge/src/cli.ts:80:10)
at Object. (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)

Config
...
"accessories": [
{
"name": "Humidifier",
"ip": "192.168.1.110",
"token": "7901cd9ea76ae5554376ea636cb5642c",
"showMuteSwitch": true,
"nameMuteSwitch": "Mute humidifier",
"showTemperature": true,
"nameTemperature": "Temperature",
"showHumidity": true,
"nameHumidity": "Humidity",
"accessory": "MiHumidifier"
}
],
...

I am using homebridge under such environment
Raspberry Pi 4 Model B Rev 1.1
Raspbian GNU/Linux 10 (buster)
node v10.21.0
hb-service version is v4.31.0

And I set the humidifier deerma mjjsq version.

New feature: empty water sensor

Please add new feature: "empty water sensor".
Xiaomi app send push when water in humidifier less level. I want sensor for Homekit, to realise custom notification.

Problems with latest update v2.3.0 under homebridge 1.3.0 / 1.3.1

Somehow, I have accidentally closed my last issue and dont know how to reopen, so here we go again:

Actually there is an issue somehow with the latest update on the CA4. Automations no longer switch the humidifiers on. Switching them on manually, puts them on but leaves the switch in „off“ position, so no surprise the automations fail.....
Here the Error I get:

[MiHumidifier] [192.168.2.16] Fail to set device property "mode". Error: Invalid result: {"did":"mode","siid":2,"piid":5,"code":-4002}

I have :
"autoSwitchhToHumidityMode": false, "disableTargetHumidity": true,

Will it work with mi humidifier v.2?

Hi,

I would like to ask if the plugin would work with xiaomi mi humidifier v.2 or only v.1 since there’s only v.1 model in your plugin setting according to the manual.

If possible, can u please post the picture of the one that work? xiaomi has so many humidifiers that I’m a but worrying I would end up buying the wrong one.

Thank you very much in advance.

Percentage values differ between Xiaomi App and Homekit

I use the plugin with deerma.humidifier.mjjsq

Unfortunately the humidity percentage values are not the same in the Xiaomi App and Homekit. The actual humidity is correct in Homekit, but the target humidity always differs by a few percent (e.g. 54% in App corresponds to 48% in Homekit).
Also it shouldn't be possible to set a value greater than 70% or lower than 40% (which are the max and min levels in the app)

Не регулируется скорость вращения. Не переходит в режим осушителя.

Здравствуйте!
Почему-то не доступны никакие регулировки кроме целевого уровня влажности в приложении Дом. При выключении увлажнителя на плитке все равно отображается целевая влажность, вместо выключения.
photo_2021-02-12_12-18-46
photo_2021-02-12_12-20-54

Конфиг:
{ "devices": [ { "disabled": false, "name": "Увлажнитель", "address": "172.17.0.181", "token": "2713b7a7cadbcc4afc91601b443886a3", "model": "zhimi.humidifier.cb1", "updateInterval": 1, "temperatureSensor": { "enabled": true, "name": "Температура воздуха" }, "humiditySensor": { "enabled": true, "name": "Влажность воздуха" }, "ledBulb": { "enabled": false, "name": "Led" }, "buzzerSwitch": { "enabled": false, "name": "Buzzer" } } ], "platform": "MiHumidifier" }

Unable to separate tile anymore

Recent update no longer allows me to separate the temperature & humidity tiles from the humidifier tiles

This makes it hard for us to discern whether the humidifier is on/off as the tiles’s color remains the same (unlike previous update where the tile turns white when on).

Clean mode

Would it be possible to add a switch for “clean mode” for model: zhimi.humidifier.ca4?

Some error

when set the speed between 1% and 30% ,the device will display "No response".

setRotationSpeed { Error: device_poweroff
at Object.reject (/home/pi/hbs/humidifier/plugin/miio/lib/device.js:217:13)
at Device._onMessage (/home/pi/hbs/humidifier/plugin/miio/lib/device.js:108:8)
at emitTwo (events.js:126:13)
at Socket.emit (events.js:214:7)
at UDP.onMessage [as onmessage] (dgram.js:659:8) code: -6011 }

Your plugin work well , TKS

Homebridge error

Fail to discover the device. Retry in 1 minute Error: Could not connect to device, handshake timeout
at Timeout._onTimeout (/homebridge/node_modules/homebridge-mi-humidifier/node_modules/miio/lib/network.js:427:17)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7)
{
code: 'timeout',
device: null
}

What can be wrong? Token got from modified me homу, ip correct

Add Min/Max Target humidity

Hello,

My device (deerma.humidifier.mjjsq) only have min/max Target humidity from 30% to 70%.
So i think, we should add this setting for device. Default should me 0% to 100%.
User can custom.

Thanks you

Adapter doesn't supported model: v1

Hi!

Homebridge started putting line "Adapter doesn't supported model: v1" in log, no other lines concerning Humidifier. Also it cannot be controlled on the "Accessories" tab of the Homebridge.

Config:
{
"name": "Увлажнитель",
"ip": "192.168.1.210",
"token": "9936a73b0107e0cab998440ae88c57",
"model": "v1",
"showMuteSwitch": false,
"nameMuteSwitch": "Mute humidifier",
"showTemperature": true,
"nameTemperature": "Увлажнитель Термометр",
"showHumidity": true,
"nameHumidity": "Увлажнитель Гигрометр",
"accessory": "MiHumidifier"
},

When importing to Home Assistant Integration, there is an error.

I have two humidifiers, which is both configured with this plugin.!

스크린샷 2021-01-26 23 05 57

There is no problem in configuration, I just set using the "settings" in the plugin menu.

"platforms": [
    {
        "devices": [
            {
                "name": "Bedroom Humidifier",
                "address": "192.168.1.129",
                 ...
                }, ...
            },
            {
                "name": "Living Room Humidifier",
                "address": "192.168.1.128",
                  ...
            }
        ],
        "platform": "MiHumidifier"
    },
    {
        "name": "Config",
        "port": 8581,
        "platform": "config"
    }
]

From the screenshot below, I guess that is because of the Name "Humidifier" or "Serial Number" which is in both of the humidifiers.
The screenshot is from one of the humidifiers in "Accessories" menu.

스크린샷 2021-01-26 23 21 00

I am always grateful for your contributions.!

New features

Can I add options such as turning on the backlight and turning off the sound notifications?

Serial number

Is it possible to set your own serial number in homekit ? Because if so, it would be a good feature to implement. Default serial number breaks the Eve for Homekit app.

Ability to hide Child lock and Oscillate switches

Is it possible to implement the ability to hide Child lock and Oscillate switches ? If so, please add these features in config. It would be useful because after disabling target humidity these switches shows up in long tap tile and it is annoying

Does this plugin support Xiaomi Humidifier 4th?

스크린샷 2021-01-20 오전 12 22 31

I installed the same plug-in on the Hoobs platform. Does Xiaomi also support 4th generation humidifier? What is the model name?

"zhimi.humidifier.v1", "zhimi.humidifier.ca1", "zhimi.humidifier.cb1", "zhimi.humidifier.ca4", "deerma.humidifier.mjjsq", "shuii.humidifier.jsq001". Default is "zhimi.humidifier.v1"

Failed to set device property “mode” error

Hi, I've created a pretty basic scene to turn on humidifier
image

When I toggle it, it says "failed" on a button (but it turns humidifier on anyway)
image

And I see this error in logs while I'm doing this
image

Any ideas what can it be? Thx

deerma.humidifier.jsq: Fail to connect to device

While I'm running
> DEBUG=miio-api* homebridge -D

I getting this error:

Fail to connect to device <IP>. TypeError: this.socket.connect is not a function

Model: deerma.humidifier.jsq

My config file:

{
            "devices": [
                {
                    "name": "Humidifier",
                    "address": "<IP>",
                    "token": "<TOKEN>",
                    "model": "deerma.humidifier.mjjsq",
                    "updateInterval": 30,
                    "temperatureSensor": {
                        "enabled": false,
                        "name": "Temperature"
                    },
                    "humiditySensor": {
                        "enabled": false,
                        "name": "Humidity"
                    },
                    "ledBulb": {
                        "enabled": false,
                        "name": "Led"
                    },
                    "buzzerSwitch": {
                        "enabled": false,
                        "name": "Buzzer"
                    }
                }
            ],
            "platform": "MiHumidifier"
        }

> miio tokens update...

 INFO  Connected to miio:248157080  - trying to change token

Token has been updated

> DEBUG=miio\*,thing\* miio inspect <IP>

...
Device ID: 248157080
Model info: deerma.humidifier.jsq
Address: <IP>
Token: <TOKEN> via stored token
Support: At least generic

Type info: miio
Capabilities:

Firmware version: 2.0.7
Hardware version: esp8266
MCU firmware version: 0113

Do you have any ideas why this could happen?


This is interesting, I have almost the same issue with other plugin:

 [Xiaomi Mi Robot Vaccum 1st Generation] ERR connect | miio.device, next try in 2 minutes | Error: Could not connect to device, handshake timeout

But because it has retries it suddenly starts working: https://github.com/homebridge-xiaomi-roborock-vacuum/homebridge-xiaomi-roborock-vacuum/blob/master/index.js#L752
Or maybe it's just a coincidence.

Homebridge accessories unresponsive/slow when plugin is installed

Hi,

I am using homebridge with this plugin in two different homes, each equipped with the cb1 humidifier. I open the Apple Home.app and after some time showing "updating", all Homebridge accessories show "No Response". I then have to close and re-ope the Home.app and the Homebridge accessories work. On both homes this only happens when the mi-humidifier plugin is installed. Do you have any idea what can be causing this?

Thank you very much

function add

thanks for your plugin, it work well and if it can display "water level" it will be perfect!

The requested accessory 'MiHumidifier' was not registered by any plugin after updating to 1.4.0

Hello,

I'm using Homebridge Docker image from oznu. After updating the plugin to version 1.4.0 Homebridge fails on boot with this error:
The requested accessory 'MiHumidifier' was not registered by any plugin

Homebridge Log:

[10/11/2020, 9:02:09 PM] ERROR LOADING PLUGIN homebridge-mi-humidifier:,
[10/11/2020, 9:02:09 PM] /homebridge/node_modules/homebridge-mi-humidifier/devices/MiHumidifierFactory.js:5,
  static adapterVersionMap = {,
                           ^,
SyntaxError: Unexpected token =,
    at Module._compile (internal/modules/cjs/loader.js:723:23),
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10),
    at Module.load (internal/modules/cjs/loader.js:653:32),
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12),
    at Function.Module._load (internal/modules/cjs/loader.js:585:3),
    at Module.require (internal/modules/cjs/loader.js:692:17),
    at require (internal/modules/cjs/helpers.js:25:18),
    at Object.<anonymous> (/homebridge/node_modules/homebridge-mi-humidifier/index.js:6:29),
    at Module._compile (internal/modules/cjs/loader.js:778:30),
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10),

[10/11/2020, 9:02:21 PM] Error: The requested accessory 'MiHumidifier' was not registered by any plugin.,
    at API.accessory (/usr/local/lib/node_modules/homebridge/lib/api.js:64:13),
    at Server._loadAccessories (/usr/local/lib/node_modules/homebridge/lib/server.js:297:42),
    at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:91:38),
    at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:59:10),
    at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22),
    at Module._compile (internal/modules/cjs/loader.js:778:30),
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10),
    at Module.load (internal/modules/cjs/loader.js:653:32),
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12),
    at Function.Module._load (internal/modules/cjs/loader.js:585:3),

Homebridge config:

    {
            "name": "Humidifier",
            "ip": "192.168.1.30",
            "token": "xxxxxxxxx",
            "model": "v1",
            "showTemperature": true,
            "nameTemperature": "Temperature",
            "showHumidity": true,
            "nameHumidity": "Humidity",
            "accessory": "MiHumidifier"
        }

Characteristics-Error with Homebridge 1.3.1

After updating my hombridge to 1.3.1. the mi humidifer throws the following warning message in the log:
"Characteristic not in required or optional characteristic section for service Service. Adding anyway."

The humidifiers work fine as far as I can tell. Is this a bug in 1.3.1 or somehting that needs fiwing in the plugin? Thanks for having a look at it.

Invalid packet size, expected 176 got 32

1/29/2021, 4:07:57 PM Error: Invalid packet size, expected 176 got 32
    at Function.fromBuffer (/home/hoobs/.hoobs/node_modules/miio-api/dist/packet.js:30:19)
    at socket.send.responseBuffer.responseBuffer (/home/hoobs/.hoobs/node_modules/miio-api/dist/device.js:148:57)
    at Socket.onMessage (/home/hoobs/.hoobs/node_modules/miio-api/dist/socket.js:101:32)
    at Socket.emit (events.js:314:20)
    at UDP.onMessage [as onmessage] (dgram.js:921:8)
1/29/2021, 4:07:57 PM Got SIGTERM, shutting down Bridge...

Setting up with

[
    {
      "name": "Humidifier",
      "address": "REDACTED",
      "token": "REDACTED",
      "model": "zhimi.humidifier.ca1",
      "updateInterval": 30,
      "disabled": false,
      "ledBulb": {
        "enabled": true,
        "name": "Humidifier LED"
      },
      "buzzerSwitch": {
        "enabled": true,
        "name": "Humidifier Buzzer"
      },
      "temperatureSensor": {
        "enabled": true,
        "name": "Humidifier Temperature"
      },
      "humiditySensor": {
        "enabled": true,
        "name": "Humidifier Humidity"
      }
    }
  ]

I also tried against zhimi.humidifier.cb1 for my evaporative humidifier

Home.app frequently shows "not responding" and Siri cannot control humidifer at first try

Thanks for the plugin, @russtone!

I've found that two requests that you make to overcome sleep after idle issue doesn't work that well for me.
I've decided to do a constant polling of my humidifer (for any characteristic really) to prevent it from going idle.
Now I don't see any "not responding" issues for 2 days straight.

These are the changes I've made: master...ZEMUSHKA:master, maybe it will help someone.

I understand that it will eat more power, but I assume it's negligible comparing with that huge fan we need to power.
Also, I haven't seen a single retry in 2 days, look like they've all happened because of 2 simultaneous requests and race that ends up with "busy" error.

Type problem

После обновления homebridge на версию 0.4.47 вылетает следующая ошибка:

throw new Error("The requested accessory '" + name + "' was not registered by any plugin.");
      ^
Error: The requested accessory 'MiHumidifier' was not registered by any plugin.
at API.accessory (/usr/local/lib/node_modules/homebridge/lib/api.js:64:13)
at Server._loadAccessories (/usr/local/lib/node_modules/homebridge/lib/server.js:296:42)
at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:90:38)
at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:45:10)
at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)

Конфиг я не менял:

   "accessories": [
        {
            "accessory": "MiHumidifier",
            "name": "Увлажнитель",
            "ip": "192.168.88.227",
            "token": "xxxxxxxxxxx",
            "model": "v1",
            "showTemperature": true,
          "nameTemperature": "Температура увлажнителя"
        }
    ],

Support disabling/dimming LED

At least some humidifiers support dimming and even turning off the LED.

set_led_b '["0"]'
get_prop '["led_b"]'

Properties:
0 - on
1 - dimmed
2 - off

2.0.0-beta.x

Thanks for the beta. I have the feeling using "platforms" is a good way.
However...

zhimi.humidifier.ca4

LED - not working
Buzzer - not working
Temperature - not working

[16.12.2020, 19:39:43] [MiHumidifier] Fail to set property 'led_brightness'. Error: Invalid result: {"did":"led_brightness","siid":5,"piid":1,"code":-4004}
    at Proto.setProp (/usr/local/lib/node_modules/homebridge-mi-humidifier/dist/devices/protocols/protocol.js:43:19)
    at BaseHumidifier.setProp (/usr/local/lib/node_modules/homebridge-mi-humidifier/dist/devices/humidifier.js:134:13)
    at On.<anonymous> (/usr/local/lib/node_modules/homebridge-mi-humidifier/dist/devices/humidifier.js:94:28)

[16.12.2020, 19:39:45] [MiHumidifier] Fail to set property 'led_brightness'. Error: Invalid result: {"did":"led_brightness","siid":5,"piid":1,"code":-4004}
    at Proto.setProp (/usr/local/lib/node_modules/homebridge-mi-humidifier/dist/devices/protocols/protocol.js:43:19)
    at BaseHumidifier.setProp (/usr/local/lib/node_modules/homebridge-mi-humidifier/dist/devices/humidifier.js:134:13)
    at On.<anonymous> (/usr/local/lib/node_modules/homebridge-mi-humidifier/dist/devices/humidifier.js:94:28)

[16.12.2020, 19:39:46] [MiHumidifier] Fail to set property 'led_brightness'. Error: Invalid result: {"did":"led_brightness","siid":5,"piid":1,"code":-4004}
    at Proto.setProp (/usr/local/lib/node_modules/homebridge-mi-humidifier/dist/devices/protocols/protocol.js:43:19)
    at BaseHumidifier.setProp (/usr/local/lib/node_modules/homebridge-mi-humidifier/dist/devices/humidifier.js:134:13)
    at Brightness.<anonymous> (/usr/local/lib/node_modules/homebridge-mi-humidifier/dist/devices/humidifier.js:94:28)

[16.12.2020, 19:39:47] [MiHumidifier] Fail to set property 'led_brightness'. Error: Invalid result: {"did":"led_brightness","siid":5,"piid":1,"code":-4004}
    at Proto.setProp (/usr/local/lib/node_modules/homebridge-mi-humidifier/dist/devices/protocols/protocol.js:43:19)
    at BaseHumidifier.setProp (/usr/local/lib/node_modules/homebridge-mi-humidifier/dist/devices/humidifier.js:134:13)
    at Brightness.<anonymous> (/usr/local/lib/node_modules/homebridge-mi-humidifier/dist/devices/humidifier.js:94:28)
[16.12.2020, 19:45:14] [MiHumidifier] Fail to set property 'mode'. Error: Invalid result: {"did":"mode","siid":2,"piid":5,"code":-4002}
    at Proto.setProp (/usr/local/lib/node_modules/homebridge-mi-humidifier/dist/devices/protocols/protocol.js:43:19)
    at BaseHumidifier.setProp (/usr/local/lib/node_modules/homebridge-mi-humidifier/dist/devices/humidifier.js:134:13)
    at RotationSpeed.<anonymous> (/usr/local/lib/node_modules/homebridge-mi-humidifier/dist/devices/humidifier.js:94:28)

[16.12.2020, 19:45:17] [MiHumidifier] Fail to set property 'mode'. Error: Invalid result: {"did":"mode","siid":2,"piid":5,"code":-4002}
    at Proto.setProp (/usr/local/lib/node_modules/homebridge-mi-humidifier/dist/devices/protocols/protocol.js:43:19)
    at BaseHumidifier.setProp (/usr/local/lib/node_modules/homebridge-mi-humidifier/dist/devices/humidifier.js:134:13)
    at RotationSpeed.<anonymous> (/usr/local/lib/node_modules/homebridge-mi-humidifier/dist/devices/humidifier.js:94:28)

[16.12.2020, 19:46:15] [MiHumidifier] Fail to set property 'led_brightness'. Error: Invalid result: {"did":"led_brightness","siid":5,"piid":1,"code":-4004}
    at Proto.setProp (/usr/local/lib/node_modules/homebridge-mi-humidifier/dist/devices/protocols/protocol.js:43:19)
    at BaseHumidifier.setProp (/usr/local/lib/node_modules/homebridge-mi-humidifier/dist/devices/humidifier.js:134:13)
    at On.<anonymous> (/usr/local/lib/node_modules/homebridge-mi-humidifier/dist/devices/humidifier.js:94:28)

  {
            "platform": "MiHumidifier",
            "devices": [
                {
                    "name": "Luftbefeuchter",
                    "address": "xxx.xxx.xxx.xx",
                    "token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                    "model": "zhimi.humidifier.ca4",
                    "updateInterval": 30,
                    "ledBulb": {
                        "enabled": true,
                        "name": "Luftbefeuchter LED"
                    },
                    "buzzerSwitch": {
                        "enabled": true,
                        "name": "Luftbefeuchter Buzzer"
                    },
                    "temperatureSensor": {
                        "enabled": true,
                        "name": "Luftbefeuchter Temperatur"
                    },
                    "humiditySensor": {
                        "enabled": true,
                        "name": "Luftbefeuchter Luftfeuchtigkeit"
                    }
                }
            ]
        },

Napkin 16 12 20, 7 51 22 PM

80% is highest, but not really

Not sure how to explain this, but if I set the humidifier to 100% in Home, it always will be automatically set back to 80%, which is fine.

Now, let's assume the humidity is 45% and I set the humidifier in home to 100%, it will automatically be set to 80%. The wheel starts spinning and the blower starts rotating quite fast, just as I expect it to. But when I manually set the humidifier to 3, instead of automatic, it rotates even faster.

In other words: either the max in the plugin (80%) is not really the highest setting, OR does this have to do with the actual current humidity? E.g., would it spin faster at 80% if the current humidity would be 25%?

Invalid IP

Hello,

I have a Mi Humidifier 2. I am getting the following error:

MiHumidifier] Invalid config for device #0}. Error: Ivalid IP address undefined
at Object.validateConfig (/home/hoobs/.hoobs/node_modules/homebridge-mi-humidifier/dist/utils.js:18:15)
at /home/hoobs/.hoobs/node_modules/homebridge-mi-humidifier/dist/platform.js:34:25
at Array.forEach ()
at MiHumidifierPlatform.didFinishLaunching (/home/hoobs/.hoobs/node_modules/homebridge-mi-humidifier/dist/platform.js:31:29)
at HomebridgeAPI.emit (events.js:215:7)
at HomebridgeAPI.signalFinished (/usr/local/lib/node_modules/@hoobs/hoobs/node_modules/homebridge/lib/api.js:81:14)
at Server.start (/usr/local/lib/node_modules/@hoobs/hoobs/bridge/server.js:160:18)
at /usr/local/lib/node_modules/@hoobs/hoobs/bridge/cli.js:94:16
at processTicksAndRejections (internal/process/task_queues.js:93:5)

The IP-adress is correct...
My config:

[
{
"platform": "MiHumidifier",
"devices": [
{
"name": "Luftfukter",
"address": "192.168.68.194",
"token": "2e563007425a05924d4e5eb6fb13daa0",
"model": "zhimi.humidifier.ca4",
"updateInterval": 30,
"ledBulb": {
"enabled": true,
"name": "Humidifier LED"
},
"buzzerSwitch": {
"enabled": true,
"name": "Humidifier Buzzer"
},
"temperatureSensor": {
"enabled": true,
"name": "Humidifier Temperature"
},
"humiditySensor": {
"enabled": true,
"name": "Humidifier Humidity"
}
}
]
}
]

zhimi.humidifier.ca4 Fail to get props. SocketError

I've also noticed same spam in logs with this error: 'Fail to get props. SocketError: Timeout', it seems issue is not resolved. I've also mentioned this in #46

Are you getting these errors for jsq model?

I have zhimi.humidifier.ca4 model. If this may help, I have two same devices connected with your plugin, maybe there is any complication if more than one device is connected?

Originally posted by @lvtz in #47 (comment)

Graceful error handling for inactive / unplugged devices

As the humidifier is a "seasonal" product which I will put in the cellar at the end of the heating season (Late February / Mid March over here), I wonder whether it might be possible to give a "smart" message that the device is not plugged in rather than a full throttled error that can take the homebridge down.

Alternative would be, that I'd have to take the entries for my humidifiers out of config, save them somewhere else, and put them back in again for the next heating season, which isnt very comfortable.

Is this something that might be possible to consider, maybe by adding a config item "smart error": true/false - or similar?

Many thanks

Target humidity is missing?

Hello,

I'm wondering if it's correct bahaviour or not: I can set the target humidity only via Mi Home app, not via Homekit - I see 3 positions for fan speed:
image
and in settings I have a fan speed slider:
image

Humidifier (ca4-Modell) does not stop ventilating once the set target-humidity has been reached

There appears to be an issue with controlling the SmartMi humidifier using target humidity. I would have expected that the ventilator switches off once the target humidity has been reached, and, consequently, that it will switch on again once the actual humidity falls below the set target humidity.

This does not appear to be the case. The humidifier keeps ventilating / rotating even after reaching the target.

Resetting the humidifier and reconnecting with new token does not solve the issue.

Is this a known problem? Thanks for having a look into it.

IMG_0144

Not responding in Apple Home

Hi, Thanks for this amazing project!

While I use it, I release the device show as not responding in the Apple Home time to time, while the other homebridge accessories were fine.

However, after a while (5~10 sec), I can interact with device suddenly.

Is there any state pull interval can be specified?

Thanks.

Update status error

Thanks for the water level!

However, as with the previous version, that with this one, the following problems are observed for the humidifier version 2:

If you enter the home program, the homebridge device status update ends - the device does not respond] (along with the homebridge).
If you restart the program, then in most cases it disappears.
This manifests itself only when the plug-in for the humidifier is on.

Homebridge/miio update

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.