Page 1 of 1

Sony 2013 TV Codes

Posted: Fri Dec 27, 2013 1:13 am
by minesht
Hi Guys,

I am trying to control the input selection for the TV using a JSON (javascript I think) command.

The Command the Sony sideview app sends along with the response is below.


POST /sony/avContent HTTP/1.1

Host: 192.168.112.12

Content-Length: 121

Connection: close

User-Agent: TVSideView/2.1.0 CFNetwork/672.0.8 Darwin/14.0.0

Content-Type: application/json

Cookie: auth=2e3798242923559430e296894d57ef501204534bc80f38243019775d958618d1; path=/sony/; max-age=1209600; expires=Tue, 07-Jan-2014 16:38:50 GMT;



{
"method" : "setPlayContent",
"id" : 1869,
"params" : [
{
"uri" : "tv:"
}
],
"version" : "1.0"
}HTTP/1.1 200 OK

Content-Type: application/json

Content-Length: 23

Connection: close

Date: Tue, 24 Dec 2013 16:45:50 GMT



{"id":1869,"result":[]}



I tired to reformat this as below, but it did not work. I am just learning how this works and don't yet have any experience with javascript so any help you can give me will be greatly appreciated.

POST /sony/avContent HTTP/1.1

Host: 192.168.112.12

Content-Length: 121

Connection: close

User-Agent: Microsoft-Windows/6.1 UPnP/1.0

Content-Type: application/json



{

"method" : "setPlayContent",

"id" : 1810,

"params" : [

{

"uri" : "tv:"

}

],

"version" :HTTP/1.1 200 OK

Content-Type: application/json

Content-Length: 28

Connection: close

Date: Tue, 24 Dec 2013 16:50:14 GMT



{"error":[5,"Illegal JSON"]}


AS you can see this retuned illegal JSON,

I was looking over the command for the XBMC JSON and noticed the jsonrpc commands like jsonrpc/{"jsonrpc":"2.0","method":"Input.ExecuteAction", "params":{"action":"number2"},"id":0}

Is the jsonrpc a function of a pc or Demopad?

If it is demo pad can I use this with some changed to control the TV?


Do you have any other suggestions?