Problem with setting up HomematicIP Cloud - HAP(Home Control Access Point)

I have Home Assistant installed on Windows 10.
When I try to add Homematic IP Cloud integration by entering SGTIN I am receiving an unknown error.

The error is : ‘Unknown error occurred’

In the log I have the following

2018-10-24 11:03:58 INFO (MainThread) [homeassistant.components.http.view] Serving /api/config/config_entries/flow/3bfd25923dca40e787f9490a1c3f0b60 to 192.168.1.12 (auth: True)
<homematicip.aio.auth.AsyncAuth object at 0x000001F3D40821D0>
2018-10-24 11:03:59 INFO (MainThread) [homeassistant.components.homematicip_cloud] Connection to HomematicIP Cloud established
2018-10-24 11:03:59 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "C:\Users\homesrv\AppData\Local\Programs\Python\Python37\lib\site-packages\aiohttp\web_protocol.py", line 390, in start
    resp = await self._request_handler(request)
  File "C:\Users\homesrv\AppData\Local\Programs\Python\Python37\lib\site-packages\aiohttp\web_app.py", line 366, in _handle
    resp = await handler(request)
  File "C:\Users\homesrv\AppData\Local\Programs\Python\Python37\lib\site-packages\aiohttp\web_middlewares.py", line 106, in impl
    return await handler(request)
  File "C:\Users\homesrv\AppData\Local\Programs\Python\Python37\lib\site-packages\homeassistant\components\http\static.py", line 66, in staticresource_middleware
    return await handler(request)
  File "C:\Users\homesrv\AppData\Local\Programs\Python\Python37\lib\site-packages\homeassistant\components\http\real_ip.py", line 34, in real_ip_middleware
    return await handler(request)
  File "C:\Users\homesrv\AppData\Local\Programs\Python\Python37\lib\site-packages\homeassistant\components\http\ban.py", line 66, in ban_middleware
    return await handler(request)
  File "C:\Users\homesrv\AppData\Local\Programs\Python\Python37\lib\site-packages\homeassistant\components\http\auth.py", line 68, in auth_middleware
    return await handler(request)
  File "C:\Users\homesrv\AppData\Local\Programs\Python\Python37\lib\site-packages\homeassistant\components\http\real_ip.py", line 34, in real_ip_middleware
    return await handler(request)
  File "C:\Users\homesrv\AppData\Local\Programs\Python\Python37\lib\site-packages\homeassistant\components\http\ban.py", line 66, in ban_middleware
    return await handler(request)
  File "C:\Users\homesrv\AppData\Local\Programs\Python\Python37\lib\site-packages\homeassistant\components\http\auth.py", line 68, in auth_middleware
    return await handler(request)
  File "C:\Users\homesrv\AppData\Local\Programs\Python\Python37\lib\site-packages\homeassistant\components\http\view.py", line 113, in handle
    result = await result
  File "C:\Users\homesrv\AppData\Local\Programs\Python\Python37\lib\site-packages\homeassistant\components\http\data_validator.py", line 47, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "C:\Users\homesrv\AppData\Local\Programs\Python\Python37\lib\site-packages\homeassistant\helpers\data_entry_flow.py", line 86, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
  File "C:\Users\homesrv\AppData\Local\Programs\Python\Python37\lib\site-packages\homeassistant\data_entry_flow.py", line 80, in async_configure
    flow, step_id, user_input)
  File "C:\Users\homesrv\AppData\Local\Programs\Python\Python37\lib\site-packages\homeassistant\data_entry_flow.py", line 98, in _async_handle_step
    result = await getattr(flow, method)(user_input)  # type: Dict
  File "C:\Users\homesrv\AppData\Local\Programs\Python\Python37\lib\site-packages\homeassistant\components\homematicip_cloud\config_flow.py", line 49, in async_step_init
    return await self.async_step_link()
  File "C:\Users\homesrv\AppData\Local\Programs\Python\Python37\lib\site-packages\homeassistant\components\homematicip_cloud\config_flow.py", line 65, in async_step_link
    pressed = await self.auth.async_checkbutton()
  File "C:\Users\homesrv\AppData\Local\Programs\Python\Python37\lib\site-packages\homeassistant\components\homematicip_cloud\hap.py", line 42, in async_checkbutton
    await self.auth.isRequestAcknowledged()
AttributeError: 'bool' object has no attribute 'isRequestAcknowledged'

Did anyone face this issue?
Any idea how can I fix it.

Thank you in advance.

1 Like

Hi Moonshadow,

I have managed to work this around.

Let’s start with that the UI functionality does not work for some reason.

You need to do the stuff manually.
Anyway the documentation about it seems to be a bit out of date.

It is written that you need to run a file called generate_auth_token.py.
But it actually does NOT exist.
It was renamed in some of the future versions after the initial release.

The new file name is hmip_generate_auth_token.py.
And it is located at .homeassistant\deps\Python37\Scripts\

You need to run this file.
After you do it it will prompt you for:

  • SGTIN
  • name (optional)
  • PIN (optional) - if you entered a PIN in your mobile HomematicIP app you must enter it here.

After these steps it will request you to push the button of the HMIP-HAP - the rectangle one.
Then you will receive a notification on the mobile device where the HomematicIP App is installed about the connection.

When you go back to the terminal/console you will see your AUTHTOKEN there.

Then just put this info in configuration.yaml if it is not already there:

homematicip_cloud:
  - accesspoint: IDENTIFIER
    authtoken: AUTHTOKEN

And voila - it is working.

BR,
Labachev

In my case the .homeassistant\deps\Python37\Scripts\ did not exist .

But the hmip_generate_auth_token.py ca be run on any other computer.

To get the required token, on another linux machine (in my case the raspberry Pi that is hosting my Docker containers ), had already installed Python Python instructions ,

hmip_generate_auth_token.py

is available. What is left is to run it folow the instructions and copy the token to the configuration file of the Hass.

Cheers
redOXf

i bought a Homematic Acess Point (HMIP-HAP) and a thermostatic head for the radiator. Access Point had to be used - the application requires a PIN (4 digits) when connecting to the device for the first time. Is it possible to reset the PIN? What I’ve already done: I’ve done some Acess Point resets. Unfortunately, the application still requires a PIN. Please help