merdok / homebridge-miot

Homebridge plugin for devices supporting the Xiaomi miot protocol
MIT License
380 stars 62 forks source link

Xiaomi Smart Air Purifier 4 Pro #260

Closed rgreco87 closed 2 years ago

rgreco87 commented 2 years ago

Describe the bug Screen toggle keep showing even if I set "ledControl": false;

Expected behavior Screen toggle should not be visible when "ledControl" is set to "false";

Your config.json

"platforms": [
        {
            "name": "Config",
            "port": 8581,
            "platform": "config"
        },
        {
            "devices": [
                {
                    "name": "Purificatore Salotto",
                    "ip": "192.168.0.27",
                    "token": "6e42206c696f1fa7fe2f0688f92f774e",
                    "deviceId": "EC:4D:3E:7F:63:6E",
                    "model": "zhimi.airp.vb4",
                    "pollingInterval": 10,
                    "deepDebugLog": false,
                    "customAccessory": false,
                    "buzzerControl": false,
                    "ledControl": false,
                    "childLockControl": false,
                    "modeControl": false,
                    "fanLevelControl": false,
                    "ioniserControl": true,
                    "pm25Breakpoints": [
                        7,
                        15,
                        30,
                        55
                    ]
                }
            ],
            "platform": "miot"
        }
    ]

Debug log

[4/11/2022, 11:15:04 AM] Homebridge v1.4.0 (HAP v0.10.0) (Homebridge 539E) is running on port 51782.
[4/11/2022, 11:15:04 AM] [miot] [Purificatore Salotto] Model known: zhimi.airp.vb4!
[4/11/2022, 11:15:04 AM] [miot] [Purificatore Salotto] Initializing device!
[4/11/2022, 11:15:04 AM] [miot] [Purificatore Salotto] Initializing device services
[4/11/2022, 11:15:04 AM] [miot] [Purificatore Salotto] Device services: [
  "air-purifier",
  "environment",
  "filter",
  "alarm",
  "physical-controls-locked",
  "screen",
  "device-display-unit",
  "custom-service",
  "filter-time",
  "aqi",
  "rfid"
]
[4/11/2022, 11:15:04 AM] [miot] [Purificatore Salotto] Initializing device properties
[4/11/2022, 11:15:04 AM] [miot] [Purificatore Salotto] Device properties: [
  "air-purifier:on",
  "air-purifier:mode",
  "air-purifier:fault",
  "air-purifier:fan-level",
  "air-purifier:anion",
  "environment:relative-humidity",
  "environment:pm2.5-density",
  "environment:temperature",
  "environment:pm10-density",
  "filter:filter-life-level",
  "filter:filter-used-time",
  "filter:filter-left-time",
  "alarm:alarm",
  "physical-controls-locked:physical-controls-locked",
  "screen:brightness",
  "device-display-unit:temperature-display-unit",
  "custom-service:moto-speed-rpm",
  "custom-service:favorite-speed",
  "custom-service:motor-set-speed",
  "custom-service:favorite-level",
  "custom-service:buttom-door",
  "custom-service:reboot-cause",
  "custom-service:manual-level",
  "custom-service:country-code",
  "filter-time:filter-used-debug",
  "aqi:purify-volume",
  "aqi:average-aqi",
  "aqi:aqi-state",
  "aqi:aqi-updata-heartbeat",
  "rfid:rfid-tag",
  "rfid:rfid-factory-id",
  "rfid:rfid-product-id",
  "rfid:rfid-time",
  "rfid:rfid-serial-num"
]
[4/11/2022, 11:15:04 AM] [miot] [Purificatore Salotto] Initializing device actions
[4/11/2022, 11:15:04 AM] [miot] [Purificatore Salotto] Device actions: [
  "air-purifier:toggle",
  "filter:reset-filter-life",
  "custom-service:toggle-mode",
  "custom-service:toggle-fan-leve"
]
[4/11/2022, 11:15:04 AM] [miot] [Purificatore Salotto] Successfully created a AirPurifier device! It is a Xiaomi Air Purifier Pro 4.
[4/11/2022, 11:15:04 AM] [miot] [Purificatore Salotto] Initializing accessory!
[4/11/2022, 11:15:04 AM] [miot] [Purificatore Salotto] Accessory successfully initialized!
[4/11/2022, 11:15:04 AM] [miot] [Purificatore Salotto] Registering 1 accessories!
[4/11/2022, 11:15:04 AM] [miot] [Purificatore Salotto] Everything looks good! Initiating property polling!
[4/11/2022, 11:15:04 AM] [miot] [Purificatore Salotto] Device found: zhimi.airp.vb4
[4/11/2022, 11:15:04 AM] [miot] [Purificatore Salotto] Setting up miot device!
[4/11/2022, 11:15:04 AM] [miot] [Purificatore Salotto] Device setup finished! Miot device ready!
[4/11/2022, 11:15:04 AM] [miot] [Purificatore Salotto] Connected to device: zhimi.airp.vb4
[4/11/2022, 11:15:04 AM] [miot] [Purificatore Salotto] Doing initial property fetch.
[4/11/2022, 11:15:05 AM] [miot] [Purificatore Salotto] Filter life level: 99%.
[4/11/2022, 11:15:05 AM] [miot] [Purificatore Salotto] Filter used time: 83 hours.
[4/11/2022, 11:15:05 AM] [miot] [Purificatore Salotto] Filter left time: 288 hours.
[4/11/2022, 11:15:05 AM] [miot] [Purificatore Salotto] Starting property polling.

Screenshots 69352A6E-5A4A-42C1-A098-8CC6A13743DF_1_101_o

Additional context N/A

rgreco87 commented 2 years ago

I have the same issue also with Xiaomi Smart Air Purifier 4 (zhimi.airp.mb5)

merdok commented 2 years ago

There is a dedicated screenControl property for that, did you try that one?

rgreco87 commented 2 years ago

There is a dedicated screenControl property for that, did you try that one?

Hello, no, I don’t know how to use it. I didn’t find any clear tutorial for that.

merdok commented 2 years ago

You just have a look in the docs for air purifiers and you will see all possible properties. screenControl is available so just use that instead of ledControl...

rgreco87 commented 2 years ago

You just have a look in the docs for air purifiers and you will see all possible properties. screenControl is available so just use that instead of ledControl...

Can you please explain? Thanks

Schermata 2022-04-11 alle 18 42 33
merdok commented 2 years ago

just put screenControl in your config.json for your device and set the value to false Here you have a configuration example: https://github.com/merdok/homebridge-miot#configuration