Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Original thread:
Post 2 made on Tuesday June 22, 2010 at 06:24
BluPhenix
Long Time Member
Joined:
Posts:
December 2008
371
Well, you're a bit close.

You stated that you input those commands in a browser, with the http:// edited out. That is the key information. The device uses the HTTP protocol to communicate.

With the socket.connect you just open a communication channel between the two devices (TSU9600 and Spotify). I'll put it this way, you pick up the phone and call a number in china. Sure you're now connected to the person you want to communicate with but if you don't know chinese, you won't be able to communicate. The http protocol mentioned above is the chinese language.

Fortunately for you philips added a HTTP library in the PEP2 editor. Take a look at it and it's usage and you will be able to do what you're looking for.

I haven't used it yet but I believe that getHTTP(url, callback) is all you need (the callback is what you want):

getHTTP("h*ttp://192.168.1.4:8080/playpause", some_callback_function)

Should do the trick. As you don't really need the data that the Spotify outputs, your callback function can be an empty function.

P.S.: The * in h*ttp is just to fool the forums not to link it (don't know how to turn html doce off :)

Last edited by BluPhenix on June 22, 2010 06:37.


Hosting Services by ipHouse