homebridge-harmonyhub icon indicating copy to clipboard operation
homebridge-harmonyhub copied to clipboard

Error: connect ECONNREFUSED

Open groovyf opened this issue 5 years ago • 19 comments

The Harmonyhub plugin was working OK last night (16th Dec 2018), but today issuing commands via Siri stopped working - TV, for instance, did not power-on when asked. The Harmony Remote functions OK and powers-on the TV. I restarted HomeBridge and this is what I get in the logs: errorhub { Error: connect ECONNREFUSED 192.168.0.10:5222 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1117:14) errno: 'ECONNREFUSED', code: 'ECONNREFUSED', syscall: 'connect', address: '192.168.0.10', port: 5222 }

Unhandled rejection TimeoutError: operation timed out at afterTimeout (/usr/lib/node_modules/homebridge-harmonyhub/node_modules/bluebird/js/release/timers.js:46:19) at Timeout.timeoutTimeout [as _onTimeout] (/usr/lib/node_modules/homebridge-harmonyhub/node_modules/bluebird/js/release/timers.js:76:13) at ontimeout (timers.js:436:11) at tryOnTimeout (timers.js:300:5) at listOnTimeout (timers.js:263:5) at Timer.processTimers (timers.js:223:10)

I wonder if there's been a software update to the harmony Hub overnight that may have altered port accessibility? I've run a port scan on the Hub and 5222 does not show as open. However, port 8222 is open. Any ideas?

groovyf avatar Dec 17 '18 13:12 groovyf

Same here. I can’t control with HomeKit app. Harmony app is ok.

toshibochan avatar Dec 17 '18 14:12 toshibochan

I tried editing /usr/lib/node_modules/homebridge-harmonyhub/node_modules/harmonyhubjs-client/lib/login/hub.js to replace the entry at the bottom to 8222 as a test: hubport = hubport || 5222

Restarted Homebridge (and then the server), but no luck. It even continued to try to connect on port 5222.

groovyf avatar Dec 17 '18 14:12 groovyf

Posted similar on Reddit. Apparently an update by Logitech has "broken" things... https://www.reddit.com/r/homeassistant/comments/a6u6ep/psa_harmony_hub_firmware_v415206_breaksremoves/?st=JPSFANTI&sh=85821541

groovyf avatar Dec 17 '18 15:12 groovyf

Same here.Is there already a solution?

xMAIKx avatar Dec 18 '18 20:12 xMAIKx

Well Logitech has now stated that this was intentional and never supported to begin with. So now someone would have to reverse engineer how the Logitech app works. Seems the home assistant community is working hard on that.

bkonings avatar Dec 19 '18 08:12 bkonings

Here is the home assistant project. They have been very fast. https://github.com/home-assistant/home-assistant/commit/23a579421ded86da432949ff8e571432aa04b6aa

Someone would still need to update https://github.com/swissmanu/harmonyhubjs-client to work with the new method (web sockets).

pponce avatar Dec 20 '18 00:12 pponce

hello, is it possible to trigger the update like the colleagues? would be stupid if it does not work anymore.

Seger85 avatar Dec 20 '18 13:12 Seger85

I get the same error....

Phoenix-DH avatar Dec 20 '18 16:12 Phoenix-DH

It looks like all harmony hubs stopped working after last update... We all have same error... So any good solution?

bbl888 avatar Dec 21 '18 07:12 bbl888

I used IFTTT instead .... not so comfortable, but for powering enough ... that is what I want.

Phoenix-DH avatar Dec 21 '18 09:12 Phoenix-DH

@KraigM

Logitech is reacting and gives developers the following instruction. I hope somebody will help the homebridge community to keep a harmony plugin working. Thanks a lot in advance.

We’ve heard your concerns. We understand that some customers are frustrated with the recent security fix we put in place, as it closed access to private local API controls. While security continues to be a priority for us, we are working to provide a solution for those who still want access despite the inherent security risks involved.

If you would like to participate in an XMPP beta program, which will allow access to local controls, see the below instructions. Over the coming weeks, we will qualify a regular firmware release that still allows XMPP control for those who need it. We expect to send out an update that will be available to all Harmony customers in January.

Here are the instructions to access the program by updating the firmware on your Hub.

Launch the MyHarmony software on your desktop computer. From the login page, press the following keys to access the tool: On Windows - Press Alt + F9 On Macs - Press Fn + Option + F9 or Option + F9. Scroll down to the bottom where it says “FIRMWARE TO ENABLE XMPP. FOR DEVELOPERS ONLY.” Be sure to read through the short warning and disclaimer to understand the impact of installing this firmware. Click on Update Firmware. Plug in your Harmony Hub via USB and click on Install.

Thank you

DJay-X avatar Dec 21 '18 20:12 DJay-X

It's a pity the just turn off features lots of people relied on -.-

gabsi20 avatar Dec 21 '18 20:12 gabsi20

Hi, I tried a first plugin using websockets to "counter" their removal of xmpp : https://www.npmjs.com/package/homebridge-harmony https://github.com/nicoduj/homebridge-harmony Feel free to try, at your own risks ! (code is still dirty, just a first try / work in progess)

nicoduj avatar Dec 21 '18 22:12 nicoduj

Thank you for doing this! It looks like they have re-enabled XMPP vía a “developer” firmware option. But I think it might be good to move to the websockets implementation anyway since it is what the iOS app uses currently so would be harder for Logitech to remove that method.

pponce avatar Dec 21 '18 23:12 pponce

Thanks for the lovely xmas present Logitech!

mezza avatar Dec 22 '18 19:12 mezza

Just to confirm that the XMPP firmware fixed things: I was doing a fresh setup of homebridge and was getting the same ECONNREFUSED when homebridge tried to access the harmony hub via the plugin. Installing the XMPP firmware on the hub via the MyHarmony app (from a Mac, physically connected) fixed things. Now homebridge correctly exposes all the harmony activities and they show up in the homekit iOS app.

Thx Logitch for giving us a solution! A homekit-enabled hub in the future would be great too.

zzcoyote avatar May 04 '19 23:05 zzcoyote

When I performed the XMPP firmware update it indicates that this is a previous firmware version meaning that new firmware updates will automatically overlay this update and newer features will not be available. Is that correct?

KBoz avatar Jun 07 '19 02:06 KBoz

I was facing the same issue and installed the XMPP firmware which solved the problem but now as soon as I want to edit an activity in the app, it forces me to upgrade. Any suggestions?

smackerg avatar Aug 09 '19 07:08 smackerg

Checked today and the firmware upgraded by itself so homebridge stopped working!

smackerg avatar Aug 09 '19 21:08 smackerg