How to send data to the property inspector? #141
-
How do I send data from the plugin to the property inspector using the Node.js tools? $SD.connection.sendJSON({
event: "sendToPropertyInspector",
action,
context,
payload
}); What is the equivalent for the Node.js tools? I was hoping for something like |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
I figured it out, for anyone else struggling with this: To send data to the PI: streamDeck.ui.current?.sendToPropertyInspector(payload); Which, in the PI code can be received using: SDPIComponents.streamDeckClient.sendToPropertyInspector.subscribe((ev) => {
//do stuff here
})` The other way around, to send data to the plugin: SDPIComponents.streamDeckClient.send('sendToPlugin', payload); Which can be received the SingletonAction class using: override async onSendToPlugin(ev: SendToPluginEvent): Promise<void> {
//do stuff here
} |
Beta Was this translation helpful? Give feedback.
-
Related to this, I'm wondering if anyone can give me some insight on the "Data Source" PI feature. It says I can add a datasource field to my sdpi html element, which Ive done like this (trying to directly copy the documentation):
and then I listen to the get request in the plugin via
The dropdown stops displaying "Fetching colors...", so it seems to be receiving a message from the plugin, but when clicking on it, there are no selectable options. Am I missing any steps here? Why don't I see "Black" and "White" as dropdown options? |
Beta Was this translation helpful? Give feedback.
-
Update: it looks like the API doesnt match the documentation. My
|
Beta Was this translation helpful? Give feedback.
I figured it out, for anyone else struggling with this:
To send data to the PI:
Which, in the PI code can be received using:
The other way around, to send data to the plugin:
Which can be received the SingletonAction class using: