KraigM / homebridge-harmonyhub

HomeBridge Plugin for Logitech Harmony Hub
181 stars 52 forks source link

Home bridge won't start because of the HarmonyHub plugin #31

Open leoneleone opened 8 years ago

leoneleone commented 8 years ago

Hello,

only this past week homebridge stopped working and won't finish setup/initialise, the cause of which is the harmony hub plugin. Uninstalling the plugin and removing it from config.json was the only way I've found to fix the issue.

Any ideas?

jer78 commented 8 years ago

Mine does that every once in awhile too. I find it has this error and the only way to fix is to pull the plugs on my hubs and wait 30 secs to power back on. I get this error message but not sure what other devices are considered clients. Is this the same error you're getting?

errorhub { [Error: MAX_CLIENTS=6] stanza: Stanza { name: 'stream:error', parent: null, children: [ [Object], [Object] ], attrs: { 'xmlns:stream': 'http://etherx.jabber.org/streams' } } }

jer78 commented 8 years ago

I also sometimes see this...

events.js:141 throw er; // Unhandled 'error' event ^

Error: MAX_CLIENTS=6 at Connection.onStanza (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/harmonyhubjs-client/node_modules/node-xmpp-client/node_modules/node-xmpp-core/lib/Connection.js:355:17) at StreamParser. (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/harmonyhubjs-client/node_modules/node-xmpp-client/node_modules/node-xmpp-core/lib/Connection.js:226:10) at emitOne (events.js:77:13) at StreamParser.emit (events.js:169:7) at SaxLtx. (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/harmonyhubjs-client/node_modules/node-xmpp-client/node_modules/node-xmpp-core/lib/StreamParser.js:58:14) at emitOne (events.js:77:13) at SaxLtx.emit (events.js:169:7) at SaxLtx._handleTagOpening (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/harmonyhubjs-client/node_modules/node-xmpp-client/node_modules/node-xmpp-core/node_modules/ltx/lib/parsers/ltx.js:31:18) at SaxLtx.write (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/harmonyhubjs-client/node_modules/node-xmpp-client/node_modules/node-xmpp-core/node_modules/ltx/lib/parsers/ltx.js:105:26) at StreamParser.write (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/harmonyhubjs-client/node_modules/node-xmpp-client/node_modules/node-xmpp-core/lib/StreamParser.js:123:17)

KraigM commented 8 years ago

Should be fixed in the next release (0.2.0) which is currently in alpha

KraigM commented 8 years ago

You can try out the next version (keeping in mind that it is a prerelease) you can upgrade to the alpha version using: npm install -g homebridge-harmonyhub@0.2.0-alpha

leoneleone commented 8 years ago

@KraigM

Thank you for this. I'll try out this weekend.

Any thoughts on adding Harmony Hub Volume control to work with Homebridge. Volume Up/Down (added as Characteristic.Brightness) and Mute/Unmute (added as a Switch or a ProgrammableSwitch)?

This to my mind is the the most vital remote control function I'd like to see integrated with HomeKit.

KraigM commented 8 years ago

That was def discussed on the #slack channel but Im curious what Apple is going to announce in a week. Maybe it will include some entertainment system device types.

leoneleone commented 8 years ago

Yes indeed. Better to wait and see. I anticipate some new Services and Device Types too.

Fingers crossed

PashCracken commented 8 years ago

I´ve installed the 0.2.0-alpha release, but are still getting the max_clients error

KraigM commented 8 years ago

How many hubs do you have?

PashCracken commented 8 years ago

I only have 1 hub(but many iOS devices if that makes a difference). Homebridge start up ok and everything works fine in the beginning. After an hour or two Homebridge crash with the max_client error in HarmonyHub

PashCracken commented 8 years ago

Any progress on this issue?

KraigM commented 8 years ago

@PashChicken No. I have (from what you have told me) your same setup and I have been running for weeks without issue.

The code on my side has been almost completely rewritten, so if you are getting the exact same error then something else is likely wrong.

The only things I can think of are:

All I can offer is send me your logs when running homebridge like DEBUG=* homebridge -D and I can look through them (obviously make sure the error happens during that session). I can look into seeing if there is something else I can cleanup but I followed the examples of the harmony hub lib I use so one would think the issue would be on their side. Other then that you prob will need to do some investigating on your own.

PashCracken commented 8 years ago

Thanks for the tips. I think I found the problem. My Raspberry Pi 3 with homebridge was placed too far away from the router and had a bad wifi connection. I did not notice it in my other use of the Pi. A closer look at the debug log from homebridge gave me some hints. I´ve now moved the Pi closer to the router and homebridge has not crashed since. There is obviously some bad client/connection handling there somewhere. It should not crash with max_clients error because of a bad connection. But problem is solved for me :-)

zhodd commented 7 years ago

I seem to have the same issue - I don't think it is connectivity related. I do have two hubs for reference:

events.js:160 throw er; // Unhandled 'error' event ^

Error: MAX_CLIENTS=6 at Connection.onStanza (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/Connection.js:363:17) at StreamParser. (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/Connection.js:231:10) at emitOne (events.js:96:13) at StreamParser.emit (events.js:188:7) at SaxLtx. (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/StreamParser.js:59:14) at emitOne (events.js:96:13) at SaxLtx.emit (events.js:188:7) at SaxLtx._handleTagOpening (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/ltx/lib/parsers/ltx.js:31:18) at SaxLtx.write (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/ltx/lib/parsers/ltx.js:105:26) at StreamParser.write (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/StreamParser.js:124:17) at Connection.onData (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/Connection.js:310:17) at emitOne (events.js:101:20) at Socket.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:172:18) at Socket.Readable.push (_stream_readable.js:130:10) at TCP.onread (net.js:542:20)

MackleMonster commented 7 years ago

I get similar error too. One hub, Homebridge running on Mac. Homebridge will run fine for a day, then error out with following:

[7/25/2016, 10:02:59 PM] [SmartThings] Invalid Response from API call [7/25/2016, 10:42:59 PM] [SmartThings] Invalid Response from API call events.js:141 throw er; // Unhandled 'error' event ^

Error: MAX_CLIENTS=6 at Connection.onStanza (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/Connection.js:363:17) at StreamParser. (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/Connection.js:231:10) at emitOne (events.js:77:13) at StreamParser.emit (events.js:169:7) at SaxLtx. (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/StreamParser.js:59:14) at emitOne (events.js:77:13) at SaxLtx.emit (events.js:169:7) at SaxLtx._handleTagOpening (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/ltx/lib/parsers/ltx.js:31:18) at SaxLtx.write (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/ltx/lib/parsers/ltx.js:105:26) at StreamParser.write (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/StreamParser.js:124:17) at Connection.onData (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/Connection.js:310:17) at emitOne (events.js:82:20) at Socket.emit (events.js:169:7) at readableAddChunk (_stream_readable.js:153:18) at Socket.Readable.push (_stream_readable.js:111:10) at TCP.onread (net.js:536:20)

miked2318 commented 7 years ago

I seem to be having the same problem. I have a single Hub. The Hub was working fine for about a week, then homebridge began crashing. I've included the onscreen log. The Hub was just put in place and I ran the Logitech updates on it prior to setup. It should have more than ample Wi-Fi signal strength. It appears to be similar to the log from MackleMonster above.

I can attach the debug logs on the next crash. I have debug turned on now.


events.js:141 throw er; // Unhandled 'error' event ^

Error: MAX_CLIENTS=6 at Connection.onStanza (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/harmonyhubjs-client/node_modules/node-xmpp-client/node_modules/node-xmpp-core/lib/Connection.js:363:17) at StreamParser. (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/harmonyhubjs-client/node_modules/node-xmpp-client/node_modules/node-xmpp-core/lib/Connection.js:231:10) at emitOne (events.js:77:13) at StreamParser.emit (events.js:169:7) at SaxLtx. (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/harmonyhubjs-client/node_modules/node-xmpp-client/node_modules/node-xmpp-core/lib/StreamParser.js:59:14) at emitOne (events.js:77:13) at SaxLtx.emit (events.js:169:7) at SaxLtx._handleTagOpening (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/harmonyhubjs-client/node_modules/ltx/lib/parsers/ltx.js:31:18) at SaxLtx.write (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/harmonyhubjs-client/node_modules/ltx/lib/parsers/ltx.js:105:26) at StreamParser.write (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/harmonyhubjs-client/node_modules/node-xmpp-client/node_modules/node-xmpp-core/lib/StreamParser.js:124:17) at Connection.onData (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/harmonyhubjs-client/node_modules/node-xmpp-client/node_modules/node-xmpp-core/lib/Connection.js:310:17) at emitOne (events.js:82:20) at Socket.emit (events.js:169:7) at readableAddChunk (_stream_readable.js:153:18) at Socket.Readable.push (_stream_readable.js:111:10) at TCP.onread (net.js:531:20)

miked2318 commented 7 years ago

I was able to recreate the crash. Let me know how much of the debug log is needed. I do see a point in the log where it sees two Hubs on the network, when there is only one. That's a good while before the crash, though.

miked2318 commented 7 years ago

Looks like I have more issues. I decided to to ensure that my Hub was up to date. When I plugged it back into my network, I then actually did have two Hubs showing up in my HomeKit apps. I went as far as to uninstall and re-install homebridge, delete persists, etc - still two Hubs. Not to hijack the thread; just find it odd that I saw the debug log for the issue above show two Hubs and now I have two, but only one device :). FWIW, the debug log states only one is found.

tstraus13 commented 7 years ago

I just wanted to chime in and say I am receiving the same MAX_CLIENTS=6 error as those above. It runs fine for a while but then all of a sudden while quit with that error. I have one Hub and I have connected to it with HomeKit with a single iPhone. Thanks.

jer78 commented 7 years ago

I've also been seeing this every few weeks and I have to delete my accessories folder (sometimes even the persist and delete the bridge) to get it working again. Not sure what's causing it but it's not connectivity related. If it was it shouldn't try to setup as a new hub when it reconnects.

samtarr commented 7 years ago

I'm also getting the same Error: MAX_CLIENTS=6. Homebridge was running fine until I added Harmony Hub plugin and now it will crash within an hour after starting. I have one hub and home bridge is running on OS X with a wired network connection.

HamOP commented 7 years ago

Same problem here, it only says Error: MAX_CLIENTS=4 after an hour or so. One Harmony hub, one homebridge, running on RPi B with wired network connection.

neilgupta commented 7 years ago

I don't have a harmony hub yet, but was browsing this thread while trying to decide whether I should order one so take my help with a grain of salt... Do the folks who are hitting the multiple hub / max clients bug have an IP address hardcoded in their config.json versus those who aren't seeing the problem? I wonder if that would make the difference.

grahamr commented 7 years ago

I see the issue running with 2 hubs, hardcoded IP addresses, 4 activities programmed to each hub.

Home bridge is running in a docker on Unraid, and is stable without the harmony plugin, but crashes within an hour once its enabled.

I have not tried removing one hub from the list. One thing i was wondering is if its making a connection when it tries to refresh each activity - so 2 hubs x 4 activities = 8 connections - some people have reported the issue with 1 hub - i wonder how many activities they have configure

grahamr commented 7 years ago

Just for some further trouble shooting I think it relates to either the max number or activities or the way the HomeKit API is connecting. I removed one hub, and now have been stable all day. Added the 2nd hub back and it crashed after a little while (less than an hour)

KraigM commented 7 years ago

What do you mean by "added the 2nd hub back"? Are you on the alpha version or the current released version?

Im probably just going to officially release the alpha if I get my system back working. I ran it for months straight without any issue. Then one night I updated to the final version of iOS 10 (I was also on the dev beta version of iOS 10 and it was still working like a champ) and then I lost power the next day and nothing came back up. So Im going to fix anything (if anything) that needs to be fixed and likely going to release. (unless there are any objections?)

grahamr commented 7 years ago

I was on the stable, just switched to alpha a few min ago. I removed the second hub from my stable config, and actually had it crash tonight, so now I'm on 0.2.0 with one hub. If it's still up in the morning I will add the second hubs connection details back into my json file.

KraigM commented 7 years ago

@grahamr On the new version (0.2.0), it automatically supports multiple hubs. In fact if you configure multiple then it will break, at least as it stands right now.

leoneleone commented 7 years ago

@grahamr What version of node are you running?

grahamr commented 7 years ago

@leoneleone - I'm running home bridge from this repo https://github.com/lukeadair/docker-templates which is using this docker https://hub.docker.com/r/adair21/homebridge-docker/ (https://github.com/lukeadair/homebridge-docker)

Based on the install for docker its using v6 for debian

also switched to the 0.2.0 alpha last night and it dropped with the max_connections error after about an hour.

This morning its been up for an 1.5 hours so far.

when adding two hubs i was doing it like this in my config:

        "platforms": [{
                "platform": "HarmonyHub",
                "name": "Living Room Harmony Hub",
                "ip_address": "192.168.2.14",
                "name": "Office Harmony Hub",
                "ip_address": "192.168.2.13"
}]

when moving to one hub i removed the office line and the IP. Hubs have static IP's on the networks as well

One thing i noticed when looking into the issue is that there is an amazon alexa harmony project as well, and there is a max_connections bug report in their repo as well - Wondering if it ties back to the initial harmony hub JS stuff itself (and less this implementation)

leoneleone commented 7 years ago

I have found that updating to the latest version of Node has fixed many of my issues with other plugins.

curl deb.nodesource.com/setup_6.x | sudo bash sudo apt-get install nodejs

I only run 1 harmony hub and have not had issues with responsiveness or errors since. I don't know if updating to the latest version of Node will fix your issue but it's worth a try.

grahamr commented 7 years ago

yep - Looks like the build I'm running uses that command curl -sL https://deb.nodesource.com/setup_6.x | bash - sudo apt-get install -qy nodes

Question - How many activities do you have setup on your hub? i'm running 4 on this hub.

leoneleone commented 7 years ago

I have 8 activities on that hub. All stable.

Maybe try disconnecting power on the harmony hub then reconnecting. A re-powering had worked for me in the past when I experienced "Max Clients" issues

You could be right, this maybe an issue on the harmony-side of things.

CliffLegere commented 7 years ago

Just installed this a couple days ago on a MacMini running El Capitan. I have 2 Harmony Hubs with 8 activites between them. Both connect fine and work great for the better part of a day, then I get the Error: MAX_CLIENTS=6. If I re-run the Homebridge command it immediatly lights back up and works for another half day. This is the only plugin I use with Homebridge.

CliffLegere commented 7 years ago

Came up with a bit of a work-around until I can figure out how to resolve this issue. Running the 'Homebridge' command on a loop in Terminal. If my Homebridge crashes and goes back to the command prompt it will re-send the 'Homebridge' command within 30 seconds. Far from an elegant solution but working with no manual oversight: bash -c 'while [ 0 ]; do homebridge; sleep 30; done'

jngothia commented 7 years ago

I'm having the MAXCLIENTS=6 error too. One hub with 9 activities running Harmony v4.10.30 connected over WiFi, running NPM v3.10.8, Node v6.7.0, on a Hackintosh Homebridge server running MacOS 10.9.4, updated all my plugins as of the date of this post. The error seems to happen between twice a day to once every two days or so. I have Homebridge set up with launchd's KeepAlive so it's no biggie--the homebridge server respawns whenever it crashes--but it usually means I have to wait a couple minutes for everything to start again. Here's the log:

`events.js:160 throw er; // Unhandled 'error' event ^

Error: MAX_CLIENTS=6 at Connection.onStanza (/Users/jngothia/.npm-packages/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/Connection.js:363:17) at StreamParser. (/Users/jngothia/.npm-packages/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/Connection.js:231:10) at emitOne (events.js:96:13) at StreamParser.emit (events.js:188:7) at SaxLtx. (/Users/jngothia/.npm-packages/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/StreamParser.js:59:14) at emitOne (events.js:96:13) at SaxLtx.emit (events.js:188:7) at SaxLtx._handleTagOpening (/Users/jngothia/.npm-packages/lib/node_modules/homebridge-harmonyhub/node_modules/ltx/lib/parsers/ltx.js:31:18) at SaxLtx.write (/Users/jngothia/.npm-packages/lib/node_modules/homebridge-harmonyhub/node_modules/ltx/lib/parsers/ltx.js:105:26) at StreamParser.write (/Users/jngothia/.npm-packages/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/StreamParser.js:124:17) at Connection.onData (/Users/jngothia/.npm-packages/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/Connection.js:310:17) at emitOne (events.js:101:20) at Socket.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:176:18) at Socket.Readable.push (_stream_readable.js:134:10) at TCP.onread (net.js:543:20) `

sleepyarmistice commented 7 years ago

I have the same error here. Two hubs, home bridge running on a Raspberry Pi with the latest version of the plugin, which is wired to my router. From googling around, it seems like these people had a similar issue. It's something about the way the hub handles connections that causes the error.

errorhub { [Error: MAX_CLIENTS=6] stanza: Stanza { name: 'stream:error', parent: null, children: [ [Object], [Object] ], attrs: { 'xmlns:stream': 'http://etherx.jabber.org/streams' } } } events.js:141 throw er; // Unhandled 'error' event ^

Error: MAX_CLIENTS=6 at Connection.onStanza (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/Connection.js:363:17) at StreamParser. (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/Connection.js:231:10) at emitOne (events.js:77:13) at StreamParser.emit (events.js:169:7) at SaxLtx. (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/StreamParser.js:59:14) at emitOne (events.js:77:13) at SaxLtx.emit (events.js:169:7) at SaxLtx._handleTagOpening (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/ltx/lib/parsers/ltx.js:31:18) at SaxLtx.write (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/ltx/lib/parsers/ltx.js:105:26) at StreamParser.write (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/StreamParser.js:124:17) at Connection.onData (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/Connection.js:310:17) at emitOne (events.js:82:20) at Socket.emit (events.js:169:7) at readableAddChunk (_stream_readable.js:146:16) at Socket.Readable.push (_stream_readable.js:110:10) at TCP.onread (net.js:523:20)

RXM307 commented 7 years ago

Just experience this problem, 1 hub 9 Activities, 6 iOS clients running. homebridge version 0.2.0, homebridge was updated and started about 6 days ago 10/7/2016, 10:11:35 AM (AEST) Harmony Hub was also updated at some point in the past 6 days.

Thu, 13 Oct 2016 01:44:58 GMT EventedHTTPServer [172.16.107.127] Sending HTTP event '2.30' with data: {"characteristics":[{"aid":2,"iid":30,"value":false}]} Thu, 13 Oct 2016 01:44:58 GMT harmonyhubjs:client:login login on hub 172.16.107.113 Thu, 13 Oct 2016 01:44:58 GMT harmonyhubjs:client:login:hub perform hub login Thu, 13 Oct 2016 01:44:58 GMT harmonyhubjs:client:login:hub retrieve identity by logging in as guest Thu, 13 Oct 2016 01:44:58 GMT xmpp:client:session start socket connection Thu, 13 Oct 2016 01:44:58 GMT xmpp:connection setup socket Thu, 13 Oct 2016 01:44:58 GMT xmpp:connection use lazy socket Thu, 13 Oct 2016 01:44:58 GMT xmpp:connection setup stream Thu, 13 Oct 2016 01:44:58 GMT xmpp:connection send: Thu, 13 Oct 2016 01:44:58 GMT xmpp:connection receive: <?xml version='1.0' encoding='iso-8859-1'?>stream:featuresPLAIN/stream:features Thu, 13 Oct 2016 01:44:58 GMT xmpp:connection send: Z3Vlc3RAeC5jb20AZ3Vlc3QAZ3Vlc3Q= Thu, 13 Oct 2016 01:44:58 GMT xmpp:connection receive: Thu, 13 Oct 2016 01:44:58 GMT xmpp:connection send: Thu, 13 Oct 2016 01:44:58 GMT xmpp:connection receive: stream:features/stream:features Thu, 13 Oct 2016 01:44:58 GMT xmpp:connection send: gatorade Thu, 13 Oct 2016 01:44:58 GMT xmpp:connection receive: 1111/gatorade Thu, 13 Oct 2016 01:44:58 GMT harmonyhubjs:client:login:hub XMPP client connected Thu, 13 Oct 2016 01:44:58 GMT xmpp:connection send: method=pair:name=harmonyjs#iOS6.0.1#iPhone Thu, 13 Oct 2016 01:44:58 GMT xmpp:connection receive: Thu, 13 Oct 2016 01:44:58 GMT harmonyhubjs:client:login:hub received XMPP stanza: Thu, 13 Oct 2016 01:44:58 GMT harmonyhubjs:discover:ping emit() Thu, 13 Oct 2016 01:44:58 GMT xmpp:connection receive: <![CDATA[serverIdentity=f3ca6b5b-a671-4711-3e9f-080244c9c2e3:hubId=97:identity=f3ca6b5b-a671-4711-3e9f-080244c9c2e3:status=succeeded:protocolVersion={XMPP="1.0", HTTP="1.0", RF="1.0", WEBSOCKET="1.0"}:hubProfiles={Harmony="2.0"}:productId=Pimento:friendlyName=Lounge Room]]> Thu, 13 Oct 2016 01:44:58 GMT harmonyhubjs:client:login:hub received XMPP stanza: serverIdentity=f3ca6b5b-a671-4711-3e9f-080244c9c2e3:hubId=97:identity=f3ca6b5b-a671-4711-3e9f-080244c9c2e3:status=succeeded:protocolVersion={XMPP="1.0", HTTP="1.0", RF="1.0", WEBSOCKET="1.0"}:hubProfiles={Harmony="2.0"}:productId=Pimento:friendlyName=Lounge Room Thu, 13 Oct 2016 01:44:58 GMT harmonyhubjs:client:login:hub received identity token: f3ca6b5b-a671-4711-3e9f-080244c9c2e3 Thu, 13 Oct 2016 01:44:58 GMT xmpp:connection send: /stream:stream Thu, 13 Oct 2016 01:44:58 GMT harmonyhubjs:client:login:hub create xmpp client using retrieved identity token: f3ca6b5b-a671-4711-3e9f-080244c9c2e3 Thu, 13 Oct 2016 01:44:58 GMT xmpp:client:session start socket connection Thu, 13 Oct 2016 01:44:58 GMT xmpp:connection setup socket Thu, 13 Oct 2016 01:44:58 GMT xmpp:connection use lazy socket Thu, 13 Oct 2016 01:44:58 GMT xmpp:connection setup stream Thu, 13 Oct 2016 01:44:58 GMT harmonyhubjs:discover:responsecollector handle new connection Thu, 13 Oct 2016 01:44:58 GMT xmpp:connection send: Thu, 13 Oct 2016 01:44:58 GMT harmonyhubjs:discover:responsecollector received data chunk Thu, 13 Oct 2016 01:44:58 GMT harmonyhubjs:discover:responsecollector connection closed. emitting data. Thu, 13 Oct 2016 01:44:58 GMT xmpp:connection receive: <?xml version='1.0' encoding='iso-8859-1'?>stream:errorMAX_CLIENTS=6/stream:error/stream:stream events.js:160 throw er; // Unhandled 'error' event ^

Error: MAX_CLIENTS=6 at Connection.onStanza (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/Connection.js:363:17) at StreamParser. (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/Connection.js:231:10) at emitOne (events.js:96:13) at StreamParser.emit (events.js:188:7) at SaxLtx. (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/StreamParser.js:59:14) at emitOne (events.js:96:13) at SaxLtx.emit (events.js:188:7) at SaxLtx._handleTagOpening (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/ltx/lib/parsers/ltx.js:31:18) at SaxLtx.write (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/ltx/lib/parsers/ltx.js:105:26) at StreamParser.write (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/StreamParser.js:124:17) at Connection.onData (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/Connection.js:310:17) at emitOne (events.js:101:20) at Socket.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:176:18) at Socket.Readable.push (_stream_readable.js:134:10) at TCP.onread (net.js:543:20)

wr commented 7 years ago

Hi, just wanted to throw in another report of this bug. 1 hub, 3 activities, homebridge 0.3.4, homebridge-harmonyhub 0.2.0.

IceCreamGuys commented 7 years ago

Same error here - 3 hubs, 9 activities. If I power cycle the hubs, it works a bit longer - otherwise crashes in less than 15 minutes.

thoduh commented 7 years ago

Same error here - 1 hub

marcel898 commented 7 years ago

Same error here - 1 hub, 4 activities.

cyberb0b commented 7 years ago

Had the problem : Error: MAX_CLIENTS=6

Removed the following devices from my Harmony hubs;

and the problem seems to have disappeared... I will keep you posted,

2 hubs, 5 and 8 activities..

Nope.. started up again.

joq3 commented 7 years ago

I got the same error + this error (ETIMEDOUT / EHOSTUNREACH). Any solutions?

sommo commented 7 years ago

same hera MAXCLIENT=6, i was sync configuration throught the harmony.. i will update if i don't do any changes if it will stay stable, i'm running multiple platform and accessories on a raspberry, this is the the only one till no that crash homebridge

Andybishop commented 7 years ago

I have the same issues, Brand new Harmony Hub, updated to latest version, Reservation for the IP Address, One Hub and 5 Activities. If I run HomeBridge it crashes with MAX_CLIENTS=6 within 5 minutes.

sommo commented 7 years ago

it's happening again, in 2 different cases, one when launch homebridge (i needed to wait few minute to execute again homebridge without the error): [12/1/2016, 9:15:07 AM] [Harmony Hub] Found activities: Radio PS4telo Guarda TV LG PowerOff Macmini LG events.js:160 throw er; // Unhandled 'error' event ^

Error: dns service error: unknown at Error (native) at MDNSService.on_resolver_done (/usr/local/lib/node_modules/homebridge-yamaha/node_modules/mdns/lib/resolver_sequence_tasks.js:19:30) at SocketWatcher.MDNSService.self.watcher.callback (/usr/local/lib/node_modules/homebridge-yamaha/node_modules/mdns/lib/mdns_service.js:18:40)

and after 11hours of running: [12/1/2016, 11:06:33 AM] Homebridge is running on port 51826. events.js:160 throw er; // Unhandled 'error' event ^

Error: MAX_CLIENTS=6 at Connection.onStanza (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/Connection.js:355:17) at StreamParser. (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/Connection.js:226:10) at emitOne (events.js:96:13) at StreamParser.emit (events.js:188:7) at SaxLtx. (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/StreamParser.js:58:14) at emitOne (events.js:96:13) at SaxLtx.emit (events.js:188:7) at SaxLtx._handleTagOpening (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/ltx/lib/parsers/ltx.js:31:18) at SaxLtx.write (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/ltx/lib/parsers/ltx.js:105:26) at StreamParser.write (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/StreamParser.js:123:17) at Connection.onData (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/Connection.js:305:17) at emitOne (events.js:101:20) at Socket.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:176:18) at Socket.Readable.push (_stream_readable.js:134:10) at TCP.onread (net.js:548:20)

IceCreamGuys commented 7 years ago

In the past three days, this is gone from once or twice an hour to an average of about a minute.

Hard to show off HomeKit to your friends when you have 20 devices not responding…

r32er commented 7 years ago

same problem here with max clients and the harmony hub plugin...

all plugins in installed works yet. only the harmony plugin don't work as it should.

no solution yet?

sommo commented 7 years ago

can't resolve for the crash, but by adding homebridge like a service, i resolve to autorerun the process in automatic, and it's ok, if it crash it get relaunch