helloworld
yet another personal website on the interwebs

An API for Maxxair MAXXFAN Deluxe

Van Hacking
ESP8266
Ventilation

As a software developer, it seems to be a natural urge to make everything controllable with an API. This time, I've built one for the main ventilation in my van. I installed a Maxxair MAXXFAN deluxe, which comes with a remote. With that you can control all the cool features this fan provides:

  • works bidirectional: it can either suck air in or push it out
  • it has a motor that opens and closes the hatch
  • you can either set a speed (0-10) or a temperature setpoint

So I've connected an infrared receiver to an ESP8266 and recorded all commands. For a couple of minutes I've tried to reverse-engineer the protocol, but when I noticed that replaying the commands totally did the trick, I've called it a day.

So long story short, here's what you need to reproduce this:

  • an ESP8266. I've picked the WEMOS D1 Mini as usual.
  • an IR diode. I'm no electronics expert, so I went with the Seeed Studio 101020026 IR-Sender. It has all the resistors in the right places.
Seeed Studio IR emitter
Seeed Studio Grove Infrared Emitter
  • Connect both the ESP and the diode with power (3.5V). I've added a DC-DC step down converter that reduces the fan's 12V down acccordingly.
  • Connect GPIO pin D2 with the TX pin of the diode
  • Open your fan, mount the diode directly in front of the receiver on the Maxxair PCB. You can actually mount everything inside the fan. There is space enough.
Location of the infrared receiver
Location of the infrared receiver
  • Compile and flash this sketch
    • you'll need to install the IRremoteESP8266 library
    • don't forget to set an SSID and WIFI password

Now navigate your browser to the IP address of the ESP, and you should see a primitive but functional web frontend with which you can control your fan.

At first I was a bit concerned about the reliability of this setup. However, it turned out to work actually super reliably - I've never seen a command that was lost in transit.

Related work