-
-
Notifications
You must be signed in to change notification settings - Fork 514
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
Internal Button action : Change PNG #2906
Comments
We want to discourage direct access to other buttons as this leads to a complex and error prone style of programming. |
I have the same issue. Here's what I'm trying to accomplish.
Basically, I'm looking for a way to dynamically set the PNG for a button from either an action, or an external script via the HTTP API. It can input base64 encoded PNG, a filename, a URL, etc. |
This is all well and good for most normal uses. I understand the reticence to expose functionality that can be abused. But there are some legitimate cases that cannot (apparently) be handled any other way. |
Have you considered making a custom module? As it would be trivial to do the sort of thing you're looking to accomplish within a module, and is already what many productions do for needs that can not be met using the default Companion actions/feedbacks. |
I'm a developer but have not gotten that far deep into Companion. Where would I start to develop a custom module? How is it deployed? Documentation on this process... ? Thanks! |
The other thought that I have in response to this is that buttons support changing the text dynamically... what is so different about changing the image? It's essentially just another attribute of the button. In our case, because we have Korean text that doesn't work in the text field (shows up as Unicode boxes as character placeholders), we are forced to use images already in many cases where text would be preferable. |
The Wiki has a Module Development 101 guide https://github.com/bitfocus/companion-module-base/wiki/Module-development-101, that's a great place to start. For private modules that you don't need included in Companions official builds are quite easy to make and there's templates available.
I don't know the reasoning, it's not something that was discussed as far as I'm aware. One other option I just thought of, is in the Companion settings you can enable the deprecated API, so while not a permanent solution (unless you fork Companion and prevent it being removed in the future) that will give you a HTTP endpoint to edit the PNG64 of any button, provided you have a png64 encoded PNG. For example a GET request to I was the one that added that API functionality, and at the time provided the ability to change all style properties. |
That functionality is also in the non-deprecated portion of the api. Nothing got removed in the revised api |
Ah, perfect, even better then! In that case the docs for using that as change the PNG of any button can be found on the Getting Started page in the Companion Web UI > Remote Control > HTTP Remote Control. |
Thanks... API access would be perfect for me since I already have a background process that I use for various purposes, talking to StreamDeck and other moving parts. I actually checked there (Remote Control > HTTP Remote Control) before, and the API to change PNG is apparently not documented there. (docs/5_remote_control/http_remote_control.md) In the code (companion/lib/Service/HttpApi.js) is it the style route with a png64 query (e.g. /api/location/<page>/<row>/<column>/style?png64=<base64_png>)? Is the png64 value just a straight-up (URL-encoded) base64 version of the PNG binary file? |
Is this a feature relevant to companion itself, and not a module?
Is there an existing issue for this?
Describe the feature
It's actually possible to change the text, the text color and the background, but I would like to change the PNG of a button on the StreamDeck, and eventually on another StreamDeck on the network.
Usecases
To let different operator on the show to identify their status to a show caller.
The text was updated successfully, but these errors were encountered: