[HOW-TO] Controlling ADAX heaters using Homey

Hi everyone!

I’ve been using Homey as well as an ADAX smart heater for some time. Unfortunately, the latter doesn’t offer much apart from being Wi-Fi enabled. It doesn’t have many features, and although the ADAX 2 app now has Google support, for me, Amazon and HomeKit support would be ideal instead. But I digress.

What I’d like to describe in this post is how you can connect it to Homey then control it with a Flow.

It’s a bummer that ADAX doesn’t provide any APIs whatsoever. What’s more, it agressively protects itself (and the user) from being controlled in any other way. Consequently, it’s somewhat hard and complicated to make it work with Homey, and everyone has to perform the following procedure for themselves.

Let’s do it step by step:

Sniffing the app through a proxy

I’m on macOS, so I’m using an app called Proxyman for creating a proxy server on my computer. Then I set this as the proxy on iOS, on my iPhone.

  1. Launch Proxyman. Near the top, note the default port number, as well as the local IP of the computer. The IP can be displayed by Alt-clicking the Wi-Fi icon.
  2. Connect your iPhone to the Wi-Fi network, then open Settings, select Wi-Fi, and tap the (i) button next to the name of the network. Scroll to the bottom, select “Configure Proxy”, and type in the IP and port of the proxy you just created, e.g.
  3. Quit settings, then open the ADAX app. You should see this:

Now you’ll need another app, Postman. You’ll use this for testing whether sniffing the data and replaying requests worked.

Once you set a new temperature from within the ADAX app, search for the following line:

This contains all the information we’ll need: address of the website, cryptographic signature, and the value of the temperature. You should look for signature under body , in the lower left part. Like this:

Once this is done, launch Postman, and set it up as follows:

Content-Type application/x-www-form-urlencoded

  • Then, switch to Body, and add a key-value pair where the key is signature and the value is the signature you extracted from the data sniffed by the proxy:

Note that each different temperature setting has its own signature. This is of course meant to be a safety feature, but for our purposes, it’s just an annoyance. So basically you must repeat this process for a set of pre-defined temperature values in order to generate re-usable URLs. You’ll get different URLs containing the desired temperature at the end, along with a unique signature.

When you are done with each temperature setting and the corresponding URLs, the only thing that remains is obtaining some runnable code from Postman. Just click on the “Code” button, and it will spit out the code in many different languages.

Screenshot 2020-05-02 at 0.16.33

I ended up creating a PHP script on a Raspberry Pi, which I trigger in Homey, and the PHP in turn calls the ADAX system.

By the way, I’m pretty sure there’s a more elegant solution for this, but I don’t have enough experience with Homey for programming a virtual thermostat or running PHP directly from it, instead of having to call an external PHP file.

So, if you could help me with running cURL or sending a POST request in general, using Homey directly, I’d be very grateful, because then I wouldn’t need a separate webserver just for this purpose.

Of course, in return, I’d be happy to share the PHP I generated, in case someone finds it to be helpful.

I hope it helps :hugs:

1 Like

Thanks for sharing!

I know for a fact that Adax is working on their own app for use with Homey. So lets hope we have a more out of the box solution shortly.

Yeah I agree however we have been waiting for months now for ADAX to finally update the software. I really hope this will happen shortly but I’m not counting on it yet.

Update! Official ADAX App is out now!