Closed scstraus closed 4 years ago
Hey there @home-assistant/cloud, mind taking a look at this issue as its been labeled with a integration (cloud
) you are listed as a codeowner for? Thanks!
I have also tried removing the homeassistant skill, de registering all Alexa devices and turning the integration off, restarting HA, and turning it on again and adding the device and skill again but no luck.
Also it looks like the one Alexa message I got in the log was due to a new zwave switch I was setting up. This one actually did finally make its way to Alexa. So I have one switch set up out of about 250 entities I told it to sync in the UI. The integration works, but it seems that HA just doesn’t want to send my devices there.
So I've tried deleting my nabu casa account and creating a new one and factory resetting my kindle and deregistering all devices but none of that helped.
Will no one help me? Am I doomed to forever have only 1 out of 216 devices enabled?
So I have put up a fix for the exception that you posted about ENTITY_HANDLERS. Once that is merged and released (0.100), please try again. For now, you can work around it by going to cloud -> alexa and making sure you don't enable any of the zwave.*
entities.
I tried to remove all zwave devices but so far no luck.
Looking back, I think the entity exception was the one time it actually worked properly. I was adding a new zwave device and it wasn’t done adding to homeassistant yet (all its entities hadn’t shown up). Finally after a restart the entities were there and this ended up being the only device that made it over to Alexa.
The problem is, there’s simply no attempt at all to send the other 200 devices so they generate no log messages. I need to trigger something which forces it to resend all devices. The sync button does nothing from what I can tell.
I will try with 0.100 but I think you will probably see a new ticket on this.
Can you try saying "Alexa, discover devices" ?
I've done it at least 50 times both verbally and through the UI on both my phone and my kindle fire. I've also clicked the "sync entities" button at least 80 times. They are simply not getting sent by homeassistant to Alexa. No log activity whatsoever.
I need some low level way to prod homeassistant to send these devices over. I'm happy to run a forked version or something which gives more debug information to figure out what the problem is..
I've tried every possible solution that seems open to me at this point.. It's just not sending the devices I had before trying to enable it. Only new devices like that Zwave one get sent.
Try adding this to your config so you can see the published messages:
logger:
default: info
logs:
hass_nabucasa: debug
homeassistant.components.cloud: debug
Also try removing the alexa:
part under cloud:
and use the UI to configure it.
I didn't have the alexa: part under cloud:, I only tried it once to see if it would change anything..
my logger section looked like this:
logger:
default: debug
logs:
homeassistant.components.mqtt: warn
homeassistant.components.websocket_api: warn
homeassistant.components.deluge_client: warn
homeassistant.components.zwave: warn
homeassistant.components.openzwave: warn
homeassistant.components.libopenzwave: warn
So, it should have already had hass_nabucasa and homeassistant.components.cloud as debug, no? Anyhow, I am updating to:
logger:
default: debug
logs:
homeassistant.components.mqtt: warn
homeassistant.components.websocket_api: warn
homeassistant.components.deluge_client: warn
homeassistant.components.zwave: warn
homeassistant.components.openzwave: warn
homeassistant.components.libopenzwave: warn
hass_nabucasa: debug
homeassistant.components.cloud: debug
So I left it running and clicked on the sync entities button for the 80th time and here's what I can get from grepping the log for those items. There were some alexa messages this time (see pastebin link). Let me know if you want any more context on any of the below. Also, my config is available at https://github.com/scstraus/home-assistant-config
Here's the interesting looking log bit: https://pastebin.com/B7gUFpad
scstraus@narnia:~/hassio/homeassistant$ grep components.cloud home-assistant.log
2019-10-06 01:16:17 DEBUG (SyncWorker_0) [homeassistant.util.json] JSON file not found: /usr/src/homeassistant/homeassistant/components/cloud/.translations/binary_sensor.en.json
2019-10-06 01:16:18 DEBUG (SyncWorker_0) [homeassistant.util.json] JSON file not found: /usr/src/homeassistant/homeassistant/components/cloud/.translations/en.json
scstraus@narnia:~/hassio/homeassistant$ grep nabucasa home-assistant.log
2019-10-06 01:16:10 INFO (MainThread) [hass_nabucasa.iot] Connected
2019-10-06 01:16:10 DEBUG (MainThread) [hass_nabucasa.iot] Publishing message:
2019-10-06 01:16:12 DEBUG (MainThread) [hass_nabucasa.cloud_api] Fetched https://remote-sni-api.nabucasa.com/register_instance (200)
2019-10-06 01:16:12 DEBUG (MainThread) [hass_nabucasa.remote] Retrieve instance data: {'status': 200, 'domain': '[REDACTED]', 'email': 'scstraus@gmail.com', 'server': 'eu-central-1.ui.nabu.casa'}
2019-10-06 01:16:14 DEBUG (MainThread) [hass_nabucasa.cloud_api] Fetched https://remote-sni-api.nabucasa.com/snitun_token (200)
2019-10-06 03:19:24 DEBUG (MainThread) [hass_nabucasa.iot] Received message:
2019-10-06 03:19:24 DEBUG (MainThread) [hass_nabucasa.iot] Publishing message:
So this seems like it is working fine from our end. As you can see in your pastebin, we get a discovery message from Alexa and we respond with 432 entities. Can you try to use the UI to disable most entities and just expose a couple of lights? It could very well be that 432 is too much for Alexa.
Okay, did that. Left 2 lights and 2 switches and told it to sync entities.. Here's a search for Alexa.Discovery (I think my problem before was probably searching for alexa in lowercase). Unfortunately Alexa still doesn't find any new devices when I ask her.
/Alexa.Discovery
...skipping
'payload': {'directive': {'header': {'messageId': '53b19c94-19e1-4f52-a993-bddcaa4bc637',
'name': 'Discover',
'namespace': 'Alexa.Discovery',
'payloadVersion': '3'},
'payload': {'scope': {'token': '[REDACTED]',
'type': 'BearerToken'}}}}}
2019-10-06 21:28:07 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event alexa_smart_home[
L]: request=namespace=Alexa.Discovery, name=Discover, response=namespace=Alexa.Discovery, name=Di
scover.Response>
2019-10-06 21:28:07 DEBUG (MainThread) [hass_nabucasa.iot] Publishing message:
{'msgid': '7ec28009-cf04-4b70-b050-3f68524159e1',
'payload': {'event': {'header': {'messageId': '293c071e-bbd8-46f5-a28f-59dc9461f041',
'name': 'Discover.Response',
'namespace': 'Alexa.Discovery',
'payloadVersion': '3'},
'payload': {'endpoints': [{'capabilities': [{'interface': 'Alexa.PowerCont
roller',
'properties': {'proactivelyRe
ported': True,
'retrievable':
True,
'supported': [
{'name': 'powerState'}]},
'type': 'AlexaInterface',
'version': '3'},
{'interface': 'Alexa.EndpointH
ealth',
'properties': {'proactivelyRe
ported': False,
'retrievable':
True,
'supported': [
{'name': 'connectivity'}]},
'type': 'AlexaInterface',
'version': '3'}],
'cookie': {},
'description': 'switch.fibaro_system_fgs223_dou
ble_relay_switch',
'displayCategories': ['SWITCH'],
'endpointId': 'switch#fibaro_system_fgs223_doub
le_relay_switch',
'friendlyName': 'Front/Right '
'Security '
'Lights',
'manufacturerName': 'Home '
'Assistant'},
{'capabilities': [{'interface': 'Alexa.PowerCont
roller',
'properties': {'proactivelyRe
ported': True,
'retrievable':
True,
'supported': [
{'name': 'powerState'}]},
'type': 'AlexaInterface',
'version': '3'},
{'interface': 'Alexa.EndpointH
ealth',
'properties': {'proactivelyRe
ported': False,
'retrievable':
True,
'supported': [
{'name': 'connectivity'}]},
'type': 'AlexaInterface',
'version': '3'}],
'cookie': {},
'description': 'switch.fibaro_system_fgs223_dou
ble_relay_switch_2',
'displayCategories': ['SWITCH'],
'endpointId': 'switch#fibaro_system_fgs223_doub
le_relay_switch_2',
'friendlyName': 'Back/Left '
'Security '
'Lights',
'manufacturerName': 'Home '
'Assistant'},
{'capabilities': [{'interface': 'Alexa.PowerCont
roller',
'properties': {'proactivelyRe
ported': True,
'retrievable':
True,
'supported': [
{'name': 'powerState'}]},
'type': 'AlexaInterface',
'version': '3'},
{'interface': 'Alexa.Brightnes
sController',
'properties': {'proactivelyRe
ported': True,
'retrievable':
True,
'supported': [
{'name': 'brightness'}]},
'type': 'AlexaInterface',
'version': '3'},
{'interface': 'Alexa.EndpointH
ealth',
'properties': {'proactivelyRe
ported': False,
'retrievable':
True,
'supported': [
{'name': 'connectivity'}]},
'type': 'AlexaInterface',
'version': '3'}],
'cookie': {},
'description': 'light.fibaro_system_fgd212_dimm
er_2_level_2',
'displayCategories': ['LIGHT'],
'endpointId': 'light#fibaro_system_fgd212_dimme
r_2_level_2',
'friendlyName': 'FIBARO '
'System '
'FGD212 '
'Dimmer 2 '
'Level',
'manufacturerName': 'Home '
'Assistant'},
{'capabilities': [{'interface': 'Alexa.PowerCont
roller',
'properties': {'proactivelyRe
ported': True,
'retrievable':
True,
'supported': [
{'name': 'powerState'}]},
'type': 'AlexaInterface',
'version': '3'},
{'interface': 'Alexa.Brightnes
sController',
'properties': {'proactivelyRe
ported': True,
'retrievable':
True,
'supported': [
{'name': 'brightness'}]},
'type': 'AlexaInterface',
'version': '3'},
{'interface': 'Alexa.EndpointH
ealth',
'properties': {'proactivelyRe
ported': False,
'retrievable':
True,
'supported': [
{'name': 'connectivity'}]},
'type': 'AlexaInterface',
'version': '3'}],
'cookie': {},
'description': 'light.fibaro_system_fgd212_dimm
er_2_level',
'displayCategories': ['LIGHT'],
'endpointId': 'light#fibaro_system_fgd212_dimme
r_2_level',
'friendlyName': 'FIBARO '
'System '
'FGD212 '
'Dimmer 2 '
'Level',
'manufacturerName': 'Home '
'Assistant'}]}}}}
Wait, wait, I just went into the Alexa app and checked in devices and it told me that 4 were discovered!! So.. There's something to this sending in small batches.. I will try to continue a few devices at a time and see if I can get them all enabled..
Might be a good feature to add to send devices in small batches if many are selected. It's worth noting that I did have the number of devices advertised much lower like 100-200 previously so it seems the limit is somewhere between 50-150.. Probably 128 or something.
Yep, this is working. Up to 55 devices now! Thanks for the continued followup and of course for bringing us the entire freaking Homeassistant project, Paulus, it's a constant source of joy and discovery for me! It's been an honor to be helped by the man himself, though I feel slightly ashamed that I didn't think of some of this myself.
Glad it's working :-) let me know if you find an upper limit so we can update the docs !
Biggest batch I tried was somewhere around 40-50.. Smallest one that failed was somewhere around 100-200, I don't really remember as I wasn't really thinking about it at the time.
good to know!!
Home Assistant release with the issue: 0.98.4 (also tried against 0.96.3)
Last working Home Assistant release (if known): Hasn't worked for me yet.
Operating environment (Hass.io/Docker/Windows/etc.): hass.io on Ubuntu
Component/platform: Nabu Casa Alexa integration
Description of problem:
New setup of alexa via Nabu Casa, but can't get it to recognize any devices. I suspect regional issues as my first alexa device was purchased in US, but I live in europe and have accounts in Amazon US, DE, and UK. Unsure what to do about it though.
Problem-relevant
configuration.yaml
entries and (fill out even if it seems unimportant):And followed all the instructions here and ensure all entities were set to publish to alexa.
Also tried being more explicit in configuration.yaml like:
But didn't change much except I had fewer entities set to publish.
Traceback (if applicable):
This is the only thing I've found in the logs that really talks about alexa
Here's what I get after I tell it to sync devices to amazon.
Additional information: