Open niccolospa opened 6 years ago
I solved that renaming "Device" to "device" but I encounter this other problem: /usr/lib/node_modules/homebridge-mi-gateway-security/index.js:101 that.device.call("get_arming", []).then(result => { ^
TypeError: that.device.call is not a function
at MiGatewaySecurity.
You can use 'npm install -g miio@0.14.1' temporarily, then I'll think about a solution.
Done, now in console I get: [Security] [MiGatewaySecurity][ERROR]get SecuritySystemTargetState Error: Error: Call to device timed out [2018-1-28 12:33:54] [Security] [MiGatewaySecurity][ERROR]get SecuritySystemCurrentState Error: Error: Call to device timed out
make sure token and ip is right.
I double checked both, they should be correct but still getting the 2 errors
I was thinking that could conflict with another plugin that is homebridge-miio https://github.com/Bluebie/homebridge-miio could it be?
@niccolospa
I hava the same errors, first time because of miio, then the second error .
Have you solved the problem?
Right now I solved because I pasted the wrong token actually
I discovered that the token changes every time the gateway is being reset, if can help someone
Note to further readers. Better to obtain token and ip of the gateway from Mi Home app. To do this in iOS App follow to gateway about page > tap at the bottom of the screen about 5 times > new rows will appear > choose 4th > find token and ip.
Can you help me to sort this out? I did all the installation ad the read me says, but at launch I get: [2018-1-28 10:09:19] [Security] Initializing MiGatewaySecurity accessory... /usr/lib/node_modules/homebridge-mi-gateway-security/index.js:48 this.device = new miio.Device({ ^
TypeError: miio.Device is not a constructor at new MiGatewaySecurity (/usr/lib/node_modules/homebridge-mi-gateway-security/index.js:48:19) at Server._loadAccessories (/usr/lib/node_modules/homebridge/lib/server.js:274: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:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)