Add Support for Fujitsu wireless Air Conditioning control app - FGLair

There isn’t a local API or access. You could use something like a Sensibo to control it via IR.

Nice, thank you! Will have a look into it

I am also stuck on this error. I am using the HyperV Virtual IMage which is based on alpine
I have install python and added the package using

lib $ pip3 install pyfujitseu
Requirement already satisfied: pyfujitseu in /usr/lib/python3.8/site-packages (0.9.3.2)
Requirement already satisfied: requests in /usr/lib/python3.8/site-packages (from pyfujitseu) (2.23.0)
Requirement already satisfied: certifi in /usr/lib/python3.8/site-packages (from pyfujitseu) (2020.4.5.1)
Requirement already satisfied: chardet in /usr/lib/python3.8/site-packages (from pyfujitseu) (3.0.4)
Requirement already satisfied: idna in /usr/lib/python3.8/site-packages (from pyfujitseu) (2.9)

I copied python to /config/deps/lib using both python3.8 and python folder directories

lib $ ls -la
total 16
drwxr-xr-x    4 root     root          4096 Jan 27 16:21 .
drwxr-xr-x    5 root     root          4096 Jan 27 16:16 ..
drwxr-xr-x   32 root     root          4096 Jan 27 16:21 python3
drwxr-xr-x   32 root     root          4096 Jan 27 16:04 python3.8

The package is in site-packages

lib $ ls -la /config/deps/lib/python3.8/site-packages/pyfujitseu
total 40
drwxr-xr-x    3 root     root          4096 Jan 27 16:04 .
drwxr-xr-x   47 root     root          4096 Jan 27 16:04 ..
-rw-r--r--    1 root     root            51 Jan 27 16:04 __init__.py
drwxr-xr-x    2 root     root          4096 Jan 27 16:04 __pycache__
-rw-r--r--    1 root     root          6573 Jan 27 16:04 api.py
-rw-r--r--    1 root     root         14648 Jan 27 16:04 splitAC.py

Still getting the error
Platform error climate.fujitsu_general_heatpump - No module named ‘pyfujitseu’

Any ideas what I can try next?

Nevermind, just needed to reboot the entire system, not just homeassistant.

My current temperature is way off. I have region set as us.

Image 181

Hi all,

I’m trying to config this in my HA.
I’m stuck in this error:
Logger: homeassistant.config
Source: custom_components/fujitsu_general_heatpump/climate.py:7
First occurred: 16:54:53 (1 occurrences)
Last logged: 16:54:53

Platform error: climate
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/config.py”, line 823, in async_process_component_config
platform = p_integration.get_platform(domain)
File “/usr/src/homeassistant/homeassistant/loader.py”, line 424, in get_platform
cache[full_name] = self._import_platform(platform_name)
File “/usr/src/homeassistant/homeassistant/loader.py”, line 429, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
File “/usr/local/lib/python3.8/importlib/init.py”, line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1014, in _gcd_import
File “”, line 991, in _find_and_load
File “”, line 975, in _find_and_load_unlocked
File “”, line 671, in _load_unlocked
File “”, line 783, 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’
Looks like I’m missing a module?
how can i get it?

If anyone is still getting

Platform error climate.fujitsu_general_heatpump - No module named ‘pyfujitseu’

then follow this code changes Custom component requirement not installed - #11 by esteele

If anyone is having troubles to run “pip install pyfujitseu” command, the easiest way is to download offical File editor addon and click on “gear icon” in top right corner and in menu select “Execute shell command”

I merged this pull request.

Thank you @philwilldo .
And I guess https://github.com/xerxes87/pyfujitsu_for_homeassistant/pull/1 is not needed as it is working fine for me in EU?

@sler correct - for degrees in Celcius you aint gonna need it.

I plan to extend this PR to make the unit configurable when I have some time to spend on it.

1 Like

@philwilldo or anyone else on this thread- sounds like the 3.3 update is now enforcing a version requirement. I have not updated yet, but vicfalls reported this today:

I’m happy to help test if someone has any ideas.

Hi @Rydcal, thanks for the heads up, I updated my branch accordingly:

1 Like

Hello I’ve tried it all and manage to make it run well really happy.

I’d like to go now for using local temperature as a trigger to start or stop climate.

I can’t find it in HA

Could you help me ?

Seb

Sorry for this, I see a lot of work has been done and I would love to have this capability on my home assistant as well. Does anyone have a writeup on how to add Fujitsu mini split systems into home assistant?
I run ha in docker on a rpi3 and I see some commands to run, but I am missing something because it is telling me that pip install pyfujitseu is not a command so I must be in the wrong prompt or environment.
Any help is greatly appreciated. If anyone is listening to get official support so this is a no brainer user function I am all for that also. Thank you guys in advance for the help.

I checked out the latest version, but still get the error that it can’t find the module.

I think i have come pretty far on getting this on my system but its still not showing up and i get this error:
2021-05-12 21:05:24 ERROR (SyncWorker_1) [homeassistant.loader] Error parsing manifest.json file at /config/custom_components/fujitsu_general_heatpump/manifest.json: Expecting value: line 7 column 1 (char 6)
I downloaded the file in directory config/custom_components/fujitsu_general_heatpump/ using ``sudo wget pyfujitsu_for_homeassistant/manifest.json at a370dffd6b5af863b0d774062edb8a52bd3440e7 · xerxes87/pyfujitsu_for_homeassistant · GitHub `

Any advice on this by chance?

Something isnt quite right for me, when i try to use this and have the directory custom_components my other thermostats stop working. When i change the name of custom_components my other thermostats work fine. Course either way for me my fujitsu devices dont show up.

I was finally able to get this to work after multiple blunders of my own. Very nice to have my mini splits in homeassistant. Thank you

1 Like

Hi All,

So I tried adding this to the basic install (HAOS on Pi 3b+). I copied the files (init.py, climate.py, and manifest.json) from Xeres87 on GitHub to /config/custom_components/fujitsu_general_heatpump/ as the instructions say.

I then added the correct text to Configurations.yaml. Obviously I replaced the !secret FGLAIR_USER/PASS with the actual username (email) & password

climate:
  - platform: fujitsu_general_heatpump
    username: !secret FGLAIR_USER
    password: !secret FGLAIR_PASS
    region: 'us'
    tokenpath: 'token.txt'

Here is the error log I have from HAOS:

2021-05-15 09:21:41 ERROR (SyncWorker_1) [homeassistant.loader] Error parsing manifest.json file at /config/custom_components/fujitsu_general_heatpump/manifest.json: Expecting value: line 7 column 1 (char 6)
2021-05-15 09:22:00 WARNING (MainThread) [homeassistant.setup] Setup of input_select is taking over 10 seconds.
2021-05-15 09:22:05 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Rec Room Black Bean' for broadlink integration not ready yet: [Errno -4000] Network timeout; Retrying in background
2021-05-15 09:22:11 ERROR (MainThread) [homeassistant.bootstrap] Error setting up integration climate - received exception
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 98, in async_setup_component
return await task # type: ignore
File "/usr/src/homeassistant/homeassistant/setup.py", line 208, in _async_setup_component
processed_config = await conf_util.async_process_component_config(
File "/usr/src/homeassistant/homeassistant/config.py", line 847, in async_process_component_config
p_integration = await async_get_integration_with_requirements(hass, p_name)
File "/usr/src/homeassistant/homeassistant/requirements.py", line 53, in async_get_integration_with_requirements
integration = await async_get_integration(hass, domain)
File "/usr/src/homeassistant/homeassistant/loader.py", line 550, in async_get_integration
integration = Integration.resolve_legacy(hass, domain)
File "/usr/src/homeassistant/homeassistant/loader.py", line 311, in resolve_legacy
comp = _load_file(hass, domain, _lookup_path(hass))
File "/usr/src/homeassistant/homeassistant/loader.py", line 609, in _load_file
module = importlib.import_module(path)
File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 779, in exec_module
File "<frozen importlib._bootstrap_external>", line 916, in get_code
File "<frozen importlib._bootstrap_external>", line 846, in source_to_code
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/config/custom_components/fujitsu_general_heatpump/__init__.py", line 7
<!DOCTYPE html>
^
SyntaxError: invalid syntax

Can anyone help???

@ThaDuhFeez,

have you also added the Python library Pyfujitseu?
It seems this is the missing link.

You have to have Python 3.8 or higher.

  • At your HASS /config folder you have to implement following path.

    /deps/lib/python3.8/site-packages/pyfujitseu
    
  • copy the 3 files from GitHub pyfujitseu to your new folder …/pyfujitseu

    __init__.py
    api.py
    splitAC.py

image

(__pychache__ folder will be done automatically by HASS after reboot)

  • change the tokenpath at your configuration.yaml to

    tokenpath: '/config/token.txt'
    
  • finally reboot HASS (I had to do it twice for the first time to make it run)

Hope this helps.
Vic

1 Like

Thanks @vicfalls ,

That was a help. However I still have an error:

Logger: homeassistant.bootstrap
Source: loader.py:609 
First occurred: 7:02:49 PM (1 occurrences) 
Last logged: 7:02:49 PM

Error setting up integration climate - received exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 98, in async_setup_component
    return await task  # type: ignore
  File "/usr/src/homeassistant/homeassistant/setup.py", line 208, in _async_setup_component
    processed_config = await conf_util.async_process_component_config(
  File "/usr/src/homeassistant/homeassistant/config.py", line 847, in async_process_component_config
    p_integration = await async_get_integration_with_requirements(hass, p_name)
  File "/usr/src/homeassistant/homeassistant/requirements.py", line 53, in async_get_integration_with_requirements
    integration = await async_get_integration(hass, domain)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 550, in async_get_integration
    integration = Integration.resolve_legacy(hass, domain)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 311, in resolve_legacy
    comp = _load_file(hass, domain, _lookup_path(hass))
  File "/usr/src/homeassistant/homeassistant/loader.py", line 609, in _load_file
    module = importlib.import_module(path)
  File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 779, in exec_module
  File "<frozen importlib._bootstrap_external>", line 916, in get_code
  File "<frozen importlib._bootstrap_external>", line 846, in source_to_code
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/config/custom_components/fujitsu_general_heatpump/__init__.py", line 7
    <!DOCTYPE html>
    ^
SyntaxError: invalid syntax