Page 1 of 1

[Python plugin] Xiaomi Pedestrial Fan ZA4

Posted: Monday 29 June 2020 8:45
by TheCondor
Hi, i started working on a plugin for interact with the xiaomi fan, model ZA4 (currently avaiable).
Here the github page, is WIP and is based on the awesome work done by "mnir" for the xiaomi vacuum.
https://github.com/Condorello/Domoticz-Xiaomi-Fan-ZA4

Currently i successfully retrive the status of the fan (on-off), can set the rotating angle and the fan speed plus retrive the status of the same parameters. I've just some trouble to change the rotating angle device states when it's off but i expect to fix that soon.
Step after is to manage the direct and natural fan parameter, this is not so simple because the API does't provides a simple toggle command.

Re: [Python plugin] Xiaomi Pedestrial Fan ZA4

Posted: Wednesday 01 July 2020 0:31
by TheCondor
Update: plugin is now fully working with toggle of natural/direct mode, fan speed and current status retrive.
There's just few graphical customizations to do (icons etc) and a bit cleaning of the code but is working, and this is a good starting point for add support for other device such air purifield and similar.

P.S. Battery is not provided by the device so is not possible to obtain that value in any way.

Re: [Python plugin] Xiaomi Pedestrial Fan ZA4

Posted: Friday 10 July 2020 20:49
by Basssment
Hi,

Do you think this plugin will also work with the xiaomi Mi Smart Standing Fan 1C?
I have this and found some scripts which made me connect to it but not send commands and adding it to domoticz.
B

Re: [Python plugin] Xiaomi Pedestrial Fan ZA4

Posted: Friday 10 July 2020 22:53
by TheCondor
Keep an eye here

https://github.com/rytilahti/python-miio

Seems to be not supported now, but when they Will implement api It Will be simple to adapt my script