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

**URL:** <https://community.homey.app/t/building-own-app-that-can-sustain-a-websocket-connection-to-a-3rd-party-platform/103492>\
**Category:** Apps\
**Tags:** app, homey-pro\
**Created:** [February 8, 2024, 12:18pm UTC](https://community.homey.app/t/building-own-app-that-can-sustain-a-websocket-connection-to-a-3rd-party-platform/103492 "2024-02-08T12:18:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![M\_Corten](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/m_corten/32/79647_2.png) [@M\_Corten](https://community.homey.app/u/M_Corten)\
**Post date:** [February 8, 2024, 12:18pm UTC](https://community.homey.app/t/building-own-app-that-can-sustain-a-websocket-connection-to-a-3rd-party-platform/103492/1 "2024-02-08T12:18:04Z")

</div>

Hello 👋 ,

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)

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [February 8, 2024, 12:21pm UTC](https://community.homey.app/t/building-own-app-that-can-sustain-a-websocket-connection-to-a-3rd-party-platform/103492/2 "2024-02-08T12:21:01Z")

</div>

That’s all possible (item #3 requires the use of the [Web API](https://athombv.github.io/node-homey-api/HomeyAPI.html#.createAppAPI), 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.

---

<div class="post-metadata">

**Author:** ![M\_Corten](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/m_corten/32/79647_2.png) [@M\_Corten](https://community.homey.app/u/M_Corten)\
**Post date:** [February 8, 2024, 12:29pm UTC](https://community.homey.app/t/building-own-app-that-can-sustain-a-websocket-connection-to-a-3rd-party-platform/103492/3 "2024-02-08T12:29:31Z")

</div>

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

so like this:

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

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [February 8, 2024, 12:35pm UTC](https://community.homey.app/t/building-own-app-that-can-sustain-a-websocket-connection-to-a-3rd-party-platform/103492/4 "2024-02-08T12:35:33Z")

</div>

> [@M\_Corten](#):
>
> by Web API you mean the local app on the homey has to use it?

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.
