joleys / niko-home-control-II

Home Assistant Custom Integration for Niko Home Control II
MIT License
74 stars 21 forks source link

Config-flow kon niet geladen worden: Unknown error #85

Closed tomazzive closed 11 months ago

tomazzive commented 1 year ago

When using HACS to install the component, I get this error. It takes +10 minutes when loading and configuring the component and then I get this error message.

In the logfile I see this: _2023-08-31 15:04:32.318 WARNING (SyncWorker2) [homeassistant.loader] We found a custom integration nhc2 which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

tijsverkoyen commented 1 year ago

The error in the logfile is a generic message from Home Assistant. Can you please enable debug for the integration, see the first step in https://github.com/joleys/niko-home-control-II#i-need-to-see-the-device-list

Can you check if you are using the most recent version of Home Assistant.

Were you able to configure a controller? If so: did you use the auto detected controller or did you enter the host/ip manually?

tomazzive commented 1 year ago

Hi Tijs. I use the latest (and totally fresh install) of homeassistant on a RP4. I enabled the debug and now the install has been busy for 50 minutes: "Een ogenblik geduld terwijl nhc2 wordt ingesteld".

I was not able to configure a controller. I don't see any configuration steps. Just blocked on this loop.

tijsverkoyen commented 1 year ago

I is not easy for me to debug. Could you try the following:

  1. Open custom_components/nhc2/config_flow.py
  2. Comment / remove lines 74 → 83, this are the lines below:
       disc = CoCoDiscoverProfiles()

        self._all_cocos = await disc.get_all_profiles()
        for coco in self._all_cocos:
            if coco[2] is not None:
                coco[2].insert(0, {
                    'Uuid': 'hobby',
                    'Name': 'hobby',
                    'Type': 'hobby'
                })
  1. Restart Home Assistant
  2. Try to configure the integration again.
tomazzive commented 1 year ago

Impressive. In an instance I see the option to set my IP of the controller. So it works! Thank you for the help! Much appreciated.

tijsverkoyen commented 1 year ago

@tomazzive glad it works. This is some code related to discovering profiles and controllers on your network.

@joleys If I'm not mistaken this was added by you? Any idea to improve the error handling? Or should we just remove this part and let people fill in the details themself?

tomazzive commented 1 year ago

Thanks for the quick help! In the meanwhile I managed to add 8 controllers for a total of 520 entities. I'm using it in one of our hotels. When a customer checks out at the reception desk, all the lights of that room will be switched off automatically. Awesome.

joleys commented 1 year ago

@tijsverkoyen This was already in the original code. I can try to find some time to dig into this part of the code.