Developing an app for Danfoss Ally API

I use Tuya as well and I agree it’s a bit buggy however it supports the Danfoss sensor and if you put it in the same room as the thermostat it uses the sensor as temperature reference which is a significant feature imo. Danfoss Homey app doesn’t support this so hopefully this feature @Doekse this will be implemented as well if talks with Danfoss succeed.

Ok now everything really changed for me. I was pondering for a long time if I would "vibe-code” something regarding this and now I finally tried it out. And it worked like a charm. What I have now:

  • All thermostats are connected to Ally Gateway and are also controllable through the Ally App in my phone with all the features like “vertical mounting” etc
  • Homey connects to Danfoss Ally API and is able to set temperatures to all thermostats
  • I am also able to read all data from thermostats (27 values that contain data and the settings information for every thermostat)
  • Example information that I am able to get below - heating demand for each of my 7 thermostats in variables (value being 0-100). I can now show these also as insights graphs.

What I did:

  • I asked ChatGPT to write me the scripts in HomeyScript
  • After a few rounds I have a few scripts that take care of token retrieval and renewal, setting the temperatures and gets the data on 15 minute intervals and saves selected data values to Homey variables
  • This is not an app, so it’s not usable to anyone else but me - theoretically I could share the scripts, but the recipient should understand basic programming to use these
  • This basically took a few hours of my time and was much easier than I thought

Of course, it would be even better if there was an official app that connects to Ally API, but I am afraid that it would still be missing some features like getting the heating demand. So I might even still continue to use my solution.

So yeah, while I originally thought I would implement an app, I am completely happy with this solution now. Probably I could vibecode the app also quite easily, but I will leave that to experts, like Athom :wink:

That’s no solution! Keep the topic open until we have what we really want! :wink:

I’ve had good succes with vibe-coding two Homey apps this weekend (flow actions for a football match API and flow actions for public transport departures) using Claude Code. It even did some great updates on my Spotify Connect app - these successes lead me back to this topic because, like you, I’m eager to integrate my Danfoss Ally in Homey.

Would you be able to share the code that’s working for you? Could save me the first few hours of reverse engineering the Ally app on my phone. Since they’re just a heating company first (in the words of doeke, haha, but I agree!), I wouldn’t be surprised if reverse engineering leads to a perfectly working app. You kind of shown that it does.

I’m planning on diving into this somewhere around the start of the new year, so no rush! And thanks for your effort so far - at least we’re a step closer!

For now I’m going to check if Claude Code can understand the HomeAssistant code shared by Cristiaan last year and translate that to a Homey app. Who knows.. after seeing the results of this weekend I would be surprised if it worked.

Claude did an impressive job porting the HomeAssistant plug-in. I’ve got it working on my Homey: it sees the icon2 (static device, no options), room sensors (humidity and temperature) and thermostats. The default cards for these types of devices work out of the box.

All info in the dedicated topic:

You are right. It was the solution for me, but obviously not for anyone else. I might try out your app at some point!

1 Like