Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't add integration #33

Open
hrtcdxfu opened this issue Nov 19, 2021 · 17 comments
Open

Can't add integration #33

hrtcdxfu opened this issue Nov 19, 2021 · 17 comments

Comments

@hrtcdxfu
Copy link

Getting the following errors when trying to add the integration:

Logger: root
Source: /usr/src/homeassistant/homeassistant/bootstrap.py:320
First occurred: 21:21:04 (5 occurrences)
Last logged: 22:00:17

Uncaught thread exception
Traceback (most recent call last):
File "/usr/local/lib/python3.9/threading.py", line 973, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.9/threading.py", line 910, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.9/site-packages/nhc2_coco/coco_discover.py", line 49, in _scan_for_nhc
while loops < 200 and ((not self._discovered_at_least_one) or loops < 20):
AttributeError: 'CoCoDiscover' object has no attribute '_discovered_at_least_one'

image

image

If it gets through any further, i can fill in the IP address which is in a different subnet, but then i get the following error instead:

Logger: aiohttp.server
Source: custom_components/nhc2/config_flow.py:143
Integration: Niko Home Control II (documentation, issues)
First occurred: 21:25:22 (4 occurrences)
Last logged: 21:28:53

Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
resp = await self._request_handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 499, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 119, 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 24, 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 138, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 135, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 157, 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 246, 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 320, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
File "/config/custom_components/nhc2/config_flow.py", line 114, in async_step_manual_host
return await self._show_user_config_form()
File "/config/custom_components/nhc2/config_flow.py", line 143, in _show_user_config_form
for i, x in enumerate(profiles):
TypeError: 'NoneType' object is not iterable

image

Any idea what could be going wrong?
All traffic is allowed from the HomeAssistant subnet to the Niko Home Control IP.

@p8ulus
Copy link

p8ulus commented Nov 23, 2021

I get the same error message
#22

@KarelKempenaers
Copy link

Hi

Maybe this is a different thing, but I had this issue:
I used nhc2 integration for almost a year now, without any problem.
Yesterday, I changed something on my NHC2-controller and had to update the programming software/firmware of my nhc2-installation. Niko is forcing this update once a year, so I had no choice.

Since the update, my HA was no longer able to connect to the nhc controller.
I deleted the integration and tried to add it again: having the same issue: not able to complete the flow.

I tried to connect using the manual way (configuration). No succes...
in the past, the NHC2 component was not using the hobby API I think, but was connected using the 'default' profile.

As I kept getting the authentication rejection, I reactivated my hobby API-key. The moment I added this to my configuration, I'm able to use it again.

Maybe, Niko is no longer allowing the connection via profiles? And is this blocking the install-flow?

@ddeconin-gh
Copy link

Hi, Same issue here. How can this be fixed?

@Gavergracht
Copy link

As I kept getting the authentication rejection, I reactivated my hobby API-key. The moment I added this to my configuration, I'm able to use it again.

How did you reactivate without making a new account ?

@KarelKempenaers
Copy link

Hi, Same issue here. How can this be fixed?

Did you try the way I discribed? With the hobby api key?

@KarelKempenaers
Copy link

As I kept getting the authentication rejection, I reactivated my hobby API-key. The moment I added this to my configuration, I'm able to use it again.

How did you reactivate without making a new account ?

I just went to the Niko hobby platform and generated it.
https://mynikohomecontrol.niko.eu/

https://www.niko.eu/nl-be/onze-producten/huisautomatisering/hobby-api

I did not need to create a new account. Just added the hobby API service and entered this information in the configuration of HA

@Gavergracht
Copy link

Gavergracht commented Dec 28, 2021 via email

@efiten
Copy link

efiten commented Jan 7, 2022

As I kept getting the authentication rejection, I reactivated my hobby API-key. The moment I added this to my configuration, I'm able to use it again.

How did you reactivate without making a new account ?

I just went to the Niko hobby platform and generated it. https://mynikohomecontrol.niko.eu/

https://www.niko.eu/nl-be/onze-producten/huisautomatisering/hobby-api

I did not need to create a new account. Just added the hobby API service and entered this information in the configuration of HA

Have the same over here (I think) : https://community.home-assistant.io/t/issue-when-adding-an-integration/376487

How do you add the API key to HA ?

I only have this :

`light:

  • platform: niko_home_control
    host: 192.168.1.133`

But as you can see in the above link, I'm not even able to enter anything while installing.

@KarelKempenaers
Copy link

In your HA configuration you need to enter this information. You should not add it as a light, just as an separate integration. Like, at the bottom of the file.

nhc2:
host: <your Controllers IP as 182.168.1.xxx>
port: 8884
username: “hobby”
password:

@efiten
Copy link

efiten commented Jan 7, 2022

Looks like it's not accepting this for me :

checking the config results in :

Invalid config for [nhc2]: expected a dictionary for dictionary value @ data['nhc2']. Got [OrderedDict([('host', '192.168.1.133'), ('port', 8884), ('username', 'hobby'), ('password',

I added it like this :

`nhc2:

  • host: 192.168.1.133
    port: 8884
    username: "hobby"
    password: "password"`

image

@Gavergracht
Copy link

Gavergracht commented Jan 7, 2022 via email

@efiten
Copy link

efiten commented Jan 14, 2022

@filipvh do you think you'll have the time somewhere to look at this integration ? Because I think many of us are depending on it (me for sure, my complete home runs on NIKO, and now my automation is gone).

Maybe we can setup a crowdfunding or so to 'buy' some of your time ?

@pete0811
Copy link
Contributor

I connect through a "default" touch panel profile. At first it didn't work at all and got those "config flow errors". By accident I did a modification in my Niko system with the Niko software and uploaded it (=niko controller restarts then). After that the integration worked. I think it's related to the restarting of the niko home controller ....

@efiten
Copy link

efiten commented Jan 17, 2022 via email

@pete0811
Copy link
Contributor

In the niko home programming software you open your project and under menu "dashboard" you can create a profile for a touchscreen. Name this profile "default" and make a password for it (it didn't work without password). You should do an upload to the niko controller then.
In my configuration.yaml file I have only:
nhc2:
host: 192.168.0.xxx
port: 8884
username: "hobby"
password: ""

Replace the 192.168.0.xxx with the correct IP adress of the niko controller.

@efiten
Copy link

efiten commented Jan 18, 2022

OK, let's try this later today.
But the password in your default profile, isn't used in the YAML file, the password over there is the API token, right ?
ANd you have the YAML setup, before adding the integration?

Erwin

@pete0811
Copy link
Contributor

pete0811 commented Jan 18, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants