Open Pensive opened 5 years ago
It's already been forked to https://github.com/materik/homebridge-harmonyhub-plugin I'd suggest you fork it instead, although they have looked at the tv Functionality and decided not to support it https://github.com/materik/homebridge-harmonyhub-plugin/issues/15
But that now uses websockets. I’m having trouble with websockets.
So that means forking materiks and reverting back to xmpp.
Or forking nico’s (which already has tv support) andcrevertimg it back to xmpp.
Websockets is vastly inferior to a local api function.
“Websockets is vastly inferior to a local api function.” @pensive I’m curious, can you explain why?
Hi, yep I don’t understand this assumption either. Websocket doesn’t mean access through internet. All calls are local through local calls (even the first http call to get the hub is). The harmony app itself is using websocket . I can think of using xmpp if you want but not sure it will be more responsive . I was using it before and add much more trouble (especially the max connection issue even if it was been fixed through a workaround). Would you explain what problems you have with websocket implementation ?
Sent with GitHawk
All the initial reporting on the XMPP switch off reported that websockets went through the harmony cloud server to connect. That is what would make it inferior.
If it’s just http calls over the local network then that’s just fine :)
The websockets were closing off over time - both materiks and your plugin would stop working overnight with a 3rd party HomeKit switch. Siri would still work - as would HomeKit buttons on my phone. But my Hue switch would trigger in HomeKit and nothing would happen (error - websocket not open on materiks, no error on Nicos - sometimes it would work after 30 second delay).
There’s an issue on materiks github describing it.
I moved over to yours instead Nico and still had the problem.
I updated 2 days ago and it hasn’t happened since - I think it may be fixed.
Hi, yes indeed I worked on this and now it should reconnect as soon as it is disconnected .
Just as a proof that it is all local even with websocket, here are the two endpoint (first one http request to retrieve hub config and second one websocket endpoint to send command and retrieve hub events) :
const hubUrl = http://${ip}:${DEFAULT_HUB_PORT}/
;
const url = ws://${ip}:${DEFAULT_HUB_PORT}/?domain=${this._domain}&hubId=${this._remoteId}
;
Sent with GitHawk
Thank you Nico!!
It worked again this morning - I think you’ve fixed it :D many levels of awesome.
I look forward to getting the TV function running soon as well :)
Do you have a PayPal to buy you a beer? :)
By the way TV mode is allready working, jsut a bit messed up (volume / back button) in the latest beta unfortunately. You can duplicate your platform in order to have both modes exposed if you want (that is what I do).
I don’t have iOS 12.2 yet as it’s my work phone - I’m waiting for release day :)
Do you have a PayPal to buy you a beer? :)
Paypal button added :)
Much improved - thank you! Seems to be 99% reliable now and i suspect the 1% is more homebridge related.
paypal button used - not much but enough for a pint :D 🍺
thank you
I am fairly technical but not so much with Linux and node - I would appreciate a little help.
I plan to re-issue this as a new repository but with a clearer name like homebridge-harmonyhub-xmpp rather than fork it - update all dependencies - merge the open pulls - and possibly add the 12.2 HomeKit tv functionality.