PDA

View Full Version : How do I trigger events in EventGhost from Girder's GIP?



Mastiff
January 16th, 2014, 07:33 AM
Edit: I mean with room for payloads. I know about the DSNER (Dead Simple Network Event Server), which drops the password and checking, but doesn't support payloads, which I need.

I have gotten as far as to send from Girder to EventGhost so that EventGhost actually feels like something's going on, by this code:


local socket = gip.Open('127.0.0.1', 1024)
if socket then
socket:Write('quintessence\n')
socket:Write('test\n')
end

But what I get then is EventGhost saying


14:29:01 NetworkReceiver md5 error

From what I have figured out, quintessence is not just "waking up" the EG Network Event Plugin, it makes it send back something, that has to be hashed and sent again to actually get the plugin to accept anything at all. Is there any already written code that can help me with this? I have tried searching without finding anything. I have LUA running perfectly from EG to Girder, it's just the other way that I would like to replace event.exe in EG with something a bit more elegant, and probably less taxing on the system when I get to sending a lot of events eventually...

Tieske8
January 17th, 2014, 01:34 AM
Try xPL. See http://www.promixis.com/forums/showthread.php?21005-Eventghost-to-Girder&p=144679#post144679

Mastiff
January 17th, 2014, 01:49 AM
Hi, Tieske8! I have seen your posts on the virtues XPL earlier. :) I have even read the thread that you link to there. But it seemed to me that it would be simple and cleaner just to fire events with what I have, without adding another component. I try to keep my automation servers as clean as possible, since in my experience it's not "the more, the merrier". More like "the more, the messier". Or is the XPL framework so stable and low on ressources that it really doesn't matter?

Tieske8
January 17th, 2014, 02:20 AM
But it seemed to me that it would be simple and cleaner just to fire events with what I have, without adding another component. I try to keep my automation servers as clean as possible, since in my experience it's not "the more, the merrier". More like "the more, the messier".
I totally agree with you, but the question whether you're better off inventing something new, or use existing components. That's your decision to make...


Or is the XPL framework so stable and low on ressources that it really doesn't matter?
The xPL hub is the only app (very lightweight, spends most of its time doing nothing, waiting for network comms) that runs in the background and it is completely stable.

Mastiff
January 17th, 2014, 02:23 AM
Me? Invent? I couldn't invent or code myself out of a brown paper bag! :D

Thanks, I may try it since you say it's so well behaved. :) So all I do is to set up the XPL, install/activate the plugins and then shoot XPL messages back and forth (presumably formatted in a special way), and they will come up as events with payloads? Or am I being overly simplistic (in accordance with my overy simplistic brain, of course)?

Tieske8
January 17th, 2014, 04:48 AM
try with the xPLCheckPackage (just google it), it will do the hard work for you when setting up the xPL basics. One caveat here; It was developed for WinXP, and the windows firewall was changed in Vista/Win7, so it might be that you still need to manually open a firewall port. Let me know if you need help with that.

For installing the xPLGirder plugin check the documentation: https://github.com/Tieske/girder-xpl-component/blob/master/ReadMe.txt

Mastiff
January 17th, 2014, 04:51 AM
Thanks! Actually the XP part is no problem. My automation servers (both home and at the cabin) are virtual XP machines used only for that, with only password protected access from the outside. So it shouldn't be a problem. I use M0n0wall firewalls on another VM on the main server (which mostly is a host machine), so I'm really not that scared about still using XP. :)