TypeError: miio.createDevice is not a function
at XiaoMiAirPurifier.discover (/usr/lib/node_modules/homebridge-xiaomi-air-purifier/index.js:106:27)
at new XiaoMiAirPurifier (/usr/lib/node_modules/homebridge-xiaomi-air-purifier/index.js:99:10)
at Server._loadAccessories (/usr/lib/node_modules/homebridge/lib/server.js:275:29)
at Server.run (/usr/lib/node_modules/homebridge/lib/server.js:86:38)
at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:40:10)
at Object. (/usr/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
Hi I'm having this error when running, please assist:
[2018-1-25 13:54:59] [Air Purifier] Initializing XiaoMiAirPurifier accessory... /usr/lib/node_modules/homebridge-xiaomi-air-purifier/index.js:106 var device = miio.createDevice({ ^
TypeError: miio.createDevice is not a function at XiaoMiAirPurifier.discover (/usr/lib/node_modules/homebridge-xiaomi-air-purifier/index.js:106:27) at new XiaoMiAirPurifier (/usr/lib/node_modules/homebridge-xiaomi-air-purifier/index.js:99:10) at Server._loadAccessories (/usr/lib/node_modules/homebridge/lib/server.js:275:29) at Server.run (/usr/lib/node_modules/homebridge/lib/server.js:86:38) at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:40:10) at Object. (/usr/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
Thank you