merdok / homebridge-miot

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

[zhimi.fan.za4] moveControl missing #457

Closed peterneutron closed 1 year ago

peterneutron commented 1 year ago

Describe the bug Setting "moveControl": true does not create the corresponding service.

Expected behavior When set to true the corresponding service should be created.

Your config.json

            "devices": [
                {
                    "name": "Fan",
                    "ip": "x.x.x.x",
                    "token": "xxxxxxxxx",
                    "deviceId": "xxxxxxxxx",
                    "model": "zhimi.fan.za4",
                    "pollingInterval": 10,
                    "deepDebugLog": false,
                    "micloud": {
                        "username": "xxxxxxxxx",
                        "password": "xxxxxxxxx",
                        "country": "xx"
                    },
                    "buzzerControl": true,
                    "ledControl": true,
                    "childLockControl": true,
                    "modeControl": true,
                    "swingControl": true,
                    "moveControl": true,
                    "horizontalAngleButtons": [
                        120,
                        90,
                        60,
                        30
                    ]
                }
            ],
            "platform": "miot"
        }

Debug log

Got device configuration, initializing device with name: xxxxxxxxx
Model known: zhimi.fan.za4!
Initializing device!
Initializing device services
Device services: [
  "fan",
  "physical-controls-locked",
  "alarm",
  "indicator-light"
]
Initializing device properties
Device properties: [
  "fan:on",
  "fan:fan-level",
  "fan:horizontal-swing",
  "fan:horizontal-angle",
  "fan:mode",
  "physical-controls-locked:physical-controls-locked",
  "alarm:alarm",
  "indicator-light:on"
]
Initializing device actions
Successfully created a Fan device! It is a Smartmi Standing Fan 2s.
Initializing accessory!
Accessory successfully initialized!
Registering 1 accessories!
Everything looks good! Initiating property polling!
Log in to MiCloud!
Successfully connected to MiCloud! Setting up miot device from MiCloud connection!
Connected to device: zhimi.fan.za4
Doing initial property fetch.
Starting property polling.

Screenshots None

Additional context homebridge: 1.6.0 homebridge-miot: 1.5.2

merdok commented 1 year ago

The zhimi.fan.za4 is not a native miot device. Instead it uses the xiaomi cloud to emulate the miot protocol, unfortunately xiaomi does not offer all the functionality for some reason when emulating hence the move service is missing on that device. This is a xiaomi limitation and there is nothing that can be done to enable it with the miot protocol.

peterneutron commented 1 year ago

So the only chance to get all native miio functionality for this fan is to use your homebridge-xiaomi-fan plugin as I figure you have no intention of combining both protocols into a single plugin.

merdok commented 1 year ago

This plugin is only about the new miot protocol and the old miio protocol will not be supported here as it is basically end of life. Yes, if you want to have full functionality you have to use the other plugin.