I'm doing some adjustments light brightness and gamma via the json-rpc API, and I see them working. But when I restart hyperion my adjustments are gone. They also don't reflect in the Web GUI. Is there a way to make these adjustments permanent?
Json-RCP API Adjustments not saved?
- sioux
- Thread is Unresolved
-
-
Everything that is set via remote control is lost after a restart, this is also the same in the WebUI.
Quote from WebUI - Remote ControlNote: All changes will be lost after a restart.
regards pclin
-
If I change settings in the Web UI for Image Processing on an Led Instance they do get saved after restart.
But why are the API changes not saved? What is the logic? I don't understand.
Is there another way to change the startup setting? Maybe in the sqlite database?
-
did you try to set the changes in the webui?
-
Yes that works. But I would like to script/automate it.
-
If I change settings in the Web UI for Image Processing on an Led Instance they do get saved after restart.
Could you share some screenshots how you do the changes and show where the changes adjustments are not saved?
Please include the Hyperion version and maybe your configuration.
But why are the API changes not saved?
The current public API is about controlling behavior of resources dynamically.
The API to configure resources is currently not officially/publicly available as additional security aspects need to be considered.
-
Here is some (shortened) Python code. Hyperion version 2.0.13. I would be very interested in the configure API.
Codes = requests.Session() s.post("http://127.0.0.1:8090/json-rpc", data = '{"command" : "instance","subcommand" : "switchTo","instance" : 2}') brightness = 100 gamma_red = 1.5 json = '{"command":"adjustment", "adjustment":{"brightness":' + str(brightness) + ',"gammaRed":' + str(gamma_red) + '}}' s.post("http://127.0.0.1:8090/json-rpc", data = json)
-
Hyperion Version 2.0.13. Apparently I'm not allowed to post code? How can I show what I'm doing?
This is basically what I'm doing but then with Python:
curl -i -X POST 'http://127.0.0.1:8090/json-rpc' --data '{"command" : "instance","subcommand" : "switchTo","instance" : 2}' --next 'http://127.0.0.1:8090/json-rpc' --data '{"command": "adjustment", "adjustment":{"brightness":100}}'
And I would be very interested in a configuration API.
-
I started with some changes re to expose the config API a while back, but need to check where I left…
Just for my curiosity, what is the problem that you would like to solve with a configure API which is not covered by the dynamic one?
-
Well I want to make a simple user interface for my users where you can only can change a few settings like brightness and maybe gamma/color correction. I don't want to give them access to the Hyperion web interface because they will make a mess and I can come over to fix it again. And I would like these settings to be saved on reboot. Alternatively I have to write a script to redo their settings on reboot, but if Hyperion crashes (and how would I know that?) they will get the old (my original) settings back. Or I have to do these settings every minute or something and that doesn't seem right either. If you have other ideas how to solve this I'd be more than happy to hear.
-
Ok. Thx for the background.
It was not clear from the initial statement that you are developing an app…
-
No problem. Do you have any recommendation for me? I do understand by the way that you don't want do save every on the fly adjustment to the database. That would take way to much time en resources. But maybe a save command in the API?
-
Quote
I started with some changes re to expose the config API a while back, but need to check where I left…
Did you look into the configuration API? Any chance you can share it with me?
-
I've created PoC for my automatic color calibrator via iphone camera and it works good for my setup but i can't save settings via available API, so, i still need to put numbers and save them manually.
Here you can see default RED color (255,0,0) against adjusted via camera (255,22,2). Camera feed used to compare tv screen with wall color, no need to have 100% white balance/color match in this case.
Some progress with WHITE calibration. Full automation, just clicking on button after proper camera position.
-
Any news on the configuration API?
-
sioux I am sorry that it took that long, but with the following PR, you can now make use of all API commands via single request.
Admin commands of course require bearer token authorization, but they are supported now.
Hope that you are still interested and might want to the PR 1727 with the new capabilities.
For simple PR testing, see here.
-
OK that is great news. And they get saved now?
-
If you use the saveconfig command yes
-
OK perfect. Thank you very much.
-
If you use the saveconfig command yes
Hi Lord-Grey,
i couldn't find any reference to a "saveconfig" command in JSON-API _Commands_Overview.md, JsonApiCommand.h and all other files. Did you mean "setconfig"?
wbr
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!