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.

control multiple instances of softwares?

If you have a question or need help, this is the place to be.
V_J
Experienced User
Posts: 165
Joined: Tue Mar 04, 2014 9:00 am

control multiple instances of softwares?

Post by V_J »

Hello!

I've recently come across EventGhost (still need to configure it, currently just experimenting how I will do it), but was thinking of using it as the heart of a multi room system. My idea would be to use 2 audio outputs on a PC, for room 1 and room 2 (with more soundcards, even more is possible).
EventGhost could then be used for the (centralized) control of the softwares that are playing back the audio to room 1 and the audio to room 2. Ideally, both rooms would use the same software, which means running two instances of the same software. For this, I was thinking of using portable versions of the playback software, installed to different locations on the disk in order to be able to have different configurations: play back different things at the same time, to different soundcards. For internet radio both "RadioSure" and "Screamer Radio" allow a portable installation, the setting of an audio output device, multiple instances and have an EventGhost plugin.

But can EventGhost distinguish multiple instances of the same software (to send events to them individually)?
But if EventGhost cannot distinguish, I will have to change my plans (ie use one software for room 1, use a different software for room 2, or some other workaround).

Thanks!

J├Ârg
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: control multiple instances of softwares?

Post by jonib »

V_J wrote:But can EventGhost distinguish multiple instances of the same software (to send events to them individually)?
I have no experience with the specific programs and plugins, but I know EventGhost can control several instances if the plugin/programs support it. My XBMC2 plugin uses the network to communicate with XBMC and as a result can control many XBMCs with different ports (Just need to add the plugin several times with different configs).

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
V_J
Experienced User
Posts: 165
Joined: Tue Mar 04, 2014 9:00 am

Re: control multiple instances of softwares?

Post by V_J »

But are you using controlling xbmc via the network interface? Because then yes, you can assign different ports... Thanks! Multiple xbmc instances might indeed be a solution: one XBMC instance per room... :)
I just have not yet come across an internet radio plugin for it that has the stations I like...
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: control multiple instances of softwares?

Post by jonib »

V_J wrote:But are you using controlling xbmc via the network interface?
Hmm, I don't understand?

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
V_J
Experienced User
Posts: 165
Joined: Tue Mar 04, 2014 9:00 am

Re: control multiple instances of softwares?

Post by V_J »

Perhaps I phrased it wrong... How does your plugin tell xmbc what to do? I assume either via the webserver or using the JSON-RPC API to control xmbc.
But I guess most programs are controlled either via hotkeys or via commandline commands, which might make distinguishing them more difficult (I would have to check how it works then if you have two instances and call a commandline command).

I already read up a bit more in XBMC, and discovered that I can add live stream sources, so even if there is no addin for the online radio stations I like, there is an option for adding them. So XBMC looks like a good option still. I just hope the PC - a low power atom - can handle running two XBMC instances (but as long as it is not for video, it might be ok).
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: control multiple instances of softwares?

Post by jonib »

V_J wrote:Perhaps I phrased it wrong... How does your plugin tell xmbc what to do?
OK, the normal buttons and actions are sent via the EventServer API over the network.
I assume either via the webserver or using the JSON-RPC API to control xmbc.
For more advanced commands you can use JSON-RPC.
But I guess most programs are controlled either via hotkeys or via commandline commands, which might make distinguishing them more difficult (I would have to check how it works then if you have two instances and call a commandline command).
Many programs have APIs to control them, you just need to check what the plugins uses.
So XBMC looks like a good option still. I just hope the PC - a low power atom - can handle running two XBMC instances (but as long as it is not for video, it might be ok).
Haven't used multiple instances on the same PC so don't know how feasible it would be.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
V_J
Experienced User
Posts: 165
Joined: Tue Mar 04, 2014 9:00 am

Re: control multiple instances of softwares?

Post by V_J »

jonib wrote:OK, the normal buttons and actions are sent via the EventServer API over the network.
I overlooked that one... :oops:
Many programs have APIs to control them, you just need to check what the plugins uses.
Yes, but if the program has no options to set some addressing, two instances might not be distinguisable after they are launched and no identifier is kept.
Haven't used multiple instances on the same PC so don't know how feasible it would be.
No problem!

You've already been a great help. Using xbmc might a good option, particularly as I plan to use XBMC in room 1 also for video. Using one program for all media, would really unify things. I've already learned it has a portable option and multiple instances are possible, so I can just use a portable XMBC installation for the other rooms. It is also a common software, so likely to have good support, development and documentation (e.g. Screamer Radio has not been updated in several years now).

Ok, at least now I know my idea is feasible.
I guess I can get started with experiments... :D

Thanks!!
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: control multiple instances of softwares?

Post by jonib »

You will need a recent test version of the XBMC2 plugin to be able to change the EventServer port. Also how to change the port in XBMC read here.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
Sem;colon
Plugin Developer
Posts: 625
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: control multiple instances of softwares?

Post by Sem;colon »

...It may be a bit off-topic, but you could use one XBMC instance on the PC with EvenGhost and another one (in room 2) on a Raspberry Pi, than you wouldn't even need two sound cards or audio wire - just (wireless) network.
If you like my work, Image me a drink :wink:
kalia
Experienced User
Posts: 109
Joined: Wed Aug 12, 2009 1:10 am

Re: control multiple instances of softwares?

Post by kalia »

J├Ârg,

I know Winamp allows this. See this post:

http://www.eventghost.org/forum/viewtop ... f=2&t=2083

kalia
V_J
Experienced User
Posts: 165
Joined: Tue Mar 04, 2014 9:00 am

Re: control multiple instances of softwares?

Post by V_J »

Sem;colon wrote:...It may be a bit off-topic, but you could use one XBMC instance on the PC with EvenGhost and another one (in room 2) on a Raspberry Pi, than you wouldn't even need two sound cards or audio wire - just (wireless) network.
True... I have been looking into that raspberry pi, but it feels too much hassle (enclosure, software, ...). It shouldn't be that difficult, but I need additional hardware and things. My first idea was actually to use a cheap tablet instead of a raspberry pi, and put xbmc for android on it. :) But I want to manage with current hardware. I also thought of some DLNA speakers, but it seems messy.
My HTPC is connected via HDMI to an amplifier, and via its analog audio port to a second input on the amplifier. The amplifier supports multi room, so I can direct the analog input to the second zone. I realized I also have (lying around) wireless speakers, which I can just connect to the zone2 output of the amplifier. And the amplifier is controllable from EventGhost via serial port. So basically I don't need extra hardware to achieve it this way. The wireless speakers are not the best, but good enough to put in e.g. a kitchen.
Using xbmc as a second instance still does not prevent to move it to another computer (e.g. raspberry) later: it would not require that much change to the config (just the target to which the events are sent).
kalia wrote:I know Winamp allows this.
Great! The more options, the better. :-) I can see what works best.
barnabas1969
Experienced User
Posts: 133
Joined: Sat Feb 04, 2012 1:42 am

Re: control multiple instances of softwares?

Post by barnabas1969 »

You could run the software in two different sessions on your PC. If you setup two user accounts on the PC, you could run EG in both sessions (using different configuration files) and each session would run its own instance of the playback software.

You'd have to login to both sessions though. Login to User1, use the "switch user" feature in Windows, and then login to User2. Each could have startup items that start EG and whatever else you need to run. User1 could play audio to room1, and User2 could play audio to room2.
Sem;colon
Plugin Developer
Posts: 625
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: control multiple instances of softwares?

Post by Sem;colon »

V_J wrote:I have been looking into that raspberry pi, but it feels too much hassle (enclosure, software, ...).
I was hesitating at first too, but it's really as easy as it could be:
1. you copy some files (noops) to an SD card
2. stick that card into your raspberry as well as an generic usb keyboard (and mouse if you want) and a screen via HDMI and start it.
3. you will get a selection of operating systems you can install - just select openELEC or Raspbmc.
4. wait
5. done, your raspberry Pi will directly boot into XBMC.

I was really surprised HOW easy it is... It took me about 15min from knowing nothing about it to a working XBMC on the Raspberry Pi.
If you like my work, Image me a drink :wink:
V_J
Experienced User
Posts: 165
Joined: Tue Mar 04, 2014 9:00 am

Re: control multiple instances of softwares?

Post by V_J »

barnabas1969 wrote:You could run the software in two different sessions on your PC. If you setup two user accounts on the PC, you could run EG in both sessions (using different configuration files) and each session would run its own instance of the playback software.

You'd have to login to both sessions though. Login to User1, use the "switch user" feature in Windows, and then login to User2. Each could have startup items that start EG and whatever else you need to run. User1 could play audio to room1, and User2 could play audio to room2.
Hey... nice out-of-the box thinking! That indeed would allow any program to run in multiple instances. :) My first feeling is that it might run things too seperate. E.g. making a unified control to control both from one interface, I think it would still be possible, but more difficult to set up due to the swapping of users... But great idea!
Sem;colon wrote: I was really surprised HOW easy it is... It took me about 15min from knowing nothing about it to a working XBMC on the Raspberry Pi.
Ok, that is good to know... I've been pondering about it for some time: I won't have time to configure it, it will require too much configuration, ... But at the same time it has this attraction. :) But I also thought: a cheap tablet would already have speakers, a display, and might even come at a similar price. But for now I feel it would be just one more box in the second room, while I think it should be manageable without it. I plan to use the second room output for kitchen/bathroom, and there is a bit limited space. A single speaker is ok, but I want to keep it simple. For configuring, it would also require connection of keyboard, display, ... whereas the single PC approach would have a single point of configuration, and perhaps makes it easier to play the same source in all rooms, in sync (using the amplifier, that would just be a matter of change the source for zone2 to the hdmi input). I'm keeping the raspberry PI open as an option (perhaps even more now), but I first want to try to configure it on a single computer (perhaps also with e.g. OpenElec running in a VirtualBox). The configuration (from EventGhost point of view) would be the same if it is running in a virtual machine on real hardware. I even think that running multiple instances vs. running on a different machine would also have little configuration difference from the point of view of EventGhost.
V_J
Experienced User
Posts: 165
Joined: Tue Mar 04, 2014 9:00 am

Re: control multiple instances of softwares?

Post by V_J »

I started testing... Apparently, while xbmc has a "portable" mode, it does not allow multiple instances out of the box...

So this means either Winamp (which does support multiple instances, and with Kalia's link Eventghost can indeed distinguish), running under multiple users (suggested by Barnabas1969), or a raspberrypi (as Sem;colun suggested).

Winamp would probably the easiest solution. But I kinda like the xbmc per room configuration as a concept: there are many options to control it with a nice Android or ios interface. It may be overkill now, but it offers more functionality towards expansion. The computer already has Virtualbox installed, I could do Sem;colon suggestion but with virtualbox rather than a raspberry. It should make the transition to a raspberry later very easy. Virtualboxes have commandline controls to start or wake up devices, so Eventghost should be able to wake them up. The computer is an Atom, but It should manage music playback. Room one could be a non-virtualbox xbmc, room two a virtual one.

Is OpenElec compabible with EventGhost, or should I go for Xbmcbuntu to have best compatibility?
Post Reply