Charmed Quark Systems
Google
WWW CharmedQuark.com

Go Back   Charmed Quark Systems > General Discussion > Beta Driver Development
Register FAQ Members List Calendar Mark Forums Read

Beta Driver Development Discussion of new drivers, finding someone to write a new driver, etc...

Reply
 
Thread Tools Display Modes
  #1  
Old 02-06-2012, 07:07 AM
wuench wuench is offline
 
Join Date: Jan 2006
Location: Saint Louis, MO US
Posts: 2,552
Lightbulb EventGhost Driver



EventGhost Driver
Version 2.1
Tested with EventGhost 0.4.1.r1544

Description:

This driver provides two-way communication with EventGhost using the CQC plug-in. EventGhost is an advanced, easy to use and extensible automation tool for MS Windows. It can use different input devices like infrared or wireless remote controls to trigger macros, that on their part control a computer and its attached hardware. So with this driver you can send messages from CQC to launch/control other applications as well as generate CQC events based on events in other applications from any other server on your network. Some examples are:
  • Launch, minimize, maximize, close, bring to front, activate any server application/window based on a CQC Event or generate a CQC Event when any of those things happen to an application.
  • Shutdown, restart, sleep, reboot, logoff, send wakeonlan to a machine based on a CQC Event
  • Control an ever growing list of applications based on a CQC Event (Zoom, Windows Media Player, XBMC, Winamp, Theatertek, SageTV, MediaMonkey, ffdshow, PowerDVD, etc).
  • Generate/recieve mouse or keyboard based events.
  • Generate/recieve events based on file/directory changes.

See attached HTML documentation for further details....

Release Info[indent]
  • Version 1.0 - Original Version
  • Version 2.0 - Uses CQC Plugin instead of Broadcaster Plugin - Allows Eventghost to be run on same host as CQC Server.
  • Version 2.1 - Added Keepliaves (requires CQC Plugin v 2.1), Supports All CQC Event Types
[indent]


Version 2.1 Now Requires a new plugin. Download CQC EventGhost Plugin zip file below and copy contents to /Program Files/EventGhost/Plugins directory. This is a breaking change, you will need to reconfigure any existing driver instances, as there are some new prompts.



Available in CQC 4.3.901+

Attachments
Attached Files
File Type: html EventGhost.html (16.2 KB, 10 views)
File Type: zip CQC EventGhost Plugin_2_1.zip (7.5 KB, 3 views)

Last edited by wuench : 05-05-2013 at 06:18 AM.
Reply With Quote
  #2  
Old 02-06-2012, 11:25 AM
SamVimes2 SamVimes2 is offline
 
Join Date: Oct 2005
Location: New York, New York
Posts: 1,291
Default

ooooh, so in theory with this could I monitor my music rip folder and trigger a squeeze rescan when new stuff lands there?
Reply With Quote
  #3  
Old 02-06-2012, 11:52 AM
wuench wuench is offline
 
Join Date: Jan 2006
Location: Saint Louis, MO US
Posts: 2,552
Default IPhone Proximity Control

Here is an example of how you can detect your IPhone (or any smartphone that replies to Pings) with EventGhost and CQC. With this configuration, EventGhost will generate a UserActionEvent when the IPhone connects to, or leaves your network via WiFi. You must have a static IP on your IPhone for this to work properly.

With this configuration you could, for example, have CQC announce Welcome Home and open your garage door when you come into range of your access point. Or have CQC remind you, that you forgot to set the alarm after you are out of range.

The following configuration will detect your phone within 10 seconds and detect your leaving withing 1 minute. You can change these intervals by adjusting the delay between pings and number of successful and unsuccessful ping attempts before sending an event.

1.) Configure EventGhost and the CQC driver per the html instructions.
2.) Install the EventGhost Ping Plug-in - In EventGhost select Configuration...Add Plugin...Other...Ping
3.) Install a startup Macro on EventGhost - Select Configuration...Add Macro...Ping...Add Host.
  • Host Name: <IPhone DNS name or IP Address>
  • Host Friendly Name: IPhone
  • Delay Between Pings: 10s
  • Alive Event: iphone-alive
  • Dead Event: iphone-dead
  • Number of successive Successful Pings: 1
  • Number of successive Unsuccessful Pings: 6
4.) Add the startup event to your macro. Configuration...Add Event Name:Main.OnInitAfterBoot
5.) Add your Alive Macro. Configuration...Add Macro...Broadcaster...Broadcast
  • Command: IPhone
  • Payload: Detected
  • UDP Port: <Port Configured in Driver>
6.) Add Ping Event to your macro. Configuration...Add Event Name:Main.iphone-alive
7.) Add your Dead Macro. Configuration...Add Macro...Broadcaster...Broadcast
  • Command: IPhone
  • Payload: Lost
  • UDP Port: <Port Configured in Driver>
8.) Add Ping Event to your macro. Configuration...Add Event Name:Main.iphone-dead
9.) In CQC Configure your Alive Triggered Event
  • Event Filter: Is This User Action
  • Field: IPhone
  • Comp Value: Detected
  • Add your Actions
10.) In CQC Configure your Dead Triggered Event
  • Event Filter: Is This User Action
  • Field: IPhone
  • Comp Value: Lost
  • Add your Actions

Last edited by wuench : 02-06-2012 at 12:04 PM.
Reply With Quote
  #4  
Old 02-06-2012, 11:54 AM
wuench wuench is offline
 
Join Date: Jan 2006
Location: Saint Louis, MO US
Posts: 2,552
Default

Quote:
Originally Posted by SamVimes2
ooooh, so in theory with this could I monitor my music rip folder and trigger a squeeze rescan when new stuff lands there?

Oh yeah. I use EventGhost to do that with XBMC now (not through CQC though). It watches my TVShow and Movie folders as described in this link.
Reply With Quote
  #5  
Old 02-06-2012, 01:14 PM
Dean Roddey's Avatar
Dean Roddey Dean Roddey is online now
Administrator
 
Join Date: Aug 2002
Location: Mountain View, CA
Posts: 32,500
Default

If the event server was updated to allow it to trigger on things other than driver changes, such as system states changing, would that allow some of this to be done without the need for the third party product? In the case of something like the phone connecting to the system, what are they actually triggering off of there?
__________________
Dean Roddey
Software Geek Extraordinaire
Reply With Quote
  #6  
Old 02-06-2012, 02:42 PM
wuench wuench is offline
 
Join Date: Jan 2006
Location: Saint Louis, MO US
Posts: 2,552
Default

That's just using ping/ICMP, they also have a couple of Bluetooth plugins but they didn't work on my Win7 system.

Its got a lot of functionality, a lot of which overlaps with things in CQC like the App Control client, and controlling things like Denon or USBUIRT. But it does a lot of things with Windows/Apps that CQC doesn't currently and it's easy to expand with its support for Python scripting. It also has a very simple drag and drop interface for events.

I rely on it pretty heavily on my HTPC as the glue to bring all the little pieces and parts together and up until now I had no way to really get CQC into the act. My main reason was to have CQC detect when TMT get's launched by XBMC. But I may use it to kill XBMC when it locks up, since I have no way to do that from the driver or app control, and it totally hoses my HTPC when it's in fullscreen.

Download it and take a look, it's free. It might give you some ideas and it's a handy app to have around anyway...
Reply With Quote
  #7  
Old 05-11-2012, 01:23 PM
MikeMelga MikeMelga is offline
 
Join Date: Apr 2008
Location: Porto, Portugal
Posts: 108
Default

Hi.

Today I started my CQC journey.
After almost 3 years of 'sightseeing' it's time for me to start getting my hands dirty. :)

So... I've downloaded version 4.1.0 and this was the first CQC driver I've installed. I use eventghost for a couple of things so... this would be very helpfull.

I've added the driver to CQC but I am having a problem: CQC catches the events sent from Eventghost but the inverse doesn't happen.

When I try to send an event to EG I get the following error in EG:

error: uncaptured python exception, closing channel <eg.CorePluginModule.Broadcaster.Server connected 192.168.1.71:33333 at 0x3ea62b0> (<class 'socket.error'>:[Errno 10054] An existing connection was forcibly closed by the remote host [asyncore.pyc|read|76] [asyncore.pyc|handle_read_event|416] [C:\Program Files\EventGhost\plugins\Broadcaster\__init__.py|h andle_read|86])

EG version is 0.4.1r1544.

Any ideas?
Reply With Quote
  #8  
Old 05-12-2012, 04:57 AM
wuench wuench is offline
 
Join Date: Jan 2006
Location: Saint Louis, MO US
Posts: 2,552
Default

Are you running Eventghost on the same machine as the driver? The problem might be they are trying to use the same port.

I never consider that case, the broadcaster plugin is designed to communicate between different machines and expects them all to use the same port (so two instances, including the driver, can't run on the same machine). If communication on the same machine is the issue, I might have to write my own plugin to tap into. There is a Network Sender/Receiver set of plugins but they won't work because they use TCP and CQC can't setup a generic TCP listener (i.e. open a TCP port and just listen on it, without connecting to something).

Last edited by wuench : 05-12-2012 at 05:26 AM.
Reply With Quote
  #9  
Old 05-14-2012, 02:37 AM
MikeMelga MikeMelga is offline
 
Join Date: Apr 2008
Location: Porto, Portugal
Posts: 108
Default

Hi wuench,

Yes. I am running them in the same machine.
I also suspected that could be the problem.

I really needed both of them on the same machine.

I'll have to try to figure a way of having them communicating.

Any ideas? :)
Reply With Quote
  #10  
Old 05-14-2012, 05:21 AM
wuench wuench is offline
 
Join Date: Jan 2006
Location: Saint Louis, MO US
Posts: 2,552
Default

It's not going to work on the same machine without a rewrite of the driver and broadcaster plugin.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:50 PM.


Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.