Alexa Bridge Keeps Going Off Line

Posted on
Tue Oct 24, 2017 4:44 am
maslett offline
Posts: 95
Joined: Aug 09, 2014

Alexa Bridge Keeps Going Off Line

Hi,

I have set up 10 Alexa bridges to control over 190 devices throughout my house including my lights, Sonos and TVs.

The Alexa Bridges keep going off line meaning discovery turns off and they don't function correctly. Below is the errors from the log.

Many thanks, Mark

Alexa-Hue Bridge Error StandardError detected in put_response for device 1195944432. Line '221' has error=''a66094807a69a9f05a0742d961206a36d08d111f06b6848711836825ed8d79ab''
Alexa-Hue Bridge Error StandardError detected in HttpdRequestHandler for device 1195944432. Line '148' has error='must be string or buffer, not None'
Alexa-Hue Bridge Error StandardError detected in put_response for device 1195944432. Line '221' has error=''a66094807a69a9f05a0742d961206a36d08d111f06b6848711836825ed8d79ab''
Alexa-Hue Bridge Error StandardError detected in HttpdRequestHandler for device 1195944432. Line '148' has error='must be string or buffer, not None'
Alexa-Hue Bridge Error StandardError detected in put_response for device 1195944432. Line '221' has error=''a66094807a69a9f05a0742d961206a36d08d111f06b6848711836825ed8d79ab''
Alexa-Hue Bridge Error StandardError detected in HttpdRequestHandler for device 1195944432. Line '148' has error='must be string or buffer, not None'
Alexa-Hue Bridge Error StandardError detected in put_response for device 1195944432. Line '221' has error=''a66094807a69a9f05a0742d961206a36d08d111f06b6848711836825ed8d79ab''
Alexa-Hue Bridge Error StandardError detected in HttpdRequestHandler for device 1195944432. Line '148' has error='must be string or buffer, not None'

Posted on
Tue Oct 24, 2017 6:01 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Alexa Bridge Keeps Going Off Line

I'll try and help. :)

When you say you have set-up 10 Alexa-Hue Bridges, are they brand new Alexa-Hue Bridge definitions in Indigo and not using existing devices already known to Alexa?
That is, is this a brand new install of the Alexa-Hue V3 plugin?

Posted on
Tue Oct 24, 2017 10:16 am
maslett offline
Posts: 95
Joined: Aug 09, 2014

Re: Alexa Bridge Keeps Going Off Line

Jon,

I had been using V2 with two Alexa Bridges. No issues.

I upgraded to V3 with the same two Alexa bridges . no issues.

I have progressively added the additional 8 bridges and mainly virtual devices that I am using to control things like my Sonos (via SONOS Plugin) and TV (via the HarmonyHub plug in).

It works. It just seems a little unstable over time ie it loses its connection and Alexa stops functioning. If I restart the plug-in and retry it functions normally again.

Not sure if it has to do with the ports as each Alexa bridge uses its own port.

Thanks, Mark

Posted on
Tue Oct 24, 2017 4:04 pm
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Alexa Bridge Keeps Going Off Line

Thanks for the info. :)

Do you get different sort of error messages ie.e for different devices other than id: 1195944432 - what is that device?

I probably need to see the full debug log for around when the error occurs.. See the first sticky post on how to get the log. :)

Posted on
Tue Oct 24, 2017 7:25 pm
maslett offline
Posts: 95
Joined: Aug 09, 2014

Re: Alexa Bridge Keeps Going Off Line

Yes. Here is another batch of errors. How do I find out what the actual device is from the numbers below.

Alexa-Hue Bridge Error StandardError detected in HttpdRequestHandler for device 1586828294. Line '141' has error='[Errno 32] Broken pipe'
Alexa-Hue Bridge Error StandardError detected in HttpdRequestHandler for device 1199999001. Line '141' has error='[Errno 32] Broken pipe'
Alexa-Hue Bridge Error StandardError detected in HttpdRequestHandler for device 1350351056. Line '141' has error='[Errno 32] Broken pipe'
Alexa-Hue Bridge Error StandardError detected in HttpdRequestHandler for device 1365117891. Line '141' has error='[Errno 32] Broken pipe'

Posted on
Wed Oct 25, 2017 2:09 pm
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Alexa Bridge Keeps Going Off Line

The device Ids are listed in the main Indigo UI. You can click on the heading to order by number. I suspect the latest log entries are referring to an Alexa-Hue Bridge. :)

Posted on
Wed Oct 25, 2017 6:20 pm
maslett offline
Posts: 95
Joined: Aug 09, 2014

Re: Alexa Bridge Keeps Going Off Line

Jon, yes the DeviceIDs are all the Alexa Bridge's.

Posted on
Sun Oct 29, 2017 8:15 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Alexa Bridge Keeps Going Off Line

Hi Mark,
Apologies for the delay in getting back to you. :|

A further couple of questions:
  1. When you reload the plugin, how long is it before you start noticing a problem?
  2. Am I correct in assuming that it normally works for all devices?

I probably need to see the debug logs (see 1st sticky post on this sub forum).
You need to turn on the debugging in the plugin config and then reload the plugin so that I have a clean plugin start.
Given that you have ten Alexa-Hue Bridges, the log file could be large. So compress it and attach it to a return post as a zip file. :)

Posted on
Sun Oct 29, 2017 9:27 am
nathanw offline
Posts: 152
Joined: Sep 05, 2011
Location: Boston, MA

Re: Alexa Bridge Keeps Going Off Line

I'm seeing the same problem. I say "Alexa, turn the living room lights on" and I get this in the log:
Code: Select all
   Alexa-Hue Bridge Error          StandardError detected in put_response for device 1970384907. Line '221' has error=''265594014''
   Alexa-Hue Bridge Error          StandardError detected in HttpdRequestHandler for device 1970384907. Line '148' has error='must be string or buffer, not None'
   Alexa-Hue Bridge Error          StandardError detected in put_response for device 1970384907. Line '221' has error=''265594014''
   Alexa-Hue Bridge Error          StandardError detected in HttpdRequestHandler for device 1970384907. Line '148' has error='must be string or buffer, not None'


1970384907 is the bridge device, and 265594014 is the living room lights device.

This is with all debugging enabled, and it happens immediately upon start.

Posted on
Sun Oct 29, 2017 9:37 am
nathanw offline
Posts: 152
Joined: Sep 05, 2011
Location: Boston, MA

Re: Alexa Bridge Keeps Going Off Line

Those logs occurred at Oct 29, 2017, 11:25:36 AM
The plugin.log from the host is attached (trimmed to the most recent restart of the plugin); it didn't seem much more informative, honestly.
Attachments
plugin.log
(176.25 KiB) Downloaded 89 times

Posted on
Sun Oct 29, 2017 9:46 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Alexa Bridge Keeps Going Off Line

nathanw wrote:
I'm seeing the same problem. I say "Alexa, turn the living room lights on" and I get this in the log. ...


Yes I agree, looking at the log, it looks as if it is going wrong straight away. :(

Another set of questions:
  1. Has it ever worked?
  2. Is this a new install of V3 or an upgrade from V2
  3. If it has worked, is it the same device that causes the problem or can it be any device?
I'll try and dig a bit deeper and see if I can spot anything. :)

Posted on
Sun Oct 29, 2017 10:12 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Alexa Bridge Keeps Going Off Line

Hi @nathanw,

Looking at the log in more detail, it possibly looks like you might not have followed the instructions in the documentation for migrating from V2 - see section Migration from Version 2. The log message has an Indigo device Id being returned from Alexa when Alexa should be returning a 64 character sha-256 hash key. The important section is:
Now the next important part, use the iOS Alexa App to forget all devices and then do a discovery which is best done by asking Alexa to 'Discover Devices'.
Doing this should generate the correct key.

If I am wrong in my assumption above then I will take another look. :)

Posted on
Sun Oct 29, 2017 11:12 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Alexa Bridge Keeps Going Off Line

Hi Mark (@maslett),

Looking at the info you have provided to me so far, I am not convinced that it is exactly the same problem as reported by @nathanw.

It looks like Alexa is returning a hash key (in this case a66094807a69a9f05a0742d961206a36d08d111f06b6848711836825ed8d79ab and the plugin is expecting that hash key to be associated with Alexa-Hue Bridge device id 1195944432 and it can't find it.

In trying to think through how this could happen, I wonder if you have moved a device from one Alexa-Hue bridge device to another one of the ten?

I have just reproduced (I think) the exact same error - the messages are the same. :wink:

I deleted a device from one Alexa-hue bridge and added it to another. I didn't run discovery. This actually gets logged as a specific error in the Indigo Event log when you ask Alexa to turn the moved device on or off e.g.:
Alexa-Hue Bridge Error _createDeviceDict: alexaDeviceNameKey 'testing lamp' not in published devices; HashKey='697f407ae1ef890e12fef54f192f43dc673c595a194538405afcaaecd3fdb161'
Not very user friendly (at the moment). :roll:

However, if the plugin is restarted and you try again to get Alexa to turn the previously moved device on or off, you get the messages:
Alexa-Hue Bridge Error StandardError detected in put_response for device 860025299. Line '221' has error=''697f407ae1ef890e12fef54f192f43dc673c595a194538405afcaaecd3fdb161''
Alexa-Hue Bridge Error StandardError detected in HttpdRequestHandler for device 860025299. Line '148' has error='must be string or buffer, not None'
Alexa-Hue Bridge Error StandardError detected in put_response for device 860025299. Line '221' has error=''697f407ae1ef890e12fef54f192f43dc673c595a194538405afcaaecd3fdb161''
which are similar to what you have reported (in the first instance).

The plugin needs to handle these situations better. It would also be useful if the hash key was available to view via the Indigo UI so it could be more easily matched to the Indigo device or action(s) it refers to. I will look into these to see how I can improve it.

I haven't managed to replicate the "broken pipe" message but it maybe related.

I think you can fix this by turning discovery on for all Alexa-Hue Bridges and then asking Alexa to do a discovery. If that fails, then maybe using the iOS App to delete all the devices in Alexa and then doing a re-discovery will hopefully sort it out. :)

Posted on
Sun Oct 29, 2017 9:12 pm
nathanw offline
Posts: 152
Joined: Sep 05, 2011
Location: Boston, MA

Re: Alexa Bridge Keeps Going Off Line

- It used to work!
- It is an upgrade to V3 from V2, but I did that a while ago. I'm not 100% sure that I used it since upgrading to V3, but I think so. Unfortunately it's been long enough that I can't remember the exact sequence I performed when I did the upgrade, but I did follow a set of instructions.....
- I would love to restart Alexa fresh with a new set of devices. I'm having a terrible time figuring out how to make the Echo system forget the devices it currently knows about. There's a "disable" option, but that's terrible because disable + re-discover seems to lead to duplicate devices.

Posted on
Mon Oct 30, 2017 1:52 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Alexa Bridge Keeps Going Off Line

Looks like the App has recently changed and you can only disable devices rather than delete them. :|

Probably the easiest way is to access Alexa via https://alexa.amazon.com and log into you account. Select Smart Home from the left-hand menu, then Devices and at the bottom of your list of devices you can do a Forget All.

You may have to select and forget individual devices rather than doing a Forget All, if you have devices defined that aren't controlled by the Alexa-Hue Bridge plugin.

Once you have done this, make sure discovery is on for all your Alexa-Hue Bridge devices and ask Alexa to "discover devices".

I have just run the above sequence and it works for me. :)

Who is online

Users browsing this forum: No registered users and 1 guest