API json-rpc Unable to switch Instance and execute another action

  • Hi everyone,


    I have a running Hyperion with 2 instances.

    I want to control them using the json API.


    As example i want to select my instance "1" and call the API to set a specific color

    Using postman all is working perfect, i'm using HTTP POST :

    Switch the instance:

    http://192.168.10.19:8090/json-rpc

    { "command" : "instance", "subcommand" : "switchTo", "instance" : 1 }

    Set Color :

    http://192.168.10.19:8090/json-rpc

    { "command":"color", "color":[255,0,0,0,255,0,0,0,255], "priority":20, "origin":"My Fancy App" }

    It work like a charm ;)


    Now I want to do the same using Curl or PHP :

    Switch the instance:

    curl -X POST -i "http://192.168.10.19:8090/json-rpc" -d '{"command":"instance","subcommand":"switchTo","instance":1}'

    Set Color :

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


    Unfortunataly doing this, the color is change for my instance "0", which mean that the "switchTo" was not keep.
    I geta succes result for all API call.


    Did i miss something ?

    Regards,

    Fabrice







    • Offizieller Beitrag

    See the following thread


    You need to execute both requests in one context/session.

    With curl use the —next option

Jetzt mitmachen!

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