EventGhost comes with a simple webserver plugin. This plugin allows HTML pages to be displayed on any browser while Eventghost is running, and allows links to trigger EventGhost events. Why would you want to do this? Well if you have handheld devices that can access a WiFi network, such as an iPhone, iTouch, or iPad, then you can turn them into remotes by using their browser.
Do not setup a webserver on a computer connected directly to the internet, as I have read on forums it does not have enough security to protect your computer from the outside world. Instead, it is better to have it on a computer that has a router protecting it from outside access. I do not know enough about security issues to elaborate, but hopefully someone who does will contribute more here.
When you add a plugin, you will find the Webserver plugin near the bottom of all the plugins. (Or you can check out the Dynamic Webserver for a variation that can work with EventGhost variables.) It will display the General Settings. Leave the TCP/IP port at 80 unless you know why you are changing it. The HTML documents root is the name of the directory where you will save your HTML pages, such as your initial index.html page. This directory can have subdirectories. Unless you know why you want to change the Event prefix, leave it as the default "HTTP". When an event is triggered it will start with this prefix followed by a period and the name you give it, which will be covered below.
Under Basic Authentication you will find a username and password. When you initially pull up a webpage from EventGhost you will be asked to supply the username and password you enter here.
Creating a Webpage
Now that you have EventGhost running, it needs a webpage. The following is a simple page for illustration:
<head> <title>EventGhost Webserver example</title> </head> <body> <a href="example.html?Air1">Radio Air 1</a> </body>
</html> The triggering event is found in the hyperlink statement. The beginning of the link references the page where the browser will jump to next. The part after the "?" will be sent to Eventghost with the event prefix you set in the plugin. If you left it at the default then the above link will create an event "HTTP.Air1" in EventGhost.
Connecting to the Webpage
Enter the IP address of the computer running EventGhost into the browser of any other computer connected to the network of the EventGhost computer, or even into the browser of the computer running EventGhost. You will be asked the username and password you entered in the General Settings. After entering the correct username and password, you will see the index.html page you created. If you click on a link with the EventGhost trigger, then EventGhost will receive the trigger.
Associating the Trigger with an Action
Just like any other trigger, you will need to associate it with an action in EventGhost. You will need to drag the trigger from the log on the left window to the action on the right window. The next time the webpage link is clicked the trigger will be sent to EventGhost and your associated action will take place.
The following code: