Replies: 2 comments 15 replies
-
hey @buffos
Making this generally available on a plugin basis is likely a call for trouble, because then a plugin relies on (or needs) another plugin to add functionality |
Beta Was this translation helpful? Give feedback.
-
Hi @buffos https://github.com/ybizeul/StreamDeckWS or with HomeAssistant: or using MQTT: Just google for it and you will find many more... If many plugins want to use the same functionality, then that's a good sign you need a background-service like our very own https://www.youtube.com/watch?v=dDIl5CqJwRo That way all plugins interested in communicaton with the service can install it and talk to it... btw: Multi-Actions don't rely onto each other, but execute their actions one after another |
Beta Was this translation helpful? Give feedback.
-
Motivation
As is now, it is very hard to make inter-button communication.
For example, I want to create an internal OSC server to listen to state changes on buttons and inform them (or web server) etc.
How could it be implemented?
Following the current form of the API, we can add two functions. One to the StreamDeck and one to the Actions class to override:
streamdeck.SendDataTo("keyString", dataObject)
andaction.Subscribe("keyString",obj, callbackfn)
The form of Subscribe allows adding subscriptions to many keys.
Usage
What this means is that actions will subscribe to these key changes and act if they are interested.
Keys can be URLs, OSC paths, names of applications, or anything else, and inter-button communication is very easy this way.
We could probably simulate that by setting values in global settings with a certain key and then deep linking to notify the action, which will read the global settings key and act accordingly, but this is too error-prone.
This will make it easier to make more general plugins.
For example, I have a service, and I publish new data every n seconds. I create my plugin, you set the interval rate, and the plugin publishes some keys. Any plugin can read and react to the values published.
Beta Was this translation helpful? Give feedback.
All reactions