Add Support for Fujitsu wireless Air Conditioning control app - FGLair

Does anyone have the lovelace standard thermostat card working with this addon?

Hey Everyone, first big thanks to Mmodarre for his work on this integration! I just had a Fuji mini split installed and once I figured out the changes in custom_components in Hassio .88, I can see my Fuji minisplit in Hassio.

I am seeing a strange issue. Although I can see and set the temp of the Fuji minisplit from Hassio, the temp will always revert back to its previous temp (what it was before i changed it with Hassio). This happens with no interaction from me. I thought that the IR remote control might be contibuting to this issue, so i pulled the batteries from it. However, the issue still persists. I wonder if anyone has noticed this?

Thanks!

Mine works fine, how long does it take to change back? Does HA show it’s changed back?

Sometimes immediately. Other times up to a minute or so. When I change the temp in Hassio I can see it change in the FGlair app. But then, unexpectedly it will return to the original temp. Hassio and FGLair both show it changed back.

after I upgraded to hassio 0.89. This became broken. Anyone know what happen?

There were changes that are referenced in other threads. I’ve turned mine off for the time being. I plan on looking at it as this seems dead from creators point of view, but it’s going to take me while. As an example this conversation appears relevant: 0.89 Breaking Change: Prevent partial custom component overlays

After upgrading to .88 of HA I had to have directory structure: /config/custom_components/fujitsu_general_heatpump/climate.py (where climate.py = fujitsu_general_heatpump.py)

I got this error after I changed the file name and location

Error loading custom_components.fujitsu_general_heatpump.climate. Make sure all dependencies are installed

Yes I have the same issue. It would seem the changes I referenced in the other thread have broken this - so it doesn’t work in 0.89. It would appear that there might only be minor changes required to get it working again, however I don’t have the python skills at this stage.

@Mmodarre, is there any chance you can update the Python code to resolve the changes to custom components introduced in 0.88?

He has said he will look at it on his GitHub repo when I created an issue

1 Like

After you have changed the directory structure, modify climate.py (old fujitsu_general_heatpump.py) and remove lines (near the top):

from homeassistant.components.climate import (
    PLATFORM_SCHEMA, SUPPORT_FAN_MODE,
    SUPPORT_OPERATION_MODE, SUPPORT_SWING_MODE, SUPPORT_TARGET_TEMPERATURE, SUPPORT_ON_OFF,
    ClimateDevice, SUPPORT_AUX_HEAT)

Then add the following where you removed the above lines:

from homeassistant.components.climate import (
    PLATFORM_SCHEMA,
    ClimateDevice
)

from homeassistant.components.climate.const import (
    SUPPORT_FAN_MODE,
    SUPPORT_OPERATION_MODE,
    SUPPORT_SWING_MODE,
    SUPPORT_TARGET_TEMPERATURE,
    SUPPORT_ON_OFF,
    SUPPORT_AUX_HEAT
)

Restart Home Assistant…

1 Like

That worked! Thanks!

Worked like a charm.
Thanks!

Glad it worked!

I upgraded HA just after midnight, and had to fix my heatpump integration before my wife and kids woke up…so I had motivation

Did you solve the european server issue,

i’m installing a similar unit in Malta europe and wanted to know if this can be integrated.

thanks

Not sure if this helps but I decompiled the APK and there are different secrets, app ids and urls based on region - which is why you would be having issues in EU. These are set on https://github.com/Mmodarre/pyfujitsu/blob/master/pyfujitsu/api.py

Secrets:
EU
"FGLair-eu-gpFbVBRoiJ8E3QWJ-QRULLL3j3U"
US
"CJIOSP-Vb8MQL_lFiYQ7DKjN0eCFXznKZE"
CH
"FGLairField-cn-zezg7Y60YpAvy3HPwxvWLnd4Oh4"

App Ids:
EU
"FGLair-eu-id"
US
"CJIOSP-id"
CH
"FGLairField-cn-id"

Urls change too:

would be
API_BASE_URL = "https://ads-eu.aylanetworks.com/apiv1/"

API_GET_ACCESS_TOKEN_URL = "https://user-field.aylanetworks.com/users/sign_in.json"
would be
API_GET_ACCESS_TOKEN_URL = "https://user-field-eu.aylanetworks.com/users/sign_in.json"

I don’t have access to another region one so can’t help more than the above but hopefully that helps someone.

China domains are (in case anyone ever wants it)

"https://ads-field.ayla.com.cn/"
"https://user-field.ayla.com.cn/"

3 Likes

Sweet! Thank you so much! I got it working!!

The server info worked once I found that I had to edit the correct api.py file.
This: c:\Users\OleAndor\AppData\Roaming.homeassistant\deps\Python36\site-packages\pyfujitsu
Not this: c:\Windows\SysWOW64\homeassistant\Lib\site-packages\pyfujitsu\

I also had to tweak the climate.py in:
c:\Users\OleAndor\appdata\Roaming.homeassistant\custom_components\fujitsu_general_heatpump'

Since I got a lot of errors. For now I just commented out some code.

Typical error:

Traceback (most recent call last):
File “C:\Users\OleAndor\AppData\Local\Programs\Python\Python36\lib\site-packages\homeassistant\helpers\service.py”, line 291, in handle_service_platform_call
await func(entity, data)
File "C:\Users\OleAndor\AppData\Local\Programs\Python\Python36\lib\site-packages\homeassistant\components\climate_init
.py", line 556, in async_service_aux_heat
await entity.async_turn_aux_heat_on()
File “C:\Users\OleAndor\AppData\Local\Programs\Python\Python36\lib\site-packages\homeassistant\components\climate_init_.py”, line 482, in async_turn_aux_heat_on
return self.hass.async_add_job(self.turn_aux_heat_on)
File “C:\Users\OleAndor\AppData\Roaming.homeassistant\custom_components\fujitsu_general_heatpump\climate.py”, line 177, in turn_aux_heat_on
self._fujitsu_device.powerfull_mode_on()
File “C:\Users\OleAndor\AppData\Roaming.homeassistant\deps\Python36\site-packages\pyfujitsu\splitAC.py”, line 69, in powerfull_mode_on
self.powerful_mode = 1
File “C:\Users\OleAndor\AppData\Roaming.homeassistant\deps\Python36\site-packages\pyfujitsu\splitAC.py”, line 233, in powerful_mode
self._api._set_device_property(self.powerful_mode[‘key’],properties)
TypeError: ‘NoneType’ object is not subscriptable

Awesome! Good to hear - I almost didn’t share those details as wasn’t sure it would help anyone so glad to know it did.

I’m getting the same issues you describe (US unit) and did something similar so I assume it’s an issue introduced recently with HA as no one else appears to have reported it.

1 Like

Great to see this progressing so well!

On a semi-related tangent, has anyone had any success with hard wiring their Fujitsu ducted air into Home Assistant? We have the wall controller for our one, and the installer said we can’t have both that and the wifi controller as the unit can’t handle both. So, I’m looking at the other options - IR being a fallback, but they seem to have a connector kit (UTD-ECS5A) that I thought I might be able to connect to a Raspberry Pi or something…

But that’s as far as I’ve got. :slight_smile: