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.

Sending Events with Webserver

If you have a question or need help, this is the place to be.
Post Reply
spyderespirt0
Posts: 16
Joined: Fri Sep 14, 2012 7:52 pm

Sending Events with Webserver

Post by spyderespirt0 »

Does anybody have any documentation on sending events with the eg webserver? examples? I can't seem to find anything.
kkl
Experienced User
Posts: 317
Joined: Wed May 04, 2011 9:32 pm

Re: Sending Events with Webserver

Post by kkl »

spyderespirt0
Posts: 16
Joined: Fri Sep 14, 2012 7:52 pm

Re: Sending Events with Webserver

Post by spyderespirt0 »

Yes I know of that documentation. It does not cover my question.
kkl
Experienced User
Posts: 317
Joined: Wed May 04, 2011 9:32 pm

Re: Sending Events with Webserver

Post by kkl »

Then perhaps you should rephrase your question, because it's not clear to me what you're asking. Activating/clicking an eg webserver hyperlink creates an eg event.
spyderespirt0
Posts: 16
Joined: Fri Sep 14, 2012 7:52 pm

Re: Sending Events with Webserver

Post by spyderespirt0 »

Sending Events to the webpage FROM eventghost, the only plugin action that is listed with the webserver plug in.
kkl
Experienced User
Posts: 317
Joined: Wed May 04, 2011 9:32 pm

Re: Sending Events with Webserver

Post by kkl »

The power of the plug-in is in creating webpage hyperlinks that generate EG events. You can create an EG action from the plug-in that generates an EG event, but that would seem to have little practical use.
Attachments
Capture.JPG
spyderespirt0
Posts: 16
Joined: Fri Sep 14, 2012 7:52 pm

Re: Sending Events with Webserver

Post by spyderespirt0 »

Its not for just creating an event within eventghost, you can send back data to the webpage using an ajax request I believe, I tapped my internet using wireshark, there seems to be outgoing traffic when using the SendEvent Action (that's why there is a host IP address option box), I want example code on the client side of responding and acting on this received response.
kkl
Experienced User
Posts: 317
Joined: Wed May 04, 2011 9:32 pm

Re: Sending Events with Webserver

Post by kkl »

The Host entry in the Webserver SendEvent configuration allows you to send an event to another computer running EG and the Webserver plug-in. An Event is generated on that Host computer.

Perhaps someone else understands what you are trying to do. I do not.
Sem;colon
Plugin Developer
Posts: 625
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: Sending Events with Webserver

Post by Sem;colon »

I do!^^
I just had the same "problem".
It seems like the EventGhost webserver SendEvent can only send data to another EventGhost using webserver - what is in my eyes kinda useless, there are other plug-ins which can do that better.
Anyway, since I had the same problem I changed the webserver plugin a bit - with my modification you will get a new event SendEventExt which can send events to other webserver.

Also I rewrote the "do_POST" block as it didn't work for me.(I was not able to send POST requests to EventGhost, only GET worked. Now both are working.)

If you have the same issues, check it out!
Attachments
__init__.py
v 1.1.2
(24.79 KiB) Downloaded 282 times
If you like my work, Image me a drink :wink:
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Sending Events with Webserver

Post by Pako »

Sem;colon wrote:Also I rewrote the "do_POST" block as it didn't work for me.(I was not able to send POST requests to EventGhost, only GET worked. Now both are working.)
Unfortunately, you are not right.
The method do_POST is functioning.
You can easily make sure of that.
Check out this post
Re: How to fire an event without a button on the webserver?
and download my example.

However, I agree that it can work better. So I'll incorporate your edits,
but in a modified form. Original features will also be maintained.
I just now (coincidentally) I also working on significant improvements to the plugin. I got it working and it looks very interesting.
For example, I can (from the website) directly execute scripts (without using TriggerEvent) and the webserver returns the result. But there is more.
I intend to publish it soon.

Pako
piert
Experienced User
Posts: 321
Joined: Tue Jun 14, 2011 2:53 pm

Re: Sending Events with Webserver

Post by piert »

Wow, that sounds really promising, Pako!
Looking forward to your latest fruit of labour.
Sem;colon
Plugin Developer
Posts: 625
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: Sending Events with Webserver

Post by Sem;colon »

Unfortunately, you are not right.
The method do_POST is functioning.
You can easily make sure of that.
Check out this post
Re: How to fire an event without a button on the webserver?
and download my example.
Hi Pako,

OK, I only tried it with a simple jquery post - but unfortunatly that resuled in an error.
For example, I can (from the website) directly execute scripts (without using TriggerEvent) and the webserver returns the result
That sounds awsome!
If you like my work, Image me a drink :wink:
Post Reply