What is the best way to troubleshoot Alexa/openHAB Cloud discovery issues

Hi,

I’m running 3.1.0M4 on a Rpi4 and just added some basic Alexa metadata:

value: PowerController.powerState
config: {}

But I can’t for the life of me get Alexa to discover it. I’ve rebooted, reauthorized the Alexa Skill, removed know items from Alexa.amazon.com but none of them are re-discovered.

Always so aggravating when you expect to make a simple change and 90 minutes later you still can’t get it going - not a complaint about this software stack, just a technology complaint in general… especially when the request was from a user (the wife).

Another 2h in… removed skill, removed connector, stopped service, cleared cache, rebooted… nothing
deleted ALL items from Alexa.amazon.com - none discovered
Rebooted router, changed patch location, etc. etc. Nothing.
Removed connector, skill, created new myopenhab.org account and made sure it was online and associated with the skill, no devices discovered.

How can I see what the skill is being returned from myopenhab.org?

Just thought to try OAUTH from within Chrome so doing that next…

Still no luck… I realized that I could get some logging info from the cloud connector bundle…set to debug, here is what I see when I click ‘discover’ from Alexa.amazon.com:

2021-05-05 14:48:09.948 [DEBUG] [io.openhabcloud.internal.CloudClient] - on(): request
2021-05-05 14:48:09.950 [DEBUG] [io.openhabcloud.internal.CloudClient] - Got request 31777736
2021-05-05 14:48:09.951 [DEBUG] [io.openhabcloud.internal.CloudClient] - Path /rest/items/
2021-05-05 14:48:09.953 [DEBUG] [io.openhabcloud.internal.CloudClient] - Method GET
2021-05-05 14:48:09.954 [DEBUG] [io.openhabcloud.internal.CloudClient] - Headers: {"host":"myopenhab.org","cache-control":"no-cache","accept-encoding":"gzip, deflate","accept":"application/json","user-agent":"openhab-cloud/0.0.1"}
2021-05-05 14:48:09.955 [DEBUG] [io.openhabcloud.internal.CloudClient] - Query {"metadata":"alexa,autoupdate,channel,synonyms","fields":"editable,groupNames,groupType,name,label,metadata,stateDescription,tags,type"}
2021-05-05 14:48:09.956 [DEBUG] [io.openhabcloud.internal.CloudClient] - Request method is GET
2021-05-05 14:48:09.957 [DEBUG] [io.openhabcloud.internal.CloudClient] - Jetty set header host = myopenhab.org
2021-05-05 14:48:09.958 [DEBUG] [io.openhabcloud.internal.CloudClient] - Jetty set header cache-control = no-cache
2021-05-05 14:48:09.959 [DEBUG] [io.openhabcloud.internal.CloudClient] - Jetty set header accept-encoding = gzip, deflate
2021-05-05 14:48:09.960 [DEBUG] [io.openhabcloud.internal.CloudClient] - Jetty set header accept = application/json
2021-05-05 14:48:09.961 [DEBUG] [io.openhabcloud.internal.CloudClient] - Jetty set header user-agent = openhab-cloud/0.0.1
2021-05-05 14:48:10.160 [DEBUG] [io.openhabcloud.internal.CloudClient] - on(): request
2021-05-05 14:48:10.161 [DEBUG] [io.openhabcloud.internal.CloudClient] - Got request 31777737
2021-05-05 14:48:10.162 [DEBUG] [io.openhabcloud.internal.CloudClient] - Path /rest/
2021-05-05 14:48:10.162 [DEBUG] [io.openhabcloud.internal.CloudClient] - Method GET
2021-05-05 14:48:10.163 [DEBUG] [io.openhabcloud.internal.CloudClient] - Headers: {"host":"myopenhab.org","cache-control":"no-cache","accept-encoding":"gzip, deflate","accept":"application/json","user-agent":"openhab-cloud/0.0.1"}
2021-05-05 14:48:10.164 [DEBUG] [io.openhabcloud.internal.CloudClient] - Query null
2021-05-05 14:48:10.165 [DEBUG] [io.openhabcloud.internal.CloudClient] - Request method is GET
2021-05-05 14:48:10.165 [DEBUG] [io.openhabcloud.internal.CloudClient] - Jetty set header host = myopenhab.org
2021-05-05 14:48:10.166 [DEBUG] [io.openhabcloud.internal.CloudClient] - Jetty set header cache-control = no-cache
2021-05-05 14:48:10.167 [DEBUG] [io.openhabcloud.internal.CloudClient] - Jetty set header accept-encoding = gzip, deflate
2021-05-05 14:48:10.168 [DEBUG] [io.openhabcloud.internal.CloudClient] - Jetty set header accept = application/json
2021-05-05 14:48:10.169 [DEBUG] [io.openhabcloud.internal.CloudClient] - Jetty set header user-agent = openhab-cloud/0.0.1
2021-05-05 14:48:10.189 [DEBUG] [io.openhabcloud.internal.CloudClient] - onHeaders 31777736
2021-05-05 14:48:10.191 [DEBUG] [io.openhabcloud.internal.CloudClient] - onResponseContent: 31777736, content size 16229
2021-05-05 14:48:10.194 [DEBUG] [io.openhabcloud.internal.CloudClient] - onResponseContent: 31777736, content size 16384
2021-05-05 14:48:10.199 [DEBUG] [io.openhabcloud.internal.CloudClient] - onResponseContent: 31777736, content size 155
2021-05-05 14:48:10.291 [DEBUG] [io.openhabcloud.internal.CloudClient] - onHeaders 31777737
2021-05-05 14:48:10.292 [DEBUG] [io.openhabcloud.internal.CloudClient] - onResponseContent: 31777737, content size 1786
2021-05-05 14:48:10.295 [DEBUG] [io.openhabcloud.internal.CloudClient] - onComplete: 31777737
2021-05-05 14:48:10.296 [DEBUG] [io.openhabcloud.internal.CloudClient] - Finished responding to request 31777737
2021-05-05 14:48:10.501 [DEBUG] [io.openhabcloud.internal.CloudClient] - onResponseContent: 31777736, content size 16376
2021-05-05 14:48:10.503 [DEBUG] [io.openhabcloud.internal.CloudClient] - onResponseContent: 31777736, content size 16384
2021-05-05 14:48:10.515 [DEBUG] [io.openhabcloud.internal.CloudClient] - onResponseContent: 31777736, content size 8
2021-05-05 14:48:10.700 [DEBUG] [io.openhabcloud.internal.CloudClient] - onResponseContent: 31777736, content size 16376
2021-05-05 14:48:10.701 [DEBUG] [io.openhabcloud.internal.CloudClient] - onResponseContent: 31777736, content size 16384
2021-05-05 14:48:10.703 [DEBUG] [io.openhabcloud.internal.CloudClient] - onResponseContent: 31777736, content size 8
2021-05-05 14:48:10.889 [DEBUG] [io.openhabcloud.internal.CloudClient] - onResponseContent: 31777736, content size 16376
2021-05-05 14:48:10.890 [DEBUG] [io.openhabcloud.internal.CloudClient] - onResponseContent: 31777736, content size 16384
2021-05-05 14:48:10.891 [DEBUG] [io.openhabcloud.internal.CloudClient] - onResponseContent: 31777736, content size 8
2021-05-05 14:48:11.088 [DEBUG] [io.openhabcloud.internal.CloudClient] - onResponseContent: 31777736, content size 16376
2021-05-05 14:48:11.090 [DEBUG] [io.openhabcloud.internal.CloudClient] - onResponseContent: 31777736, content size 16384
2021-05-05 14:48:11.093 [DEBUG] [io.openhabcloud.internal.CloudClient] - onResponseContent: 31777736, content size 8
2021-05-05 14:48:11.291 [DEBUG] [io.openhabcloud.internal.CloudClient] - onResponseContent: 31777736, content size 16376
2021-05-05 14:48:11.292 [DEBUG] [io.openhabcloud.internal.CloudClient] - onResponseContent: 31777736, content size 16384
2021-05-05 14:48:11.294 [DEBUG] [io.openhabcloud.internal.CloudClient] - onResponseContent: 31777736, content size 8
2021-05-05 14:48:11.457 [DEBUG] [io.openhabcloud.internal.CloudClient] - onResponseContent: 31777736, content size 16376
2021-05-05 14:48:11.459 [DEBUG] [io.openhabcloud.internal.CloudClient] - onResponseContent: 31777736, content size 16384
2021-05-05 14:48:11.460 [DEBUG] [io.openhabcloud.internal.CloudClient] - onResponseContent: 31777736, content size 8
2021-05-05 14:48:11.640 [DEBUG] [io.openhabcloud.internal.CloudClient] - onResponseContent: 31777736, content size 16376
2021-05-05 14:48:11.641 [DEBUG] [io.openhabcloud.internal.CloudClient] - onResponseContent: 31777736, content size 16384
2021-05-05 14:48:11.642 [DEBUG] [io.openhabcloud.internal.CloudClient] - onResponseContent: 31777736, content size 8
2021-05-05 14:48:11.848 [DEBUG] [io.openhabcloud.internal.CloudClient] - onResponseContent: 31777736, content size 16376
2021-05-05 14:48:11.850 [DEBUG] [io.openhabcloud.internal.CloudClient] - onResponseContent: 31777736, content size 16384
2021-05-05 14:48:11.853 [DEBUG] [io.openhabcloud.internal.CloudClient] - onResponseContent: 31777736, content size 8
2021-05-05 14:48:11.962 [DEBUG] [io.openhabcloud.internal.CloudClient] - onResponseContent: 31777736, content size 16376
2021-05-05 14:48:11.963 [DEBUG] [io.openhabcloud.internal.CloudClient] - onResponseContent: 31777736, content size 2810
2021-05-05 14:48:11.966 [DEBUG] [io.openhabcloud.internal.CloudClient] - onComplete: 31777736
2021-05-05 14:48:11.968 [DEBUG] [io.openhabcloud.internal.CloudClient] - Finished responding to request 31777736

so it looks like data is being exchanged, but Alexa is no smarter.

Did you label your item?

Thanks for the reply.

I did. But I think it is a bigger issue as no previously discoverable items can be re-discovered after being deleted.

You should follow the troubleshooting guide and stagger your changes.

Been through all those steps, one at a time, and anything related I can find in the forums that worked for people: peeling it back which is why it is taking so long, I’ve pretty much wasted the whole day on this.

Issue was detected when I was ready to make another device similarly controllable from Alexa as another device that was already working as desired. I copied the exact metadata over to it, and it didn’t discover.

I then created a new item with simpler metadata and it didn’t discover. Something I’ve done frequently as I have about 100 items that are Alexa controllable.

When it didn’t work, I deleted it, and another functioning item to watch it re-discover, something I’ve done several times in the past as I move items around and need to change their names.

I was hoping to be able to see what Alexa thought was happening through some logs, and eventually added the DEBUG setting to the CloudConnector, and it seems like data is being passed to Alexa properly, but I can’t see what is happening with it.

I pointed another Alexa account at the myopenhab.org account and it was also unable to discover devices.

I am about to commission a fresh install of 3.1.0M4 with one item properly tagged to see if Alexa can discover it.

I did see a tweet about a partial AWS outage, but I couldn’t find anything to corroborate or confirm it.

Unfortunately, we don’t have much logs at the Alexa skill level due to resource constraint. Your CloudConnector logs indicates that the skill is generating proper discovery requests to your server and responses are sent back.

Can you try with one single basic item configured for Alexa?

waiting for a fresh openhabian to install to test… almost there…

Ok,

So, a fresh install of OH 3.02, connected to a new myopenhab.org account, and sync’d to a second Alexa account did discover the item.

So what do I do to troubleshoot my config?

Should I restore from backup? Not 100% sure when I last discovered an item…
Should I just meticulously remove metadata until any item discovers properly? Not sure best way…
Is there something else I could be missing?

Welp - I removed metadata from the last 3 or 4 items that I can remember modifying, and I am now discovering items again. It doesn’t appear like it has discovered them all, and maybe discovered a device or two that I’m not sure why it did, so I’ll go look at the API and see if I can figure out why…

You should stagger, from the point you are able to discover your existing items, one item at the time to identify the culprit item definition. Once you found it, you can post it in this thread.

Same situation here, used to have all my tagged items discovered and working fine. Added one item which was never discovered, erased all devices from alexa, reconnected, rebooted, upgraded from 3.1M3 to 3.1M5, reset cached items, etc. to no avail…

to the extent you can remember, remove metadata from the more recent items and see if it will discover. This seemed to be what helped me. Can’t recall if I did anything in between (clean-cache, etc.)

2 Likes

Thanks, yes, I just did that (rolled back by removing recently tagged items) and now it’s discovering again, I will gradually add them back to see which is the culprit, but I am guessing that it’s related to semantic model meta data tags in items files.

In most cases, this is the root cause. Unfortunately, the whole Alexa discovery process can silently fail, instead of ignoring the bad endpoint. Feel free to post the item definition you had an issue with.