Hi everyone! I’m thrilled to share my recent success in integrating my Fujitsu Airstage air conditioner with Openhab. This journey was a mix of curiosity and determination, and I’m excited to walk you through it.
My Setup
I have the Fujitsu ASYG12KMCF model, which comes with built-in Wi-Fi, making it a perfect candidate for local network integration without the need for additional dongles. My goal was to control the AC directly through Openhab, bypassing the Fujitsu cloud.
The Process
-
Understanding the REST API:
The Fujitsu Airstage system provides a REST API that, unfortunately, isn’t well-documented. I relied heavily on GitHub - danielkaldheim/ha_airstage for guidance. -
Configuring Openhab:
- HTTP Binding: This was crucial for sending and receiving REST requests.
- JSONPATH Transformation: Used to parse the JSON responses from the AC.
- Java Script: Custom scripts were written to handle commands like turning the AC on/off, changing the temperature, and adjusting the mode.
-
Channels Setup:
- Power Control: On/Off functionality.
- Temperature Adjustment: Both retrieving and setting the target temperature.
- Mode Selection: AUTO, COOL, DRY, FAN, HEAT.
-
Custom Scripts:
I created several JavaScript files to handle different aspects of the AC’s functionality. For example,airstageSendTemp.jsconverts the desired temperature into the format required by the API.
Challenges and Solutions
- Parsing Responses: Initially, I struggled with correctly parsing the JSON responses. Using JSONPATH made this process much smoother.
- Temperature Conversion: The API requires temperatures to be sent as multiples of 10 (e.g., 190 for 19°C). A custom script handles this conversion seamlessly.
Final Thoughts
This integration has been a game-changer for my smart home setup. The ability to control my AC through Openhab has added a new level of convenience and automation. I’m now exploring how to integrate this with my existing routines, like automatically cooling the room when I arm my security system.
If you’re considering this integration, I highly recommend starting with the GitHub repository I mentioned. It’s a fantastic starting point, and with a bit of tweaking, you can tailor it to your specific needs.
Happy automating! ![]()
![]()