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 13 made on Wednesday May 14, 2014 at 07:46
Stealth
Long Time Member
Joined:
Posts:
December 2003
72
On May 13, 2014 at 20:42, Lyndel McGee said...
If using PEP2, have you tried using the Philips HTTP library? Otherwise you will have to encode your parameter string.

What you write to socket will be something like this (4 lines total and you may need to use Javascript url encoding to get this working.) See this.

[Link: stackoverflow.com]

[Line 1]GET /data_request?id=lu_action&output_format=xml&DeviceNum=3&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=1 HTTP 1.0\r\n
[Line 2]host:192.168.0.151\r\n
[Line 3]\r\n
[Line 4]\r\n

So, where you have a single function which writes command + '\r\n' you need to actually build your string as above and send that. Note that if you choose to use the function you have, you can build a command with only the first 3 lines and call the function with that.

Hi Lyndel,

Thank you for your help with this code. I will have to do some more reading up on this to better understand your instructions. I will report back with outcome.

Thanks again

Steve


Hosting Services by ipHouse