Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Context ID is unknown until event is triggered on StreamDeck #39

Open
avarabyeu opened this issue Aug 30, 2024 · 1 comment
Open

Context ID is unknown until event is triggered on StreamDeck #39

avarabyeu opened this issue Aug 30, 2024 · 1 comment

Comments

@avarabyeu
Copy link

Hey. First of all, thx for an amazing plugin.
I was wondering if there's any chance to receive context ID (aka uuid) when websocket connection is established.
My use case: stream deck is connected and websocket server is started afterwards (not a node red, custom one). After ws connection is established, there's no way to send an event pro-actively since context ID is unknown.
It would be nice to receive it as http header or have a possibility to request it somehow for given remote server

@ybizeul
Copy link
Owner

ybizeul commented Aug 30, 2024

Hi, if I got your question correctly, I think the answer is that you can't do this as you describe it, the API is called only when something is happening, and that's what I'm forwarding alongside the context ID.

That said, when streamdeck starts, it pushes an event for every key, that's your chance to get thir context id and cache it. It's the method I use in the node red plugin to learn all the keys so you can push an arbitrary event whenever you want.

In other words, run your WS server, and restart streamdeck software, you should see willAppear event for each key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants