Mmodarre / pyfujitsu_for_homeassistant

MIT License
31 stars 33 forks source link

Info for using pyfujitsu_for_homeassistant on 0.113.x #18

Closed chiefcomm closed 3 years ago

chiefcomm commented 3 years ago

With the change in 0.113.x to the minumum Python version it is necessary to update the dependencies folder - to fix I renamed the folder \deps\lib\python3.7 to \deps\lib\python3.8. Working perfectly post upgrade to 0.113.x image

meichthys commented 3 years ago

@chiefcomm what version of code are you using? @xerxes87 's latest code? I get a module not found error even though i adjusted the path that you mentioned.

meichthys commented 3 years ago

After a reboot the 'module not found' error on the config checker went away and the integration works fine :)

chiefcomm commented 3 years ago

@chiefcomm what version of code are you using? @xerxes87 's latest code? I get a module not found error even though i adjusted the path that you mentioned.

@meichthys I confirm I am using the latest code of @xerxes87 (with the ambient temperature upgrade by @tomdb-BE), 0.113.x does not support python version lower than 3.7.1 so I renamed the dependencies folder \deps\lib\python3.7 to \deps\lib\python3.8 which solved the issue.

tomdb-BE commented 3 years ago

I cannot find any reference in the code included in this repo towards 3.7.1 <-> 3.8. The original code is based on the API maintained in another repo here:: https://github.com/Mmodarre/pyfujitsu For better performance, it would also be a good idea to include the current_temperature in the API directly as well (instead of getting the value from the whole json response)

meichthys commented 3 years ago

@tomdb-BE The python 3.8 is required because Homeassistant itself has moved to the python 3.8 requirement.

It would indeed be better to include the code in pyfujitsu but there are no active forks of the original repo that i know of.

vicfalls commented 3 years ago

After a reboot the 'module not found' error on the config checker went away and the integration works fine :)

worked for me as well. Thanks @meichthys for your hints

pilot1981 commented 3 years ago

Hi, I'm on 0.112.4 version and I tried to rename folder \deps\lib\python3.7 to \deps\lib\python3.8. I rebooted HA, but now I have:

Logger: homeassistant.components.climate Source: custom_components/fujitsu_general_heatpump/climate.py:68 Integration: Termostato (documentation, issues) First occurred: 8:34:22 (1 occurrences) Last logged: 8:34:22

Error while setting up fujitsu_general_heatpump platform for climate Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 178, in _async_setup_platform await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT) File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for return fut.result() File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/fujitsu_general_heatpump/climate.py", line 68, in setup_platform import pyfujitsu.api as fgapi ModuleNotFoundError: No module named 'pyfujitsu'

I have to use code of https://github.com/xerxes87/pyfujitsu_for_homeassistant?

pilot1981 commented 3 years ago

Hi, I also updated to code version available here https://github.com/xerxes87/pyfujitsu_for_homeassistant but now I have another error:

Logger: homeassistant.config Source: custom_components/fujitsu_general_heatpump/climate.py:7 First occurred: 9:20:15 (1 occurrences) Last logged: 9:20:15

Platform error: climate Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config.py", line 780, in async_process_component_config platform = p_integration.get_platform(domain) File "/usr/src/homeassistant/homeassistant/loader.py", line 322, in get_platform f"{self.pkg_path}.{platform_name}" File "/usr/local/lib/python3.7/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1006, in _gcd_import File "", line 983, in _find_and_load File "", line 967, in _find_and_load_unlocked File "", line 677, in _load_unlocked File "", line 728, in exec_module File "", line 219, in _call_with_frames_removed File "/config/custom_components/fujitsu_general_heatpump/climate.py", line 7, in import pyfujitseu ModuleNotFoundError: No module named 'pyfujitseu'

and my entity climate don't works...

I think I have some problem with new versiion of Python Library for Fujitsu General split Airconditioners API, so I tried to install new: I copied files from here https://github.com/Mmodarre/pyfujitsu/tree/master/pyfujitseu to /config/deps/lib/python3.8/site-packages/pyfujitseu/

what's wrong?

pilot1981 commented 3 years ago

Hi, I updated to 0.113.3 and now all seems to work fine...so I suppose this workaround work only from 0.113 version of HA...

meichthys commented 3 years ago

@chiefcomm i think we can close this.

chiefcomm commented 3 years ago

Agreed @meichthys