The Virtual Crib - Home Automation Software Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
NEEDS DEVELOPER: Event Ghost integration
Goto page 1, 2, 3  Next
 
Reply to topic    The Virtual Crib - Home Automation Software Forum Index » Feature Requests View previous topic
View next topic
NEEDS DEVELOPER: Event Ghost integration
Author Message
Humanzee



Joined: 22 Aug 2007
Posts: 519
Location: Seattle, WA

Post NEEDS DEVELOPER: Event Ghost integration Reply with quote
Event Ghost integration would expand vCrib's capabilities to automate other PC operations.
Wed Sep 19, 2007 3:06 pm View user's profile Send private message
CribKeeper
Site Admin


Joined: 09 Aug 2007
Posts: 653
Location: Overland Park, KS

Post Reply with quote
I agree, just move this to sticky please.

_________________
the Crib Keeper
www.vcrib.com
Thu Sep 20, 2007 5:20 pm View user's profile Send private message Visit poster's website
CollinR



Joined: 14 Jan 2008
Posts: 10

Post Reply with quote
BTT

This would be super cool!
Mon Jan 14, 2008 9:12 am View user's profile Send private message
Humanzee



Joined: 22 Aug 2007
Posts: 519
Location: Seattle, WA

Post Reply with quote
Ok, so I've been trumpeting on about EventGhost but I never really explained what it does. So here goes.

Quote:
EventGhost is an open-source automation tool for MS Windows, that can be extended through plugins. It can use different input devices like infrared or wireless remotes to trigger macros, that on their part control a computer and its attached hardware. After the user has configured everything to its needs, the program will run silently in the system tray and waits for an event to arrive. So it can be used to control a Media-PC with a normal consumer remote for example.


Essentially this is very similar to the way that vCrib works. An event occurs, such as a button press on a remote control, that event then triggers an action contained within a macro. You can then add in other objects and code to control how that action is performed. Typically the actions are contained within a plug-in which contains all the controls for your targeted application or device.

So essentially a vCrib plug-in for EventGhost could be quite minimalistic in that vCrib Events just need to be turned into EventGhost events. Then EventGhost could simply duplicate a desired event and insert it back into the vCrib events processor to trigger actions etc. You could also add the command and action lists from vCrib into an the plug-in for EventGhost to use directly with out the event logging.

Two challenges I see.

1. The plug-ins for EventGhost are written in Python, so we need somebody to learn that. NEVERMIND.
Quote:
Plugins can be written in any language that can produce DLLs, like C, C++, Delphi and Visual Basic. But of course they can also easily be written in Python
We have our own dll now so this might be easier than I thought.

2. Adding new objects / events / commands / actions may require a rebuild of the plugin for EventGhost. I don't know if you can yous a live set of DB records to populate the possible events and actions for a plug-in. I envision a button in the Admin.exe that would output a compliant python script file. (not sure about this as I havn't built any plug-ins for EG)[/i]

_________________
vCrib Tester #1, Forum moderator, using INSTEON devices, X10 sensors and remotes via W800RF, All doors are wired with contact closures.
vCrib Wiki
Thu Oct 16, 2008 10:18 am View user's profile Send private message
CollinR



Joined: 14 Jan 2008
Posts: 10

Post Reply with quote
Ideally whenever an Event is written to the database it would also be sent to EventGhost. I would guess using the TCP (Network Event Reciever plugin) would probably be the easiest way to get events into EventGhost.

This is a simple php script that can be used to trigger events.

Code:

<?
function sendMsg($args)
{
    $fp = fsockopen($args["host"],$args["port"], $errno, $errstr, 10);
   
    if (!$fp)
    { //Something didn't work....
        echo "ERROR: $errno - $errstr\n";
        return FALSE;

    } else {

        // First wake up the server, for security reasons it does not
        // respond by it self it needs this string, why this odd word ?
        // well if someone is scanning ports "connect" would be very obvious
        // this one you'd never guess :-)
       
        fputs($fp, "quintessence\n\r");
       
        // The server now returns a cookie, the protocol works like the
        // APOP protocol. The server gives you a cookie you add :<password>
        // calculate the md5 digest out of this and send it back
        // if the digests match you are in.
        // We do this so that noone can listen in on our password exchange
        // much safer then plain text.
       
        $cookie = fgets($fp, 400);     
       
        // Trim all enters and whitespaces off
        $cookie = trim($cookie);
       
        // Combine the token <cookie>:$args[pword]
        $token = $cookie . ":" . $args["password"];
       
        // Calculate the digest
        $digest = md5($token);
       
        // add the enters
        $digest = $digest . "\n";
               
        // Send it to the server     
        fputs($fp, $digest );
       
        // Get the answer
        $res = fgets($fp, 400);
       
        // If the password was correct and you are allowed to connect
        // to the server, you'll get "accept"
        if ( trim($res) != "accept" )
        {
             fclose($fp);
             return FALSE;
        }
       
        if (isset($args['payload']))
        {
            if (is_array($args['payload']))
            {
                foreach($args['payload'] as $key => $value)
                    fputs($fp, "payload " . $value . "\n");
            }else
            {
                if ( $args["payload"] <fputs> $value)
        if(strcasecmp(substr($key, 0, 3), 'pld') == 0)
            $args['payload'][] = urldecode($value);
    sendMsg($args);
    if(!isset($_GET['REFERER']))
        $_GET['REFERER'] = "index.php";
    header("Location: http://".$_SERVER['HTTP_HOST']
           . dirname($_SERVER['PHP_SELF'])
           ."/".$_GET["REFERER"]);
}
?>


You would then call it like:

EG-Action.php?event=FrontPorchLightOff

adding a

&REFERER=index.php?Location=MasterSuite

will kick you back to whever you like once it's sent.



Can't help ya with getting events from EventGhost into vCrib.
Thu Oct 16, 2008 10:51 am View user's profile Send private message
Humanzee



Joined: 22 Aug 2007
Posts: 519
Location: Seattle, WA

Post Reply with quote
CollinR wrote:
Can't help ya with getting events from EventGhost into vCrib.
Vaughn released the SDK on the 10/15/2008 so hopefully that will help when building a plug-in.

I've just started to experiment with EG myself and have some IR blasters on order to expand my capabilities. In just a few hours last night I could tell that EG is quite powerful. I'm probably going to try and re-write one of the serial port plug-ins so that its specific to my AVR equipment.

_________________
vCrib Tester #1, Forum moderator, using INSTEON devices, X10 sensors and remotes via W800RF, All doors are wired with contact closures.
vCrib Wiki
Thu Oct 16, 2008 12:39 pm View user's profile Send private message
SnyperBob



Joined: 22 Aug 2007
Posts: 630
Location: Illinois

Post Reply with quote
Humanzee wrote:
CollinR wrote:
Can't help ya with getting events from EventGhost into vCrib.

I've just started to experiment with EG myself and have some IR blasters on order to expand my capabilities.


What are you using in terms of hardware for IR blasting?

_________________
Visit the vCrib Wiki!

Clever image to be inserted here soon.... Smile
Thu Oct 16, 2008 10:30 pm View user's profile Send private message Visit poster's website AIM Address
SnyperBob



Joined: 22 Aug 2007
Posts: 630
Location: Illinois

Post Reply with quote
From what I understand, you can use EventGhost with simple key presses. Sounds similar to how Girder can work. Wouldn't it be easier to have vCrib simulate key presses for now, just so we can play with EventGhost? I think keypress simulation to send feedback to EventGhost would be faster to implement than figuring out the actual Events stuff.

I dunno

_________________
Visit the vCrib Wiki!

Clever image to be inserted here soon.... Smile
Thu Oct 16, 2008 10:33 pm View user's profile Send private message Visit poster's website AIM Address
Humanzee



Joined: 22 Aug 2007
Posts: 519
Location: Seattle, WA

Post Reply with quote
SnyperBob wrote:


What are you using in terms of hardware for IR blasting?
USB-UIRT, what I ordered was additional IR emitters and a stereo to dual mono splitter so that I can control 2-3 devices.

_________________
vCrib Tester #1, Forum moderator, using INSTEON devices, X10 sensors and remotes via W800RF, All doors are wired with contact closures.
vCrib Wiki
Thu Oct 16, 2008 10:37 pm View user's profile Send private message
Humanzee



Joined: 22 Aug 2007
Posts: 519
Location: Seattle, WA

Post Reply with quote
SnyperBob wrote:
From what I understand, you can use EventGhost with simple key presses. Sounds similar to how Girder can work. Wouldn't it be easier to have vCrib simulate key presses for now, just so we can play with EventGhost? I think keypress simulation to send feedback to EventGhost would be faster to implement than figuring out the actual Events stuff.

I dunno
The power would come via a a full plug-in, It may not be that hard to build. Just needs some focused attention.

_________________
vCrib Tester #1, Forum moderator, using INSTEON devices, X10 sensors and remotes via W800RF, All doors are wired with contact closures.
vCrib Wiki
Thu Oct 16, 2008 10:42 pm View user's profile Send private message
SnyperBob



Joined: 22 Aug 2007
Posts: 630
Location: Illinois

Post Reply with quote
Cool! Let us know how it turns out Smile

_________________
Visit the vCrib Wiki!

Clever image to be inserted here soon.... Smile
Fri Oct 17, 2008 12:39 am View user's profile Send private message Visit poster's website AIM Address
CollinR



Joined: 14 Jan 2008
Posts: 10

Post Reply with quote
SnyperBob wrote:
Humanzee wrote:
CollinR wrote:
Can't help ya with getting events from EventGhost into vCrib.

I've just started to experiment with EG myself and have some IR blasters on order to expand my capabilities.


What are you using in terms of hardware for IR blasting?


Right now I use a USBUIRT but I just got an ocelot last week so we'll have to see what I end up with.
Fri Oct 17, 2008 12:30 pm View user's profile Send private message
SnyperBob



Joined: 22 Aug 2007
Posts: 630
Location: Illinois

Post Reply with quote
Cool, thanks

_________________
Visit the vCrib Wiki!

Clever image to be inserted here soon.... Smile
Sat Oct 18, 2008 6:43 am View user's profile Send private message Visit poster's website AIM Address
SnyperBob



Joined: 22 Aug 2007
Posts: 630
Location: Illinois

Post Reply with quote
Brian! Is this something you would be able to do? Humanzee and I have been looking into getting something like this for vCrib.

Basically, if you could find a way to have vCrib talk to Homeseer software, vCrib would then be able to interface with tons of stuff. I don't think this would be that complicated, but I don't know how to program.

Homeseer I think uses events to initiate actions. You can use Homeseer for media management (NetRemote, j River, etc), along with some elegant hardware stuff. IR blasters, custom IR stuff, etc...

I'd be willing to get you a copy of Homeseer if you think you could tackle this.

_________________
Visit the vCrib Wiki!

Clever image to be inserted here soon.... Smile
Tue Dec 09, 2008 12:36 am View user's profile Send private message Visit poster's website AIM Address
hobbes487



Joined: 10 Oct 2007
Posts: 268
Location: Boston, MA

Post Reply with quote
SnyperBob wrote:
Brian! Is this something you would be able to do? Humanzee and I have been looking into getting something like this for vCrib.

Basically, if you could find a way to have vCrib talk to Homeseer software, vCrib would then be able to interface with tons of stuff. I don't think this would be that complicated, but I don't know how to program.

Homeseer I think uses events to initiate actions. You can use Homeseer for media management (NetRemote, j River, etc), along with some elegant hardware stuff. IR blasters, custom IR stuff, etc...

I'd be willing to get you a copy of Homeseer if you think you could tackle this.


Are you saying there is an Event Ghost plugin for Homeseer and if there was one for vCrib, they would be able to talk via EG?


After reading the thread I think it would be pretty easy to create a vCrib plugin that emulates key presses. This in turn could trigger event in EG?

_________________
Brian
Tue Dec 09, 2008 12:44 am View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:    
Reply to topic    The Virtual Crib - Home Automation Software Forum Index » Feature Requests All times are GMT - 6 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.