Hello All, I need your help for a JSON request. I need to know the status of the components "ALL". (image attached) I don't manage to do it, i'm stuck with all the array. I manage to start/stop an instance with : curl -i -X POST 'http://IP_ADRESS:8090/json-rpc' --data '{"command":"componentstate","componentstate":{"component":"ALL","state":true}}' If someone could help. Thxs
Thxs for answering. But in the post it is not specified how to check the status, but only how to start/Stop an instance, what i already manage to do. I'd like to check the status
heres a curl example for checking the status of the Platform Capture Code: curl -sS -X POST -H 'Content-Type:application/json' -H 'Accept:application/json' -d '{"command": "serverinfo"}' http://192.168.1.30:8090/json-rpc | jq '.info.components[] | select(.name == "GRABBER") | .enabled' I was unable to curl that ALL info and sort it in a way I wanted without having to manually curl each item, ended up using python to get the JSON status of ALL and store them in a dict as they are defined by Hyperion along with their current state. Quite sure there are other JSON-rpc examples in a few different threads that may be of use to you Good Luck
Thx you. I think this is the right direction to do the request. I still got an error as shown in the image joined what is the "| jq" for? (pipe + Json Query ?)
it parses the JSON from the command line, you get that result and error because you do not have it installed try the code below to install it then rerun the command, you should see either true or false depending on the component you select Code: sudo apt-get install jq
yeah that's why i went down the Python route with LibreELEC was easier to pull in the Python Libraries than get jq installed and easier to extend.