Closed onkelalex closed 3 years ago
I'll make a testintegration in the next days, but all tests have to make by you. I dont own the device so i can't test.
Ok, i've made a testversion. There are two possible protocols, so first, we have to find out which one is used. Ive just integrated power and mode function for testing, if it works i will complete with the otherr functions. If not, we try the other protocol.
Now your part, please copy the file zhimi-airpurifier.mc1.js from here: https://github.com/Pittini/iobroker-nodemihome/tree/main/DefinitionfilesForNode-Mihome to your node-mihome devices directory as described in the readme. Restart the js controller. Copy and install the new scriptversion 0.2.16. Start it. If it works, you got two new Datapoints power and mode, they also should automaticly filled with the actual state. If yes, try to switch power. If it works, report. If it dont works, report also.
Hi Pittini,
first: thanks for your fast answer!
after copying the new 0.2.16 script into the JS Engine and added the zhimi-airpurifier.mc1.js to the directory, the js engine says No Supported devices found. After checking the script (header says that it is still the version 0.2.15?) it turns out that there is no device for the zhimi-airpirifier.mc1. Is this the right behavior?
The device will be added to objects, bit there is no reading on it.
You've restartet the js adapter after copying the .js file into the directory? Thats important! But, if yes, then we try the second protocol.
yes I did :)
Uhh, i see, a mistake at my side, it was really the 0.2.15 and not the new one. Now i've uploaded the right one, sorry. Please try again with the actual 0.2.16
No Problem 😁 And here we go:
Powerswitch is working like a charm!
Looks good, can you switch power via datapoint??
yes, without any issues.
Ok, so we have the right protocol. I'll set the other functions now, and after that you have to copy the .js again and restart the js controller. Give me an hour or so.
Ok, lets try it. Please first delete the created datapoint tree (the script will renew it) of the device in iob. Then copy the new .js file and the new script (no new version number) as you did before. Start script, if working, test all datapoints and report.
Just tuned in and it works perfectly! Thanks for your quick solution! Great Work!
just a small improvement idea: is it possible to make the value at favorite_level only changeable between 1 and 10? because these are the maximum and minimum values of the device
just a small improvement idea: is it possible to make the value at favorite_level only changeable between 1 and 10? because these are the maximum and minimum values of the device
Sure. Done. Get the 0.2.16 again. You have to delete the datapoints first again, or the changed setting has no effect.
Works perfectly! Thank you, Pittini! issue can be closed 👍
I own a Air Purifier S2 (zhimi.airpurifier.mc1) but atm there is no chance to get this device working with iobroker. Last chance will be your script :)
Please add support for it.