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.
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.
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.
Wondering if this can be done
-
scottbakertemp
- Posts: 17
- Joined: Sun Nov 28, 2010 7:21 pm
Re: Wondering if this can be done
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.
My answer has been to create web server pages on each instance and have links back and forth from each webpage.
-
eatmeimadanish
- Experienced User
- Posts: 118
- Joined: Thu Oct 01, 2009 5:11 pm
Re: Wondering if this can be done
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:
or you could hard code it:
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.
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()Code: Select all
import urllib
url = ("http://192.168.0.100/?HEYDOSOMETHING&MOVIETITLE")
response = urllib.urlopen(url).read()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.
-
queequeeg78
- Posts: 9
- Joined: Wed Feb 23, 2011 6:28 am
Re: Wondering if this can be done
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!
Thanks!
-
eatmeimadanish
- Experienced User
- Posts: 118
- Joined: Thu Oct 01, 2009 5:11 pm
Re: Wondering if this can be done
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.
-
Beladorizid
- Posts: 2
- Joined: Sun Jun 03, 2012 10:25 pm
Re: Wondering if this can be done
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.
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.