Wondering if this can be done

If you have a question or need help, this is the place to be.

Wondering if this can be done

Postby queequeeg78 » Thu Jan 19, 2012 5:14 am

I am going to be starting a project soon after I am done building my current one, but I would like to get as much info as possible. I have a HTPC with xbmc. I got all the events I need for it with awesome results. Ok so this is what I want. I am going to add a digital projector that will hook up to either a computer or a media server, this will run seperate from my htpc. But i was wondering can I trigger this projector OR media server with eventhghost? In other words say I play "Movie1" from my htpc and an event will broadcast from XBMC triggering either the digital projector OR media server to play a entirely different movie file?

If i confused anyone i am sorry.

Thanks in advance.
queequeeg78
 
Posts: 9
Joined: Wed Feb 23, 2011 6:28 am

Re: Wondering if this can be done

Postby scottbakertemp » Mon Jan 23, 2012 4:09 pm

So you want to run eventghost on 2 different machines and have both instances communicate with each other? If so I'm working on a similar thing. There are send and receive plug-ins to do that - however I've had very little success with them.

My answer has been to create web server pages on each instance and have links back and forth from each webpage.
scottbakertemp
 
Posts: 14
Joined: Sun Nov 28, 2010 7:21 pm

Re: Wondering if this can be done

Postby eatmeimadanish » Mon Jan 23, 2012 9:53 pm

You can do one of two things. You can use the network event sender and reciever, but to have bi-directional support you need to load both plugins on each and make sure all the passwords and ports are set correctly.
I find it easier to use python and create scripts that send events through the webserver. Example Python Script would be:
Code: Select all
import urllib
suf = eg.event.suffix
suf = str(object[object.find(".")+1:]);
pay = eg.event.payload
set = "192.168.0.100"
url = ("http://%s/?%s&%s"%(set, suf, pay))
response = urllib.urlopen(url).read()

or you could hard code it:
Code: Select all
import urllib
url = ("http://192.168.0.100/?HEYDOSOMETHING&MOVIETITLE")
response = urllib.urlopen(url).read()


Both are the same thing. You can also cheat and instead of injecting data with %s you can just surround the variables with {eg.globals.example}
so instead of: url = ("http://%s/?%s&%s"%(set, suf, pay))
you can use: url = ("http://{eg.global.ipadd2}/?{eg.event.suffix}&{eg.event.payload}")

Choose your poison. The first example is straight up python, the second is unique to EventGhost.

*note* you may want to call an empty file that exists (I use Ajax.xhr) so that it calls an actual page and doesn't generate a potential error.
Example: url = ("http://192.168.0.100/Ajax.xhr?HEYDOSOMETHING&MOVIETITLE")

I like this method the best because you can consolidate your macro's into one do everything macro, and then let it just resend triggered events. For instance, you could use a button on a web page that toggles which system to send it to (enables a folder or macro) and then just resends the events to that system. Just a thought.
eatmeimadanish
Experienced User
 
Posts: 96
Joined: Thu Oct 01, 2009 5:11 pm

Re: Wondering if this can be done

Postby queequeeg78 » Mon Jan 23, 2012 11:13 pm

I was actually playing around with the network sender/reciever this past weekend and after I read this reply I am going to play around with the webserver plugin as well. I will hopefully get it work the way I want it too. :)

Thanks!
queequeeg78
 
Posts: 9
Joined: Wed Feb 23, 2011 6:28 am

Re: Wondering if this can be done

Postby eatmeimadanish » Tue Jan 24, 2012 5:36 am

Well let me know if you need any assistance. I have learned some more tricks to make this type of thing easier depending on your setup and what kind of other stuff you want to do.
eatmeimadanish
Experienced User
 
Posts: 96
Joined: Thu Oct 01, 2009 5:11 pm

Re: Wondering if this can be done

Postby Beladorizid » Thu Jun 07, 2012 2:59 am

I am trying to figure out something similar if you guys would be kind enough to assist.

Long story short I need to have EG on Computer A send a variable value to Computer B and have that computer utilize that variable with a DOS Command.

It is to control an IR blaster which is set up in my basement. I figured out how use my remote upstairs to capture a variable (3 digit number) but I dont know how to have my EG on another computer on my network read that number. Once I have that number on computer b I need it to run a command called haupblast + that 3 digit number. For example haupblast 223.

Can you point me in the right direction? Really appreciate it.
Beladorizid
 
Posts: 2
Joined: Sun Jun 03, 2012 10:25 pm


Return to General Support

Who is online

Users browsing this forum: Bing [Bot] and 3 guests