homebridge-harmonyhub
homebridge-harmonyhub copied to clipboard
Home bridge won't start because of the HarmonyHub plugin
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?
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' } } }
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.
Should be fixed in the next release (0.2.0) which is currently in alpha
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 [email protected]
@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.
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.
Yes indeed. Better to wait and see. I anticipate some new Services and Device Types too.
Fingers crossed
I´ve installed the 0.2.0-alpha release, but are still getting the max_clients error
How many hubs do you have?
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
Any progress on this issue?
@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:
- Somehow the connection in the code is not being cleaned up when it goes offline (but again that code is completely diff and it should be fixed by simply restarting homebridge if that were the case)
- you have multiple homebridges and/or other apps running at the same time
- you have a bad network that is losing packets
- your harmony hub is out of date and needs to be updated
- something else is out of date and needs to be updated
- you are actually using a harmony link instead of a harmony hub
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.
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 :-)
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.
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.
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 have a single homebridge
- I have a stable network that does not exhibit symptoms of packet loss
- I have run the updates on my harmony hub
- something else is always out of date and needs to be updated ;)
- I replaced my harmony link with the harmony hub. Link was never part of homebridge and is not on the network
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.
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.
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.
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.
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.
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.
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.
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.
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
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)
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?)
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.
@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.
@grahamr What version of node are you running?
@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)
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.
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.
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.
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.
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'
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.
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.
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: <stream:stream xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" version="1.0" to="x.com">
Thu, 13 Oct 2016 01:44:58 GMT xmpp:connection receive: <stream:stream from='x.com' id='0d8a27be' version='1.0' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>stream:features
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.
Hi, just wanted to throw in another report of this bug. 1 hub, 3 activities, homebridge 0.3.4, homebridge-harmonyhub 0.2.0.
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.
Same error here - 1 hub
Same error here - 1 hub, 4 activities.
Had the problem : Error: MAX_CLIENTS=6
Removed the following devices from my Harmony hubs;
- hue
- nest
- iftt link
and the problem seems to have disappeared... I will keep you posted,
2 hubs, 5 and 8 activities..
Nope.. started up again.
I got the same error + this error (ETIMEDOUT / EHOSTUNREACH). Any solutions?
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
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.
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.
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…
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?
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
can u tell me how this workaround works?
i can't find the link now, but i found i useful guide to get it work like a charm, when i found it i will post
founded: https://timleland.com/setup-homebridge-to-start-on-bootup/ follow this and you will get ok
and then home bridge restarts when it crashes because of harmony plugin?
yes, after you follow that steps, u will have homebridge running like a service, and it constantly check if it is running, if not it relaunch it. no matter what cause his stop, also it execute homebridge when rp reboots
hm seems to be Little tricky for me.
Got the same issue. I just changed the "name" of the platform "HarmonyHub" in config.json and restarted homebridge. I worked again.
I tried to rename the platform but it still crashes with the same error again.... that sucks so hard. the only reason why i bought the harmony hub was the Siri support with home bridge. when this not work i will have to sent the hub back....
I installed the plugin on a new installed Homebridge on a RPi and it crashes within half an hour constantly. I'm running 2 hubs with the latest firmware.
If so many people are having this issue, why isn't being solved?
I have almost given up on this plugin. Yesterday I did some research and found that other harmony applications also have the same issue. So my understand of this issue now is that the MAX_CLIENTS=6 error actually originates from the Harmony Hub itself. The problem is that the client libraries/apps don't handle this error in a graceful way. They need to catch the exception and retry the operation.
What do you mean with other harmony applications?
I found this one from 2014: http://forum.micasaverde.com/index.php/topic,14928.msg167757.html?PHPSESSID=302dsv368aajtf036l3ig21sk2#msg167757
And also this one that states that this is an error from the hub itself https://forum.athom.com/discussion/653/submitted-for-approval-harmony-hub-app-v0-3-4/p14
If this is correct then this can be fixed by adding some error handling in the plugin or in one of the libraries used for communication with the hub
Now it's crashing every 2 minutes :-(
Please solve this issue
Has anyone who's complaining of these problems tried updating NodeJs 7.x and updating Homebridge to its latest iteration?
While I agree the plugin could use some error handling, everything seems to working fine for me. I've recently had to reset my HomeKit config. Everything still working fine after I re-added homebridge with quite a few plugins
I run it on a Raspberry Pi. In my latest attempt to see if it was stable I updated everything to the latest version. Still the same error
@PashCracken What version of node are you running?
Just wanted to throw my 2 cents in here. I am running into the same error that everyone else seems to be hitting. "Error: MAX_CLIENTS=6"
My set-up is;
- On a RPi
- Running Node v6.6.0
- Latest of homebridge + Many other plugins
- One Harmony Hub - Brand New
- Wifi isn't an issue, as the RPi is plugged directly into the router
Let me know if any additional information is needed! Thank You!
@kenderson Can you try upgrading Node to 7.x version?
@leoneleone Done. I'm now on 7.2.1. I'm now getting the following error.
Unhandled rejection Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory: XXXXXX-XXX-XXX
A few data points;
- I've tried to uninstall and reinstall the plugin
- If I remove HarmonyHub from the config file, everything else fires up fine. So I think the issue is rooted with the HarmonyHub plugin and not a function of the upgrade....but I could be wrong there.
Any thoughts/guidance is greatly appreciated! Ken
@kenderson - stop homebridge, remove the content of the persist folder.
@cyberb0b Thanks for the assist here. QQ before I do that - will that require me to re-add the bridge to homekit and reconfigure all of the accessories and automations that are in place?
Thanks Again!
@kenderson if your hub is still in the config, just start homebridge.
Settings of automations are not stored inside homebridge, only in the homekit db from Apple.
@kenderson The advice from others above is sound. My suggest is to:
- remove homebridge from HomeKit
- Delete .homebridge/accessories & .homebridge/persist folders.
- Reboot homebridge
It is true you will lose all accessory sorting (into rooms, service groups, and automations) and association, but it is an easy thing to rectify.
Please let us know if that has solved the problem for you. Otherwise maybe we could try adding some error handling code to the plugin.
I have to do this every other day to keep mine running. It works, but it is temporary.
On Dec 23, 2016, at 10:33 AM, leoneleone <[email protected]mailto:[email protected]> wrote:
@kendersonhttps://github.com/kenderson The advice from others above is sound. My suggest is to:
- remove homebridge from HomeKit
- Delete .homebridge/accessories & .homebridge/persist folders.
- Reboot homebridge
It is true you will lose all accessory sorting (into rooms, service groups, and automations) and association, but it is an easy thing to rectify.
Please let us know if that has solved the problem for you. Otherwise maybe we could try adding some error handling code to the plugin.
You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/KraigM/homebridge-harmonyhub/issues/31#issuecomment-269022190, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AV0gYggDfeCacf741C0ZzobAPMky6hsWks5rLAXigaJpZM4IRtU4.
I have installed it as a service, so every time it crashes it recovers. But what am i wondering about, the persons with error max client 6, do they all have more than 1 harmony hub?
I have three hubs running
On Dec 23, 2016, at 10:36 AM, cyberb0b <[email protected]mailto:[email protected]> wrote:
I have installed it as a service, so every time it crashes it recovers. But what am i wondering about, the persons with error max client 6, do they all have more than 1 harmony hub?
You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/KraigM/homebridge-harmonyhub/issues/31#issuecomment-269022544, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AV0gYuU0Xq1WnY27OefFElp-SrnJ6-Wpks5rLAaNgaJpZM4IRtU4.
It turns out I was running node version 5.2. I've upgraded to version 7.3 now. Will report back after some testing
New node version is probably not gonna work, if I check out hub-connection.js I see no error handling for code 6.
It has nothing to do with number of hubs running. The problem is that the underlying harmonyhubjs-discover
library keeps making multiple connections to the hub, which has an internal hard-coded limit of 6 max connections. This is why other projects are also facing this problem. The best fix is for the lower-level library to fix its leak so it manages a persistent connection, but this project could also be smarter about how it creates new connections.
Try out the following code in node's console:
var HarmonyHubDiscover = require('./node_modules/harmonyhubjs-discover');
var discover = new HarmonyHubDiscover(61991);
var hubInfo;
discover.on('online', function(hub) { hubInfo = hub });
discover.start();
var Connection = require('./lib/hub-connection');
console.debug = console.log;
var c = new Connection(hubInfo, console, discover);
c.connectAsync(hubInfo); // run 6 times and it'll emit the same error (but not crash because it's caught)
Somewhere in homebridge-harmonyhub
, the max connection error is going uncaught or getting rethrown. I only have one hub with one activity, so number of hubs makes no difference.
The frustrating part is how intermittent/random the problem is. It's difficult to figure out reproduction steps. I tried running Homebridge in debug mode to gather more logs a couple weeks ago, but haven't seen it crash since then... For a few weeks before that, it was crashing daily.
I haven't tried this myself yet, but running homebridge as a service to auto-restart when it crashes is probably your best bet for now if you're seeing this error.
Stupid suggestion maybe, but why not put error 6 behind the timeout?
I mean, like in hub-connection.js, var connection status 6.. and send it to the conntask timeout?
Those connections should timeout eventually I guess.
@cyberb0b I removed content from both folders and fired everything back up. Now I get the following.
[12/23/2016, 1:06:05 PM] [homebridge-harmonyhub.HarmonyHub] Ignoring Harmony Platform setup because it is not configured
Thoughts?
Your config file doesn’t have the info about the harmony platform in it.
On Dec 23, 2016, at 1:09 PM, Ken Henderson [email protected] wrote:
@cyberb0b https://github.com/cyberb0b I removed content from both folders and fired everything back up. Now I get the following.
[12/23/2016, 1:06:05 PM] [homebridge-harmonyhub.HarmonyHub] Ignoring Harmony Platform setup because it is not configured
Thoughts?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/KraigM/homebridge-harmonyhub/issues/31#issuecomment-269026407, or mute the thread https://github.com/notifications/unsubscribe-auth/AQLd5wGrSf2T3_Ln_Mt5BUBVNMa4HaY9ks5rLA5PgaJpZM4IRtU4.
the same error i got when i started home bridge with the command: sudo homebridge. when i type only homebridge the it works for a while and runs into the max client error...
i upgraded to node 7.2.1 and now homebridge don't work ...
pi@raspberrypi:~ $ homebridge /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/mdns/lib/dns_sd.js:35 throw ex; ^
Error: The module '/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/mdns/build/Release/dns_sd_bindings.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 46. This version of Node.js requires
NODE_MODULE_VERSION 51. Please try re-compiling or re-installing
the module (for instance, using npm rebuild
ornpm install
).
at Object.Module._extensions..node (module.js:598:18)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.
what is now wrong?
@leoneleone @cyberb0b & @sleepyarmistice - Thanks for the assistance from you all! So below are a few data points;
- My last error was weird, the config file has the HamonyHub platform defined. That said, I rebooted the RPi and that error went away.
- As of now, the system has been running without error for longer than I've had in the past. I'll repost here if I run into an error.
Below is a breakdown of the what it took for me;
- Update node (went to v7.2.1)
- Uninstall and install Homebridge and all Plugins (npm rebuild didnt do the trick)
- Delete the contents of accessories and persist folders
- Reboot everything
@leoneleone @cyberb0b & @sleepyarmistice - I spoke too soon. I just got the Max Clients error. I got about 2 hrs out of it beforeI hit the error.
At this point, I have to agree that this really needs better error handling within the plugin.
Let me know if there's anything else I can help try/test.
Thanks Again! Ken
@kenderson Can you tell me why my homebridge doesnt work since I update node to 7.2.1?
I really give up with the harmony plugin. But now even the hole homebridge doesn't work...:/
@r32er When I first updated, I got the same error you did. I had to uninstall and reinstall homebridge and all plugins. I'm guessing when you install them there's a reference to the node version. So you're probably seeing an error b/c they're looking for the previous version of node.
Can u tell me how it works ? I m really a noob with this...
@r32er no problem. Are you looking for guidance on how to uninstall and reinstall? Or a deeper understanding of the issue? I can help you with the uninstall and and reinstall commands....but probably not with a deeper understanding. Let me know!
Only the uninstall re install so homebridge will work again please.
@r32er No problem. My routine was;
-
sudo npm uninstall -g homebridge
-
sudo npm install -g homebridge
-
sudo npm uninstall -g homebridge-{insert-plugin-name}
-
sudo npm install -g homebridge-{insert-plugin-name}
Repeat the last two for all plugins Let me know if you have any additional questions. Ken
thank you ! i will try this. This ist everything? its easier as i thought
Update: I got this error.. pi@raspberrypi:~ $ sudo npm uninstall -g homebridge module.js:472 throw err; ^
Error: Cannot find module 'internal/fs'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at evalmachine.
Hi, I've started experiencing this issue over the last few weeks. I'm using Node v7.4.0, and have tried @kenderson 's example of updating Node, then uninstalling and reinstalling homebridge and its plugins, but after a short period of time the same error occured, max_clients=6.
I've had good luck downgrading to the previous HarmonyHub plugging version. It never crashes out my homebridge install.
Thanks for the advice @starlessblack , can I please ask how I downgrade a plugin? Thanks
Sure--essentially, I followed this person's advice: https://github.com/KraigM/homebridge-harmonyhub/issues/61#issuecomment-261899772
Uninstall the current version of the plugin, download the old one, unzip it, run the "sudo npm install –g" command from that directory to install it...I think that's about it. Mine's now been running for close to a month without any crashes.
Are you able to use multiple hubs after downgrading?
Oh, I'm not sure, as I only use a single hub. If that was a feature of the newer version of the plugin, then this option might not work for you. It looks like the developer alludes to using a workaround in the old version, adding multiple platforms to the config file. Maybe it'll still work for you after all.
When I first ran my setup I had two hubs in my config file - unless an update on the harmony end fixed something I had the crashing more than with the .20 builds.
From research it looks like the issue lies with the error handling in the library used by the plugin - the amazon echo and smart things plugins are the same issue.
On Feb 21, 2017, 10:58 AM -0400, starlessblack [email protected], wrote:
Oh, I'm not sure, as I only use a single hub. If that was a feature of the newer version of the plugin, then this option might not work for you. It looks like the developer alludes to using a workaround in the old version, adding multiple platforms to the config file. Maybe it'll still work for you after all.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub (https://github.com/KraigM/homebridge-harmonyhub/issues/31#issuecomment-281368017), or mute the thread (https://github.com/notifications/unsubscribe-auth/AAFB5Ve9D34kk_ZswYeh-P-TM41a9a_Vks5revuvgaJpZM4IRtU4).