YinHangCode / homebridge-mi-gateway-security

XiaoMi Gateway Security plugin for HomeBridge.
31 stars 5 forks source link

Suddenly stop to work #5

Open Hohnjo opened 6 years ago

Hohnjo commented 6 years ago

Hello !

It's been like 2 months everything works perfectly and it stopped to work yesterday,in the home app the switch shows "no response"(in french), in Terminal I get this message :

[MiGatewaySecurity][ERROR]get On Error: Error: Call to device timed out

Do you have any idea ? (I havn't change anything in the config.json, my mi aqara and mi philips plugins still work)

Hohnjo commented 6 years ago

up ?

aremishevsky commented 6 years ago

@Hohnjo

  1. try to restart your homebridge server
  2. re-check your "ip" and "token" values in config with MiHome app's
  3. if they are the same - re-generate new token and try to restart your homebridge with updated token
Hohnjo commented 6 years ago

Thanks for the answer !

I've tried everything you said except re-generating the token. To do it, do I have to reset my gateway and every preferences ? :/ Is there any alternative so I don't have to set up everything again ?

aremishevsky commented 6 years ago

@Hohnjo you should not reset all settings on you hub. Make like this: https://github.com/aremishevsky/homebridge-smarthome#configuration (developer mode, generate password, get token from info)

Hohnjo commented 6 years ago

Okay if I understand, by generating a new password it will generate a new token ?

aremishevsky commented 6 years ago

it should)

Hohnjo commented 6 years ago

Okay I'll try that for the security plugin,in parallel I have like 60 accessories in my mi aqara plugin, i'll edit the json with the new password but do you think I will have to delete the accessory cache and configure everything again in the home app ? (scenes, rooms etc)

aremishevsky commented 6 years ago

at first try without deleting cache

Hohnjo commented 6 years ago

I've tried to generate a new password/put on/off local access, the good point is that it doesn't change anything in the settings of mi app/home app but it doesn't generate a new token. I think the only way is to reset the gateway (don't want to start from 0 with all the sensors...). The odd part is that I have 5 gateways and if I put token/ip of another one the plugin works, it's only with my master gateway (linked to the sensors) that it doesn't work :(

Hohnjo commented 6 years ago

Ok it works now ! the ip adress in the sqlite file (i use this file to get the tokens) was not the correct one, i got the good one in my router settings !