HomeKit error "User input malformed"

Yep, bug still exists on core2021.11.5

2 Likes

Same here, 2021.11.5.

4 Likes

The same Here.

Version
core-2021.11.5

Issue still there.

Also still encountering the user input malformed bug on core-2021.11.5.

Looks like there is a second part to the fix that should be released in core 2021.11.6, according to the GitHub page.

1 Like

I finally solved it by editing the core config file used for the UI based config. You can find it in your config directory /config/.storage/core.config_entries (the .storage folder is a hidden folder).

My specific problem was the raspberry pi power sensor that i removed since I moved my install to a ODROID device. The sensor was part of the Home Kit excludes list so I just searched for it and removed the line.

I used the VSCode extension in HomeAssistant OS, used the VSCode built in terminal to open the hidden folder like this: $ code /config/.storage. This opens the hidden folder in a new window where you can open the correct file and make your edits.

2 Likes

Thanks a lot ! I can now configure my Homekit integration and remove all the new devices I got in between :wink:
Thanks again !

This seemed to be resolved for me with the latest builds of 2021.11.xx but after updating to 2021.12.0 it’s broken again. Now instead of “user input malformed” i get an error message “Unknown error occurred.” This is starting to get incredibly frustrating, every time a new release of Home Assistant is pushed out this damn integration breaks.

I am also getting the Unknown error occurred message after updating to 2021.12.

Please check the logs. There isn’t much we can do to fix an unknown error without some context.

500 Internal Error via Console…

Logs say

2021-12-15 11:28:45 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
resp = await request_handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 117, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 98, in forwarded_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 78, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 181, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 137, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 215, in post
return await super().post(request, flow_id)
File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 62, in wrapper
result = await method(view, request, *args, **kwargs)
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post
result = await self._flow_mgr.async_configure(flow_id, data)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 252, in async_configure
result = await self._async_handle_step(flow, cur_step["step_id"], user_input)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 325, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
File "/usr/src/homeassistant/homeassistant/components/homekit/config_flow.py", line 446, in async_step_include_exclude
return await self.async_step_advanced()
File "/usr/src/homeassistant/homeassistant/components/homekit/config_flow.py", line 333, in async_step_advanced
all_supported_devices = await _async_get_supported_devices(self.hass)
File "/usr/src/homeassistant/homeassistant/components/homekit/config_flow.py", line 515, in _async_get_supported_devices
results = await device_automation.async_get_device_automations(hass, "trigger")
File "/usr/src/homeassistant/homeassistant/components/device_automation/__init__.py", line 74, in async_get_device_automations
return await _async_get_device_automations(hass, automation_type, device_ids)
File "/usr/src/homeassistant/homeassistant/components/device_automation/__init__.py", line 175, in _async_get_device_automations
for domain_results in await asyncio.gather(
File "/usr/src/homeassistant/homeassistant/components/device_automation/__init__.py", line 128, in _async_get_device_automations_from_domain
platform = await async_get_device_automation_platform(
File "/usr/src/homeassistant/homeassistant/components/device_automation/__init__.py", line 110, in async_get_device_automation_platform
platform = integration.get_platform(platform_name)
File "/usr/src/homeassistant/homeassistant/loader.py", line 530, in get_platform
cache[full_name] = self._import_platform(platform_name)
File "/usr/src/homeassistant/homeassistant/loader.py", line 535, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/config/custom_components/alexa_media/__init__.py", line 16, in <module>
from alexapy import (
File "/usr/local/lib/python3.9/site-packages/alexapy/__init__.py", line 16, in <module>
from .alexaapi import AlexaAPI
File "/usr/local/lib/python3.9/site-packages/alexapy/alexaapi.py", line 21, in <module>
from alexapy.aiohttp import ClientConnectionError, ClientResponse
File "/usr/local/lib/python3.9/site-packages/alexapy/aiohttp/__init__.py", line 6, in <module>
from .client import (
File "/usr/local/lib/python3.9/site-packages/alexapy/aiohttp/client.py", line 35, in <module>
from . import hdrs, http, payload
File "/usr/local/lib/python3.9/site-packages/alexapy/aiohttp/http.py", line 7, in <module>
from .http_parser import (
File "/usr/local/lib/python3.9/site-packages/alexapy/aiohttp/http_parser.py", line 15, in <module>
from .helpers import NO_EXTENSIONS, BaseTimerContext
File "/usr/local/lib/python3.9/site-packages/alexapy/aiohttp/helpers.py", line 667, in <module>
class CeilTimeout(async_timeout.timeout):
TypeError: function() argument 'code' must be code, not str

EDIT: If you don’t even modify the HomeKit settings and just hit Configure, Next, Next etc. It still says Unknown error occurred. I just deleted & re-did all my homekit config because of the previous error but now got stuck with this error :smiley:

Its crashing when trying to import the alexa_media custom component. Check if there is an update available or uninstall it.

So I resolved my issue with not being able to adjust included/excluded components for HomeKit by simply deleting and re-installing the configuration.

1 Like

Made the updates today, its working again.

Is anyone else having issues again with HomeKit after the latest update? I updated last night to 2021.12.9 and when I went to go toggle on a new entity I was shocked to find it had blown away my config and none of my previously selected entities were selected anymore. I’m no longer getting the “User input malformed” error, that went away quite a while ago, but this in a way is almost as bad. I probably have between 50-60 exposed sensors, switches, etc in HomeKit so I don’t have the time to re-do everything again. Rolled back to 2021.12.8 and all is well again.