iobroker-community-adapters / ioBroker.harmony

Logitech Harmony Adapter for ioBroker
MIT License
14 stars 15 forks source link

Fix XMPP connect for new Firmware 4.15.250 #49

Closed Bertilax closed 5 years ago

Bertilax commented 5 years ago

Sice Firmware 4.15.250 XMPP is enabled again and Vers. 1.1.5 is not working any more... Confirmed working version is 0.9.3 ;)

foxriver76 commented 5 years ago

Latest working XMPP version of the adapter should be 1.0.0 but I recongized, that https://www.npmjs.com/package/@harmonyhub/client broke something in v1.0.7, so current latest working version for this dep is 1.0.6, otherwise I am receiving

 [CONNECT] Could not connect to hubname: TypeError: Cannot read property 'port' of undefined
Bertilax commented 5 years ago

I tried Version 1.0.0 but it was not working - Version 0.9.3 works fine (0.9.6 was not available for download - why ever…). I tried every version back and stopped at 0.9.3. In the future XMPP schould be the way to go - if Logitech do not touch this feature again (so they promissed ;))

foxriver76 commented 5 years ago

Yes, the content of 1.0 will also work, with a pinned dependency of harmonyhub client to 1.0.6 or if this will be fixed: https://github.com/AirBorne04/harmonyhub/issues/26

foxriver76 commented 5 years ago

As soon as this ( https://github.com/Pmant/harmonyhubws/pull/4 ) is merged, after a reinstall of the adapter it should work again with websockets.

nob0dy80 commented 5 years ago

as long its not merged, dont forget that you have to change "Harmony_Hub" to "Harmony Hub" in your scripts/flows when using 0.9.3

nob0dy80 commented 5 years ago

Ok.. like foxriver76 said, 1.0.0 is running fine with client version 1.0.6. and the best: you dont need to change the underscores in your scripts ;)

foxriver76 commented 5 years ago

V1.0.0 nehmen und in der Package JSON bei dependencies bei @harmonyhub/Client das Zirkumflex vor der Versionsnummer entfernen. Anschließend im Verzeichnis npm i ausführen.

nob0dy80 commented 5 years ago

ah ! ok das wäre auf jeden fall der saubere weg.. ich hab einfach 1.0.0 installiert und dann die client version mit npm install @harmonyhub/client@1.0.6 drübergebügelt :-D

DanielWeeber commented 5 years ago

Zur Hilfe für andere, die hier lesen. Aktueller Workaround wie von @foxriver76 und @nob0dy80 erklärt wie folgt:

Instanz stoppen

cd /opt/iobroker
npm install iobroker.harmony@1.0.0 --production
cd /opt/iobroker/node_modues/iobroker.harmony
npm install @harmonyhub/client@1.0.6
cd /opt/iobroker
iobroker upload harmony

Instanz starten
DanielWeeber commented 5 years ago

As soon as this ( Pmant/harmonyhubws#4 ) is merged, after a reinstall of the adapter it should work again with websockets.

It is merged, but newest version does not seem to connect. No error message after "connecting".

foxriver76 commented 5 years ago

Problem is that it is merged but not published yet on npm.

DanielWeeber commented 5 years ago

Why not force the use of the GitHub repo as long it is not published?

PR https://github.com/Pmant/ioBroker.harmony/pull/52

foxriver76 commented 5 years ago

Both Repos are owned by Pmant and he is the only one having push access. So it doesn’t make a difference. Also I don’t like git dependencies because some people do not have git installed and more support questions will pop up.

DanielWeeber commented 5 years ago

Okay. Then everyone (who has git) can use my fork till its published ;)

Pmant commented 5 years ago

Sorry for the delay guys, I just published both repos to npm. This adapter will stick to the websocket method since the connection handling is better and we have less dependencies. @foxriver76 thanks a lot for the PRs.