 |
 |
|
|
Philips Pronto Professional Forum - View Post
|
|
 |
|
10/10/25 - It’s been so long since we’ve last seen you!
10/24/22 - In searching for the perfect day, Timmy discovers something unexpected!
9/04/22 - That childhood favorite is back in a new Timmy video.
7/31/22 - It’s time for my second new Just Like Timmy video!
7/12/22 - Why not check out my new YouTube animation channel, Just Like Timmy!
|
|
 |
|
The following page was printed from RemoteCentral.com:
|
HTTP command via TCP/IP possible?
| |
|
| Topic: | HTTP command via TCP/IP possible? This thread has 8 replies. Displaying all posts. |
|
| Post 1 made on September 23, 2008 at 16:28 |
Fishbones Long Time Member |
Joined: Posts: | August 2008 14 |
|
|
Hi, My sat receiver has no discrete IR codes for power but it is possible to control via a browser with the following command: [Link: receiver_IP]{powerstate_number} * 0 = Standby * 1 = Deepstandby * 2 = Reboot * 3 = Restart Enigma2 * 116 = Wake-up Would it be possible through a ProntoScript to send this HTTP line to the Sat receiver ? Thank you.
|
|
| Post 2 made on September 23, 2008 at 16:49 |
Yes as long as it doesn't need an encrypted password (it's more complicated than that, but I don't grok it enough to explain it) See the http example in the developer guide. Or search forum for tcpsocket
|
|
| OP | Post 3 made on September 24, 2008 at 13:21 |
Fishbones Long Time Member |
Joined: Posts: | August 2008 14 |
|
|
OK, had "another" Read of the FM and came up with this: var socket = new TCPSocket(true); socket.connect("192.168.1.13", 80, 3000); socket.write("/web/powerstate?newstate=0"); socket.close(); and an Asynchronous version: var socket = new TCPSocket(false); socket.onConnect = function() { socket.write("/web/powerstate?newstate=0"); socket.close(); }; socket.onClose = function() { }; socket.onIOError = function(e) { label = "Error: " + e; }; socket.connect('192.168.1.13',80,3000); Unfortunately, none of them work :-( and there is no indication of script errors on _PS_DEBUG_. Is there any other way to check what the sat receiver response is? When I send _http://192.168.1.13/web/powerstate?newstate=0 from a browser it works but not via the above prontoscripts on a TSU9400. Thank you.
|
|
| Post 4 made on September 24, 2008 at 13:47 |
try socket.write("GET /web/powerstate?netstate=0 HTTP/1.0\r\n\r\n")
|
|
| Post 5 made on September 24, 2008 at 23:36 |
|
Joined: Posts: RC XP: | August 2001 13,165 538⭐︎ |
|
|
You might want to invest in the book "Webmaster in a Nutshell" from O'Reilly to get a better understanding of the HTTP protocol which you have to use. Web browsers hide all this stuff from you that you need to know if writing raw strings to a TCP socket.
|
Lyndel McGee Philips Pronto Addict/Beta Tester
|
|
| OP | Post 6 made on September 25, 2008 at 15:21 |
Fishbones Long Time Member |
Joined: Posts: | August 2008 14 |
|
|
On September 24, 2008 at 14:47, MVis said...
try socket.write("GET /web/powerstate?newstate=0 HTTP/1.0\r\n\r\n") Yes! That works. Thank you very much. For anyone that needs a workaround for discrete power on/off IR codes for a dreambox you can use the IR power toggle to power on and the following prontoscript to place the receiver in standby. var socket = new TCPSocket(false); socket.onConnect = function() { socket.write("GET /web/powerstate?newstate=0 HTTP/1.0\r\n\r\n") socket.close(); }; socket.onClose = function() { }; socket.onIOError = function(e) { label = "Error: " + e; }; socket.connect('dreambox_IP',80,3000); Thank you once again to MVis.
Cheers.
|
|
| Post 7 made on May 22, 2009 at 04:42 |
|
Joined: Posts: | January 2008 197 |
|
|
On September 25, 2008 at 16:21, Fishbones said...
Yes! That works. Thank you very much. For anyone that needs a workaround for discrete power on/off IR codes for a dreambox you can use the IR power toggle to power on and the following prontoscript to place the receiver in standby. var socket = new TCPSocket(false); socket.onConnect = function() { socket.write("GET /web/powerstate?newstate=0 HTTP/1.0\r\n\r\n") socket.close(); }; socket.onClose = function() { }; socket.onIOError = function(e) { label = "Error: " + e; }; socket.connect('dreambox_IP',80,3000); Thank you once again to MVis. Cheers. Can you please post the rest of the ip protocol of the Dreambox Receiver, i would like full control of all functions by ip. Thank you,, Kevin
|
|
|
| Post 8 made on May 24, 2009 at 11:04 |
|
Joined: Posts: RC XP: | August 2001 13,165 538⭐︎ |
|
|
Kevin, You may want to send him an email (addy on profile). You posted to a rather old thread and the user only has 12 posts.
|
Lyndel McGee Philips Pronto Addict/Beta Tester
|
|
| Post 9 made on May 24, 2009 at 12:13 |
|
Joined: Posts: | January 2008 197 |
|
|
|
 |
Before you can reply to a message... |
You must first register for a Remote Central user account - it's fast and free! Or, if you already have an account, please login now. |
Please read the following: Unsolicited commercial advertisements are absolutely not permitted on this forum. Other private buy & sell messages should be posted to our Marketplace. For information on how to advertise your service or product click here. Remote Central reserves the right to remove or modify any post that is deemed inappropriate.
|
|
|
|
|