Building own app that can sustain a websocket connection to a 3rd party platform

Hello :wave: ,

I am a software developer and we are building a 3rd party platform that supports API calls over web sockets. We would like to integrate a homey pro to our platform but for that we need to know if the following is possible.

  1. write our own homey app that can connect by websocket to our platform on boot
  2. sustain the connection (as in our app will not be killed)
  3. the homey app should notify our platform if for example a specified hue lamp tuns on)

That’s all possible (item #3 requires the use of the Web API, which requires additional permissions but shouldn’t be a problem).

Do make sure your websocket connection is resilient against lost connections, Homey doesn’t have a great track record when it comes to long-living network connections.

1 Like

question, by Web API you mean the local app on the homey has to use it?

so like this:

3rd party platform
| (websocket connection)
homey with app running
use local web api to get information about devices etc.?

Correct, only with the Web API are apps able to retrieve information from (and optionally control) devices from other apps. For instance, my app HomeKitty uses it to expose devices to HomeKit.

1 Like