JSON Api

  • Hi, I am in trouble trying to use the JSON Api.


    I am sending
    curl -X POST --http0.9 -d '{"jsonrpc": "2.0", "params": {"command": "serverinfo", "tan": 1}}' <hyperion_ip>:19444


    But I get

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


    And the logs shows "Failed to parse json data from JsonRpc / Illegal value"

    2022-07-21T12:48:19.117Z [JSONSERVER] (DEBUG) (JsonServer.cpp:101:newConnection()) New connection from: ::ffff:<client_ip>
    2022-07-21T12:48:19.119Z [JSONCLIENTCONNECTION] (ERROR) Failed to parse json data from JsonRpc@::ffff:<client_ip>: Error: illegal value at Line: 0, Column: 1, Data: 'POST / HTTP/1.1'
    2022-07-21T12:48:19.120Z [JSONCLIENTCONNECTION] (ERROR) Failed to parse json data from JsonRpc@::ffff:<client_ip>: Error: illegal value at Line: 0, Column: 1, Data: 'Host: <hyperion_ip>:19444'
    2022-07-21T12:48:19.121Z [JSONCLIENTCONNECTION] (ERROR) Failed to parse json data from JsonRpc@::ffff:<client_ip>: Error: illegal value at Line: 0, Column: 1, Data: 'User-Agent: curl/7.81.0'
    2022-07-21T12:48:19.122Z [JSONCLIENTCONNECTION] (ERROR) Failed to parse json data from JsonRpc@::ffff:<client_ip>: Error: illegal value at Line: 0, Column: 1, Data: 'Accept: */*'
    2022-07-21T12:48:19.123Z [JSONCLIENTCONNECTION] (ERROR) Failed to parse json data from JsonRpc@::ffff:<client_ip>: Error: illegal value at Line: 0, Column: 1, Data: 'Content-Type: application/json'
    2022-07-21T12:48:19.125Z [JSONCLIENTCONNECTION] (ERROR) Failed to parse json data from JsonRpc@::ffff:<client_ip>: Error: illegal value at Line: 0, Column: 1, Data: 'Content-Length: 86'
    2022-07-21T12:48:19.126Z [JSONCLIENTCONNECTION] (ERROR) Failed to parse json data from JsonRpc@::ffff:<client_ip>: Error: illegal value at Line: 1, Column: 0, Data: ''


    Any thoughts ?

    • Offizieller Beitrag
    Zitat von lzno

    I am sending

    curl -X POST --http0.9 -d '{"jsonrpc": "2.0", "params": {"command": "serverinfo", "tan": 1}}' <hyperion_ip>:19444

    Is not your seriousness?

    You have to enter something meaningful!


    regards pclin

    • Offizieller Beitrag

    Example: Set a cyan color for 12 seconds at priority 20

    curl -X POST -i 'http://Hyperion_IP:8090/json-rpc' --data '{"command":"color", "color":[0,255,255], "duration":12000, "priority":20, "origin":"My Fancy App"}'


    Hyperion_IP = You have to enter the IP of your Hyperion server there.


    JSON RPC Introduction | Hyperion


    regards pclin

    Dreambox ONE / TWO

    dreamOS OE2.6

    Amlogic S922X - 53.000 DMIPS - 2 GB RAM - 16 GB Flash - Twin-DVB-S2X Tuner - HDR10 - HLG
    -
    AudioDSP: miniDSP 2x4HD - Amp: Pentagon - Lautsprecher ELAC / ARENDAL
    LG OLED65BX9LB (PicCap, hyperion.NG webOS)

    FireTV 4K max

    -
    hyperion (classic) & Plugin HyperionControl | hyperion-ng 2.0.16-beta.1 (dreamOS)
    Hyperion-ng (Debian bullseye)
    -
    6 x ESP32/Wemos D1 mini - WLED - SK6812 RGBW-NW 60 LEDs/m
    FeinTech VSP01201 - Grabber Macrosilicon

    LG TV Hyperion webOS & PicCap


    snoozer_likelinux_manvtkns.gif


    Ambilight for ever

    Einmal editiert, zuletzt von pclin ()

Jetzt mitmachen!

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