Homebridge MHI WF-RAC
This is a Homebridge plugin for Mitsubishi WF-RAC air conditioners controlled by the Smart M-Air app.
This plugin exposes three services to HomeKit as one device: a thermostat service for HEATing and COOLing (or AUTO), a fan (additional to the thermostat, or standalone for FAN mode), and a dehumidifier.
The devices are automatically discovered on the local network (using mDNS bonjour).
Prerequisites
- Smart M-Air App Configuration: First, configure the devices with the Smart M-Air app according to the normal instructions provided by Mitsubishi.
- Homebridge Setup: Ensure you have Homebridge installed and set up on your system.
Installation
-
Install the Plugin: Install this plugin using Homebridge Config UI X or via the command line.
npm install -g homebridge-mhi-wfrac
-
Update Homebridge Configuration: Update your Homebridge config.json
file with the platform configuration, setting the Operator ID that corresponds to your Smart M-Air app.
Operator ID
You will need to set the Operator ID of the app you configured.
The Operator ID is a UUID that is randomly generated by the Smart M-Air app and registered as a remote control device to your air conditioner.
To find the Operator ID, you can do a simple curl
request to the air conditioner's IP address.
curl http://<air-conditioner-ip>:51443/beaver/command -d '{"apiVer":"1.0","command":"getAirconStat","deviceId":"<deviceName>","operatorId":"1234567890","timestamp":1722259820}'
This will return a JSON response with the current status of the air conditioner, including a remoteList
array with the Operator ID(s) that are registered to the air conditioner.
Notice that for getting the device status, you also need to provide a operatorId
in the request, but it can be any random string.
Also, the timestamp
can be any number, but it must be a valid UNIX timestamp.
For setting the status of the air conditioner, you will need to use the Operator ID that is registered to the air conditioner and a valid recent timestamp.
In the future, it would be possible to register the homebridge plugin as a separate remote control device on first discovery, but for now, you will need to use the Operator ID of the Smart M-Air app.
Specific Homekit behavior
- Thermostat: turning the thermostat off will turn off the air conditioner. Turning it to heat, cool or auto will turn on the air conditioner and switch to the corresponding mode as expected.
- Fan: turning the fan on while the thermostat is turned off, will turn on the air conditioner and switch to fan mode. The thermostat will be displayed as off in this case.
- Fan speed: Fan speed 0% means auto mode, 25% means low speed, 50% means medium speed, 75% means high and 100% means highest speed. In fan mode, however, switching to 0% will turn off the fan. So, even though the device supports it, you cannot set your air conditioner to fan mode with fan speed auto via Homekit. Notice that Homekit does know an AUTO TargetFanState (which we try to support), but it doesn't seem to be implemented as nicely in the Home app as we would like it.
- Dehumidifier: turning the dehumidifier on will turn on the air conditioner and switch to dehumidifier mode. The thermostat will be displayed as auto mode in this case (as you are able to set a target temperature in drying mode), and effectively cooling or heating depending on the current and target temperature. Controlling the fan is not possible in dehumidifier mode as the air conditioner does not support it.
- Temperature: For some reason, temperatures are not reported on .1 decimals in Homekit, even though we know a more accurate value. The target temperature should be between 18 and 30 degrees, with 0.5 degree increments.
- Humidity: We do not have humidity sensors in the air conditioner, so the humidity is not reported, resulting in a Homekit value of 0%.
- Outdoor temperature: We do not (yet) report the outdoor temperature, though we could provide a separate accessory for it.
Limitations
- Fan Direction Control: The horizontal and vertical direction of the fan cannot be managed via Homebridge, as HomeKit does not provide a suitable service for this. There is RotationDirection and SwingMode, but they seem too limited for this purpose (though perhaps the 3D auto swing could be implemented as a SwingMode). You should configure these settings in the Smart M-Air app or via the remote control, Homebridge will not override these settings.
- Outdoor Temperature: The outdoor temperature is not implemented yet (we should provide a separate accessory for it).
- Error Handling: The plugin does not handle errors from the air conditioner yet, so if the air conditioner is not reachable, the plugin will not be able to recover from it.
- Error codes: The plugin does not provide device error codes or other status information yet (firmware version, electricity usage, etc.), though it could be implemented in the future because the air conditioner does provide this information.
Contributing
We welcome contributions to this project. If you have an idea for a new feature or have found a bug, please open an issue or submit a pull request.
License
This project is licensed under the Apache-2.0 License. See the LICENSE file for details.
Acknowledgements
This plugin was developed taking inspiration from the https://github.com/edwinvdpol/com.mhi.wfrac Homey app by Edwin van der Pol.