|
|
|
The following page was printed from RemoteCentral.com:
Topic: | Pronto script This thread has 23 replies. Displaying posts 1 through 15. |
|
Post 1 made on Wednesday April 9, 2008 at 07:53 |
Timnl Long Time Member |
Joined: Posts: | March 2008 23 |
|
|
Hi there,
Iīm trying to find out how the pronto script is working. I am using the ProntoScript Developer manual, but still I got some probs.
I want to power up/down a beamer over RS232, using the script. As there are some examples in the manual, I took them over adjusted them, but still no luck :( Here are the commands Iīm using. I think Iīm still missing something, but donīt know what. Didnīt have time to visit the bookshop to buy a book bout Javascript.
var e = CF.extender[0]; s.bitrate = 115200; s.databits = 8; s.parity = 0; s.stopbits = 1; s.send ("P0\r");
Other question, how can you make a link between PS and an IR or RS code? As I read before, I need to make pages and link the PS to it with tags, but that didnīt work out yet. Will read a bit more, first I need to figure out how to switch on/off the beamer.
Tim
|
|
Post 2 made on Wednesday April 9, 2008 at 08:16 |
Phoenix_Elite Long Time Member |
Joined: Posts: | July 2007 123 |
|
|
I see you are missing the serial port declaration in your extender configuration. Adding the "_PS_DEBUG_" panel into your configuration would probably show you some "undeclared object: s" errors.
var e = CF.extender[0]; var s = e.serial[0]; // serial port 1 s.bitrate = 115200; s.databits = 8; s.parity = 0; s.stopbits = 1; s.send ("P0\r");
To fire off an IR code using PS you would give the button that stores the code a PS name then reference it using CF.widget("[button]", "[page]", "[device]").executeActions();
|
|
OP | Post 3 made on Wednesday April 9, 2008 at 08:30 |
Timnl Long Time Member |
Joined: Posts: | March 2008 23 |
|
|
Hi Phoenix,
in the debug window I donīt have errors anymore, previous I had an error for the bitrate. Thnx for that prob solving. But still the command gets to the RFX9600, it just doesnīt arrive at the beamer somehow. Normally the power on code in ASII would be P1 and P0 for power down.
Maybe I need to switch some commands from position.
|
|
Post 4 made on Wednesday April 9, 2008 at 12:50 |
ddarche Mr. RemoteQuest |
Joined: Posts: | February 2002 2,309 |
|
|
Have you tested the RS-232 commands directly outside of PS? You can just make a button and add the rs-232 command and see if it works directly. This will take the wiring and the code out of the equation.
In PS, you may want to try the command as hex and not ascii.
Dave
|
Dave D'Arche http://RemoteQuest.comFine Home Theater Remote Controls & Solutions - Programming services for most remotes |
|
OP | Post 5 made on Wednesday April 9, 2008 at 15:27 |
Timnl Long Time Member |
Joined: Posts: | March 2008 23 |
|
|
without the PS itīs not a problem. The projector just turns on and off. Iīll try hex, just need to look for a hex-ASCII converter. But thnx Tim Found a free ASCII to Hex converter.. Just need to figure out how to place it in the string.
Last edited by Timnl
on April 9, 2008 15:43.
|
|
Post 6 made on Friday April 11, 2008 at 16:55 |
Sogliphy Long Time Member |
Joined: Posts: | July 2007 186 |
|
|
Timnl: to specify a string by a series of hexadecimal values, use
var myTest = "\x48\x65\x6C\x6C\0x6F";
which is equivalent to:
var myTest = "Hello";
You could also use String.fromCharCode(), as in:
var myTest = String.fromCharCode(0x48, 0x65, 0x6C, 0x6C, 0x6F);
(Not that I think this will help you with your problem, as the Serial.send() function does not care how the string was specified)
|
|
Post 7 made on Saturday April 12, 2008 at 04:45 |
gopronto Senior Member |
Joined: Posts: | April 2008 1,453 |
|
|
Is there any one who is available to write me a pronto Script?
|
Pronto still one of the best Wi-Fi Remotes, www.ikonavs.co.nz and [Link: axiumcontrol.com] Axium Control |
|
Post 8 made on Saturday April 12, 2008 at 04:54 |
dave964 Long Time Member |
Joined: Posts: | January 2008 172 |
|
|
On April 12, 2008 at 04:45, gopronto said...
Is there any one who is available to write me a pronto Script? You may want to start your own thread. And you will need to be a bit more specific - a prontoscript to do.... what?
|
Dave
|
|
Post 9 made on Saturday April 12, 2008 at 09:22 |
Lyndel McGee RC Moderator |
Joined: Posts: | August 2001 12,999 |
|
|
On April 12, 2008 at 04:45, gopronto said...
Is there any one who is available to write me a pronto Script? Likely not for free.
|
Lyndel McGee Philips Pronto Addict/Beta Tester
|
|
Post 10 made on Sunday April 13, 2008 at 04:00 |
gopronto Senior Member |
Joined: Posts: | April 2008 1,453 |
|
|
no problem willing to pay, please email me at mark4017(at)hotmail.com
|
Pronto still one of the best Wi-Fi Remotes, www.ikonavs.co.nz and [Link: axiumcontrol.com] Axium Control |
|
Post 11 made on Sunday April 13, 2008 at 21:36 |
Lyndel McGee RC Moderator |
Joined: Posts: | August 2001 12,999 |
|
|
What type of equipment do you need ProntoScript written for. How do you plan to control this equipment? IR? RS-232? TCP/IP?
If you could provide a bit more detail here that would be helpful.
|
Lyndel McGee Philips Pronto Addict/Beta Tester
|
|
OP | Post 12 made on Monday April 14, 2008 at 02:19 |
Timnl Long Time Member |
Joined: Posts: | March 2008 23 |
|
|
For the moment I want to control a beamer by RS232. Connected on port 1 of the RFX9600, but if this one works I can control more devices offcourse. Just wanted to know how itīs needed to be done.
On the moment I get "RSCODES" (page) has no properties. Must be something stupid..
Into the homepage, advanced tap I got the EPG. // Projector ON/OFF var w = widget("Projector On") label = epgOn ? "On" : "Off";
Button { epgOn = !epgOn; label = epgOn ? "Projector On" : "Projector Off"; page("RSCODES").widget(epgOn ? "PLUS_ON" : "PLUS_OFF").executeActions(); }
Labels of the buttons are equal to the ones I used in the script. The prontoscript has as Label for the button, RSCODES, the home page HOME and RSCODES page none. On the RSCODES page I just got the standard RS232 link.
first thought was to make a button with the script (first post), but it might be easier to have a link. As I can copy the buttons, with not too much adjustments (IR or RS).
A litle hint would be helpfull :)
Tim
|
|
Post 13 made on Monday April 14, 2008 at 06:35 |
dave964 Long Time Member |
Joined: Posts: | January 2008 172 |
|
|
I've never used page, so don't know if what you've done is correct.
I tend to use CF.widget (button_name, page_name, device_name).executeActions ();
|
Dave
|
|
OP | Post 14 made on Monday April 14, 2008 at 10:36 |
Timnl Long Time Member |
Joined: Posts: | March 2008 23 |
|
|
Hi Dave, thnx for replying. This one doesnīt work either as I get the error message CF is not defined. -- For the ones who has a lil bit time to check, what I am doing wrong.. You can download the file here [Link: idisk.mac.com]Thnx Tim
Last edited by Timnl
on April 14, 2008 11:21.
|
|
Post 15 made on Monday April 14, 2008 at 11:45 |
dave964 Long Time Member |
Joined: Posts: | January 2008 172 |
|
|
You have two problems :
1) You have given PLUS_PC1 button the Label name PLUS_PC1 - but you have not given it a ProntoScript name PLUS_PC1. In the button actions part, you need to click on the PS button at the end, and then enter the Prontoscript name PLUS_PC1.
2) You are trying to reference device "Home" - but again, you have not defined this device with a ProntoScript name. Click on Home Properties, then the Advanced tab and enter "Home" as the prontoscript name.
This fixes your problem (at least, it fixes that particular problem).
|
Dave
|
|
|
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.
|
|