swissmanu / harmonyhubjs-client

A Node.JS library which allows you to interact with your Logitech Harmony Hub.
https://github.com/swissmanu/harmonyhubjs-client
MIT License
155 stars 42 forks source link

Fix disconnect issue (MAX_CLIENTS=6) #43

Closed patters closed 5 years ago

patters commented 6 years ago
patters commented 6 years ago

This fixes #34. I've been running it for a few weeks and haven't had any problems; previously, Homebridge would crash daily because of this issue.

kobim commented 6 years ago

Hi @patters, I've been trying to resolve this on my own too and I have some questions regarding your implementation:

  1. Why do you use reconnect: true? isn't that the user's responsibility to implement his own reconnection policy upon error (e.g throttling) 1.1. If already using reconnect, why is it omitted from loginWithIdentity?
  2. Any reason not to filter the error reason before trying to reconnect? Especially in loginWithIdentity, where the client might receive errors not related to function but to the consumer (remember the xmppClient is being passed to the consumer for the session.)
AirBorne04 commented 6 years ago

since this repo seems to be abandoned i created an updated package which includes some of the here available pull requests, hop over to @harmonyhub and give it a try.

nicoduj commented 5 years ago

Hi all, I tried to put the fix manually, will keep this thread update dif it is good for me . By the way, any possibility to update the package and homebridge-harmonyhub on npm also in order to have this directly through homebridge ?

nicoduj commented 5 years ago

Hi,

So @patters fix didn't worked for me : homebridge was not crashed, but harmony plugin was not responding until I restarted homebridge server. I put @kobin fix in place, let's see tomorrow :)

swissmanu commented 5 years ago

thank you for your change. it will be part of the next released version.