Add Support for Fujitsu wireless Air Conditioning control app - FGLair

Hi there,

I have recently purchased a Fujitsu reverse cycle air conditioning system that has an internal Wifi controller. The control is done via an app called FGLair (full details here: https://www.fujitsu-general.com/global/products/fglair/index.html).

I would love to be able to have this app and the control of the air conditioning integrated with HA.

As I am not a programmer, I would love it if someone in the HA community could provide some guidance on how to integrate this in HA.

Thanks in advance.
RE

This is something I have been looking into for sometime. I am casually working on a platform for climate component in HA.

Will update once I got it to a working condition. But honestly the FGLair app is so bad, I had enough of it!

I also have a Fujitsu aircon with the FGlair app, would love to test it out if you get it working.

Hi there

I have gotten a chance to develop a Python library and a platform for climate component of Fujitsu.

  1. create this directory path /config/custom_components/climate/ if does not exist.

  2. Download this custom platform file from GitHub and place it in the climate directory mentioned in previous step. So the file would be as /config/custom_components/climate/fujitsu_general_heatpump.py

  3. add the below lines to your configuration.yaml:

climate:
   - platform: fujitsu_general_heatpump
     username: <your FGLair username>
     password: <your FGLair password> 
  1. Restart HASS
3 Likes

Known issues:

  1. Google Assistant integration is not working [most possibly due to states not matching what Google assistant is expecting]
  2. Logging needs to be implemented
  3. The “powerful” functionality is implemented through aux_heat button in UI
  4. There are some other functionalities in the A/C which currently is not implemented.
  5. Could not reverse engineer the API to give the ambient room temperature. If you figured it out let me know and I am happy to update the library.

Regards,
Mehdi

1 Like

Awesome I’ll test it out tomorrow, I might just out an Xiaomi aqara temp sensor in there for the ambient temp then control the air con based on that. Thank you so much for sharing.

1 Like

Thanks Medhi, just set it up and appears to be working well.
I need to play around with the options to test it all, but first impression is great.

1 Like

That’s exactly what I have in mind. Ordered the Xiaomi sensors a while back and expecting them to arrive anytime soon. In fact I think by placing them around the room you will have better control of the ambient temp and humidity.

no worries. Looking forward to hearing you experience and let me know if there is any issues. Will try to get them fixed. I’ve been using it for about month now and haven’t really noticed anything.

Appears to be working fine except I can’t control my air con haha. There is a problem on the FGLair side as I can’t control it through the app either. Even though I can see my air con on the wifi network and I registered the unit to my Fglair account. Contacting Fujitsu tech support now.

Thanks for the hard work though looks good.

I dunno what happened but all of a sudden it won’t load my AC, it’s still connected to the network and on startup I can see it saying loading custom_component, climate, fujitsu air pump etc so no errors

i look in states and it’s no longer there?

So I sorted out all the mess with my aircon and the FGlair account and now the component is working perfectly and I can control my A/C through home Assistant thanks again

Hi, what was the problem? I cannot log in… please help

2018-11-22 11:31:43 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform fujitsu_general_heatpump
Traceback (most recent call last):
File “c:\windows\SysWOW64\homeassistant\lib\site-packages\homeassistant\helpers\entity_platform.py”, line 128, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File “C:\Users\OleAndor\AppData\Local\Programs\Python\Python37-32\lib\asyncio\tasks.py”, line 416, in wait_for
return fut.result()
File “C:\Users\OleAndor\AppData\Local\Programs\Python\Python37-32\lib\concurrent\futures\thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “C:\Users\OleAndor\AppData\Roaming.homeassistant\custom_components\climate\fujitsu_general_heatpump.py”, line 36, in setup_platform
if not fglairapi._authenticate():
File “c:\windows\SysWOW64\homeassistant\lib\site-packages\pyfujitsu\api.py”, line 100, in _authenticate
headers= _api_headers())
File “c:\windows\SysWOW64\homeassistant\lib\site-packages\pyfujitsu\api.py”, line 156, in _call_api
response.raise_for_status()
File “c:\windows\SysWOW64\homeassistant\lib\site-packages\requests\models.py”, line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://user-field.aylanetworks.com/users/sign_in.json

I had to unpair my A/C from my router and connect it again. To me yours looks like maybe a login issue.

Yes… you are probably right, however, I do use the same username (email) and password that I do for the FGLair app, nevertheless it will not log in using the script. Any ideas on how to solve this?

Thanks Mehdi. Wow, I just added this to my HA about 5mins ago. Every function working straight out of the box (so to speak). No issues, no challenges to setup fantastic thanks for getting this up and running.

Nice! I keep getting the “Unauthorized for url: https://user-field.aylanetworks.com/users/sign_in.json” Error… did you have to sign up for aylanetworks.com or something to get it working?

I found that by creating an FGlair account with Austraila as country I get to log in without the error! I used Norway before. However, I havent been able to connect the air conditioner to the aussi account yet.

Hmmm when I did mine a week ago I no issues at all, admittedly I am in Australia and already had the FGLair app up and running so all I did was drop in my credentials and hey presto magic…

I contacted Fujitsu and the the answer is quoated below. So I guess I could ask them what server is used in Europe, and try to change the address in the script? I sent them an email asking for the European server name.

At this moment IFTTT is not deployed for Ayla servers in Europe. Not only Norway, but for the whole European market will be possible to use IFTTT. Adding a Norwegian air condition model to an Australian FGLair account will not be possible, because WIFI adapters are using different servers for each market.
The measures are examined by our development department, but I am sorry to say, can’t give you a schedule when this option will be available