Harmony Hub not working after reboot

Posted on
Tue Aug 08, 2017 12:49 pm
DVDDave offline
Posts: 470
Joined: Feb 26, 2006
Location: San Jose, CA

Harmony Hub not working after reboot

Ever since I upgraded to a faster Mac server, some of my plugins, have stopped working after rebooting. Reloading the plugins gets them working again. I think this is happening because the plugins load before the network is fully connected.

This plugin used to work, apparently because it tries again in 10 seconds after a failure. However, it no longer works and must be reloaded. Ironically, this problem started just as another plugin was updated to keep trying after a failure. That plugin fails 3 times over the course of 20 seconds and then works on the 4th attempt. Perhaps the Harmony Hub plugin retries only once which is not a long enough wait.

Here are the log entries after a reboot and subsequent attempt to use the device, and, if needed, I can collect more detailed data:

2017-08-08 11:17:59.255 Harmony Hub Error Error in plugin execution ExecuteAction:
2017-08-08 11:17:59.255 Harmony Hub Error Error in plugin execution ExecuteAction:
2017-08-08 10:14:46.669 Harmony Hub Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
2017-08-08 10:14:46.669 Harmony Hub Error Error in plugin execution runConcurrentThread:
2017-08-08 10:14:46.669 Harmony Hub Error Error in plugin execution runConcurrentThread:
2017-08-08 10:14:46.661 Harmony Hub Error exception in deviceStartComm(Harmony Hub): not all arguments converted during string formatting

Thanks for this very useful plugin!

--Dave

Posted on
Tue Aug 08, 2017 12:58 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Harmony Hub not working after reboot

Update to the latest version (7.1.2 is out now), check the IP address of your hub(s), and turn on debug logging if you're still having problems.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Tue Aug 08, 2017 2:47 pm
DVDDave offline
Posts: 470
Joined: Feb 26, 2006
Location: San Jose, CA

Re: Harmony Hub not working after reboot

FlyingDiver wrote:
Update to the latest version (7.1.2 is out now), check the IP address of your hub(s), and turn on debug logging if you're still having problems.

Unfortunately, it's still not working on 7.1.2 but I now see why. For some reason, Indigo communication is being disabled for the Harmony Hub device when I reboot (but does not get disabled if I simply restart the Indigo server process). Turning communication back on restores normal operation. The address is correct and I've turned on debug logging. Here are the various types of log messages with debug on, reboot at about 13:38. Hopefully something in here will tell you why comms is being disabled. I don't see anything else in the log that would give a clue. Note the last line in the pasted log debug entries showing communications being disabled immediately after the server is shutdown for reboot.

2017-08-08 13:38:59.156 Harmony Hub Checking for updates...
2017-08-08 13:38:59.142 Harmony Hub Starting Harmony Hub
2017-08-08 13:38:03.663 Harmony Hub Shutting down Harmony Hub

2017-08-08 13:38:59.149 Harmony Hub Warning Harmony Hub: Socket test failure

2017-08-08 13:38:59.167 Harmony Hub Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
2017-08-08 13:38:59.167 Harmony Hub Error Error in plugin execution runConcurrentThread:
2017-08-08 13:38:59.167 Harmony Hub Error Error in plugin execution runConcurrentThread:
2017-08-08 13:38:59.149 Harmony Hub Error Harmony Hub: Error starting harmonyHub device, possibly bad IP address, disabling...

2017-08-08 13:38:59.159 Harmony Hub Debug Getting latest release from FlyingDiver/Indigo-Harmony...
2017-08-08 13:38:59.159 Harmony Hub Debug GET /repos/FlyingDiver/Indigo-Harmony/releases/latest
2017-08-08 13:38:59.159 Harmony Hub Debug Called deviceStopComm(self, device): Harmony Hub (1189557276)
2017-08-08 13:38:59.157 Harmony Hub Debug Current version is: 7.1.2
2017-08-08 13:38:59.156 Harmony Hub Debug Plugin version detected: 7.1.2
2017-08-08 13:38:59.149 Harmony Hub Debug Harmony Hub: Starting harmonyHub device (1189557276)
2017-08-08 13:38:59.149 Harmony Hub Debug Harmony Hub: Device Version is up to date
2017-08-08 13:38:59.149 Harmony Hub Debug Harmony Hub: Device Current Version = 0
2017-08-08 13:38:59.147 Harmony Hub Debug Called deviceStartComm(self, device): Harmony Hub (1189557276)
2017-08-08 13:38:59.142 Harmony Hub Debug updateFrequency = 86400.0
2017-08-08 13:38:59.092 Harmony Hub Debug logLevel = 5
2017-08-08 13:38:03.208 Harmony Hub Debug Called deviceStopComm(self, device): Harmony Hub (1189557276)

Posted on
Tue Aug 08, 2017 2:51 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Harmony Hub not working after reboot

This is the same problem you posted about in another thread. The plugin can't communicate with the hub, so I disable it. There's something about your computer or network that's blocking network attempts while Indigo is trying to start up.

I'll look into retrying the comm test instead of disabling the device, but that won't be a quick fix.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Tue Aug 08, 2017 3:09 pm
DVDDave offline
Posts: 470
Joined: Feb 26, 2006
Location: San Jose, CA

Re: Harmony Hub not working after reboot

FlyingDiver wrote:
This is the same problem you posted about in another thread. The plugin can't communicate with the hub, so I disable it. There's something about your computer or network that's blocking network attempts while Indigo is trying to start up.

I'll look into retrying the comm test instead of disabling the device, but that won't be a quick fix.


Yes, this is exactly what the author of Alexa-Hue-Bridge is implementing in a new version. As it stands now, he tries every 10 seconds until it works and it seems to take 4 or 5 attempts.

I've also seen reports from other users whose servers exhibit the same behavior although I don't know why some servers don't have the network up and running before Indigo loads the plugins. My old, slower server did not have this issue.

Other plugin developers have implemented similar fixes and it seems to be Matt's and Jay's recommendation as well per this discussion: viewtopic.php?p=142826#p142826

All that said, I have not seen anyone say they are disabling communication in a device when this error occurs. This is especially troublesome since it is not resolved by reloading the plugin or restarting the server process. Is there some reason why you are doing that?

Thanks!

--Dave

Posted on
Tue Aug 08, 2017 3:11 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Harmony Hub not working after reboot

DVDDave wrote:
All that said, I have not seen anyone say they are disabling communication in a device when this error occurs. This is especially troublesome since it is not resolved by reloading the plugin or restarting the server process. Is there some reason why you are doing that?


Because the most prevalent case for non-communication (that I've seen) is a wrong IP address for the hub. That's never going to fix itself. This is different than a problem communicating with an outside service (like WUnderground), which is usually caused by some transient network or server issue.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Tue Aug 08, 2017 3:16 pm
DVDDave offline
Posts: 470
Joined: Feb 26, 2006
Location: San Jose, CA

Re: Harmony Hub not working after reboot

FlyingDiver wrote:
DVDDave wrote:
All that said, I have not seen anyone say they are disabling communication in a device when this error occurs. This is especially troublesome since it is not resolved by reloading the plugin or restarting the server process. Is there some reason why you are doing that?


Because the most prevalent case for non-communication (that I've seen) is a wrong IP address for the hub. That's never going to fix itself.

Ah, makes sense! Hopefully, it will be possible to simply stop trying, or even keep trying periodically rather than changing the device communication setting permanently. Certainly a temporary network issue could also be a common cause of this and IMHO it would be confusing to users to have to look for the disabled communication setting when the network comes back up.

BTW, I don't think I was having this problem in earlier versions since I never had to enable communications to get it working again. My earlier post even shows a reference to trying again in 10 seconds and I think reloading the plugin got it working again.

Posted on
Wed Aug 09, 2017 7:06 am
DVDDave offline
Posts: 470
Joined: Feb 26, 2006
Location: San Jose, CA

Re: Harmony Hub not working after reboot

I just implemented an easy workaround for the problem that works great. I use the startup trigger with a 1 minute delay to execute a server action to enable the Harmony Hub device. This turns communications back on without any issues. :)

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest