Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

Dynamic Webserver (variable processing)

Questions and comments specific to a particular plugin should go here.
wollo
Posts: 4
Joined: Wed May 25, 2011 4:23 pm

Re: Dynamic Webserver (variable processing)

Post by wollo »

Hi guys, wondering if anyone can offer some help. I'm new to eventghost and I'm a bit stuck. I'm trying to toggle the power on my tv from the dynamic web server plugin and my usbuirt sending. I can then control my tv from homeseer. I'll never look at the webpage so its looks only need be functional.
I've installed EventGhost 0.4.1.r1509 to fully patched win7 ultimate x86 and configured dynamic web server (default config, no password) and usbuirt plugins firewall is open I have my webroot in users/xxxx/eventghost web. I can access my very basic web page on http://localhost/control.html The web page, modified from an example of here shows my one shortcut Toggle TV Power, however when i click on my shortcut I get 404 error.
I know very little about html and I'm sure I'm missing something, nothing is logged in event ghost when I access the shortcut as I believe it should be. When I press an unmapped button on my remote control it is logged. Please help.

Contents of html in users/xxxx/eventghost web:


<html>
<head>
<title>EventGhost Webserver example</title>
</head>
<body>
<a href="example.html?TV">Toggle TV Power</a>
</body>
</html>

Sorry for the legth of my post, further details available.
Bill
tohenrik
Posts: 2
Joined: Fri Aug 06, 2010 9:39 pm

Re: Dynamic Webserver (variable processing)

Post by tohenrik »

your file is named control.html right? the file example.html does not exist in your folder therefore you will get a http 404 error: "file not found"
try to change the following line:
from:

Code: Select all

<a href="example.html?TV">Toggle TV Power</a>
to:

Code: Select all

<a href="control.html?TV">Toggle TV Power</a>

Code: Select all

 
<html>
<head>
 <title>EventGhost Webserver example</title>
 </head>
 <body>
<a href="control.html?TV">Toggle TV Power</a>
 </body>
</html>
wollo
Posts: 4
Joined: Wed May 25, 2011 4:23 pm

Re: Dynamic Webserver (variable processing)

Post by wollo »

Many, Many thanks. that worked a treat.
eatmeimadanish
Experienced User
Posts: 118
Joined: Thu Oct 01, 2009 5:11 pm

Re: Dynamic Webserver (variable processing)

Post by eatmeimadanish »

I am having an issue getting {{eg.globals.variable}} to display in my web pages with the Dynamic Webserver. For example if I use the sample listed in this forum:

Code: Select all

<html>
    <head></head>
    <body>
        <p>
            <a href="?LightOn">Turn Light On</a>
        </p>
        <p>
            <a href="?LightOff">Turn Light Off </a>
        </p>
        <p>
            <a href="?LightToggle">Toggle Light</a>
        </p>
        <p>
            Light is {{"on" if lightState else "off"}}
        </p>
    </body>
</html>
What I get in my browser is this:
Turn Light On

Turn Light Off

Toggle Light

Light is {{"on" if lightState else "off"}}



How do I get it to display my variables that are in Eventghost?
eatmeimadanish
Experienced User
Posts: 118
Joined: Thu Oct 01, 2009 5:11 pm

Re: Dynamic Webserver (variable processing)

Post by eatmeimadanish »

Also if I just put in

<p>
Light is {{eg.globals.lightState}}
</p>

I get a series of errors in Eventghost.
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Dynamic Webserver (variable processing)

Post by Pako »

eatmeimadanish wrote:I am having an issue getting {{eg.globals.variable}} to display in my web pages with the Dynamic Webserver. For example if I use the sample listed in this forum:

Code: Select all

<html>
    <head></head>
    <body>
        <p>
            <a href="?LightOn">Turn Light On</a>
        </p>
        <p>
            <a href="?LightOff">Turn Light Off </a>
        </p>
        <p>
            <a href="?LightToggle">Toggle Light</a>
        </p>
        <p>
            Light is {{"on" if lightState else "off"}}
        </p>
    </body>
</html>
What I get in my browser is this:
Turn Light On

Turn Light Off

Toggle Light

Light is {{"on" if lightState else "off"}}



How do I get it to display my variables that are in Eventghost?
For the example mentioned to work, you must meet the following requirements:
1. The author of this example is Bitmonster. For this reason, it is necessary to use the plugin Webserver
(which is also the author Bitmonster) and not plugin Dynamic Webserver.
Plugin Dynamic Webserver is obsolete and will be removed from the installation file.

2. In your configuration, must be this
LightControl.gif
LightControl.gif (6.87 KiB) Viewed 8341 times
3. The plugin webserver must be configured as follows:
Webserver.gif
Pako
eatmeimadanish
Experienced User
Posts: 118
Joined: Thu Oct 01, 2009 5:11 pm

Re: Dynamic Webserver (variable processing)

Post by eatmeimadanish »

lol, well that makes a whole lot of sense now. I was assuming the Dynamic Webserver was the most current since it was not in earlier builds but in the newer ones. I know how to set it up, was just confused why it wasnt working. I will switch it over and see if it works. Also if anyone cares, I figured out how to do long key press and posted in the forum in case anyone is interested. It requires a down and up event on the web button, but can be done with Eventghost logic.

Anyway cheers.

P.S. watch for a free project called doggo July 5th. Then users will see how powerful Eventghost truly is, and hopefully bring more attention to this awesome tool.
User avatar
Livin
Experienced User
Posts: 792
Joined: Wed Oct 08, 2008 4:56 am

Re: Dynamic Webserver (variable processing)

Post by Livin »

Looking forward to seeing what you have in store for us.
setup... XBMC, W7MC for DVR & Live OTA TV, JRMC for multi-zone audio, EG, MiCasaVerde Vera3, USB-UIRT IR receiver, Harmony remote, 5.2 home theater system
User avatar
Livin
Experienced User
Posts: 792
Joined: Wed Oct 08, 2008 4:56 am

Re: Dynamic Webserver (variable processing)

Post by Livin »

Pako wrote: 1. The author of this example is Bitmonster. For this reason, it is necessary to use the plugin Webserver
(which is also the author Bitmonster) and not plugin Dynamic Webserver.
Plugin Dynamic Webserver is obsolete and will be removed from the installation file.
Pako,
Where is the webserver plugin you are currently using?
setup... XBMC, W7MC for DVR & Live OTA TV, JRMC for multi-zone audio, EG, MiCasaVerde Vera3, USB-UIRT IR receiver, Harmony remote, 5.2 home theater system
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Dynamic Webserver (variable processing)

Post by Pako »

I in reality do not use the Webserver plugin. I have no use for it.
But the Webserver plugin, about which I wrote, is part of the installation file EventGhost.

Pako
User avatar
Livin
Experienced User
Posts: 792
Joined: Wed Oct 08, 2008 4:56 am

Re: Dynamic Webserver (variable processing)

Post by Livin »

strange, my install (3.7.1494) does not have a default Webserver plugin
setup... XBMC, W7MC for DVR & Live OTA TV, JRMC for multi-zone audio, EG, MiCasaVerde Vera3, USB-UIRT IR receiver, Harmony remote, 5.2 home theater system
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Dynamic Webserver (variable processing)

Post by Pako »

Livin wrote:strange, my install (3.7.1494) does not have a default Webserver plugin
I was obviously referring to the actual installation file.
Based on the theme New version 0.4.1 is out! (especially post by kingtd, posted Sun May 29, 2011 9:07 am),
Webserver plugin is back in the installer file since version r1522.

Pako
User avatar
Livin
Experienced User
Posts: 792
Joined: Wed Oct 08, 2008 4:56 am

Re: Dynamic Webserver (variable processing)

Post by Livin »

I'll try installing .4 again... last time I tried to update it had problems - and I did not see anything .4 fixed or added that I needed anyway.
setup... XBMC, W7MC for DVR & Live OTA TV, JRMC for multi-zone audio, EG, MiCasaVerde Vera3, USB-UIRT IR receiver, Harmony remote, 5.2 home theater system
User avatar
Livin
Experienced User
Posts: 792
Joined: Wed Oct 08, 2008 4:56 am

Re: Dynamic Webserver (variable processing)

Post by Livin »

eatmeimadanish ... where is doggo?
setup... XBMC, W7MC for DVR & Live OTA TV, JRMC for multi-zone audio, EG, MiCasaVerde Vera3, USB-UIRT IR receiver, Harmony remote, 5.2 home theater system
eatmeimadanish
Experienced User
Posts: 118
Joined: Thu Oct 01, 2009 5:11 pm

Re: Dynamic Webserver (variable processing)

Post by eatmeimadanish »

Very very soon my friend. I was punched in the face by my adopted son, who broke my eyesocket. So... needless to say I have had more pressing things to contend with. But the product is compeleted, I am waiting for the web designer to finish the www.doggohouse.com redesign and the download will become available when we are ready to launch. My goal is in 2 weeks.
Post Reply