Philips Hue API v2 Events (Server-Side Events)
Hello everyone,
First of all, hope you all had a very nice Christmas, with all the beloved ones.
I'm using some Philips HUE sensors, and I was actually using some of them to turn KNX lights on.
The problem, is that we need to constantly pool the API, which is time and resource consuming for the HUE hub and Comfortclick.
Philips HUE updated the API to the v2, and they have some interesting features, like the events, which allows to keep a constant connection to a data stream, and get realtime updates without the need to constantly pool the HUB.
https://developers.meethue.com/develop/hue-api-v2/migration-guide-to-the-new-hue-api/#Event%20Stream (Login needed to see the API docs)
Side note:
I have to trick the HUB about the sensor. The sensor needs to be active, and for that at least one HUE light has to be linked. But on my case I don't want to turn on any HUE light, but rather a KNX light. For that, I link the sensor to a random HUE light, and set the actions to do nothing when detecting movement (so I can just extract the true motion from the json).
Back to the topic:
So I've tested the curl command, and I really get the realtime updates, and it looks awesome.
Problem: I can see this realtime updates on the Windows console, by using the curl command, as stated on their documentation:
curl --insecure -N -H 'hue-application-key: ' -H 'Accept: text/event-stream' https:///eventstream/clip/v2
But, I would like to do this on ComfortClick. I've tested several options, but none of them worked.
Anyone can eventually enlighten me, if it's doable?


Sorry, I've pasted the command with some missing info. Here's the correct curl command:
curl --insecure -N -H 'hue-application-key: hue_app_key' -H 'Accept: text/event-stream' https://hue_ip_address/eventstream/clip/v2
Example of a real time update on the data stream coming from the HUE sensor:
id: 1672012139:0
data: [{"creationtime":"2022-12-25T23:48:59Z","data":[{"id":"b89c6bec-90cf-44fe-8bfb-7bbb886dbc6f","id_v1":"/sensors/38","motion":{"motion":true,"motion_valid":true},"owner":{"rid":"cf9bd628-7c47-44f7-9794-1a08d6baf345","rtype":"device"},"type":"motion"}],"id":"c3f9ec9c-d672-422c-904f-7982d8759a79","type":"update"}]
The ideia would be using this constant connection on ComfortClick to trigger other cool stuff, so we could abandon the constant API pooling. But unfortunately I'm not getting there (probably due to the overconsumption of Christmas treats).
Best regards