ptz0n / homebridge-verisure

 Platform plugin for Homebridge allowing to manage and control Verisure devices.
https://www.npmjs.com/package/homebridge-verisure
MIT License
66 stars 15 forks source link

Bridged accessory not reachable #34

Closed chrissearle closed 6 years ago

chrissearle commented 6 years ago

This is more a question on help to find out what's going wrong.

Running homebridge-verisure 1.8.0

It starts up fine - and I can both see status, get updates and also control it (turn alarm on and off etc).

But after a while - I get a problem.

In the eve iOS app it says "The bridged accessory is not reachable. Make sure Wi-Fi is enabled and try again".

In the iOS home app it says only "No response".

But only for the bridged verisure accessories - the bridged netatmo, harmony and nest accessories are all working fine.

If I look in the logs for homebridge all I see is lots of info lines like:

2018-6-14 11:24:57] [Verisure] info Alarm (Havna allé): Getting current alarm state.
[2018-6-14 11:24:57] [Verisure] info Alarm (Havna allé): Getting current alarm state.
[2018-6-14 11:24:57] [Verisure] info Siren (Inngangspartiet): Getting current temperature value.
[2018-6-14 11:24:57] [Verisure] info Inngangsdør: Getting current sensor state.
[2018-6-14 11:24:57] [Verisure] info PIR2 (Inngangspartiet): Getting current temperature value.
[2018-6-14 11:25:51] [Verisure] info Alarm (Havna allé): Getting current alarm state.
[2018-6-14 11:25:51] [Verisure] info SmartLock (Inngangsdør): Getting current lock state.

From that it looks to me as if homebridge is running fine.

Any ideas how to debug this further given that it's only the verisure ones that are getting into this state?

ptz0n commented 6 years ago

Interesting, is this occurring for a single device or same as all Verisure devices?

Please share your config without any personal info or passwords 👍

I'm wondering if Verisure might be rate limiting the requests. If this is the case, or any other error occurs, there should be error output in the logs.

chrissearle commented 6 years ago

It's all verisure components.

My versions (just in case):

"homebridge-netatmo": "0.2.0",
"homebridge-harmonyhub": "0.2.1",
"homebridge-verisure": "1.8.0",
"homebridge-nest": "2.1.3"

And my config:

{
  "bridge": {
    "name": "HA12Homebridge",
    "username": "XX:XX:XX:XX:XX:XX",
    "port": 51826,
    "pin": "XXX-XX-XXX"
  },
  "description": "XXXXXX",
  "platforms": [
    {
      "platform": "netatmo",
      "name": "netatmo platform",
      "ttl": 10,
      "auth": {
        "client_id": "XX",
        "client_secret": "XX",
        "username": "XX",
        "password": "XX"
      }
    },
    {
      "platform": "HarmonyHub",
      "name": "Harmony Hub"
    },
    {
      "platform": "Nest",
      "clientId": "XX",
      "clientSecret": "XX",
      "code": "XX",
      "token": "XX"
    },
    {
      "platform" : "verisure",
      "name" : "Verisure",
      "email": "XX",
      "password": "XX",
      "alarmCode": "XX",
      "doorCode": "XX"
    }
  ]
}

There is nothing in the logs after the initial startup other than info lines every minute saying that it is fetching data. Is it easy to enable more than info level logging?

Can we change the rate via config to test?

I do have a utility that logs the statuses to elasticsearch/kibana but that runs once every 10 mins so that shouldn't be affecting this too badly. I will try disabling that too.

ptz0n commented 6 years ago

You could add "pollInterval": 600 to your Verisure config to decrease the poll interval a bit and run homebridge in debug mode:

$ DEBUG=* homebridge -D
chrissearle commented 6 years ago

Just a quick update - I disabled my other app that was polling verisure and am waiting to see if the home connection goes offline again or not. I will update in a day or so when enough time has passed.

Odd if it is that - the app I had polled once every 10 minutes - using the verisure npm library. But I see that its using ^1.2.0 (code was written a while back). Homebridge has ^2.4.0 - if this error doesn't come back while the other logger is offline then I will have to see if updating the verisure library for that one helps (but lets test one thing at a time ;) )

ptz0n commented 6 years ago

Oh, I see. The verisure module has a different API nowadays but does the same request under the hood. Therefore you should not need to update, but please try it out.

chrissearle commented 6 years ago

I'm going to close this. With the other script not running I don't see this issue any more so there is something in the other script causing issues. I'll dig into that - and thanks for your help debugging this issue.

ptz0n commented 6 years ago

Oh, okej. Please let me know if I can help out in any way.

gymoese commented 4 years ago

I have the exact same problem. I run home bridge on my raspberry pi. Everything is up to date, but still I experience that the Verisure devices suddenly becomes unresponsive. If I restart my pi, then everything goes back to normal and it then stays ok for some days typically. I have reinstalled everything, OS, HomeBridge and plug-in, but it does not help.

If anybody knows anything I would be really glad to get some help.

ptz0n commented 4 years ago

@gymoese Can you share some log output?