Implement SSE (in combination with OAuth2)

I’m implementing an app that uses eventing (SSE) to get updates from the device.

I have implemented a driver and device using the Homey OAuth2 app and everything is working fine (requesting devices, getting the state, etc).

They also supply eventing url’s but I don’t know how to implement this in Homey. I tried using EventSource but nothing seems to happen.

Does anybody have an example for me how to implement this? Or is this not possible in the current Homey implementation and do I need to implement the good old polling mechanism?

You need a Node.js implementation for EventSource, like this one.