core: Nabu Casa not sending devices to alexa. Alexa Discover devices gives "No new devices found."

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):

cloud:

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:

  alexa:
    filter:
      include_domains:
        - alert
        - automation
        - cover
        - fan
        - group
        - input_boolean
        - light
        - lock
        - media_player
        - scene
        - script
        - sensor
        - switch

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

Error doing job: Task exception was never retrieved

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/alexa/state_report.py", line 125, in async_send_add_or_update_message
    alexa_entity = ENTITY_ADAPTERS[domain](
KeyError: 'zwave'

Here’s what I get after I tell it to sync devices to amazon.

2019-09-04 23:17:39 DEBUG (SyncWorker_1) [homeassistant.components.evohome] Status = {'systemId': '4187037', 'zones': [{'zoneId': '4187036', 'temperatureStatus': {'temperature': 25.5, 'isAvailable': True}, 'activeFaults': [], 'setpointStatus': {'targetHeatTemperature': 18.0, 'setpointMode': 'PermanentOverride'}, 'name': 'Living Room'}, {'zoneId': '4217766', 'temperatureStatus': {'temperature': 22.0, 'isAvailable': True}, 'activeFaults': [], 'setpointStatus': {'targetHeatTemperature': 20.0, 'setpointMode': 'PermanentOverride'}, 'name': 'Dining Room'}, {'zoneId': '4217767', 'temperatureStatus': {'temperature': 21.5, 'isAvailable': True}, 'activeFaults': [], 'setpointStatus': {'targetHeatTemperature': 18.0, 'setpointMode': 'PermanentOverride'}, 'name': 'Entrance'}, {'zoneId': '4217768', 'temperatureStatus': {'temperature': 22.0, 'isAvailable': True}, 'activeFaults': [], 'setpointStatus': {'targetHeatTemperature': 22.0, 'setpointMode': 'FollowSchedule'}, 'name': 'Laundry room'}, {'zoneId': '4217769', 'temperatureStatus': {'temperature': 23.5, 'isAvailable': True}, 'activeFaults': [], 'setpointStatus': {'targetHeatTemperature': 22.0, 'setpointMode': 'PermanentOverride'}, 'name': "Sebastian's Room"}, {'zoneId': '4217770', 'temperatureStatus': {'temperature': 22.5, 'isAvailable': True}, 'activeFaults': [], 'setpointStatus': {'targetHeatTemperature': 21.0, 'setpointMode': 'PermanentOverride'}, 'name': "Sophie's Room"}, {'zoneId': '4217771', 'temperatureStatus': {'temperature': 23.0, 'isAvailable': True}, 'activeFaults': [], 'setpointStatus': {'targetHeatTemperature': 21.0, 'setpointMode': 'PermanentOverride'}, 'name': 'Guest Bedroom'}, {'zoneId': '4217772', 'temperatureStatus': {'temperature': 24.0, 'isAvailable': True}, 'activeFaults': [], 'setpointStatus': {'targetHeatTemperature': 22.0, 'setpointMode': 'PermanentOverride'}, 'name': 'Master Closet'}, {'zoneId': '4217773', 'temperatureStatus': {'temperature': 23.0, 'isAvailable': True}, 'activeFaults': [], 'setpointStatus': {'targetHeatTemperature': 21.0, 'setpointMode': 'PermanentOverride'}, 'name': 'Master Bedroom'}, {'zoneId': '4217774', 'temperatureStatus': {'temperature': 21.5, 'isAvailable': True}, 'activeFaults': [], 'setpointStatus': {'targetHeatTemperature': 18.0, 'setpointMode': 'PermanentOverride'}, 'name': 'Garage'}, {'zoneId': '4217775', 'temperatureStatus': {'temperature': 22.5, 'isAvailable': True}, 'activeFaults': [], 'setpointStatus': {'targetHeatTemperature': 21.5, 'setpointMode': 'PermanentOverride'}, 'name': 'Office & Library'}, {'zoneId': '4217776', 'temperatureStatus': {'temperature': 24.5, 'isAvailable': True}, 'activeFaults': [], 'setpointStatus': {'targetHeatTemperature': 22.0, 'setpointMode': 'PermanentOverride'}, 'name': 'Master Bath'}], 'activeFaults': [], 'systemModeStatus': {'mode': 'Auto', 'isPermanent': True}}
2019-09-04 23:17:40 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=climate.living_room, old_state=<state climate.living_room=heat; hvac_modes=['off', 'heat'], current_temperature=26.0, min_temp=5.0, max_temp=25.0, temperature=18.0, hvac_action=heating, preset_mode=permanent, preset_modes=['none', 'temporary', 'permanent'], status=zoneId=4187036, activeFaults=[], setpointStatus=targetHeatTemperature=18.0, setpointMode=PermanentOverride, temperatureStatus=temperature=26.0, isAvailable=True, setpoints=current=from=2019-09-04T18:00:00+00:00, temperature=18.0, next=from=2019-09-05T00:00:00+00:00, temperature=18.0, friendly_name=Living Room Temperature, icon=mdi:radiator, supported_features=17 @ 2019-09-04T22:00:02.296506+02:00>, new_state=<state climate.living_room=heat; hvac_modes=['off', 'heat'], current_temperature=25.5, min_temp=5.0, max_temp=25.0, temperature=18.0, hvac_action=heating, preset_mode=permanent, preset_modes=['none', 'temporary', 'permanent'], status=zoneId=4187036, activeFaults=[], setpointStatus=targetHeatTemperature=18.0, setpointMode=PermanentOverride, temperatureStatus=temperature=25.5, isAvailable=True, setpoints=current=from=2019-09-04T18:00:00+00:00, temperature=18.0, next=from=2019-09-05T00:00:00+00:00, temperature=18.0, friendly_name=Living Room Temperature, icon=mdi:radiator, supported_features=17 @ 2019-09-04T22:00:02.296506+02:00>>
2019-09-04 23:17:40 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.living_room_temperature, old_state=<state sensor.living_room_temperature=26; unit_of_measurement=C, friendly_name=Temperature-Living Room, device_class=temperature @ 2019-09-04T23:11:39.264067+02:00>, new_state=<state sensor.living_room_temperature=25; unit_of_measurement=C, friendly_name=Temperature-Living Room, device_class=temperature @ 2019-09-04T23:17:40.338285+02:00>>
2019-09-04 23:17:40 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event automation_triggered[L]: name=Living Room Last Temp, entity_id=automation.living_room_last_temp>
2019-09-04 23:17:40 INFO (MainThread) [homeassistant.components.automation] Executing Living Room Last Temp
2019-09-04 23:17:40 INFO (MainThread) [homeassistant.helpers.script] Script Living Room Last Temp: Running script
2019-09-04 23:17:40 INFO (MainThread) [homeassistant.helpers.script] Script Living Room Last Temp: Executing step call service
2019-09-04 23:17:40 ERROR (MainThread) [homeassistant.helpers.service] Error rendering data template: UndefinedError: homeassistant.helpers.template.AllStates object has no element 18.0
2019-09-04 23:17:40 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=automation.living_room_last_temp, old_state=<state automation.living_room_last_temp=on; last_triggered=2019-09-04T23:11:39.278533+02:00, id=living_room_last_temp, friendly_name=Living Room Last Temp @ 2019-09-04T22:13:38.240456+02:00>, new_state=<state automation.living_room_last_temp=on; last_triggered=2019-09-04T23:17:40.356007+02:00, id=living_room_last_temp, friendly_name=Living Room Last Temp @ 2019-09-04T22:13:38.240456+02:00>>
2019-09-04 23:17:40 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event automation_triggered[L]: name=Living Room Last Mode, entity_id=automation.living_room_last_mode>
2019-09-04 23:17:40 INFO (MainThread) [homeassistant.components.automation] Executing Living Room Last Mode
2019-09-04 23:17:40 INFO (MainThread) [homeassistant.helpers.script] Script Living Room Last Mode: Running script
2019-09-04 23:17:40 INFO (MainThread) [homeassistant.helpers.script] Script Living Room Last Mode: Executing step call service
2019-09-04 23:17:40 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=input_select, service=select_option, service_data=entity_id=input_select.living_room_last_preset_mode, option=<template DomainStates('permanent')>>
2019-09-04 23:17:40 WARNING (MainThread) [homeassistant.components.input_select] Invalid option: <template DomainStates('permanent')> (possible options: none, permanent, temporary)
2019-09-04 23:17:40 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=automation.living_room_last_mode, old_state=<state automation.living_room_last_mode=on; last_triggered=2019-09-04T23:11:39.286686+02:00, id=living_room_last_preset_mode, friendly_name=Living Room Last Mode @ 2019-09-04T22:13:38.246136+02:00>, new_state=<state automation.living_room_last_mode=on; last_triggered=2019-09-04T23:17:40.368819+02:00, id=living_room_last_preset_mode, friendly_name=Living Room Last Mode @ 2019-09-04T22:13:38.246136+02:00>>
2019-09-04 23:17:40 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.discworld_cpu_load_total, old_state=<state sensor.discworld_cpu_load_total=61; attribution=Data provided by Synology, unit_of_measurement=%, friendly_name=discworld CPU Load (Total), icon=mdi:chip @ 2019-09-04T23:02:12.162730+02:00>, new_state=<state sensor.discworld_cpu_load_total=62; attribution=Data provided by Synology, unit_of_measurement=%, friendly_name=discworld CPU Load (Total), icon=mdi:chip @ 2019-09-04T23:17:40.959387+02:00>>
2019-09-04 23:17:40 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.discworld_network_down, old_state=<state sensor.discworld_network_down=1492.7; attribution=Data provided by Synology, unit_of_measurement=Kbps, friendly_name=discworld Network Down, icon=mdi:download @ 2019-09-04T23:02:12.171565+02:00>, new_state=<state sensor.discworld_network_down=1369.5; attribution=Data provided by Synology, unit_of_measurement=Kbps, friendly_name=discworld Network Down, icon=mdi:download @ 2019-09-04T23:17:40.970879+02:00>>
2019-09-04 23:17:40 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.discworld_network_down_mbit, old_state=<state sensor.discworld_network_down_mbit=1.45771484375; unit_of_measurement=Mbit/s, friendly_name=Discworld Network Down Mbit @ 2019-09-04T23:02:12.174564+02:00>, new_state=<state sensor.discworld_network_down_mbit=1.33740234375; unit_of_measurement=Mbit/s, friendly_name=Discworld Network Down Mbit @ 2019-09-04T23:17:40.975055+02:00>>
2019-09-04 23:17:40 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.discworld_network_up, old_state=<state sensor.discworld_network_up=46.4; attribution=Data provided by Synology, unit_of_measurement=Kbps, friendly_name=discworld Network Up, icon=mdi:upload @ 2019-09-04T23:02:12.178059+02:00>, new_state=<state sensor.discworld_network_up=313.4; attribution=Data provided by Synology, unit_of_measurement=Kbps, friendly_name=discworld Network Up, icon=mdi:upload @ 2019-09-04T23:17:40.978779+02:00>>
2019-09-04 23:17:40 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.discworld_network_up_mbit, old_state=<state sensor.discworld_network_up_mbit=0.0453125; unit_of_measurement=Mbit/s, friendly_name=Discworld Network Up Mbit @ 2019-09-04T23:02:12.180747+02:00>, new_state=<state sensor.discworld_network_up_mbit=0.3060546875; unit_of_measurement=Mbit/s, friendly_name=Discworld Network Up Mbit @ 2019-09-04T23:17:40.984086+02:00>>
2019-09-04 23:17:44 DEBUG (MainThread) [homeassistant.components.http.view] Serving /api/camera_proxy/camera.right to 10.10.10.4 (auth: True)
2019-09-04 23:17:44 DEBUG (MainThread) [homeassistant.components.http.view] Serving /api/camera_proxy/camera.front to 10.10.10.4 (auth: True)
2019-09-04 23:17:44 DEBUG (MainThread) [homeassistant.components.http.view] Serving /api/camera_proxy/camera.left to 10.10.10.4 (auth: True)
2019-09-04 23:17:44 DEBUG (MainThread) [homeassistant.components.http.view] Serving /api/camera_proxy/camera.back to 10.10.10.4 (auth: True)
2019-09-04 23:17:47 DEBUG (SyncWorker_4) [botocore.credentials] Looking for credentials via: env
2019-09-04 23:17:47 DEBUG (SyncWorker_4) [botocore.credentials] Looking for credentials via: assume-role
2019-09-04 23:17:47 DEBUG (SyncWorker_4) [botocore.credentials] Looking for credentials via: shared-credentials-file
2019-09-04 23:17:47 DEBUG (SyncWorker_4) [botocore.credentials] Looking for credentials via: custom-process
2019-09-04 23:17:47 DEBUG (SyncWorker_4) [botocore.credentials] Looking for credentials via: config-file
2019-09-04 23:17:47 DEBUG (SyncWorker_4) [botocore.credentials] Looking for credentials via: ec2-credentials-file
2019-09-04 23:17:47 DEBUG (SyncWorker_4) [botocore.credentials] Looking for credentials via: boto-config
2019-09-04 23:17:47 DEBUG (SyncWorker_4) [botocore.credentials] Looking for credentials via: container-role
2019-09-04 23:17:47 DEBUG (SyncWorker_4) [botocore.credentials] Looking for credentials via: iam-role
2019-09-04 23:17:48 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.memory_use_percent, old_state=<state sensor.memory_use_percent=49.2; unit_of_measurement=%, friendly_name=Memory use (percent), icon=mdi:memory @ 2019-09-04T23:17:17.020807+02:00>, new_state=<state sensor.memory_use_percent=48.1; unit_of_measurement=%, friendly_name=Memory use (percent), icon=mdi:memory @ 2019-09-04T23:17:48.011796+02:00>>
2019-09-04 23:17:48 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.processor_use, old_state=<state sensor.processor_use=6; unit_of_measurement=%, friendly_name=Processor use, icon=mdi:memory @ 2019-09-04T23:15:44.036335+02:00>, new_state=<state sensor.processor_use=8; unit_of_measurement=%, friendly_name=Processor use, icon=mdi:memory @ 2019-09-04T23:17:48.025726+02:00>>
2019-09-04 23:17:48 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.load_15m, old_state=<state sensor.load_15m=0.24072265625; unit_of_measurement= , friendly_name=Load (15m), icon=mdi:memory @ 2019-09-04T23:17:17.012976+02:00>, new_state=<state sensor.load_15m=0.23193359375; unit_of_measurement= , friendly_name=Load (15m), icon=mdi:memory @ 2019-09-04T23:17:48.030525+02:00>>
2019-09-04 23:17:48 DEBUG (SyncWorker_1) [homeassistant.components.gtfs.sensor] Timetable: []
2019-09-04 23:17:48 DEBUG (Thread-2) [sseclient] Dispatching keep-alive event, 4 bytes...
2019-09-04 23:17:48 DEBUG (Thread-2) [nest.nest] <<< keep-alive event
2019-09-04 23:17:48 DEBUG (SyncWorker_4) [botocore.utils] Caught retryable HTTP exception while making metadata service request to http://169.254.169.254/latest/meta-data/iam/security-credentials/: Connect timeout on endpoint URL: "http://169.254.169.254/latest/meta-data/iam/security-credentials/"
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 160, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw)
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py", line 80, in create_connection
    raise err
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py", line 70, in create_connection
    sock.connect(sa)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/botocore/httpsession.py", line 258, in send
    decode_content=False,
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 641, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 344, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/local/lib/python3.7/site-packages/urllib3/packages/six.py", line 686, in reraise
    raise value
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 603, in urlopen
    chunked=chunked)
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 355, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/local/lib/python3.7/http/client.py", line 1244, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/local/lib/python3.7/site-packages/botocore/awsrequest.py", line 125, in _send_request
    method, url, body, headers, *args, **kwargs)
  File "/usr/local/lib/python3.7/http/client.py", line 1290, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.7/http/client.py", line 1239, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.7/site-packages/botocore/awsrequest.py", line 152, in _send_output
    self.send(msg)
  File "/usr/local/lib/python3.7/site-packages/botocore/awsrequest.py", line 236, in send
    return super(AWSConnection, self).send(str)
  File "/usr/local/lib/python3.7/http/client.py", line 966, in send
    self.connect()
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 183, in connect
    conn = self._new_conn()
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 165, in _new_conn
    (self.host, self.timeout))
urllib3.exceptions.ConnectTimeoutError: (<botocore.awsrequest.AWSHTTPConnection object at 0x7f53e8f35c10>, 'Connection to 169.254.169.254 timed out. (connect timeout=1)')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/botocore/utils.py", line 303, in _get_request
    response = self._session.send(request.prepare())
  File "/usr/local/lib/python3.7/site-packages/botocore/httpsession.py", line 282, in send
    raise ConnectTimeoutError(endpoint_url=request.url, error=e)
botocore.exceptions.ConnectTimeoutError: Connect timeout on endpoint URL: "http://169.254.169.254/latest/meta-data/iam/security-credentials/"
2019-09-04 23:17:48 DEBUG (SyncWorker_4) [botocore.utils] Max number of attempts exceeded (1) when attempting to retrieve data from metadata service.
2019-09-04 23:17:48 DEBUG (SyncWorker_4) [botocore.hooks] Event choose-service-name: calling handler <function handle_service_name_alias at 0x7f53ed0ab320>
2019-09-04 23:17:48 DEBUG (SyncWorker_4) [botocore.hooks] Event creating-client-class.cognito-identity-provider: calling handler <function add_generate_presigned_url at 0x7f53ed0e7dd0>
2019-09-04 23:17:48 DEBUG (SyncWorker_4) [botocore.args] The s3 config key is not a dictionary type, ignoring its value of: None
2019-09-04 23:17:48 DEBUG (SyncWorker_4) [botocore.endpoint] Setting cognito-idp timeout as (60, 60)
2019-09-04 23:17:48 DEBUG (SyncWorker_4) [botocore.client] Registering retry handlers for service: cognito-idp
2019-09-04 23:17:48 DEBUG (SyncWorker_4) [botocore.hooks] Event choose-service-name: calling handler <function handle_service_name_alias at 0x7f53ed0ab320>
2019-09-04 23:17:48 DEBUG (SyncWorker_4) [botocore.hooks] Event creating-client-class.cognito-identity-provider: calling handler <function add_generate_presigned_url at 0x7f53ed0e7dd0>
2019-09-04 23:17:48 DEBUG (SyncWorker_4) [botocore.args] The s3 config key is not a dictionary type, ignoring its value of: None
2019-09-04 23:17:48 DEBUG (SyncWorker_4) [botocore.endpoint] Setting cognito-idp timeout as (60, 60)
2019-09-04 23:17:48 DEBUG (SyncWorker_4) [botocore.client] Registering retry handlers for service: cognito-idp
2019-09-04 23:17:49 DEBUG (MainThread) [homeassistant.components.http.view] Serving /api/camera_proxy/camera.front to 10.10.10.168 (auth: True)
2019-09-04 23:17:49 DEBUG (MainThread) [homeassistant.components.http.view] Serving /api/camera_proxy/camera.left to 10.10.10.168 (auth: True)
2019-09-04 23:17:49 DEBUG (MainThread) [homeassistant.components.http.view] Serving /api/camera_proxy/camera.right to 10.10.10.168 (auth: True)
2019-09-04 23:17:49 DEBUG (MainThread) [homeassistant.components.http.view] Serving /api/camera_proxy/camera.back to 10.10.10.168 (auth: True)
2019-09-04 23:17:52 DEBUG (SyncWorker_4) [botocore.credentials] Looking for credentials via: env
2019-09-04 23:17:52 DEBUG (SyncWorker_4) [botocore.credentials] Looking for credentials via: assume-role
2019-09-04 23:17:52 DEBUG (SyncWorker_4) [botocore.credentials] Looking for credentials via: shared-credentials-file
2019-09-04 23:17:52 DEBUG (SyncWorker_4) [botocore.credentials] Looking for credentials via: custom-process
2019-09-04 23:17:52 DEBUG (SyncWorker_4) [botocore.credentials] Looking for credentials via: config-file
2019-09-04 23:17:52 DEBUG (SyncWorker_4) [botocore.credentials] Looking for credentials via: ec2-credentials-file
2019-09-04 23:17:52 DEBUG (SyncWorker_4) [botocore.credentials] Looking for credentials via: boto-config
2019-09-04 23:17:52 DEBUG (SyncWorker_4) [botocore.credentials] Looking for credentials via: container-role
2019-09-04 23:17:52 DEBUG (SyncWorker_4) [botocore.credentials] Looking for credentials via: iam-role
2019-09-04 23:17:53 DEBUG (SyncWorker_4) [botocore.utils] Caught retryable HTTP exception while making metadata service request to http://169.254.169.254/latest/meta-data/iam/security-credentials/: Connect timeout on endpoint URL: "http://169.254.169.254/latest/meta-data/iam/security-credentials/"
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 160, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw)
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py", line 80, in create_connection
    raise err
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py", line 70, in create_connection
    sock.connect(sa)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/botocore/httpsession.py", line 258, in send
    decode_content=False,
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 641, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 344, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/local/lib/python3.7/site-packages/urllib3/packages/six.py", line 686, in reraise
    raise value
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 603, in urlopen
    chunked=chunked)
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 355, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/local/lib/python3.7/http/client.py", line 1244, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/local/lib/python3.7/site-packages/botocore/awsrequest.py", line 125, in _send_request
    method, url, body, headers, *args, **kwargs)
  File "/usr/local/lib/python3.7/http/client.py", line 1290, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.7/http/client.py", line 1239, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.7/site-packages/botocore/awsrequest.py", line 152, in _send_output
    self.send(msg)
  File "/usr/local/lib/python3.7/site-packages/botocore/awsrequest.py", line 236, in send
    return super(AWSConnection, self).send(str)
  File "/usr/local/lib/python3.7/http/client.py", line 966, in send
    self.connect()
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 183, in connect
    conn = self._new_conn()
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 165, in _new_conn
    (self.host, self.timeout))
urllib3.exceptions.ConnectTimeoutError: (<botocore.awsrequest.AWSHTTPConnection object at 0x7f53e833d0d0>, 'Connection to 169.254.169.254 timed out. (connect timeout=1)')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/botocore/utils.py", line 303, in _get_request
    response = self._session.send(request.prepare())
  File "/usr/local/lib/python3.7/site-packages/botocore/httpsession.py", line 282, in send
    raise ConnectTimeoutError(endpoint_url=request.url, error=e)
botocore.exceptions.ConnectTimeoutError: Connect timeout on endpoint URL: "http://169.254.169.254/latest/meta-data/iam/security-credentials/"
2019-09-04 23:17:53 DEBUG (SyncWorker_4) [botocore.utils] Max number of attempts exceeded (1) when attempting to retrieve data from metadata service.
2019-09-04 23:17:53 DEBUG (SyncWorker_4) [botocore.hooks] Event choose-service-name: calling handler <function handle_service_name_alias at 0x7f53ed0ab320>
2019-09-04 23:17:53 DEBUG (SyncWorker_4) [botocore.hooks] Event creating-client-class.cognito-identity-provider: calling handler <function add_generate_presigned_url at 0x7f53ed0e7dd0>
2019-09-04 23:17:53 DEBUG (SyncWorker_4) [botocore.args] The s3 config key is not a dictionary type, ignoring its value of: None
2019-09-04 23:17:53 DEBUG (SyncWorker_4) [botocore.endpoint] Setting cognito-idp timeout as (60, 60)
2019-09-04 23:17:53 DEBUG (SyncWorker_4) [botocore.client] Registering retry handlers for service: cognito-idp
2019-09-04 23:17:53 DEBUG (SyncWorker_4) [botocore.hooks] Event choose-service-name: calling handler <function handle_service_name_alias at 0x7f53ed0ab320>
2019-09-04 23:17:53 DEBUG (SyncWorker_4) [botocore.hooks] Event creating-client-class.cognito-identity-provider: calling handler <function add_generate_presigned_url at 0x7f53ed0e7dd0>
2019-09-04 23:17:53 DEBUG (SyncWorker_4) [botocore.args] The s3 config key is not a dictionary type, ignoring its value of: None
2019-09-04 23:17:53 DEBUG (SyncWorker_4) [botocore.endpoint] Setting cognito-idp timeout as (60, 60)
2019-09-04 23:17:53 DEBUG (SyncWorker_4) [botocore.client] Registering retry handlers for service: cognito-idp
2019-09-04 23:17:54 DEBUG (SyncWorker_7) [botocore.credentials] Looking for credentials via: env
2019-09-04 23:17:54 DEBUG (SyncWorker_7) [botocore.credentials] Looking for credentials via: assume-role
2019-09-04 23:17:54 DEBUG (SyncWorker_7) [botocore.credentials] Looking for credentials via: shared-credentials-file
2019-09-04 23:17:54 DEBUG (SyncWorker_7) [botocore.credentials] Looking for credentials via: custom-process
2019-09-04 23:17:54 DEBUG (SyncWorker_7) [botocore.credentials] Looking for credentials via: config-file
2019-09-04 23:17:54 DEBUG (SyncWorker_7) [botocore.credentials] Looking for credentials via: ec2-credentials-file
2019-09-04 23:17:54 DEBUG (SyncWorker_7) [botocore.credentials] Looking for credentials via: boto-config
2019-09-04 23:17:54 DEBUG (SyncWorker_7) [botocore.credentials] Looking for credentials via: container-role
2019-09-04 23:17:54 DEBUG (SyncWorker_7) [botocore.credentials] Looking for credentials via: iam-role
2019-09-04 23:17:55 DEBUG (SyncWorker_7) [botocore.utils] Caught retryable HTTP exception while making metadata service request to http://169.254.169.254/latest/meta-data/iam/security-credentials/: Connect timeout on endpoint URL: "http://169.254.169.254/latest/meta-data/iam/security-credentials/"
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 160, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw)
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py", line 80, in create_connection
    raise err
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py", line 70, in create_connection
    sock.connect(sa)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/botocore/httpsession.py", line 258, in send
    decode_content=False,
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 641, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 344, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/local/lib/python3.7/site-packages/urllib3/packages/six.py", line 686, in reraise
    raise value
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 603, in urlopen
    chunked=chunked)
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 355, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/local/lib/python3.7/http/client.py", line 1244, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/local/lib/python3.7/site-packages/botocore/awsrequest.py", line 125, in _send_request
    method, url, body, headers, *args, **kwargs)
  File "/usr/local/lib/python3.7/http/client.py", line 1290, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.7/http/client.py", line 1239, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.7/site-packages/botocore/awsrequest.py", line 152, in _send_output
    self.send(msg)
  File "/usr/local/lib/python3.7/site-packages/botocore/awsrequest.py", line 236, in send
    return super(AWSConnection, self).send(str)
  File "/usr/local/lib/python3.7/http/client.py", line 966, in send
    self.connect()
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 183, in connect
    conn = self._new_conn()
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 165, in _new_conn
    (self.host, self.timeout))
urllib3.exceptions.ConnectTimeoutError: (<botocore.awsrequest.AWSHTTPConnection object at 0x7f53ebd716d0>, 'Connection to 169.254.169.254 timed out. (connect timeout=1)')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/botocore/utils.py", line 303, in _get_request
    response = self._session.send(request.prepare())
  File "/usr/local/lib/python3.7/site-packages/botocore/httpsession.py", line 282, in send
    raise ConnectTimeoutError(endpoint_url=request.url, error=e)
botocore.exceptions.ConnectTimeoutError: Connect timeout on endpoint URL: "http://169.254.169.254/latest/meta-data/iam/security-credentials/"
2019-09-04 23:17:55 DEBUG (SyncWorker_7) [botocore.utils] Max number of attempts exceeded (1) when attempting to retrieve data from metadata service.
2019-09-04 23:17:55 DEBUG (SyncWorker_7) [botocore.hooks] Event choose-service-name: calling handler <function handle_service_name_alias at 0x7f53ed0ab320>
2019-09-04 23:17:55 DEBUG (SyncWorker_7) [botocore.hooks] Event creating-client-class.cognito-identity-provider: calling handler <function add_generate_presigned_url at 0x7f53ed0e7dd0>
2019-09-04 23:17:55 DEBUG (SyncWorker_7) [botocore.args] The s3 config key is not a dictionary type, ignoring its value of: None
2019-09-04 23:17:55 DEBUG (SyncWorker_7) [botocore.endpoint] Setting cognito-idp timeout as (60, 60)
2019-09-04 23:17:55 DEBUG (SyncWorker_7) [botocore.client] Registering retry handlers for service: cognito-idp
2019-09-04 23:17:55 DEBUG (SyncWorker_7) [botocore.hooks] Event choose-service-name: calling handler <function handle_service_name_alias at 0x7f53ed0ab320>
2019-09-04 23:17:55 DEBUG (SyncWorker_7) [botocore.hooks] Event creating-client-class.cognito-identity-provider: calling handler <function add_generate_presigned_url at 0x7f53ed0e7dd0>
2019-09-04 23:17:55 DEBUG (SyncWorker_7) [botocore.args] The s3 config key is not a dictionary type, ignoring its value of: None
2019-09-04 23:17:55 DEBUG (SyncWorker_7) [botocore.endpoint] Setting cognito-idp timeout as (60, 60)
2019-09-04 23:17:55 DEBUG (SyncWorker_7) [botocore.client] Registering retry handlers for service: cognito-idp

Additional information:

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 18 (5 by maintainers)

Most upvoted comments

good to know!!

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.

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.

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.

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.