Maxmudjon/com.maxmudjon.mihomey

Unable to add Air Purifier Pro v7

Amelsfort opened this issue · 1 comments

When I try to connect my new Air Purifier Pro, I get an error: An error occured, handshake timeout.
I have tried running (parts of) the code using NodeJS from a command line and I can connect fine with the exact same IP and token. I can also read info from the device.
Now I noticed the driver (drivers/mi_air_purifier_v6/driver.js) is checking the model on line 32: 'if (value.model == this.data.model)' where the value of 'model' is set to 'zhimi.airpurifier.v6'. The model I have returns 'zhimi.airpurifier.v7' as it's model, so I suppose that model version should be added.

I'm not sure if it's as easy as copy the code and replace 'v6' with 'v7', but if so, it would be an easy fix.

ok i will add