Json-RCP API Adjustments not saved?

  • I am really sorry!

    Yes, I meant the setconfig subcommand.

    Hi,


    thank you for the clarification (mistakes happen :) ).


    And also thank you for the extensive revision of the JSON API. I'll play around with it a bit.


    Do you know off the top of your head whether you can now use setconfig to change individual settings or whether a complete configuration is still expected?


    wbr

    • Official Post

    Do you know off the top of your head whether you can now use setconfig to change individual settings or whether a complete configuration is still expected?

    I would need to try myself…

    My current understanding is that you need to have a complete config per config element defined by its schema. There is no need to save the complete Hyperion config DB.

    You can get the schemas via API call too.

    e.g. if you want to update the smoothing config, you write it along the smoothing schema.


    For easier reference, Schemas can be found here.

  • Hi Lord-Grey,


    thanks. I needed a way to switch between inputs of my UTV007-grabber in the past. I've coded some bash scripts triggered by LIRC. While working on it i realized that i have to read whole config (getconfig), modify the input setting and then write whole config back (setconfig). It was not possible to write back changed settings only, because all other config items where resetted to defaults. But that's not a problem if you know about it.


    wbr

    • Official Post

    Let me have a look to extend the getconfig command that you can provide the config types as a filter....


    Something like the following....

    Code
    {
    "command":"config",
    "subcommand":"getconfig",
    "types": ["smoothing", "device"],
    "tan":1
    }


    Then you can get the config of a type, update the elements and write back the config type via setconfig.

    Edit: Ok. Seems more complex than I thought.... setconfig currently cannot write one type.... :(

    • Official Post

    Here you find the documentation for 2.0.16.

    For the latest changes in 2.0.17 beta, I would still need to do some updates to the docs.

    In case you are stuck, ask…


    Edit: In the PR description you already find some details on additions and changes.

    Refactor Hyperion JSON-API by Lord-Grey · Pull Request #1727 · hyperion-project/hyperion.ng
    Summary Breaking Align JSON subscription update elements. ledcolors-imagestream-update, ledcolors-ledstream-update, logmsg-update now return data via data and…
    github.com


    Edit2: I am not fully happy with the current get and set config command.

    So we can discuss how to better shape them.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!