Hi,
I have made a home assistant integration for Fujitsu Airstage Airconditioners, if any one want to try it out.
Please let me know if any issues here:
Hi,
I have made a home assistant integration for Fujitsu Airstage Airconditioners, if any one want to try it out.
Please let me know if any issues here:
Daniel! Youâre the hero weâve been waiting for!
Appears to work flawlessly on my system. Case closed everyone, shut down the thread, send Daniel some beers.
Local. That approach with the various REST calls we got working over the rest of this thread was working fine for me so saw no reason to involve the cloud now.
Allright
Let me know if you stumble upon any issues!
This is great work @danielkaldheim
I am having some trouble with the integration.
I am using local mode (briefly tried Cloud with same issue). The model number of my Airstage adapter is UTY-TFSXJ3 for a ducted unit.
The integration partially works in that it shows the room/outdoor temperatures and the current settings for âEcomony modeâ and âEnergy saving fanâ.
However:
The climate controls are âunavailableâ
The âEcomony modeâ and âEnergy saving fanâ settings donât reflect changes I make in the app (until I reload the integration). I suspect the temperatures donât update but canât confirm this (as it takes a long time for temperature to change!)
I wonder if it isnât updating as the aircon unit itself doesnât have all the functionality of a normal split unit (e.g. doesnât have a âswing modeâ)
When I try and change the A/C mode I see a âfailed to call service climate.set_hvac_mode 65535â in the UI
I have enabled debug logging but there is nothing in there even though there are errors in the UI:
2023-08-15 07:51:24.901 DEBUG (MainThread) [custom_components.fujitsu_airstage] Finished fetching Fujitsu Airstage data in 4.149 seconds (success: True)
2023-08-15 07:51:39.212 DEBUG (MainThread) [custom_components.fujitsu_airstage.climate] ON
2023-08-15 07:51:45.538 DEBUG (MainThread) [custom_components.fujitsu_airstage] Finished fetching Fujitsu Airstage data in 5.550 seconds (success: True)
I have included the output of a CURL command to see if this helps the debug
curl -vv -X POST --data '{"device_id":"E8FB1CFF5FF5","device_sub_id":0,"req_id":"","modified_by":"","set_level":"03","list":["iu_set_tmp","iu_indoor_tmp","iu_outdoor_tmp","iu_onoff","iu_economy","iu_fan_ctrl","iu_powerful","ou_low_noise","iu_op_mode","iu_fan_spd","iu_af_swg_vrt","iu_onoff","iu_af_swg_vrt"]}' 'http://192.168.1.59/GetParam'
Note: Unnecessary use of -X or --request, POST is already inferred.
* Trying 192.168.1.59:80...
* Connected to 192.168.1.59 (192.168.1.59) port 80 (#0)
> POST /GetParam HTTP/1.1
> Host: 192.168.1.59
> User-Agent: curl/7.81.0
> Accept: */*
> Content-Length: 283
> Content-Type: application/x-www-form-urlencoded
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Content-Type: application/json
< Content-Length: 409
<
* Connection #0 to host 192.168.1.59 left intact
{"value":{"iu_set_tmp":"220","iu_indoor_tmp":"7250","iu_outdoor_tmp":"6500","iu_onoff":"1","iu_economy":"0","iu_fan_ctrl":"1","iu_powerful":"65535","ou_low_noise":"0","iu_op_mode":"4","iu_fan_spd":"0","iu_af_swg_vrt":"65535","iu_onoff":"1","iu_af_swg_vrt":"65535"},"read_res":"ack","device_id":"E8FB1CFF5FF5","device_sub_id":0,"req_id":"","modified_by":"","set_level":"03","cause":"","result":"OK","error":""}
I suspect the issue is relating to the lack of some functions on ducted A/C. Note the JSON output âiu_af_swg_vrtâ:â65535â especially the number 65535 which is the same as referenced in the UI error message above. I think the integration is baulking at the fact that some features are not available. Note also âiu_powerfulâ:â65535â
Does the integration setup routine need to be able to disable features that are not available with tick-boxes e.g. be able to disable powerful and the swing control.
update: I think the integration updates some of the modes (e.g. choose heating) as it is reflected in the App but the HA UI remains âunavailableâ
In case itâs useful the unit Iâm using that works fine is the ASYG07KMCE.
Thatâs a standard split unit with swing control
Mine is a ARXG18KLLAP which is a ducted unit and uses a slightly different Airstage adapter
Hi,
Thank you for sharing, and I think you are right. I can add a check for params resulting with â65535â and enable / disable function based on this.
I made this integration based on the unit Iâm having access to, so your CURL is appreciated!
If you want you could add this to configuration.yaml for more debug info:
logger:
default: info
logs:
fujitsu_airstage: debug
pyairstage: debug
Iâm using three sets of param list for getting the information needed for the integration. Some of these are probably redundant.
This one fetches the model for example: âASYG12KMCENâ. This has failed in another case, and Iâm looking into this.
modelInfo = await self.get_parameters(
[
"iu_model",
],
)
acInfo = await self.get_parameters(
[
"iu_wifi_led",
"iu_af_inc_hrz",
"iu_af_inc_vrt",
"iu_indoor_tmp",
"iu_outdoor_tmp",
"iu_hmn_det",
"iu_main_ver",
"iu_eep_ver",
"iu_has_upd_main",
"iu_has_upd_eep",
"iu_fld_set80",
],
)
modeInfo = await self.get_parameters(
[
"iu_onoff",
"iu_op_mode",
"iu_fan_spd",
"iu_set_tmp",
"iu_af_dir_vrt",
"iu_af_swg_vrt",
"iu_af_dir_hrz",
"iu_af_swg_hrz",
"ou_low_noise",
"iu_fan_ctrl",
"iu_hmn_det_auto_save",
"iu_min_heat",
"iu_powerful",
"iu_economy",
"iu_err_code",
"iu_demand",
"iu_fltr_sign_reset",
],
)
It would be interesting to get your results from this curl (the same as modeInfo used in my integration):
curl -vv -X POST --data '{"device_id":"E8FB1CFF5FF5","device_sub_id":0,"req_id":"","modified_by":"","set_level":"03","list":["iu_onoff","iu_op_mode","iu_fan_spd","iu_set_tmp","iu_af_dir_vrt","iu_af_swg_vrt","iu_af_dir_hrz","iu_af_swg_hrz","ou_low_noise","iu_fan_ctrl","iu_hmn_det_auto_save","iu_min_heat","iu_powerful","iu_economy","iu_err_code","iu_demand","iu_fltr_sign_reset"]}' 'http://192.168.1.59/GetParam'
Thereâs a delay (120 seconds) for every background refresh from the unit. This was set to not flood the cloud service. So when theres a change done by the app, it can take up to two minutes before itâs reflected in the integration.
I can lower this when on local connection, and maybe add a configuration settings where you can set the sync interval.
Thanks for the reply.
Happy to test out some code edits as I appreciate that it is difficult if you donât have access.
(alternatively I could send you my Airstage login details for you to work against with a temporary password if that is more useful)
Here is the output of the requested curl command:
curl -vv -X POST --data '{"device_id":"E8FB1CFF5FF5","device_sub_id":0,"req_id":"","modified_by":"","set_level":"03","list":["iu_onoff","iu_op_mode","iu_fan_spd","iu_set_tmp","iu_af_dir_vrt","iu_af_swg_vrt","iu_af_dir_hrz","iu_af_swg_hrz","ou_low_noise","iu_fan_ctrl","iu_hmn_det_auto_save","iu_min_heat","iu_powerful","iu_economy","iu_err_code","iu_demand","iu_fltr_sign_reset"]}' 'http://192.168.1.59/GetParam'
Note: Unnecessary use of -X or --request, POST is already inferred.
* Trying 192.168.1.59:80...
* Connected to 192.168.1.59 (192.168.1.59) port 80 (#0)
> POST /GetParam HTTP/1.1
> Host: 192.168.1.59
> User-Agent: curl/7.81.0
> Accept: */*
> Content-Length: 355
> Content-Type: application/x-www-form-urlencoded
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Content-Type: application/json
< Content-Length: 507
<
* Connection #0 to host 192.168.1.59 left intact
{"value":{"iu_onoff":"1","iu_op_mode":"1","iu_fan_spd":"0","iu_set_tmp":"220","iu_af_dir_vrt":"65535","iu_af_swg_vrt":"65535","iu_af_dir_hrz":"65535","iu_af_swg_hrz":"65535","ou_low_noise":"0","iu_fan_ctrl":"1","iu_hmn_det_auto_save":"65535","iu_min_heat":"0","iu_powerful":"65535","iu_economy":"0","iu_err_code":"0","iu_demand":"0","iu_fltr_sign_reset":"65535"},"read_res":"ack","device_id":"E8FB1CFF5FF5","device_sub_id":0,"req_id":"","modified_by":"","set_level":"03","cause":"","result":"OK","error":""}
I think a locally configurable poll interval would be good for the local API.
Interestingly, the app when connected to the cloud seems to update very quickly. Not sure if this is just rapid polling or some kind of push.
Issue should be have fixed now in version 1.0.6!
All working for my ducted unit here.
Perfect thanks
Nice work, works perfectly! (local connection)
Out of interest what does iu_demand mean?
Does that =1 when unit is active?
Would this be useful as a sensor?
Similarly, would iu_err_code be useful to log/alert when in error state
Not sure what the temp conversion for the sensors is?
I can see the python module does a:
value = (int(value) - 5000) / 100
However, the basis I was working on was:
| float / 100 ) - 32 ) * 5/9)
Neither seems to be an accurate rendition!
I was just about to comment that the only thing I could see missing was the ability to disable the indoor LEDs, and I just saw you added that to your pyairstage library so hope to see that toggle in the HA integration at some point
Awesome stuff. The only thing I can see missing so far is the presence/person sensor?