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

[Issue] Changing picture based on Expected Value String doesnt work. #17

Open
AquaCobell opened this issue Dec 4, 2023 · 4 comments
Open

Comments

@AquaCobell
Copy link

My get request looks like this
image

image
image

Am I doing something wrong or is this a bug?

@dannyyy
Copy link

dannyyy commented Dec 17, 2023

I have the same issue. Image isn't changing at all.
In addition, I have no idea how the Periodically poll a URL for status works. Do I have to copy just the initial URL again? Does it uses the same headers? Should it apply the same image change for matching / unmatching results?

@m-10-c
Copy link

m-10-c commented Jan 13, 2024

I was able to figure out a solution via debugging - setting the registry value mentioned there and debugging via Chrome helped further.

The below config parses a json value returned from Portainer REST api, endpoint "portainer/api/endpoints/2/docker/containers/json". The returned json is a list, so I need a list index first and then access the json field "State". List index works without brackets or root element here, just give the index number. However, I couldn't get it working without entering a json path.

The button config above the section "periodically poll..." is basically used when you press the streamdeck button manually, while the polling section is used for the automated refresh.
If you want to have the same action done manually and periodically, you need to give the request url twice (json path and expected value if different).
Apparently the request headers are used for both manual and periodic requests.
It seems you can send different requests for manual and periodic execution, but the button state is evaluated from both results. So either set json path and expected value for manual action to values matching the manual action json result, otherwise it seems that it is also valid to set json path to * and keep expected value empty to have the result matching always.

Hope this helps.

grafik

@AquaCobell
Copy link
Author

@m-10-c
I had to read it three times before I understood your reply, but now it finally works.
Thank you soo much :)

@AquaCobell
Copy link
Author

either I'm missing something or it doesn't work again.
grafik
grafik

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

3 participants