anthonywebb / homebridge-cbus

CBus plugin for homebridge
MIT License
35 stars 20 forks source link

gracefully handle reconnect after dropped C-Gate connection #27

Closed simonhac closed 7 years ago

simonhac commented 7 years ago

addresses issue #14.

...and i got to work out what ES6 generator functions are all about.

simonhac commented 7 years ago

fyi, i ran through the following (manual) tests:

  1. start homebridge without cgate running — we force exit.
  2. start homebridge with cgate running, ctrl-c and restartcgate(cgate.sh — we recover.
  3. start homebridge with cgate running, turn on switch with activeDuration but disable network connection before timer expiry — the connection times out, we re-establish shortly after network connection is restored.
  4. start homebridge with cgate running, turn on light and disable network connection — connection doesn't time out within 5 minutes i gave it. i'll leave the network connection disabled overnight to see if that'll be picked up as a timeout.

given the first 3 tests worked, i'm pretty sure we're doing as best we can -- but i'll see what happens with more extensive testing on test 4.

simonhac commented 7 years ago

@anthonywebb i'm also working on #2. should be a quick one, but it'll be a separate PR.