web server how to stop and start events

Do you have questions about writing plugins or scripts in Python? Meet the coders here.
Post Reply
back_ache
Posts: 6
Joined: Tue Jan 27, 2009 2:34 pm

web server how to stop and start events

Post by back_ache » Tue Jan 27, 2009 2:46 pm

I want to control a volume control from a web interface but I don't want to have to repeatedly press the button, just press and hold as you would a normal remote control

On other systems I've started a "volumeup" event on "button down" and stopped it on "button release" how can I do this with event ghost?

User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: web server how to stop and start events

Post by Bitmonster » Thu Jan 29, 2009 12:19 am

Take a look at the webserver demo: http://www.eventghost.org/downloads/

Basically you have to start the event with "http://url/mypage.html?eventname&withoutRelease" and stop it with "http://url/mypage.html?ButtonReleased".
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!

back_ache
Posts: 6
Joined: Tue Jan 27, 2009 2:34 pm

Re: web server how to stop and start events

Post by back_ache » Thu Jan 29, 2009 8:45 am

That's demo's a nice piece of HTML!

Is there anywhere we can see the eventghost configuration that goes with it.

In my tests so far I have been sending eg.TriggerEnduringEvent("world") on buttondown and eg.EndLastEvent() on buttonup.

Unfortunately this results in a never-ending loop! I don't know whether this is because of a misunderstanding on my part or whether it is too busy processing the loop to notice the stop!

BTW So people can benefit from what I am finding out I've been putting my thoughts in http://www.eventghost.org/wiki/Webserver and have put together a simple ajax example
Attachments
ajax.zip
simple AJAX demostration
(838 Bytes) Downloaded 322 times

User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: web server how to stop and start events

Post by Bitmonster » Mon Feb 02, 2009 2:04 pm

I've updated the webserver demo to AJAX with working button endurance.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!

Post Reply