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.
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:Is OpenElec compabible with EventGhost, or should I go for Xbmcbuntu to have best compatibility?
Shouldn't matter, as long as XMBC is running you can use any system.
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 »

Thanks!

It will take a bit of time before I get everything set up, I've decided to start with a clean system (always good to do that every now and then). :)

I will go for the configuration with XBMC running in a VirtualBox. Initial configuration is 2 rooms (livingroom / kitchen), but with this approach, I can add my office also to it (there is a computer there), while not having to change much to the config. My guess is that the first config will take some time, but the others are virtually clones. Thanks again for all the suggestions! :)
(I'll post back with status updates)

Edit: small snag... While my htpc is updating, I'm trying to make the virtual machines on another computer, and it is not working: OpenElec crashes in virtualbox. Hopefully XBMCBuntu manages, it is still installing. It may be because this other computer is quite old, and I'm really hoping that is the case. However, the htpc is just a low spec Atom (ION chipset), so it may also give issues. If it also fails, I'll have to go for Winamp, at least for the second room...
V_J
Experienced User
Posts: 165
Joined: Tue Mar 04, 2014 9:00 am

Re: control multiple instances of softwares?

Post by V_J »

Just realized: I always assumed that I would put the Raspberry in the same room as where the speakers are, but there is no reason at all to do that... It can be in any room, and then send audio still using the same wireless speakers. So still an option to considere, but I would first like to try without more hardware.

So far, no luck gettting OpenElec or XBMCBuntu to start in virtualbox, although it seems possible (OpenElec has virtual builds, and people on XMBC forums managed). So it needs a bit more of investigating...
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: So far, no luck gettting OpenElec or XBMCBuntu to start in virtualbox, although it seems possible (OpenElec has virtual builds, and people on XMBC forums managed). So it needs a bit more of investigating...
I think you need to enable 3D support on the VM and install VirtualBox guest additions in order to get XBMC to work.
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 »

Yes... I tried, but it still crashes on boot. However, I tried on an older computer with an old Matrox videocard. Perhaps there is a problem getting 3D accelleration through VirtualBox on this card (older directX standard or so?). So I'll try on a different system. :)

I keep getting kernel panic... Furthermore, I've discovered that Virtualbox does not allow one to choose a different audio output device. So I'll abandon the virtualbox idea, and go for the winamp solution. I should be able to get that one up and running faster. When it works, I can evaluate it... :-)
V_J
Experienced User
Posts: 165
Joined: Tue Mar 04, 2014 9:00 am

Re: control multiple instances of softwares?

Post by V_J »

Not sure if other people are checking this... but a simple heads-up...

If you use HDMI for the audio signal, then the audio gets lost the system initiates powersaving for the screen... :D

As I would still like power saving under normal circumstances, I solved it by using the windows command "powercfg", which allows you to change the power mode using the commandline. I defined a powermode which is low power, but no powersaving for monitor. I will switch to this mode when audio is played back from winamp for zone 1. I revert back to a normal powermode after this winamp closes. Main reason is to still keep normal powersaving functions (convenient sometimes), while still have uninterrupted playback. Still not there, but getting there... amplifier control is coming (need to modify the commands), multiple winamps are working...
blaher
Experienced User
Posts: 487
Joined: Thu Nov 17, 2011 1:27 am

Re: control multiple instances of softwares?

Post by blaher »

V_J wrote:Not sure if other people are checking this... but a simple heads-up...

If you use HDMI for the audio signal, then the audio gets lost the system initiates powersaving for the screen... :D

As I would still like power saving under normal circumstances, I solved it by using the windows command "powercfg", which allows you to change the power mode using the commandline. I defined a powermode which is low power, but no powersaving for monitor. I will switch to this mode when audio is played back from winamp for zone 1. I revert back to a normal powermode after this winamp closes. Main reason is to still keep normal powersaving functions (convenient sometimes), while still have uninterrupted playback. Still not there, but getting there... amplifier control is coming (need to modify the commands), multiple winamps are working...
Could you post your .xml, please? I'd like to see how the powercfg thing works with winamp.
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 won't have access to that computer in the next few days, so cannot post it immediately. It is also far from completed, as I am still experimenting. But this is what I did: I used the "execute program" option. The action is completely independent from Winamp. Changing the power setting is the defined as the executing the program:
-
c:\windows\system32\powercfg.exe - s identifier
-
You can find the identifiers for the different power settings using "powercfg /l" in a CMD window. The identifier is that long code, which probably depends on the system.

Run this action to activate a power setting that does not switch off the monitor when winamp starts, run it with another identifier to switch to your regular power setting.

edit: It works, but it may not be sufficient; I just realize there may be an issue: if one winamp stops, and the action reverts to the normal power setting, the system may still enter powersaving even if the other winamp is playing (I plan to have one winamp per zone, and just 2 zones for now). I have to test if winamp prevents the system from entering powersaving, if it does, then the problem only exist when hdmi gets cut off, and the setting would only be necessary for the winamp that uses that as output. If the system enters powersaving while the winamp for the second zone is playing, then perhaps a more complicated definition is necessary (e.g. only change powermode if no other winamps are playing, but I have not tried such things yet). I just started a week ago with eventghost and don't have that much time to play with it; I first want to learn and try all sorts of options/configs before really starting my final config.

Hope this helps.

PS: the reference for powercfg: http://technet.microsoft.com/en-us/libr ... 10%29.aspx
blaher
Experienced User
Posts: 487
Joined: Thu Nov 17, 2011 1:27 am

Re: control multiple instances of softwares?

Post by blaher »

Cheers, that works well. I was using a really convoluted method with scripts, button presses, etc.
V_J wrote: if one winamp stops, and the action reverts to the normal power setting
You can use the find window action, above the powercfg action, and stop the macro running, (changing the power schemes), if it finds a winamp window.
V_J
Experienced User
Posts: 165
Joined: Tue Mar 04, 2014 9:00 am

Re: control multiple instances of softwares?

Post by V_J »

Great to hear you got it working too! I was wondering how to post the config, because as you see there is not really much in the config to achieve it. :)
blaher wrote:You can use the find window action, above the powercfg action, and stop the macro running, (changing the power schemes), if it finds a winamp window.
Nice idea! I run the WinAmps minized though, so would "find window" see them? But I think there also is a "process running" test, so we could also check for the process Winamp.

The only downside to my approach is that the powerschemes change, and if something is done that is not caught by EventGhost, the system might have the wrong powerscheme. E.g. If a users closes the last WinAmp manually, rather than through the EventGhost trigger, and there is no definition in EventGhost to trigger that the powerscheme should be changed. Ideally, there would be something like
-
while winamp is running -> powerscheme is x
while winamp is not running -> powerscheme is y
-

I suspect this could be simulated with a scheduler that checks at regular intervals (e.g. every 5 minutes - none of my powerschemes has shorter time intervals) if there are winamp process, and sets the powerscheme accordingly.
blaher
Experienced User
Posts: 487
Joined: Thu Nov 17, 2011 1:27 am

Re: control multiple instances of softwares?

Post by blaher »

Here's how I use it in the attached .xml. The GUIDs will probably be different, but you can see how it works.
Attachments
monitor.xml
(1.34 KiB) Downloaded 189 times
V_J
Experienced User
Posts: 165
Joined: Tue Mar 04, 2014 9:00 am

Re: control multiple instances of softwares?

Post by V_J »

Yes... I'm still wondering if not to add some addition scheduling, to check at regular intervals if the power configuration is still ok.

Regarding the original thread... (funny how many things one suddenly comes up with when solving one problem)... I currently plan on using Winamp, as this seems to be the only software that can run in multiple instances while giving EventGhost the possibility of distinguishing. I have seen interesting Sony DLNA speakers, which I might consider at a future point. Winamp seems rather difficult to combine with dlna (no play-to function, some extenstions exist, but not sure how well they perform). I will still continue with Winamp for the time being, but are there good DLNA controlpoints that can be operated from EventGhost (e.g. to provide enough functionality to play one source to one dlna speaker, and another source to another)?
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 currently plan on using Winamp, as this seems to be the only software that can run in multiple instances while giving EventGhost the possibility of distinguishing.
Really? How do you do that?
I didn't check it out to be honest, but I know the winamp plugin and I would be very suprised if it can hanhle multible instances.
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 »

You missed this post in the thread: viewtopic.php?f=2&t=6050#p30072

It links to an updated .py file for the winamp plugin, that allows you to specify the target class. Then start winamp with the correct commandline parameters, and it works (I tested it).
So that makes it perfect for my multi-room config: all room configurations would be similar, apart from the winamp target class and selected audio output device (which I can do by launching winamps with different configurations).

Winamp was never my favorite program, but this is exactly what I need.
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 »

Ahh, thank you!
Please test it and post any feedback here. If there are no issues with it I'm going to go ahead and commit the changes to eg SVN.
I guess he never did that ;-)
If you like my work, Image me a drink :wink:
Post Reply