@shorty707 i think I may request too many properties in one go.I read somewhere that only 8 properties can be requested, for the purifier I think currently there are 9.
I don’t own one myself, so can’t test out locally.
I’ll see if I can split the request in 2.
Can you maybe enable the commands channel (advanced) and see if it works with less properties.
hi, in fact I think there is 2 missing field, 1 is temperature, 2 is fanspeed,
I found the binding is not very stable, air purifier stop response to OH binding while later ( I am not sure for how long), but at same time, I still able to use miio(JS) to control it.
May I know do you have schedule yet for next version release? I may give some help on debug.
@hamwong actually the new version has already been available, did not have the time yet to make a proper forum post around it. It is available on the marketplace.
For all the non-vacuum devices, indeed the debugging that would help is
Indicate if discovery works, and what is the ‘Device Model String’ (in the advanced thing properties)
send the log of the binding (from start to end, incl the discovery & first commands + responses)
For your specific device: find which commands & properties are supported and execute those commands via the (advanced) commands channel. Than send example of the command & responses.
Even better: Propose a database file for it (see examples in the github).
I’ll make a separate topic for the non-vacuum devices to discuss the specifics around those devices
New version available for the Xiaomi Vacuum
Significant ‘under the hood’ changes: Changed the communication from synchronous to async. This should improve the binding performance esp in case you have failing responses.
Main changes
Changed the communication from synchronous to async
Command queuing, ensuring all commands are executed
Improved online/offline detection. Note, if your device can be pinged, but does not accept commands it assumes a token issue and goes to offline with configuration error.
Support for IOS encrypted tokens ( @sradi can you pls test)
Faster discovery of miio things
2nd discovery method (using mDNS), which may support discovery passing subnet boundary (@Multisaft7 this may fix your discovery issue)
Check for checksum errors
Added Xiaomi Philips Led Bulb support
As usual: To update to the latest version, uninstall the market place binding and re-install it. Remove your device and let it be discovered again to ensure the latest config is used.
In case anyone is running Android 8.0 (Oreo), the MiToolkit did not work for me. It threw an exception when it tried to unpack the backup. I believe this is because Oreo changed the version number in the backup file from 4 to 5. Thanks for that Google!
To get the token, I ended up following this procedure here, with one additional step. After the backup.ab file is created, I edited it with a hex editor and changed the backup version number from 5 to 4 (the number is near the beginning of the file).
@marcel_verpaalen Thanks for your work on this binding. The availability of the binding is one of the reasons I went with the Xiaomi vacuum (along with the fact that the vacuum does quite a nice job cleaning).
Edit: Note that the procedure referred to above no longer requires editing the backup.ab file. It appears that the app that unpacks the file has been updated to support the backup file produced by Oreo.
@shorty707 I made another small update. Now the properties are requested max 5 per request.
This will hopefully fix the properties for your airpurifier.
Pls let me know the result
I upgraded to the new version.
First change is that it is NOT automatically creating items.
Which is actually correct because I deactivated simple mode. For some reasons the MIIO binding created them anyways in the previous version.
So I created now 1 item manually for humidity which is not working,
I will check debug logs tomorrow.
@shorty707 okay, I think I know what is going on.
Only version zhimi.airpurifier.m1 is currently in the database.
Pls go to advanced properties and change the model string to zhimi.airpurifier.m1
Than it will work as before.
There are 6 versions of the purifier. Let me know the exact version you have, which channels are different and I can add your specific model to the database.
@shorty707 thanks, indeed, than the model wasn’t the problem. Than the database needs to be modified. The source I used to find the channels did not specify exactly the model. it indicated was a 1, I guessed it was the m1
I would really like to see the debug (what is the device responding etc) and any channel you still miss.
I’ve added the temperature channel.
(update should be downloadable from the market in about 20 min)
Here is the Information that can be read in the App…
from these I would derive the channels: PM2.5 = Airquality (probably your AQI channel) Temperature Humidity Comfort Level Filter Remaining days Filter Remaining percent Running time Clean Air delivered MODE Select Notification Sound (activates/deactives is the device confirms a setting chnage with a beep) light (has 3 settings for the LED: off; bright; dim)
PM2.5 = Airquality (probably your AQI channel)
Temperature
Humidity
Comfort Level
Filter Remaining days
Filter Remaining percent
Running time
Clean Air delivered
MODE Select
Notification Sound (activates/deactives is the device confirms a setting chnage with a beep)
light (has 3 settings for the LED: off; bright; dim)
Comfort Level should be local calculation on app
Clean Air delivered should be local calculation on app
Notification Sound = buzzer
light = brightness 0, 1, 2 > off; bright; dim
@shorty707 strange that the scheduled refresh is not working. In my setup the sceduled refresh is working when (faking) I I configure a airpurifier. From your log there is no obvious error. So after this bit nothing is happening?
Can you execute via the (advanced) command channel these 2 commands: get_prop["power","mode","humidity","aqi","bright"] get_prop["led","act_det","buzzer","f1_hour","filter1_life"]
I’ll take another look @ the code
NB. I also know that paperUI sometimes needs a refresh when the channels are defined. They are there, but just not visible in the UI. (refresh with e.g. with F5 or reloading the page)