maddox / harmony-api

🗼 A simple server allowing you to query/control multiple local Harmony Home Hubs over HTTP or MQTT
MIT License
393 stars 115 forks source link

No hubs available - random issue #113

Open ilker-aktuna opened 3 years ago

ilker-aktuna commented 3 years ago

Hi,

Sometimes , "randomly" , the API produces the message "No hubs available" when this happens nothing works until I restart the Harmony hub.

How can we solve this issue ?

I see the following function on app.js var hasHarmonyHubClient = function(req, res, next) { if (Object.keys(harmonyHubClients).length > 0) { next() }else{ res.status(500).json({message: "No hubs available."}) } } app.use(hasHarmonyHubClient)

what does this do actually ?

is there a way to statically connect to a hub IP and not try to discover it ?

thanks.

johngo7470 commented 3 years ago

One thing I forgot about (that made the difference between the hub being discoverable or not), was to make sure and use the older firmware where the port is not turned off. See www.home-assistant.io/blog/2018/12/17/logitech-harmony-removes-local-api/ for info on how to use the desktop software (plus USB cable to the hub), to select the option to revert the firmware to 4.15.193 (assuming you're using the Harmony Hub, like me)

waltlillyman commented 3 years ago

I have two Harmony Hubs with firmware version 4.15.290. I have XMPP enabled on both and never see the "no hubs available" errors in Home Assistant. The integration works fine for me.

Instructions for enabling XMPP are here.

ilker-aktuna commented 3 years ago

integration works fine. but sometimes lose it with the "no hubs available" message.

ilker-aktuna commented 3 years ago

it is not a permanent failure, but happens randomly.

johngo7470 commented 2 years ago

I'm seeing it randomly, more recently. Interestingly, power cycling the hub doesn't help, but power cycling my raspi always fixes it.

HonestJohn61 commented 1 year ago

I have two Harmony Hubs with firmware version 4.15.290. I have XMPP enabled on both and never see the "no hubs available" errors in Home Assistant. The integration works fine for me.

Instructions for enabling XMPP are here.

Hi, I didn't spot this in the instructions on how to use it, so was stuck with the log saying my hubs were discovered, but neither being available. Enabling XMPP via the Harmony app immediately solved the problem. Should this be mentioned in the instructions @maddox ?