Update LED layout and set image crop over API?

  • Hi folks,


    I have a custom script that needs to update LED layout (hmin etc.) and image crop factors (cropLeft etc.). Is there a way to do it over JSON API? I've tried this:

    but it says

    Code
    {
     "command": "",
     "error": "Errors during message validation, please consult the Hyperion Log.",
     "success": false,
     "tan": 0
    }

    The log doesn't show any messages in the UI (even when I change it to "Verbose" mode). Any other ideas here?


    For context, my script detects LED layout etc. from a camera capture, and I'd like to automatically set these values when it runs, instead of having to ask users to copy-paste them into the UI.


    Thanks

  • OK thanks! Thought I tried that yesterday, but probably didn't reload. So looks like that command may not be supported :/

    Code
    [hyperiond HTTPJSONRPC] (ERROR) While validating schema against json data of 'JsonRpc@::ffff:<client-ip>':[root].command: Unknown enum value (allowed values are: ["color","image","effect","create-effect","delete-effect","serverinfo","clear","clearall","adjustment","sourceselect","config","componentstate","ledcolors","logging","processing","sysinfo","videomode","authorize","instance","leddevice","transform","correction","temperature"]) 
  • Oh! Actually it may be supported through

    Code
    {
     "command": "config",
     "subcommand": "setconfig",
     ...
    }

    Which requires authorization.. reading up on it now, ?this is it! (I can also see the relevant sections through "getschema" subcommand)

  • Hmm, I've generated the token through the web UI and trying to attach it to the HTTP requests using

    `Authorization: token <token>` header, but it still says "No Authorization"... I've also tried just `<token>` and `Bearer <token>`, but it still doesn't work, and the debug log doesn't show an error.


    EDIT: I'm connecting over local network, and did check "API Authentication" and "Local Admin API Authentication" also, which are required for this method according to https://github.com/hyperion-pr…bsrc/api/JsonAPI.cpp#L853

    • Offizieller Beitrag

    dinvlad Bear in mind that the configuration API is not an officially exposed one. There might be negative side-effects when doing inconsistent updates to the configuration.

    I just mention, in case you see unexpected misbehavior…

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!