Homey Community Forum

Connecting to the Homey API?

Hi All,

I see some great alternatives here with HomeyDash and some other alternatives, but I want to be able to fully customize and maintain the dashboard (reinvent the wheel). I’m a web and windows developer myself, with some knowledge of Unity as well and that one lets me deploy to Android and a lot of other platforms.

So I’m actually thinking about creating a whole new dashboard build upon the Unity engine and made cross platform with that so I could publish it to any kind of tablet.

This would allow me to create all kind of neat looking controls, but my main issue is the communication to Homey. There seems to be a web API (https://api.developer.homey.app/) but it is not open to the public.

HomeyDash seems to be using Homey Ink credentials and methods, but that would add another layer of dependency. It must be possible to talk directly to the Homey API?

I thought about having the dashboard app fill a queue of Homey commands and run a HomeyScript within Homey processing the queue, but that is also causing performance and overhead.

I’m requesting the web API key, but it seems only for companies. Anyone ever tried something similar already? Do they change that API a lot after every release? If it’s not a stable API I’m rethinking putting a lot of time and effort into this :slight_smile:

Homeydash’s dependancy on homey.ink is for authentication only, once there’s a token it no longer uses homey.ink.
Whatever you’ll build will have to authenticate against Athoms infrastructure, might as well piggyback on something existing (as you will not be getting an API key). Never looked into it but maybe can do it transparant to the user.

The Web API is very stable and hasn’t really changed a lot over the years. However, Athom just doesn’t seem to be interested in making it available to the public.

Curious where you guys got that information from, if you contact Athom support with a (valid) request for API keys, they will give it out (and have done so a few times already for community members).

There is just no easy way yet to get the keys.
They have been busy with it, combining it with the app store, but I guess it is really low on the priority list.

Except for Homeydash (although perhaps Athom’s stance towards this (valid) product has changed since the last time it was asked).

It seems you can access the API for local development:

While the Web API is not yet available, you can use these API Credentials to test your project locally.

Key Value
Client ID 5a8d4ca6eb9f7a2c9d6ccf6d
Client Secret e3ace394af9f615857ceaa61b053f966ddcfb12a
Callback URL http://localhost , http://localhost/oauth2/callback
Scopes homey

So I should be able to run a proxy service locally on the LAN and expose that over the internet if that works. Think I will try that while waiting response if they would allow me a API key.

They also indicate “is not yet available”, don’t know how long that phrase is there already, but raises hope that it would be available some day.

And a wear os app (abandoned unfortunately, but still available), and there was an mobile app made by I believe a Russian? First with a work around, later officially

Those were the public ones, but i think there have been more keys given out.

I requested the key, but got a response that because of Covid-19 it could take a whiiiiile before a receive any answer.

While the dashboard would be installed on the local network anyway it should be able to connect to the localhost API already. Perhaps I don’t even need the proxy or a public key for this. I was thinking about running the application logic on Azure Cloud, but if I integrate it all within the app itself it could simply work.

Isn’t it a bit weird that all homey’s seem have the same client id and secret key locally? So I could create an app that would work as soon as I plug it in to anyones LAN and have full Homey access with it?

You still need to login (oauth) to their account to be able to manage their Homey.

Athom in COVID-19 times: “Let’s build a Homey Cloud service and design an entirely new device to go with it!”

Also Athom in COVID-19 times: “No sorry, generating a few API keys is going to take a while…”

Well this sucks :slight_smile:

Thank you for contacting Athom support.
Sadly we are not allowed to share any API keys.

Great how nice and open Homey is for developers… not…

You can’t even seem to authenticate locally. Others all seem to be using homey.ink to get a unlimited token from there ( [Unsupported] Homey v2 REST API - Developers - Homey Community Forum (athom.com)).

Why would you local homey not simply provide a REST API to authenticate to? For now this seems like the best cumbersome way to do it:

Getting a bearer token - Homey (solweb.no)

1 Like

Correct, Athom thinks that authenticating through the cloud is more secure than local authentication.