Simple, cloud-free control for Mitsubishi Heavy Industries air conditioners with the WF-RAC Wi-Fi module (the module behind the Smart M-Air app). AirLAN talks to the units directly over your home network. It comes in two forms:
- an Android app (
android/) that talks to the units itself, and - a small server with a web app, for any phone or computer on the network.
Per unit you can:
- switch it on or off
- choose the mode: auto, cooling, heating, drying or fan only
- set the temperature (16–30 °C in 0.5° steps)
- have it switch off automatically after a set time: 30 minutes or 1, 2 or 4 hours in the app, 15 or 30 minutes or 1–6 hours in the web app
- switch it on and off by a schedule: in the app, rules for set times on chosen days (switching on in its last setting or in a chosen mode and temperature); in the web app, a time of day to switch it on
- set the fan speed (auto, quiet, low, medium, high) and the direction, at the bottom of the screen: up/down (swing, or highest to lowest) and, on units that have them, left/right (swing, five directions, wide or narrow) and 3D auto, which aims both vanes itself
- in the app, switch on a quiet outdoor unit, the SILENT button on the remote: it runs quieter, at less capacity (on units that have it)
That is all, on purpose. Indoor and outdoor temperature are shown along the way, and with more than one unit a compact tile per unit shows at a glance which ones run. Both follow the device's language (English and Dutch so far) and light/dark theme.
AirLAN is an independent project. It is not affiliated with, endorsed by or supported by Mitsubishi Heavy Industries. "Works with" means: tested against WF-RAC modules, see below.
Get AirLAN on Google Play, or download the APK from the latest release.
Want new versions a few days early? Join the AirLAN testers group with the Google account you use on your phone, then open the testing page with that same account and tap Become a tester. Other members cannot see who is in the group, and the group sends no mail. Leave the same way, any time.
What is confirmed to work, and what is not:
- Confirmed: Mitsubishi Heavy Industries indoor units with the WF-RAC module on the
HTTP firmware (wireless 010, MCU 131), on the developer's own three units, and on the
WF-RAC-HTTPSfirmware (wireless 025, MCU 200), reported by a tester with two units. - Untested: the
WCBN4612Lfirmware branch, see Supported firmware. Reports are very welcome. - Not supported: Mitsubishi Electric units (MELCloud, MAC-xxx Wi-Fi interfaces). They use a different system.
Found a problem, or does it work with your unit? Please open an issue; the form asks for the unit model and the versions that help most. Share diagnostics under a unit on the Manage units screen gives a report to paste in: the module's firmware and transport and the last requests with their result codes, without names, and with addresses cut to their last number.
The app finds the units on your Wi-Fi network, asks you to name them, and runs the switch-off timer and each unit's schedule as alarms on the phone, so they fire with the app closed and survive a restart. The phone has to be on the home network when they fire.
- The switch-off timer keeps trying for 75 minutes if the unit cannot be reached (see Limitations) and then notifies you.
- The schedule is a list of rules: switch on or off at a time, on chosen days (no day: once). A switch-on brings the unit back in its last setting, or in a mode and temperature the rule names. The unit screen shows the next switch and the week as seven bars; the schedule has its own screen, where the next switch can be skipped and the whole schedule paused until a date. A switch that fails is tried again until the unit's next switch (at most 12 hours), so a switch-on at 17:30 still happens when the phone comes home at 18:10. Only a failure while the phone was on the unit's network is notified; one missed because the phone was elsewhere is shown on the schedule screen.
- Anything the user does to the unit replaces a switch that is still being retried.
- Away from the unit's network (its address is not in the phone's Wi-Fi network) the app still asks the unit directly, which reaches units behind a router, but it never searches that network for it, and says Not on this network instead of Unreachable.
No air conditioner at hand? Try a demo unit (on the Manage units screen) adds a simulated unit, marked Demo, that works like a real one: power, the modes, temperature, and the timers as real alarms. It reports an indoor temperature that moves towards the set temperature while it runs. Its state is kept in memory only and starts afresh (off, cooling, 21 °C) whenever the app's process starts; the unit itself stays until you forget it. Network scans never find or touch it.
On Android 17 and newer the app asks for the Nearby devices permission, which Android
requires for talking to devices on the local network. Without it the app still opens
and the demo unit works; real units are not searched or contacted until it is allowed
(the Allow button on the Manage units screen). Older versions need no permission
for that. Android 16 has an opt-in test mode for this protection (the compatibility change
RESTRICT_LOCAL_NETWORK, off unless enabled with adb); with it enabled, allow Nearby
devices for AirLAN in the app's permission settings.
Build it with Android Studio, or from the command line with JDK 21 and the Android SDK:
cd android
./gradlew :app:assembleDebug # app/build/outputs/apk/debug/app-debug.apk
./gradlew :app:testDebugUnitTestPublishing on Google Play is described in docs/play-store.
- Node.js 22 or newer. No other dependencies.
- A machine on the same network as the air conditioners that stays on: the timers run in the server, so they only fire while the server is running. A Raspberry Pi, NAS or always-on PC works well.
- The units must already be connected to Wi-Fi (for example with the Smart M-Air app). AirLAN does not do the initial Wi-Fi setup.
git clone https://github.com/erdtsieck/airlan.git
cd airlan
npm startOpen http://<ip-of-that-machine>:8321 on your phone and use "Add to Home screen".
On first start AirLAN scans the local network for units, and the app asks you to name each one it finds. Not sure which unit is which? Switch it on from the app and listen, or match the MAC address shown with the one printed on the Wi-Fi module. The gear icon opens Manage units: search the network again (for a new unit), add a unit by IP address, put the units in the order you like, rename or forget one.
Searching asks the network by mDNS (the units announce themselves as _beaver._tcp) and
also probes the module's port on every address, because not every unit answers mDNS every
time. The probe covers networks up to /22 completely; on larger networks only the /24
around the server's own address. If your units live on a separate network (an IoT VLAN, for
instance), add them by IP address and make sure the server can reach port 51443 there.
| Variable | Default | |
|---|---|---|
AIRLAN_PORT |
8321 |
Port of the web app and API |
AIRLAN_DATA_DIR |
./data |
Where state.json is kept |
On Windows, start.ps1 -Install registers a task that starts the server at logon and
opens the firewall for the local subnet (it asks for elevation). start.ps1 -Uninstall
removes both. Logs go to data/server.log.
The WF-RAC module comes in three firmware branches:
| Branch | Transport | Status |
|---|---|---|
WF-RAC (e.g. wireless 010, MCU 131) |
HTTP | Tested on real units |
WF-RAC-HTTPS (e.g. wireless 025, MCU 200) |
HTTPS, legacy mbedTLS | Works, reported by a tester (reads and writes). Each request takes about 1.6 s |
WCBN4612L |
HTTPS, legacy mbedTLS | Implemented, not yet tested on real units |
AirLAN detects the transport per unit. If you have a WCBN4612L unit, please open an issue
with your result. Share diagnostics on the app's Manage units screen gives the firmware
branch, versions and transport in one report (the server has
GET /api/units/:id/diagnostics).
wfrac.js: the local protocol.POST <scheme>://<unit>:51443/beaver/command/<command>with a base64airconStatframe. The encoder and decoder are a port of pywfrac and are tested byte for byte against it. How a write deals with the account table and the write lock follows the WF-RAC module reference of the Mitsubishi WF-RAC Home Assistant integration.mdns.js: just enough multicast DNS to find the units by name.discovery.js: which addresses to probe, and the port probe.timers.js: the on and off timers: when they fire, when they try again, and when they give up.server.js: HTTP server and API. It discovers units, follows them when DHCP gives them a new address (asking mDNS first), registers AirLAN's account with each unit and runs the timers.public/: the web app.data/state.json: unit names, addresses, timers and this installation'sdeviceId. Timers survive a restart; a timer that expired while the server was down fires at startup.
| Request | Effect |
|---|---|
GET /api/units |
All units with their current state; name is null until the user names it. timers holds the time (epoch ms) of the pending on and off timer, or null; timerFailed ({ action, at }) is the last timer that gave up |
POST /api/units |
Body { "host": "192.168.1.50" }: add the unit at that address |
PATCH /api/units/:id |
Body with any of power (bool), mode (cool, heat, auto, fan, dry), presetTemp, fanSpeed ("auto" or 1–4: quiet, low, medium, high), vane (up/down direction: "swing" or 1–4, highest to lowest), vaneLR (left/right direction: "swing", 1–5 from left to right, 6 wide, 7 narrow), "3d" as vane and/or vaneLR for 3D auto, name. vaneLR is null, and vaneLR and "3d" are refused, for a unit that does not report its left/right vane (see below) |
PUT /api/units/order |
Body { "order": ["<airconId>", …] }: the order of the units; units left out keep theirs after the named ones |
DELETE /api/units/:id |
Forget the unit |
GET /api/units/:id/diagnostics |
A plain-text report for a bug report: firmware, transport and the last requests with their result codes. Addresses keep only their last number, the MAC its last four digits; no names |
PUT /api/units/:id/timers/off |
Body { "minutes": 1–360 }: switch off after that time |
PUT /api/units/:id/timers/on |
Body { "time": "07:00" }: switch on, with the last settings, the next time the server's clock reads that time |
DELETE /api/units/:id/timers/on, …/timers/off |
Cancel that timer |
PUT/DELETE /api/units/:id/timer |
The older name of /timers/off |
POST /api/scan |
Scan the network for units again |
Errors come back as { "error": { "code", "message" } } with code one of
unreachable, unit_refused, bad_response, invalid, not_found,
no_unit_at_address.
- Home network only. The units are reachable on the local network only, and so is AirLAN. Anyone on that network can control the units. That is also true of the module itself, which has no authentication.
- Account slots. A unit holds at most four accounts (apps or phones paired with it) and
refuses new ones when they are taken; it never pushes one out. Writing needs an account,
reading does not. All AirLAN clients, every phone and the server, register the same
account,
98c7ec9c-1dac-4e5f-8d16-a145f58a38db, so AirLAN takes one slot however many phones use it. That id is no secret and guards nothing: the module has no authentication (see Home network only). Writers are still told apart by a per-installationdeviceId. AirLAN 0.1.1 and older registered an account per installation; newer versions free that one and move to the shared account the first time they reach the unit. When a unit is full of other apps' accounts, the Android app writes asawsinstead: the operator id the module keeps for its own cloud connection, which it lets write without an account. That takes no slot. It was measured onWF-RAC010/131 andWF-RAC-HTTPS025/200; it is not documented, so a firmware update may close it, and then AirLAN says the unit is full (no_account_slot). Each start the app tries to register again, and goes back to its own account once a slot is free. Remove the unit from an app you no longer use to make room. - Write lock. After a write, the writer holds an exclusive 60-second write lock. If
someone just used Smart M-Air or a voice assistant, AirLAN may be refused briefly
briefly. AirLAN reads when the lock lapses (
expiresin the unit's status): a lock that lapses within 20 seconds is waited out, otherwise the app says how long it still runs (unit_busy). A timer waits it out by itself. - Hourly dropouts. The module drops off Wi-Fi about once an hour, a reset commanded by the air conditioner itself. Usually it is back within a minute, but sometimes it does not accept connections again until the next hour; roaming between access points or bands can cost 15–35 minutes as well. The timers therefore keep trying for 75 minutes, quickly at first and then every 5 minutes. A dedicated 2.4 GHz network for the units, with 802.11r and 802.11v off, makes them more reliable.
- Heating overshoots on purpose. In heating mode the unit aims for the set temperature plus 2 °C, so a thermometer at seating height can read warmer than the setting. That is the air conditioner, not AirLAN.
- Left/right vane and 3D auto. Offered once a unit has shown that it reports them. Units with the older bus protocol take the commands but always read back as swinging, so AirLAN cannot show what they are set to and leaves both out; ceiling cassettes have no left/right vane. A unit whose left/right vane is on swing looks the same as such a unit until it is set to a direction once, with its remote control or another app.
- Quiet outdoor unit. Silent operation is not part of the state the module reports: AirLAN can only ask for it, and asking takes the write lock like a write. So it shows the state it last set or read, and reads it only when you switch it. Set with the remote, it shows here once you switch it in the app. The module answers the switch with an error even when the unit took it, so AirLAN reads it back to know. A unit that does not know it hides the switch.
- One request at a time. The module accepts one connection at a time and about one request per second. AirLAN queues requests per unit, and only that queue talks to a known unit: a network search leaves the addresses of known units alone.
- Transport stays put. Once AirLAN knows whether a unit speaks HTTP or HTTPS, a unit that is out of reach or slow to answer keeps it. Only an answer in the other protocol makes AirLAN detect it again; trying TLS on a plain-HTTP module (or the reverse) would only keep its one connection busy.
- No
fetch. The module only reads a request body that arrives in the same TCP packet as the headers. Node'sfetchsends them separately and gets "501 Not supported this command", so AirLAN usesnode:http.
npm testThe tests use frames captured from real units (test/fixtures/live-frames.json) and
reference vectors generated with pywfrac (test/fixtures/pywfrac-vectors.json). To
regenerate those vectors:
pip install pywfrac==0.1.7
python tools/gen_pywfrac_vectors.pytest/fixtures/test-unit.key is a throwaway key for the local HTTPS test server. The
Android tests in android/app/src/test use the same fixtures.
No air conditioner at hand? node tools/fake-unit.mjs runs a stand-in that answers like
an HTTP-firmware unit, keeps its state and logs every change. It also refuses what the real
module refuses: writes from unregistered operators and request bodies with \/ escapes.
AirLAN controls heating and cooling equipment through an undocumented protocol. Use it at your own risk. The authors accept no liability for damage, energy costs or discomfort.
English is the source language. The app's text lives in public/locales/<language>.json;
it picks the first of the browser's preferred languages it has a file for, and falls back
to English for anything missing. To add a language, copy en.json to your language code
(for example de.json) and translate the values. Keep the {placeholders} as they are;
npm test checks that every translation has the same keys and placeholders as English.
The Android app keeps its text in android/app/src/main/res/values/strings.xml (English)
with one values-<language>/strings.xml per translation.
Available: English, Dutch.
We take Pull Requests! See CONTRIBUTING.md.