filipvh / hass-nhc2

Niko Home Control II Home Assistant Integration
MIT License
36 stars 26 forks source link

latest update NHC2 dependencies issue #38

Open Lethichore opened 2 years ago

Lethichore commented 2 years ago

Hi,

Both Niko and HA pushed an update today, with the latest version of both installed the integration throws the following error: Unable to install package nhc2-coco==1.4.1: ERROR: Cannot install nhc2-coco==1.4.1 because these package versions have conflicting dependencies

Lethichore commented 2 years ago

Hi,

Both Niko and HA pushed an update today, with the latest version of both installed the integration throws the following error: Unable to install package nhc2-coco==1.4.1: ERROR: Cannot install nhc2-coco==1.4.1 because these package versions have conflicting dependencies

so it's in the HA update :)

image

Sharnobile commented 2 years ago

Any update ? I can't control my NHC2 from HA for the moment. Or anyone can share a workaround for this issue ?

anvarit commented 2 years ago

No work arround for the moment, it is python pip dependency problem that needs to be resolved in nhc2-coco. Only someone with enough Python knowledge can solve this.

Best thing for the moment is roll back to previous backup and wait untill the issues is solved

anvarit commented 2 years ago

Found another work around because I wanted to use the new media features. Install HASS on another machine (Pi, VM, ...) restore your backup, delete everything except for the NHC2 plugin and install Remote Home Assistant from HACS on both the new and main HASS. You can keep your main up 2 date and have the second one on the supported HASS version with only NHC2. Works perfectly but takes some work ofcourse

joleys commented 2 years ago

I believe it can be resolved by either changing the nhc2-coco requirement to 'paho-mqtt==1.6.1', or by completely removing the requirement. Unfortunately you cannot access this file in a regular HA installation. I've asked @filipvh if he sees a path forward to get the development of this integration back on track. No reply so far.

Hermke commented 2 years ago

I commented out the requirement in init.py But I’m still getting this ERROR when trying to add the Niko Home Control 2 integration (custom_component)

2022-03-04 19:26:49 INFO (SyncWorker_4) [homeassistant.util.package] Attempting install of nhc2-coco==1.4.1 2022-03-04 19:27:08 ERROR (SyncWorker_4) [homeassistant.util.package] Unable to install package nhc2-coco==1.4.1: ERROR: Cannot install nhc2-coco==1.4.1 because these package versions have conflicting dependencies. ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

Lethichore commented 2 years ago

it's in the setup process, not in de installed files, and as far as I know we can't modify those ourselves

Hermke commented 2 years ago

Ah wait I understand, …. It would indeed be nice if the latest commit (if this is the fix) was in eg. 1.4.2 and released as a Python package/module. Then we could just change to that version in init.py and get the custom component / integration working. Or is there another way to get the custom component working?

Hermke commented 2 years ago

Yes indeed I understood after I saw the commit. It’s in the requirements.txt for nhc2-coco …

I first thought it was regarding the ‘REQUIREMENTS’ in init.py from hass-nhc2

Hermke commented 2 years ago

Perhaps we can get the .ZIP from the latest commit where requirements.txt was changed And use it with ‘pip install’ on home assistant? Not sure if this is possible, is there a CLI somewhere to do this? I’m running from a RPI

Hermke commented 2 years ago

I SSHed into RPI home assistant, and tried to install Python module from my last commit but seems this won't work unfortunately. python -m pip install git+https://github.com/Hermke/nhc2-coco.git@356161d5e36f32ec1558adc3b37f47ab8b4623b6

Is there a way to install Python modules/packages on home assistant? Seems it's containerized. I'm new to using hass since today.

Lethichore commented 2 years ago

that's what i've been looking at but haven't seen a way to do a manual upload yet, only through repositories that requires specific structures

Hermke commented 2 years ago

Perhaps have @joleys publish his fork as a new PyPI package and we can use that one?

Cire2019 commented 2 years ago

@anvarit I see you configured a workaround by installing Remote Home Assistant from HACS. It's a good idea. Just a small question before i try it. What is happening with existing devices in primary HA ? Do you need to reconfigure them ? Thanks

blatruwe commented 2 years ago

A workaround: The fork https://github.com/boced66/hass-nhc2 has the nhc2 with the coco combined, removing the dependency. Currently this works for me with the new version of HA

Cire2019 commented 2 years ago

Thanks, i will have a look

Sharnobile commented 2 years ago

A workaround: The fork https://github.com/boced66/hass-nhc2 has the nhc2 with the coco combined, removing the dependency. Currently this works for me with the new version of HA

Perfectly work for me. Thank @blatruwe and @boced66 :)

efiten commented 2 years ago

A workaround: The fork https://github.com/boced66/hass-nhc2 has the nhc2 with the coco combined, removing the dependency. Currently, this works for me with the new version of HA

And how can I install this one ? I have the previous one (via HACS), but even when I delete it, from the integrations. And even if I delete the info from the YAML, it stays image

So How can I make sure the working version is inside ?

Erwin

Cire2019 commented 2 years ago

Hello, I just added in HACS the new custom image

image

I updated HA, restarted it And it's working fine Nothing else :)

Cire2019 commented 2 years ago

So i have 2 NHC II Integration in the GUI, but only one Custom Folder image

Probably not the best way to do it but it's working

efiten commented 2 years ago

So i have 2 NHC II Integration in the GUI, but only one Custom Folder image

Probably not the best way to do it but it's working

Same here, but it works, and, for me, that's what counts, great ! thanks !

Sharnobile commented 2 years ago

Fiy, i just remove content of custom_components\nhc2 and copy content of nhc2 into the folder.

Reboot HA and enjoy 👍

Handy-Harry commented 2 years ago

It works! Thanks a lot!

boced66 commented 2 years ago

Glad to have been able to help

ddeconin-gh commented 2 years ago

Hi, Could you write up the steps in a bit more details? Not quite sure I understand all mentioned above..

boced66 commented 2 years ago

Hello @ddeconin-gh

  1. Uninstall your version of nhc2 a. In the HACS tab, remove the integration b. Dans le dossier de configuration HASS, dans le sous dossier "custom_components" : Supprimer le dossier "nhc2"
  2. Install the new version a. https://github.com/boced66/hass-nhc2 : Download the zip file (green "code" button) b. Unzip the file in your computer c. Importer le sous dosser "nhc2" dans le dossier "custom_components" de HASS d. Restart HASS
dimitridelanghe commented 2 years ago

do you keep the (historical) data if u install the 2nd version or is it gone?

boced66 commented 2 years ago

Good question, If you just replace the contents of the folder (without removing the embed before) the data will remain. If that doesn't work and you have to uninstall and then install. I don't know how home assistant will react.

dimitridelanghe commented 2 years ago

I needed to delete everything, and adding the new version from @boced66 Which is working fine and have the full history back as the entities stay the same. Thanks for the fix!

claesto commented 2 years ago

Thanks, @boced66 I installed it alongside the official nhc2 integration (without uninstalling) through HACS, restarted and everything is working again as before.

joleys commented 2 years ago

For those of you who are interested in my spin-off of Filip's hard work, check my repo niko-home-control-II.

I've tried to reach Filip as well, without response so far.

kjurcik commented 2 years ago

niko-home-c

same in my case. Working back with workaround

Cire2019 commented 2 years ago

Hello, My Hobby API was expired. I renew it on NIKO web site. How can I update it in HA ? I don't find where to change the api key. Thanks

MirandaPoth commented 2 years ago

Hello, My Hobby API was expired. I renew it on NIKO web site. How can I update it in HA ? I don't find where to change the api key. Thanks

You copy & paste it into the 'password:' part of the nhc2 part of your configurations.yaml file, replacing the existing one.

Cire2019 commented 2 years ago

Very strange. I don't have NHC2 config section in my configurations.yaml file. I have the integration image But not option to change the password I checked all yaml files There is a file strings.json in \config\custom_components\nhc2 where we can set username and password. I tried but it didn't work

MirandaPoth commented 2 years ago

Very strange. I don't have NHC2 config section in my configurations.yaml file. I have the integration image But not option to change the password I checked all yaml files There is a file strings.json in \config\custom_components\nhc2 where we can set username and password. I tried but it didn't work

OK, mine isn't installed like that. I assume you restarted HA after changing strings.json? Is there a place in the System options (from the 3 dots) to enter it? If not, I'm sorry but I can't help. But I'm sure someone else will be able to :-)

Cire2019 commented 2 years ago

Thanks for your response. Indeed, i restarted HA after changing strings.json but not working In system Options, there is no option to adapt hobby API key

I'm missing something ... If someone has an idea ...

Cire2019 commented 2 years ago

Finally, i modified this line in coco.py client.username_pw_set(username, password)

Not sure it's the best method ... but it's workning :)

geertmeersman commented 2 years ago

Finally, i modified this line in coco.py client.username_pw_set(username, password)

Not sure it's the best method ... but it's workning :)

You can always go and hard change it into the /config/.storage/core.config_entries :-) But be carefull...

geertmeersman commented 2 years ago

I'm having this issue when using the @boced66 repo:

Logger: root
Source: custom_components/nhc2/coco_discover_profiles.py:58
Integration: nhc2 ([documentation](https://github.com/filipvh/hass-nhc2/blob/master/README.md), [issues](https://github.com/filipvh/hass-nhc2/issues))
First occurred: 12:14:38 (1 occurrences)
Last logged: 12:14:38

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 "/config/custom_components/nhc2/coco_discover.py", line 61, in _scan_for_nhc
    self._on_done()
  File "/config/custom_components/nhc2/coco_discover_profiles.py", line 53, in _done_discovering_controllers_callback
    CoCoProfiles(self._discover_profiles_callback(ctrl[0], ctrl[1]), ctrl[0],
  File "/config/custom_components/nhc2/coco_profiles.py", line 37, in __init__
    self._done_discovering_profiles_callback()
  File "/config/custom_components/nhc2/coco_discover_profiles.py", line 58, in _done_discovering_profiles_callback
    time.sleep(1)
NameError: name 'time' is not defined
Cire2019 commented 2 years ago

Finally, i modified this line in coco.py client.username_pw_set(username, password) Not sure it's the best method ... but it's workning :)

You can always go and hard change it into the /config/.storage/core.config_entries :-) But be carefull...

Ah yes, better place indeed :) Thanks

geertmeersman commented 2 years ago

I'm having this issue when using the @boced66 repo:

Logger: root
Source: custom_components/nhc2/coco_discover_profiles.py:58
Integration: nhc2 ([documentation](https://github.com/filipvh/hass-nhc2/blob/master/README.md), [issues](https://github.com/filipvh/hass-nhc2/issues))
First occurred: 12:14:38 (1 occurrences)
Last logged: 12:14:38

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 "/config/custom_components/nhc2/coco_discover.py", line 61, in _scan_for_nhc
    self._on_done()
  File "/config/custom_components/nhc2/coco_discover_profiles.py", line 53, in _done_discovering_controllers_callback
    CoCoProfiles(self._discover_profiles_callback(ctrl[0], ctrl[1]), ctrl[0],
  File "/config/custom_components/nhc2/coco_profiles.py", line 37, in __init__
    self._done_discovering_profiles_callback()
  File "/config/custom_components/nhc2/coco_discover_profiles.py", line 58, in _done_discovering_profiles_callback
    time.sleep(1)
NameError: name 'time' is not defined

I have added the configuration manually to configuration.yaml and this seems to add the nhc2 to the integrations page, but it doesn't add any entities... image

But when using MQTT to connect to the Niko hub, it seems to work, so user, pwd and IP/port are quite correct. image

in the custom_components it is well the one from @boced66 , I checked the source codes

So I don't really understand why it doesn't pop up devices/entities

geertmeersman commented 2 years ago

I'm having this issue when using the @boced66 repo:

Logger: root
Source: custom_components/nhc2/coco_discover_profiles.py:58
Integration: nhc2 ([documentation](https://github.com/filipvh/hass-nhc2/blob/master/README.md), [issues](https://github.com/filipvh/hass-nhc2/issues))
First occurred: 12:14:38 (1 occurrences)
Last logged: 12:14:38

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 "/config/custom_components/nhc2/coco_discover.py", line 61, in _scan_for_nhc
    self._on_done()
  File "/config/custom_components/nhc2/coco_discover_profiles.py", line 53, in _done_discovering_controllers_callback
    CoCoProfiles(self._discover_profiles_callback(ctrl[0], ctrl[1]), ctrl[0],
  File "/config/custom_components/nhc2/coco_profiles.py", line 37, in __init__
    self._done_discovering_profiles_callback()
  File "/config/custom_components/nhc2/coco_discover_profiles.py", line 58, in _done_discovering_profiles_callback
    time.sleep(1)
NameError: name 'time' is not defined

I have added the configuration manually to configuration.yaml and this seems to add the nhc2 to the integrations page, but it doesn't add any entities... image

But when using MQTT to connect to the Niko hub, it seems to work, so user, pwd and IP/port are quite correct. image

in the custom_components it is well the one from @boced66 , I checked the source codes

So I don't really understand why it doesn't pop up devices/entities

SOLVED IT :-)