bitfocus / companion-module-generic-websocket

Used for generic websockets
MIT License
4 stars 9 forks source link

Filter on Websocket message #23

Open MrJekylleOFF opened 6 months ago

MrJekylleOFF commented 6 months ago

Hello ! I have a little problem with ur websocket module

In the feedback field "Update variable with value from WebSocket message" i can't filter the event what i want so the variable change when other event is send

exemple: Message received: {"id":18446744073709551615,"data":{"Patch":[{"op":"replace","path":"/mixers/S201210970CQK/levels/volumes/Music","value":75}]}} Message received: {"id":18446744073709551615,"data":{"Patch":[{"op":"replace","path":"/mixers/S201210970CQK/levels/volumes/Mic","value":30}]}}

I can’t differentiate the two to set them on two different variables when one is update all change in same time

i want to filter with the path value like Variable 1 is the value of the path "/mixers/S201210970CQK/levels/volumes/Music" Variable 2 is the value of the path "/mixers/S201210970CQK/levels/volumes/Mic"

chrisspiegl commented 4 months ago

I found a way to get into the details of the messages and adjust variable values based on the messages received using the Triggers in Companion.

There, I then set a custom variable based on the last message received with JSON capable reading and formulas.

To do this, you have to:

I set up a handful for some web socket implementations. And I always set up one that's a generic LastMessage variable so that I can set up a trigger based on that.

Feedback to Set the Variable

Xnapper-2024-06-06-10 42 49

Trigger to further work with the last message

Xnapper-2024-06-06-10 30 04