Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95468

Help Please - Shell command to play channel on Kodi

$
0
0

@harpdogg wrote:

Hi,

I have a curl command to play a live TV channel in Kodi.

  1. This variation runs successfully from the command line, but does not validate in configuration.yaml:
    Command line:
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":"1","method":"Player.Open","params":{"item":{"channelid":46}}}' http://192.168.x.xxx:8080/jsonrpc

Error from the configuration.yaml:

incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line at line 63, column 46:
     ... s: curl -X POST -H "Content-Type: application/json" -d '{"jsonrp ... 
  1. This variation validates in configuration.yaml:
curl -X POST '{"jsonrpc":"2.0","id":1,"method":"Player.Open","params":{"item":{"channelid":46}}}' -H 'content-type:application/json;' http://192.168.x.xxx:8080/jsonrpc

But does not run from the command line:

curl: (3) nested brace in URL position 57:
{"jsonrpc":"2.0","id":1,"method":"Player.Open","params":{"item":{"channelid":46}}}
                                                        ^
{"error":{"code":-32700,"message":"Parse error."},"id":null,"jsonrpc":"2.0"}

Can anyone offer any suggestions?

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95468

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>