Xiaomi electric fan

Sorry for the slow response.

The new build of addons package has indeed brought the za4 version into play, and it seems to mostly work as intended.

As for the battery level not being exposed, you seem to be right - I can’t find it in the Xiaomi app either. I tried emailing SmartMi using the address posted on their site (sales@smartmi.com.cn) - but it freakin’ bounces! So I guess we can’t expect any support from them. Crazy though, not exposing this attribute, makes no sense…

Regarding the Android app and setting fan speeds, I am unable to get this to work. Tried adding the min, max and step values to the item in the sitemap - but still no go.
Everything else seems to work, so this is a real pitty.

Log doesn’t show anything unexpected:

2020-08-09 10:09:30.163 [ome.event.ItemCommandEvent] - Item 'fan_SpeedLevel' received command 35.0
2020-08-09 10:09:30.173 [nt.ItemStatePredictedEvent] - fan_SpeedLevel predicted to become 35.0
2020-08-09 10:09:30.183 [vent.ItemStateChangedEvent] - fan_SpeedLevel changed from 74 to 35.0
2020-08-09 10:09:30.836 [vent.ItemStateChangedEvent] - fan_SpeedLevel changed from 35.0 to 74

Other than it being set back to the previous value instantly…

Also, natural level does not appear to work at all. No value is fetched for the item and changing it does nothing.

Best regards,
/Fred

1 Like

haha…indeed as expected, China style service… service until the door… and we don’t even have a door… :frowning:

the fan does not seem to like the digit in 35.0, if you somehow can manage to send just 35 it will work as far as I can see. Don’t know why in my case it is sending without digits and in our case with digits.
The same I expect for the natural level.

I resolved the decimal issue by adding a state format to the Item entry as per this post.
Setting fan speed now works in Android app as well. And yes, this works for natural level as well. Although, that isn’t a percentage value so I assume one would need to adjust the min and maxValue for this to work as intended.
Now to find a working email address and have them expose the battery level…

1 Like

Hey there,
is that angle really working for you? For me it seems like it is ignoring it. Also would put 0 (if possible) in there to turn off rotation (otherwise I would approach that with a rule I guess).

About the speedlevel I put the following into the sitemap and it is working nicely:

Slider item=office_fan_speedlevel label="Geschwindigkeit [%d]" icon="flow" minValue=0 maxValue=100 step=5

Only downside is that you have two speeds to also control the natural level. I might attempt to also solve that with a rule later on (sth. like a Normal/Natural Switch and then only one speed level and forwarding that to the right speedlevel of the fan).

Greetings
Andy

Thx @marcel_verpaalen for all your work! That socket(?) was the best investment I ever did. :stuck_out_tongue:

:slight_smile: sure was… got me interested in the other miio devices and is still the one I use for much of my testing… nowadays almost 250 different devices are supported by the miio:basic driver.

1 Like

Hello!
Sorry to reopen this old thread, but I did not want to open a new one:

There is a new Model of the SmartMi Standing Fan (Version 3) that is not yet supported.
I have the test file here, but where should I put/send it (do I open an issue on GitHub?)

Bye, Fridolin.

Best is to submit it in github, than it won’t be missed…
what is the exact model string for it?

Thank you @marcel_verpaalen, will do that. The Model string seems to be “zhimi.fan.za5”. (SmartMi Standing Fan 3)
I guess it should have the same channels as the Mi Fan 2c, with the addition of an “ioniser”-Switch.

I appended the file here and will open a GitHub issue.

Bye, Fridolin.

test-zhimi.fan.za5-20210520-105542.txt (24.2 KB)

Thanks for the test file.
From what I see this device is using the ‘new’ miot style communication, so you won’t be able to substitute other models.

I’ll create a dB file for you in the coming days to test

Thank you very much Marcel, looking forward to it!

Bye, Fridolin.

Hi @fridomac
Looks like your fan already has a file in the current snapshot

If you are on OH3, you can most likely just use it. If you’re on OH2.5 you can try, but your millage may vary

note your ioniser switch was most likely what made it in the file as ‘anion’ which is how it was spelled in the chinese spec file :slight_smile:

Thank you, I will try copying the file to my OH3 instance and report back.

Bye, Frido.

Silly question…

So I just got a Smart Standing Fan 3, my first ever Xiaomi device. I installed the app, and made the network (wifi) setup. But I understand I need a token… My fan is on the same network as OH, so I programmed my login details on the binding setup, set the server to ‘de’ (I’m in sweden), and selected local discovery. (I selected this because of the text “Allow for discovery via the cloud. This may be used for devices that are not on the same network as OpenHAB server” in the binding config section.

But my thing still stays in " HANDLER_CONFIGURATION_PENDING"

So I need to do something else obviously?
(Sorry for the very basic question!)

you need to get the token for your device in order to have it working.
If the logon details are right and you have the allowed for discovery via cloud, the tokens are obtained for you from the cloud.

Aha, but I have the fan on the same network as the openhab?

But anyway, I tried now also the other two options “Discover online suppported devices from Xiaomi cloud” and “Discover all devices from Xiaomi cloud”.

Should now my fan get populated with the token automatically (“token” is empty), or am I supposed to find it somewhere, (where?) and paste it into the fan thing?

Maybe I need to wait, or restart openhab or something?
Edit: I’m using the binding that came with oh3.1 release. Maybe I need an updated binding?

Both work the same… the later is for more advanced usage if you are trying to incorporate very new (unsupported devices)

there is no need for updating, the v3.1 is very new.
You can check the binding readme to see if your device is already supported.
In any case you first need the token for your device to get connection & more details.
You can run the ‘scan’ in the discovery page if you are inpatient

Yes, I understand I need the token. The Fan it self is already found and installed as a thing.

So I switched back to “Discover online supported deivces”, but where is the token supposed to show up? Directly/automatically in the Fan thing, or somewhere else?

Maybe xiaomi server is down, it was very slow yesterday, when I installed their app on my phone. I’ll leave it until tomorrow, before I give up on this.

Thanks anyway,
Micael

see here the example/difference of the discovery results

you can check in either the degug logging or in the userdata/miio folder for files with filename miiotokens_COUNTRY.json) to know if the cloud connection was successfull

OK, so the miioTokens-de.json contained the token! After copying it to the fan thing, it came online. I think this is not easy to understand (or it was not for me, anyway, maybe it is too warm (hence the fan!) for my brain to find this information)!

Thanks, now I can continue configuring! :slight_smile:

So I found this thread when searching for support of my new Fan.
I notice many are now using OH3 but I am still hesitating and would like to continue using my OH2.5
For that reason I opened a new thread about this Fan support but using OH2.5
I would appreciate if you could please reply on that thread as well.