First time coding - Sending JSONrequest to Philips TV

Hi,
My new Philips TV can accept JSONrequests through the Jointspace API?s, but I cant figure out the code to send a JSONrequest, can someone help me figure the error with this code? Trying to set the TV to Standby.

[url=http://jointspace.sourceforge.net/projectdata/documentation/jasonApi/1/doc/API-Method-input-key-POST.html]http://jointspace.sourceforge.net/projectdata/documentation/jasonApi/1/doc/API-Method-input-key-POST.html[/url]

function JSONTest()
{
requestNumber = JSONRequest.post(
“http://10.0.1.19:1925/1/input/key”,
{
key: “Standby”,

},
function (requestNumber, value, exception) {
    if (value) {
        processResponse(value);
    } else {
        processError(exception);
    }
}

);
}

Anyone know how to send a JSONrequest.post( ??

That’s a JavaScript library … Where do you plan to call it from ?

See: JSONRequest

[quote=“RichardTSchaefer, post:2, topic:177520”]That’s a JavaScript library … Where do you plan to call it from ?

See: http://www.json.org/JSONRequest.html[/quote]

I want to make a scene which can turn on and off my TV using JSONrequest. How can I do this in the LUUP field? I thought I could run this code in the luup field, but offcourse no chance…

::slight_smile:

This is all based on http requests with JSON formatted objects … all doable in LUA … but you will need to do some coding.

Did this work? Any ideas on how you could get pressing play or pause on the philips remote to run a scene??
Cheers
J

Sent from my iPhone using Tapatalk

Any information on how to integrale this Code in LUUP. This would be great.