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

Login:
Pass:
 
 

Page 1 of 2
Topic:
EventGhost ProntoScript Library (constructive criticism wanted)
This thread has 15 replies. Displaying all posts.
Post 1 made on Sunday March 14, 2010 at 10:19
fdaa
Long Time Member
Joined:
Posts:
August 2009
11
I have no previous experience of programing in JavaScript or any other programing language except some shell scripting before getting my Pronto. The downside with learning something by yourself at home is that there is no one to ask for advice. So the reason for publishing it here is foremost to get constructive criticism on my coding. But if anyone find it good enough to use, feel free to do so. If it ever get the Ok-stamp from the board members I will post it in the Files section of this site.

The EventGhost ProntoScript Library is a bare bones version of the modules I am using at home. It is supposed to be really simple and do only one thing. That is to send events to EventGhost via its Network Event Receiver Plugin. It therefore expose only one public function named "event". The only "required" parameter is the name of the event to be sent. Optional parameters are IP Adress, IP Port and Password for EventGhost. This can be useful for example if your HTPC is turned of and you want to send a Wake-On-Lan command to it via another EventGhost PC. The communication error handling is really simple, it just displays a GUI.alert with the reason when the timeout value is reached.

/Fredrik

Download link:
[Link: algonet.se]

Requirements:
--------------------
EventGhost ProntoScript Library is only tested with PEP 2.4.18 and Firmware 7.2.22.

EventGhost automation software with the Network Event Receiver Plugin loaded.

Philips TCP Library (com.philips.InteractiveTCPClient.js). Make sure that you have it attached and enabled either sytem-wide or at your activity.

EventGhost ProntoScript Library expects to find a parameter page in each activity in wich it is invoked. The parameter page has three different labels containing respectively the IP Adress, IP Port and Password of EvenGhost.

Parameter Page:
--------------------
EventGhost Parameter page ProntoScript Name: EG_PARAMETERS
EventGhost IP Adress label ProntoScript Name: IP
EventGhost IP Port label ProntoScript Name: PORT
EventGhost Password label ProntoScript Name: PASSWORD

Sample Usage:
--------------------
Activity Script:
--------------------
var eg = local.fdaa.EventGhost;

Page or Button Script:
--------------------
eg.event("Name Of Event");
or
eg.event("Name Of Event", "EventGhost IP", "EventGhost port", "EventGhost Password");
Post 2 made on Sunday March 14, 2010 at 11:47
Goat
Long Time Member
Joined:
Posts:
January 2003
16
NICE work! I am going to play around with this right now.
OP | Post 3 made on Sunday March 14, 2010 at 14:43
fdaa
Long Time Member
Joined:
Posts:
August 2009
11
I just posted an updated version. It has the same functionality but I had unintentionally left an old unused variable in there which where removed. While at it I also did some minor restructuring.

/Fredrik
Post 4 made on Monday March 15, 2010 at 02:31
Drabert
Long Time Member
Joined:
Posts:
October 2008
132
stumbled on this too late tonight but i am excited to try this tomorrow. Great addition!

Drabert
Post 5 made on Wednesday May 5, 2010 at 14:26
onkelandy
Long Time Member
Joined:
Posts:
May 2009
32
Sounds very interesting! I've tried it and thought that I had everything set up the right way but can't make it work. Could you probably provide some example xcf-file?
Post 6 made on Monday May 17, 2010 at 13:54
onkelandy
Long Time Member
Joined:
Posts:
May 2009
32
Could anyone help.. I can't get it to work.. posting an example file would be great!
OP | Post 7 made on Saturday August 14, 2010 at 10:29
fdaa
Long Time Member
Joined:
Posts:
August 2009
11
You can download a simple demo xcf file from the following link: [Link: algonet.se]

Don't forget to copy the EventGhostLibrary (local.fdaa.EventGhost.js) to the library folder first. ("C:\ProgramData\Philips\ProntoEdit Professional 2\Libraries" on Win Vista / Win 7)

Change the parameters on the EventGost Parameter page to reflect your configuration.

/Fredrik
Post 8 made on Thursday September 30, 2010 at 13:59
onkelandy
Long Time Member
Joined:
Posts:
May 2009
32
Awesome! I just had to configure my firewall. Now with your demo-file everything works fine. THANKS ALOT!
Post 9 made on Sunday October 31, 2010 at 09:03
scottns
Long Time Member
Joined:
Posts:
August 2003
50
Silly question. Where do I get com.philips.InteractiveTCPClient.js ?
Post 10 made on Sunday October 31, 2010 at 16:32
rhinoman
Long Time Member
Joined:
Posts:
March 2009
21
On October 31, 2010 at 09:03, scottns said...
Silly question. Where do I get com.philips.InteractiveTCPClient.js ?

It comes in prontoedit, in building blocks, it just needs enabling.

That said I cannot make this work, I need a dummy's guide please. I've not used event ghost before so don't know if its setup right. This is what I've done.

Disabled MCE firewall.
Installed EG
EG enable network receiver plugin
Merged the file above into my xcf
Moved the com.interactive.philips.tcpclient and loacal.fdaaeventghost to the system properties PS libraries and enabled them.
Configured the network port settings EG parameters
Pushed the trial home page button but EG shows no response in the log.

What am I missing please?
Post 11 made on Thursday December 30, 2010 at 11:26
scottns
Long Time Member
Joined:
Posts:
August 2003
50
Just to revisit this. I also am not seeing anything in the log. I mainly want to have a wake on lan command to my HTPC. So I have event ghost installed on my main PC which is on all the time. I made a macro with the WOL command in Eventghost and when I hit the test button it works. But my problem is I don't know what the syntax should be in the pronto script to get it working with my remote. In the example you had

eg.event("Event_from_Pronto");

but I don't know what to change to link it to the WOL in eventghost. Thanks for any help.

Last edited by scottns on December 31, 2010 09:24.
Post 12 made on Monday January 3, 2011 at 08:58
scottns
Long Time Member
Joined:
Posts:
August 2003
50
Bump
Post 13 made on Monday January 3, 2011 at 10:14
johanj
Long Time Member
Joined:
Posts:
January 2008
52
I have not used EventGhost so I can not help you with that. However, the TSU9X00 can send wake up message with UDP, do a forum search for UDP and open the first search result. I use this myself with no problem at all.

Johan
Post 14 made on Monday January 3, 2011 at 11:33
scottns
Long Time Member
Joined:
Posts:
August 2003
50
Took sWords script from the post you suggested. Replaced all the parameter "a" with the MAC address of my PC but the script does not seem to do anything. I'm a complete novice at the scripting stuff so I'm sure I'm missing something.
Post 15 made on Monday January 3, 2011 at 12:08
johanj
Long Time Member
Joined:
Posts:
January 2008
52
I use the below script at activity level. You have to change the line:

---------------------------
// Send WOL to 00:1E:8C:9E:88:07
sendWOL("\x00\x1E\x8C\x9E\x88\x07");
----------------------------
to your mac address.

Have your checked that Wake on Lan works from another computer? One has to check that both bios and windows settings are correct.



function sendWOL(aMacAddress) {
var s, i, packet;

// Constuct payload: 6 0xFF bytes..
packet = "\xFF\xFF\xFF\xFF\xFF\xFF";
// ..followed by 16 repetitions of the MAC address
for (i = 0; i < 16; i += 1) {
packet += aMacAddress;
}

s = new UDPSocket();
// Now, send that packet 40 times, in UDP packets,
// to the "all multicast hosts" address.
for (i = 0; i < 40; i += 1) {
s.send(packet, "224.0.0.1", 7);
}
s.close();
}
// Send WOL to 00:1E:8C:9E:88:07
sendWOL("\x00\x1E\x8C\x9E\x88\x07");
Page 1 of 2


Jump to


Protected Feature 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.

Hosting Services by ipHouse