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

Integration no longer working after Niko Home Controller update 2.22.1.624 #210

Open
brett1996 opened this issue Feb 13, 2025 · 18 comments
Open
Assignees
Labels
Waiting for feedback Further information is requested

Comments

@brett1996
Copy link

Hi,

Last evening I've updated my controller to version 2.22.1.624.
After this the integration stopped working.
This morning I've updated everything to the latest version.
I also enabled Debuggin in de NHC2 integration.

HAOS 2025.02
Core 14.2.

The only thing that can be wrong on my side is that the renewal of the API token was not done in time.
Can someone maybe Explain, how I can do this?

If there are other things I can do, to get this working, let me know.

@brett1996
Copy link
Author

@bauffman
Copy link

bauffman commented Feb 13, 2025

@brett1996 I'm having the same issue and my debug log looks the same.

My API token has been renewed less than 2 months ago, so I assume that will not be the root cause.

@hp040609
Copy link

Hi,

  1. I've completely uninstall the integration,

  2. I've done the full update of the NIKO system through the 'Niko Home Control programming software',

  3. Then updated the Daikin API inside the NIKO system who was also broken due to the update,

  4. Then re-installed the integration and everithing works smoothly now.

So I would suggest that you do the same steps but in a different ordrer:

2 -> 3

Chek if it still doesnt fix the home assistant problem; if not :

1 -> 4

Le me know if it helped

@joleys
Copy link
Owner

joleys commented Feb 13, 2025

I completed the update of my controller just now. Although I do see some errors in the logs, all functionality is working.

An error of an expired token did show up after the update.

@tijsverkoyen
Copy link
Collaborator

From the log off @brett1996:

There are 2 warnings related to NHC

2025-02-13 10:24:13.509 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module with args ('custom_components.nhc2',) in /usr/src/homeassistant/homeassistant/loader.py, line 1075: ComponentProtocol, importlib.import_module(self.pkg_path) inside the event loop; ...

and

2025-02-13 10:24:13.845 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to load_verify_locations with args (<ssl.SSLContext object at 0x7f7bbdd640>, '/config/custom_components/nhc2/nhccoco/coco_ca.pem') inside the event loop by custom integration 'nhc2' at custom_components/nhc2/nhccoco/coco.py, line 96: client.tls_set(ca_path) (offender: /usr/local/lib/python3.13/site-packages/paho/mqtt/client.py, line 804: context.load_verify_locations(ca_certs)), ...

Both of them are warnings. Which do not block anything.

I see the following in the logs

2025-02-13 10:24:13.847 DEBUG (MainThread) [custom_components.nhc2] Connecting to 192.168.X.XXX with YYYY

Which means the integration tries to connect. After that there are no more NHC entries in the log. So I think the controller does not respond.

@bauffman @brett1996 some questions:

  1. Is the Niko Home Control iOS/Android app working?
  2. Do you have something from Daikin connected to Niko Home Controller (not via Home Assistant)
  3. Can you do the steps 2 & 3 from Integration no longer working after Niko Home Controller update 2.22.1.624 #210 (comment)
  1. I've done the full update of the NIKO system through the 'Niko Home Control programming software',
  2. Then updated the Daikin API inside the NIKO system who was also broken due to the update,

@bauffman
Copy link

bauffman commented Feb 14, 2025

  • The Niko Home control app on ios works;
  • I have no Daikin devices;
  • I've done step 2 and 3.

@brett1996
Copy link
Author

Same for me,
I also do not use anything daikin related.
If you sent me a private message. I can give you a temp login to my home assitant.

@firepinn
Copy link
Contributor

It would be interesting to see whether 0ac652a could fix this issue. It should force an MQTT reconnect when you reload the integration

@brett1996
Copy link
Author

Thanks for the support,

When opening the niko app this morning I got a notification to update to version 2.22.1.625.
Did that. After this, it still was not working.

Then I've added the changes you've made to the init.py.
Still not working.
I tried rebooting the OS and reloading the integration.

home-assistant_2025-02-14T08-36-26.766Z.log

@BalderikTheSecond
Copy link

BalderikTheSecond commented Feb 14, 2025

I had the same issues with 2.22.1. In the meantime, there is 2.22.2.625 and all issues were resolved.

@brett1996
Copy link
Author

Still not working,

Are there anything I can do to help ?

I want to reinstall the integration, But will I lose all devices then ?
How kan I Redo my API config ?

Please let me know. I'm here to help

@brett1996
Copy link
Author

I found the problem.
A very noob problem, The IP of the controller was changed since the update.
How do I set a static IP in de Niko software ?
I've set a static IP based on MAC in my unify controller.

@tijsverkoyen
Copy link
Collaborator

@brett1996 I also set a static IP on my Unify controller.
@bauffman can you check if this is also the case in your installation?

@tijsverkoyen tijsverkoyen self-assigned this Feb 15, 2025
@tijsverkoyen tijsverkoyen added the Waiting for feedback Further information is requested label Feb 15, 2025
@tvandyck85
Copy link

same issue here and after two days I have to re-enter the API key again after which HA restarts and the connection between NHC II is active again. No renewal of the api key was done.

The HA has a fixed IP

@jefG-dlw
Copy link

jefG-dlw commented Feb 16, 2025

I had the same issue on both the 2.22 versions released.
after a reload of the integration or reboot of HA the issue disappeared and the integration is working.
Had the same error about the authentication.
no Daikin here.
NHC has a fixed ip.

Image
after entering the API key again,

Image
HA restarts, a bit unexpected but anyway. the issue seems to be resolved after that.

it seems when niko does an automatic update of the controller, the HA integration is having issues with that and unable to recovery automatically.

@bauffman
Copy link

My installation had its IP address changed as well. After assigning a fixed IP it still didn't work. About a day later all of a sudden it started working again 🤷‍♂️

I'm assuming Niko changed & fixed something on their side.

@tijsverkoyen
Copy link
Collaborator

I have contacted Niko to ask them wat has been changed. But I don't have a reply (yet)

@tijsverkoyen
Copy link
Collaborator

Just an update based on the information I received from Niko

Change of IP of the controller.
Probably related to the reboot after the Niko Home Controller update. Make sure your controller has a fixed ip. In most network interfaces you can set this based on MAC address.

Authentication failed
Niko released 2.22.3 which contains a bugfix for that every first authentication on MQTT after a reboot got Authentication denied.

Also the authentication is more strict. If you try to authenticate with wrong credentials too much you will be blocked.

Make sure you have the latest update from Niko on your Niko Home Controller and use the correct credentials.

No devices
In a new Home Assistant environment you can add the integration but don't get any devices. (which I can reproduce).

It seems that Home Assistant is not able to connect to the MQTT broker on the Niko Home Controller when adding the integration. The config gets saved after a timeout. So it seems like it works.

But as there is no connection the device list is not received and no devices/entities are created.

To be honest: I don't have a clue a this point why the connection fails in an empty Home Assistant. But why it works on my "production" Home Assistant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Waiting for feedback Further information is requested
Projects
None yet
Development

No branches or pull requests

9 participants