core: Cannot configure Wemo Dimmer as homekit controller device
Home Assistant release with the issue:
0.87.1
Last working Home Assistant release (if known): N/A
Operating environment (Hass.io/Docker/Windows/etc.):
Linux (arch)
Component/platform:
https://www.home-assistant.io/components/homekit_controller/
Description of problem: I am unable to configure any of my Wemo dimmers using homekit controller.
Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
The only configuration changes are:
# Discover some devices automatically
discovery:
enable:
- homekit
logger:
default: debug
Traceback (if applicable):
Additional information:
They are all on the latest firmware,11215 (and use to work fine as wemo entities before the firmware upgrades).
There seems to be an anomaly as soon as they get discovered (see the last line of the follow snippet):
2019-02-12 02:31:48 INFO (MainThread) [homeassistant.setup] Setup of domain homekit_controller took 0.1 seconds.
2019-02-12 02:31:48 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event component_loaded[L]: component=homekit_controller>
2019-02-12 02:31:48 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event platform_discovered[L]: service=homekit, discovered=host=IPADDR, port=54392, hostname=wemo_dimmer-2.local., properties=c#=1, ff=2, id=MACADDR, md=Wemo Dimmer, pv=1.1, s#=1, sf=1, ci=5, sh=Rr2teA==, name=Kitchen>
2019-02-12 02:31:48 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.140059089157648] Sending {'id': 3, 'type': 'event', 'event': {'event_type': 'component_loaded', 'data': {'component': 'homekit_controller'}, 'origin': 'LOCAL', 'time_fired': datetime.datetime(2019, 2, 12, 7, 31, 48, 541799, tzinfo=<UTC>), 'context': {'id': 'c723d90126f341c4acbb1e3693644b43', 'user_id': None}}}
2019-02-12 02:31:48 DEBUG (SyncWorker_12) [homeassistant.components.homekit_controller] Discovered unique device MACADDR
2019-02-12 02:31:48 INFO (SyncWorker_12) [homeassistant.components.homekit_controller] Setting up Homekit device Wemo Dimmer
2019-02-12 02:31:48 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=configurator.wemo_dimmer, old_state=None, new_state=<state configurator.wemo_dimmer=configure; configure_id=14005871224121-2, fields=[{'id': 'code', 'name': 'HomeKit code', 'type': 'string'}], friendly_name=Wemo Dimmer, entity_picture=None, description=Please enter the HomeKit code for your Wemo Dimmer, submit_caption=submit @ 2019-02-12T02:31:48.543187-05:00>>
2019-02-12 02:31:48 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.140059089157648] Sending {'id': 2, 'type': 'event', 'event': {'event_type': 'state_changed', 'data': {'entity_id': 'configurator.wemo_dimmer', 'old_state': None, 'new_state': <state configurator.wemo_dimmer=configure; configure_id=140058571224121-2, fields=[{'id': 'code', 'name': 'HomeKit code', 'type': 'string'}], friendly_name=Wemo Dimmer, entity_picture=None, description=Please enter the HomeKit code for your Wemo Dimmer, submit_caption=submit @ 2019-02-12T02:31:48.543187-05:00>}, 'origin': 'LOCAL', 'time_fired': datetime.datetime(2019, 2, 12, 7, 31, 48, 543198, tzinfo=<UTC>), 'context': {'id': '13bd1d7d42d24c59aebbbdc5d63802ac', 'user_id': None}}}
2019-02-12 02:31:48 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.140059089157648] Received {'type': 'config/entity_registry/get', 'entity_id': 'configurator.wemo_dimmer', 'id': 16}
2019-02-12 02:31:48 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.140059089157648] Sending {'id': 16, 'type': 'result', 'success': False, 'error': {'code': 'not_found', 'message': 'Entity not found'}}
When I click the “configure” button in the web interface, (1 device at a time (making sure I have the right HomeKit code and device pair) I see the following again in the log:
2019-02-12 02:43:28 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.140059089157648] Received {'type': 'config/entity_registry/get', 'entity_id': 'configurator.wemo_dimmer', 'id': 17}
2019-02-12 02:43:28 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.140059089157648] Sending {'id': 17, 'type': 'result', 'success': False, 'error': {'code': 'not_found', 'message': 'Entity not found'}}
Then if I try to put in the HomeKit code and click submit, sometimes it looks like it’s going through fine, but nothing happens, the configurator is still displayed and no new entity is created:
2019-02-12 02:44:38 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.140059089157648] Received {'type': 'call_service', 'domain': 'configurator', 'service': 'configure', 'service_data': {'configure_id': '140058571224121-2', 'fields': {'code': 'CODECODE'}}, 'id': 18}
2019-02-12 02:44:38 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=configurator, service=configure, service_data=configure_id=140058571224121-2, fields=code=CODECODE>
2019-02-12 02:44:48 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.140059089157648] Sending {'id': 18, 'type': 'result', 'success': True, 'result': None}
If I try hitting submit (HomeKit code) again, I see:
2019-02-12 02:51:00 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.140059089157648] Received {'type': 'call_service', 'domain': 'configurator', 'service': 'configure', 'service_data': {'configure_id': '140058571224120-2', 'fields': {'code': 'CODECODE'}}, 'id': 20}
2019-02-12 02:51:00 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=configurator, service=configure, service_data=configure_id=140058571224120-2, fields=code=CODECODE>
2019-02-12 02:51:09 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140059089157648] Error handling message: {'type': 'call_service', 'domain': 'configurator', 'service': 'configure', 'service_data': {'configure_id': '140058571224120-2', 'fields': {'code': 'CODECODE'}}, 'id': 20}
Traceback (most recent call last):
File "/home/alx/.local/lib/python3.7/site-packages/homeassistant/components/websocket_api/decorators.py", line 17, in _handle_async_response
await func(hass, connection, msg)
File "/home/alx/.local/lib/python3.7/site-packages/homeassistant/components/websocket_api/commands.py", line 148, in handle_call_service
connection.context(msg))
File "/home/alx/.local/lib/python3.7/site-packages/homeassistant/core.py", line 1130, in async_call
self._execute_service(handler, service_call))
File "/home/alx/.local/lib/python3.7/site-packages/homeassistant/core.py", line 1152, in _execute_service
await handler.func(service_call)
File "/home/alx/.local/lib/python3.7/site-packages/homeassistant/components/configurator.py", line 221, in async_handle_service_call
call.data.get(ATTR_FIELDS, {}))
File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/alx/.local/lib/python3.7/site-packages/homeassistant/components/homekit_controller/__init__.py", line 141, in device_config_callback
self.controller.perform_pairing(self.hkid, self.hkid, code)
File "/home/alx/.homeassistant/deps/lib/python3.7/site-packages/homekit/controller.py", line 192, in perform_pairing
pairing = perform_pair_setup(conn, pin, str(uuid.uuid4()))
File "/home/alx/.homeassistant/deps/lib/python3.7/site-packages/homekit/protocol/__init__.py", line 82, in perform_pair_setup
connection.request('POST', '/pair-setup', request_tlv, headers)
File "/usr/lib/python3.7/http/client.py", line 1229, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.7/http/client.py", line 1275, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.7/http/client.py", line 1224, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/home/alx/.homeassistant/deps/lib/python3.7/site-packages/homekit/http_impl/http_client.py", line 44, in _send_output
self.send(msg)
File "/usr/lib/python3.7/http/client.py", line 956, in send
self.connect()
File "/usr/lib/python3.7/http/client.py", line 928, in connect
(self.host,self.port), self.timeout, self.source_address)
File "/usr/lib/python3.7/socket.py", line 727, in create_connection
raise err
File "/usr/lib/python3.7/socket.py", line 716, in create_connection
sock.connect(sa)
OSError: [Errno 113] No route to host
And there is definitely no network configuration issue.
If I go in Developer tools -> Services -> homeassistant.update_entity on configurator.wemo_dimmer, I see this in the log:
2019-02-12 04:06:30 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=homeassistant, service=update_entity, service_data=entity_id=configurator.wemo_dimmer>
2019-02-12 04:06:30 WARNING (MainThread) [homeassistant.helpers.entity_component] Forced update failed. Component for configurator.wemo_dimmer not loaded.
The Configurator widget stays displayed in the Notifications panel (even after a restart of home assistant).
This was noticed after a (countless) fresh install of home assistant and a fresh complete reset the Wemo dimmers. I also tried re-install the Wemo app on my iPhone.
During this whole process I also noticed I can’t discover the Wemos as Wemos anymore, but only homekit devices, not sure if that is normal.
EDIT: formatting EDIT2: I forgot to mention I am able to use all these devices successfully in the Wemo app, add them to the Home iOS app through the Wemo app and use the Home iOS app flawlessly.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 19 (6 by maintainers)
I’m trying to find the issue using pdb, but haven’t found anything yet.