INTERACT FORUM

Windows => Third Party Plug-ins, Programs, and Skins => Topic started by: gvanbrunt on October 05, 2014, 12:23:57 pm

Title: MC EventGhost Plugin
Post by: gvanbrunt on October 05, 2014, 12:23:57 pm
Hi All,

Have you ever wanted your lights to dim when you pressed play in MC? Or wanted something to happen when a particular song played? I’ve written a plugin for EventGhost that polls MC’s Rest API for Track Changes and Play\Stop\Pause events. I could add more features if needed so it depends on people’s interest. If you have a scenario you would like to support, let me know and I’ll see what I can do.
To show how to use the plug in I thought I’d give a real world example: how I use it to make the lights dim when a movie is played. To start, locate your EvenGhost directory. It’s usually under C:\Program files (x86)\EventGhost. In the plug in’s directory create a new folder called MCEvent. Copy the attached __init__.py file there.

 (http://yabb.jriver.com/interact/index.php?action=dlattach;topic=92375.0;attach=14902;image)

Open EventGhost and select Configuration->Add Plugin. Add the JRiver Media Center Event Plugin under the Other folder:

(http://yabb.jriver.com/interact/index.php?action=dlattach;topic=92375.0;attach=14904;image)
 
You will need to have Network Access (http://wiki.jriver.com/index.php/Network_Access) setup and working. Information on doing that can be found here:
http://wiki.jriver.com/index.php/Network_Access
Enter I the information required to access MC that you have setup previously:

(http://yabb.jriver.com/interact/index.php?action=dlattach;topic=92375.0;attach=14906;image)
 
I would recommend the longest polling interval necessary to achieve your desired scenario to avoid unnecessarily asking it for information.
Once that is configured and working you need to fire some events from MC to make them appear in EventGhost:

(http://yabb.jriver.com/interact/index.php?action=dlattach;topic=92375.0;attach=14908;image)

You can then use these events to trigger Macro’s in EventGhost. You will notice that when one of these events is triggered there is a bunch of data (payload) right after the event. You can access this information inside of EventGhost via a Python Script etc. While this may sound daunting, I’ll walk you through a simple example that I use myself to dim the lights only if a Video is playing etc.

(http://yabb.jriver.com/interact/index.php?action=dlattach;topic=92375.0;attach=14910;image)

I’ve setup 2 macros. The first is one called “Light Scene: Dim”. If this macro is fired it sends a command to my ISY-994i controller that does my home automation. You can use whatever home automation controller you want provided EventGhost supports it. It supports quite a few.
The second Macro is triggered by the MCEvent.Play event we captured earlier. I created a Macro called “Track Playing” and dragged the event there. I then added a Python Script and Jump action. The Jump action will trigger the” Light Scene: Dim” macro if the script returns successful. The key to this working is the Script:

Title: Re: MC EventGhost Plugin
Post by: gvanbrunt on October 05, 2014, 12:24:49 pm
(http://yabb.jriver.com/interact/index.php?action=dlattach;topic=92375.0;attach=14917;image)

In the python script we import the eg module which gives us access to EventGhost. The script checks the event payload to get information about the playing track. In this case it is checking if the Media Type is Video. If it is, it returns True causing the Jump action to fire and the lights to dim. If not nothing will happen.
I also created some other macros. I created one for pause which brings the lights up a bit if someone needs to go get popcorn or use the restroom.  I also created one for stop that brings the lights back up again.
Troubleshooting

If you run into issues with the plug in not firing events etc you can enable troubleshooting which will cause some information to be dumped to the EventGhost log panel. You can enable it by editing the plugin __init__.py file:

(http://yabb.jriver.com/interact/index.php?action=dlattach;topic=92375.0;attach=14914;image)
 
Change the line DEBUG = False to DEBUG = True. After restarting EvengGhost you should see a bunch of Blue informational events that show what is going on inside the plugin. You may be able to figure out what the issue is yourself, or you can contact me with a screenshot if not.
This is version 0.0.1 so there is bound to be some bugs etc. Let me know of any issues you have. If there is enough interest I will add to the plugin over time to add features to it. There are a few known limitations:
-   It only works for the active zone. I’m not sure how to handle other zones as I don’t use them myself in my setup. If you have a particular need I’ll see what I can do.
-   It only works on the WAN. I'm going to fix this in the near future. USE AUTHENTICATION to make sure someone doesn't mess with your library.
-   It only supports track change, play, stop, and pause events. I can probably add more if you need them
-   It doesn't have any actions to control MC. I use the Start Application action and fire MCC core commands to control MC. It is possible to add actions that do these things, but I haven’t bothered at this point.
Have Fun!
Title: Re: MC EventGhost Plugin
Post by: WinoOutWest on October 05, 2014, 12:50:39 pm
AWESOME!

I'm a huge Eventghost fan and longtime MC user.  Years ago I used to have this functionality using Zoomplayer, Girder and Netremote.  I've been waiting/hoping for some additional hooks into MC with Eventghost so this is great news.

Thank you for sharing!
Title: Re: MC EventGhost Plugin
Post by: Castius on October 06, 2014, 09:53:19 am
I think i'm in love.  :o

I can't wait to try this out.
Title: Re: MC EventGhost Plugin
Post by: d_pert on November 08, 2014, 05:58:33 pm
AWESOME AWESOME AWESOME !!!  :o :o :o

For starters, in the bedroom, I will be making this turn on my Bose Wave Radio II and set it to the AUX input, every time MC goes PLAY!

Fantasic work and thanks for the thorough introduction!
Title: Re: MC EventGhost Plugin
Post by: gvanbrunt on November 08, 2014, 07:34:33 pm
I'm glad people are finding it useful. I wasn't even sure it would be and almost didn't.

If you find any functionality etc missing or some ways it can be improved, let me know.
Title: Re: MC EventGhost Plugin
Post by: astromo on November 09, 2014, 01:40:53 pm
I did a cross post to this thread over at the EG forum:
http://www.eventghost.net/forum/viewtopic.php?f=2&t=1600&p=32946&hilit=jriver#p32946 (http://www.eventghost.net/forum/viewtopic.php?f=2&t=1600&p=32946&hilit=jriver#p32946)
Thought it might help anyone travelling over that way first.

Nice work.
Title: Re: MC EventGhost Plugin
Post by: gvanbrunt on November 09, 2014, 04:41:37 pm
Thanks appreciate it. I was going to post over there, but didn't find a good place for it to "fit".
Title: Re: MC EventGhost Plugin
Post by: beginner44 on November 12, 2014, 04:11:18 pm
What can I say : a dream has come true; This is AWESOME. 8) 8) 8)

Thank you so much SIR  ;) !!!
Title: Re: MC EventGhost Plugin
Post by: WinoOutWest on November 13, 2014, 12:20:52 pm
Quote
-   It only works for the active zone. I’m not sure how to handle other zones as I don’t use them myself in my setup. If you have a particular need I’ll see what I can do.

Is there any way to get zones support?  In my setup I have 2 zones on the htpc:  "Music" and "Video".
The music zones feeds the whole house (about 8 sets of independent speaker sets) with music.  The Music zones runs continuously throughout the day and may.  The video zone is only for the living room and plays any of the video content. 
Things like triggering the lights or the projector screen only apply to the video zone which may or may not be the active zone.
Title: Re: MC EventGhost Plugin
Post by: gvanbrunt on November 13, 2014, 01:15:32 pm
I'm not even sure how this works in relations to zones. So are you saying that sometimes it is getting triggered from the "non video" zone?
Title: Re: MC EventGhost Plugin
Post by: gvanbrunt on November 13, 2014, 08:25:21 pm
Since I haven't heard back yet I'll take a crack at what I think you're asking. I'm guessing you want to only dim the lights (or whatever) when the event happens in a particular zone. Every zone except the default zone has a name.  You can do something like this in the script:

if eg.event.payload['Media Type'] == 'Video' and eg.event.payload['ZoneName'] == 'Video Zone':
    eg.result = True
else:
    eg.result = False

You can test for any one of the values returned in the payload. If you want to see them all right click on an event and select copy. You can then paste to notepad and look at all the available values for an event.
Title: Re: MC EventGhost Plugin
Post by: WinoOutWest on March 17, 2015, 10:40:31 pm
Hi Despite my initial excitement I am just getting around to installing this now.

It is not logging any MC event at all.  I turned logging on and I get the error:

MCEventPlugin Exception in PollingLoop: <urlopen error [Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond>

I've doublechecked my key and tried this with and without log in credentials.

Any idea what else I can try?
Thanks.
Darren
Title: Re: MC EventGhost Plugin
Post by: gvanbrunt on March 18, 2015, 09:41:00 am
It means it can't reach the web service in MC for some reason. On the computer running EventGhost you can check if can reach the service.

For starters see if you can reach it via localhost if MC is on the same computer:

http://localhost:52199/MCWS/v1/doc

If not replace localhost with the IP Address of your MC server and try. It should return some documentation.
Title: Re: MC EventGhost Plugin
Post by: WinoOutWest on March 18, 2015, 09:51:56 am
yes it can reach it fine - I am successfully using the MC webservice already within EG for some controls.

EG and MC are on the same box.  No firewall is active on that box.

I can also hit MC from outside my network as well.





Title: Re: MC EventGhost Plugin
Post by: gvanbrunt on March 18, 2015, 11:50:22 am
I'm trying to figure out what is failing exactly, so please make sure you actually tried what I said, not assumed it is reachable because other plug in etc are working.

What we need to test are:

localhost:
http://localhost:52199/MCWS/v1/doc

localIP:
http://<InsertLocalIPAddressHere>:52199/MCWS/v1/doc

PublicIP:
http://<InsertPublicIPAddressHere>:52199/MCWS/v1/doc

Let me know your results.
Title: Re: MC EventGhost Plugin
Post by: WinoOutWest on March 18, 2015, 11:59:36 am
Yes I definitely tried that and it definitely works.
I have been using the MCWS commands to control MC from iRule.

At any rate... The url gives me the MCWS  command list back in both cases.
Title: Re: MC EventGhost Plugin
Post by: gvanbrunt on March 18, 2015, 12:13:39 pm
Hmm,

Checked my code and I guess it only uses the public IP to connect. So if that one is working via web browser then we might have to do some network tracing.
Title: Re: MC EventGhost Plugin
Post by: WinoOutWest on March 18, 2015, 06:29:30 pm
not that it particularly matters but I used both the external IP as well as my dyndns external address and both hit the MC server just fine.

Anything else I can do/check on my end?
Title: Re: MC EventGhost Plugin
Post by: gvanbrunt on March 18, 2015, 08:07:23 pm
Nothing off the top of my head. But what we can do is use Fiddler to see the calls being made and find out what is going on. You can get it here:

http://www.telerik.com/fiddler

what you need to do is shut everything down in the system tray etc or there will be lots of junk in the trace. The open Media Center then open Fiddler so it starts tracing. Then start EventGhost. Give it a min or two and save the trace. I'll PM my email address and you can send it there.
Title: Re: MC EventGhost Plugin
Post by: gvanbrunt on March 19, 2015, 09:38:26 am
I got your log and it clearly shows the call to the public IP of your server failing. Like a firewall is blocking it. However, I try from my computer and it works.

Are you positive that you can browse in a web browser to the pubic IP? It the one that begins with 70.78.x.x.

http://<InsertPublicIPAddressHere>:52199/MCWS/v1/doc

Also are you running any kind of security software? Virus, Malware, etc. It may be blocking the calls.
Title: Re: MC EventGhost Plugin
Post by: WinoOutWest on March 19, 2015, 10:00:39 am
Yup,
tested it again this am and I can still hit the MCWS from outside.

No firewalls on, port is open.  I run some scanners to doublecheck for virus/malware.
Title: Re: MC EventGhost Plugin
Post by: raider on March 24, 2015, 08:54:06 am
Hi, with this Eventghost plugin, is it possible for me to do this:

1. Eventghost to detect if JRiver is playing say a 2 channel music and if so, send an IR pulse to switch the integrated amplifier to Aux 1
2. If a 6 channel movie is played, send an IR pulse to switch the integrated amplifier to Aux 2.

It looks like this is possible but would like to know if this is indeed doable? Thanks
Title: Re: MC EventGhost Plugin
Post by: gvanbrunt on March 24, 2015, 11:46:50 am
Yes I believe Channels is in the payload so you could check for them in the script and trigger whatever event you want that would generate the IR. As for what plugin to use for the IR, you would have to check if your IR Blaster is supported.
Title: Re: MC EventGhost Plugin
Post by: raider on March 24, 2015, 11:31:31 pm
Thanks for that. Will try!
Title: Re: MC EventGhost Plugin
Post by: raider on March 25, 2015, 05:30:54 pm
I installed this as per instructions yesterday but eventghost does not seem to be able to monitor the actions happening in jriver. Say I play a song and change a zone, eventghost does nor show these actions happening.

I don't think I use the wrong access password because I can control jriver using gizmo on my tablet and it is using the same access password.

I have also installed the normal MC plug in and I can execute an action to trigger jriver but I just can't get jriver to monitor what jriver is actually playing.

Any ideas?
Title: Re: MC EventGhost Plugin
Post by: gvanbrunt on March 25, 2015, 08:39:26 pm
Yes, Do you have it setup for access from the internet? As mentioned in the notes, only WAN (internet) access works at the moment. If you know your local IP address you can temporarily hack the plug in to accept a static IP address. Open the __init__.py file and make the following change:

(http://yabb.jriver.com/interact/index.php?action=dlattach;topic=92375.0;attach=16601;image)

This is likely your issue.
Title: Re: MC EventGhost Plugin
Post by: WinoOutWest on March 25, 2015, 11:32:25 pm
^^^ I can vouch for this - this will get it working.
(thanks again gvanbrunt!)

Title: Re: MC EventGhost Plugin
Post by: raider on March 26, 2015, 08:00:54 am
I added the new line

ipAddress = 192.168.1.90 into the __init__py file and now when I start eventghost, it is throwing up a bunch of errors on the log screen.

I tried ipAddress = <192.168.1.90> and it is also throwing the same error.

I double checked and ensure that the characters have the correct case and spelling. Not sure why it is failing...any ideas?

I enclosed the .py file here.

Thanks
Title: Re: MC EventGhost Plugin
Post by: WinoOutWest on March 26, 2015, 09:26:24 am
try quotes.  This is my modded line that does work:

ipAddress = "192.168.2.225"
Title: Re: MC EventGhost Plugin
Post by: gvanbrunt on March 26, 2015, 09:40:26 am
Thanks Wino, you are absolutely correct, you need the quotes.

Sorry for the confusion. I guess this also means I should get off my butt and get this fixed... :)
Title: Re: MC EventGhost Plugin
Post by: WinoOutWest on March 26, 2015, 09:50:23 am
I use iRule for my whole house control including audio.
I found a tutorial that shows me how to read eventghost variables into iRule so I can display them on my panels.
I can see that MCEvents seems to capture everything I could possibly want to display.
Not being much of a programmer I was wondering if you could give me an example of how to take the the info from MCEvents and save them into a variable?
For starters I would like to get the song, artist and album into 3 variables so I can pass these to iRule.
Title: Re: MC EventGhost Plugin
Post by: gvanbrunt on March 26, 2015, 01:25:37 pm
Don't use iRule myself so  I don't know how it gets variables from Eventghost, but you could set variables in the script:

(http://yabb.jriver.com/interact/index.php?action=dlattach;topic=92375.0;attach=14917;image)

something like this:

myVariable == eg.event.payload['<name of field>']

you would later be able to access them under eg.globals such as eg.globals.myVariable. You can find all the fields available by right clicking on one in Eventghost as the appear and copy and paste to Notepad.

If you get this working I would love see some examples of it working in iRule etc.
Title: Re: MC EventGhost Plugin
Post by: WinoOutWest on March 26, 2015, 04:51:13 pm
Okay - baby steps for me...

here is my script that fires when the track is changed:
CurrentTrack == eg.event.payload['Name']

when it runs in EG I get the error:
Traceback (most recent call last):
 Python script "15", line 1, in <module>
  CurrentTrack == eg.event.payload['Name']
NameError: name 'CurrentTrack' is not defined
Title: Re: MC EventGhost Plugin
Post by: raider on March 26, 2015, 06:13:05 pm
Many thanks for the help guys. That syntax change works perfectly.

But I am now getting these errors...maybe unrelated to MCEvent but any ideas?

Traceback (most recent call last) (1700):
  File "C:\Program Files (x86)\EventGhost\eg\Classes\MainFrame\__init__.py", line 345, in FuncWrapper
    func()
  File "C:\Program Files (x86)\EventGhost\eg\Classes\MainFrame\__init__.py", line 832, in OnCmdSave
    self.document.Save()
  File "C:\Program Files (x86)\EventGhost\eg\Classes\Document.py", line 360, in Save
    self.WriteFile(self.filePath)
  File "C:\Program Files (x86)\EventGhost\eg\Classes\Document.py", line 178, in WriteFile
    tmpFile, tmpPath = mkstemp(".xml", "$", os.path.dirname(filePath))
  File "tempfile.pyc", line 293, in mkstemp
  File "tempfile.pyc", line 228, in _mkstemp_inner
OSError: [Errno 13] Permission denied


Also....as MCEvent is located in the c:\program files directory and it will require Admin access to modify and save the file everything it is required to be changed....is this the intended thing?

Thanks again
Title: Re: MC EventGhost Plugin
Post by: gvanbrunt on March 26, 2015, 07:18:56 pm
Those errors are not from the plug in. Eventghost itself can't write to it's own directory and create I temp file from what I see. This isn't really the forum for fixing eventghost issues though so I would suggest following that part up on their forum. If I knew the answer I would tell you but I don't offhand.
Title: Re: MC EventGhost Plugin
Post by: gvanbrunt on March 26, 2015, 07:23:05 pm
here is my script that fires when the track is changed:
CurrentTrack == eg.event.payload['Name']

Ug, I lead you astray again. That should have been a single equals sign. One equals sign assigns something to a variable. Two of them COMPARES the two sides. So of course since we've never assigned anything to CurrentTrack at this point it tells us so...

Hope that makes sense
Title: Re:
Post by: raider on March 26, 2015, 07:36:45 pm
Thanks gvanbrunt. I restarted eventghost and this time run it with admin rights and the errors went away.....so seems okay for now.
Title: Re: MC EventGhost Plugin
Post by: WinoOutWest on March 26, 2015, 07:43:49 pm
I am making progress as well.  No errors now - trying to get the info over to iRule now.
Thanks for the quick response!
Title: Re: MC EventGhost Plugin
Post by: raider on March 27, 2015, 05:44:47 am
Hi, I followed the instruction and created a new python script:

import eg

if eg.event.payload['ZoneName'] == 'Maverick Audio D1 + Rotel RA-06SE':
    eg.result = True
else:
    eg.result = False

But I am getting this error...

Python Script
   Traceback (most recent call last):
     Python script "5", line 3, in <module>
       if eg.event.payload['ZoneName'] == 'Maverick Audio D1 + Rotel RA-06SE':
   TypeError: 'NoneType' object is unsubscriptable

some help please? thanks
Title: Re: MC EventGhost Plugin
Post by: gvanbrunt on March 27, 2015, 10:03:42 am
Where are you seeing this error? Some screenshots would help.
Title: Re: MC EventGhost Plugin
Post by: raider on March 27, 2015, 07:48:44 pm
Sorry I must have messed up the earlier script. Here is my screenshot.

I have already defined the IR command to be sent to the amplifier to switch it to Aux 1 and Aux 2 and it is working. I just dont know how to get this working such that MCEvent detect the current zone it is in and tell eventghost what to do.






Title: Re: MC EventGhost Plugin
Post by: gvanbrunt on March 28, 2015, 12:29:15 am
Are you saying the script is not throwing errors now? If so you just need to define the jump after the script as shown in my screenshots in the original post.

And you also need to drag an MC play event etc over to the macro. It must be there before the script.
Title: Re: MC EventGhost Plugin
Post by: raider on March 28, 2015, 03:09:42 am
Thanks gvanbrunt. That does it. I added the MCEventPlugin.Play action to the macro and it now works perfectly! U are the man!
Title: Re: MC EventGhost Plugin
Post by: soundstorm on April 02, 2015, 03:42:16 pm
hello gvanbrunt,

Thanks for the nice work :). This Plugin works fine in one direction but it would be very nice to controll JRiver with EG too

it would be very usefull to send Mute, Play/Pause, Last Track, Next Track, Rewind and Forward to MC


what do you think?

Title: Re: MC EventGhost Plugin
Post by: gvanbrunt on April 02, 2015, 07:59:10 pm
You can already do this with EventGhost. That is what I do with it. You need to send commands to MC using MCC Commands:

http://wiki.jriver.com/index.php/Media_Center_Core_Commands

That is how I and others automate MC from EventGhost.
Title: Re: MC EventGhost Plugin
Post by: soundstorm on April 03, 2015, 03:38:36 am
thanks, i will try
Title: Re: MC EventGhost Plugin
Post by: gvanbrunt on April 03, 2015, 10:18:16 am
It's pretty easy but I can provide some specific examples if you need the help. Didn't have access to my HTPC yest when I wrote back.
Title: Re: MC EventGhost Plugin
Post by: soundstorm on April 03, 2015, 12:51:14 pm
that would be very kind if you could give me an example
Title: Re: MC EventGhost Plugin
Post by: WinoOutWest on April 03, 2015, 12:56:01 pm
There is a "J River Media Center" Plugin in here somewhere that seems to work for me.  I don't think it has seen much love in a while at some point I think I had to mode the config file to point it to the newer version - but for the most part the commands still work.  And it comes if most of the required commands.


Title: Re: MC EventGhost Plugin
Post by: WinoOutWest on April 03, 2015, 12:56:45 pm
Actually I think the plugin might be over in the Eventghost forum
Title: Re: MC EventGhost Plugin
Post by: soundstorm on April 03, 2015, 01:11:38 pm
would be cool if there is a solution that works also for future versions of MC and i think that core comands can provide this. isn't it ?

As far as i know the plugin dosn't

i was using winamp for the last 10 years and the plugin for EG is very good but JRiver is in indeed much better and the only thing i miss is to controll
Title: Re: MC EventGhost Plugin
Post by: soundstorm on April 03, 2015, 02:35:35 pm
 :D thank you guys

It is very easy, just used "windows commamd" in system and input      MC20.exe /MCC 10000,0     and that is all!

happy now :)

Title: Re: MC EventGhost Plugin
Post by: gvanbrunt on April 03, 2015, 11:43:57 pm
You can use the plug in, but as mentioned it isn't maintained and might be problematic. I just use MCC core commands and the "Start Application"

(http://yabb.jriver.com/interact/index.php?action=dlattach;topic=92375.0;attach=16715;image)

Then use like this:

(http://yabb.jriver.com/interact/index.php?action=dlattach;topic=92375.0;attach=16711;image)

And configure like this:
(http://yabb.jriver.com/interact/index.php?action=dlattach;topic=92375.0;attach=16713;image)

Thats about it. You can perform any of the many hundreds of actions the MCC core commands allow. FYI the example above is the play command.
Title: Re: MC EventGhost Plugin
Post by: mikemelga on July 01, 2015, 11:20:14 am
Hi.

I have added this plugin to Eventghost but I am not getting any events   :(

What am I doing wrong?
The plugin is installed in autostart and is configured with JRiver's access key and username/password.

Not a single event comes through and no error appears  :(

Any help?

Thanks.

Regards,
Mike

Title: Re: MC EventGhost Plugin
Post by: gvanbrunt on July 06, 2015, 05:19:30 pm
Sorry for my late reply but I was out of town and had no access to the internet.

For your issue, you first must make sure you have external access working for Media Center. In other words you need to be able to access from a client OUTSIDE your home network via the internet. If you are certain this works let us know.

Also, read through this entire thread. There is some advice for turning on debugging and how to access if you don't have external (internet) access set up.
Title: Re: MC EventGhost Plugin
Post by: mikemelga on July 08, 2015, 06:52:16 am
gvanbrunt,

Edited the plugin to set my ip directly and is now working great. Thanks. ;D
Title: Re: MC EventGhost Plugin
Post by: kgschlosser on May 04, 2016, 10:26:07 pm
@ gvanbrunt

I make plugins for eventghost and I would liek to know if you are ok with me modifying this plugin.

for starters make the debug something that can be changed on the fly with no need to stop edit the plugin and restart.

i would also like to add the ipaddress and port to the plugin config panel

i am not sure if there is a newer version of the plugin but the version i downloaded from the first page only shows events, has no control of jriver.

and if that is the case i would like to start the process of adding those commands into the plugin.

if you are ok with that

thanks again

K
Title: Re: MC EventGhost Plugin
Post by: gvanbrunt on May 04, 2016, 11:52:08 pm
I'm ok with any modifications you want to do, as long as the copyright notice is not removed and source remains open for anyone to use and modify. You can certainly add your name and info about modifications you did if you'd like.

If you add the IP Address and port to the control panel, It would be good if you had a radio button so you can go between automatic config (as is now) and manual.

The plug in, is not intended to control JRiver. I believe there already is a plug in that does it. You can also use MCC calls to do a lot.

However if you want to add control functions that would be fine as well. I really just wrote the plug in for my needs and put it out there if anyone else wanted to make use of it. I'm sure there would be many happy folks if you took the effort to expand on it.
Title: Re: MC EventGhost Plugin
Post by: WinoOutWest on May 05, 2016, 12:43:43 am
well this is exciting!
:-)
Title: Re: MC EventGhost Plugin
Post by: JimH on May 05, 2016, 06:46:37 am
Yes.  Thanks.

You might find the developer pages helpful:
http://wiki.jriver.com/index.php/DevZone

Especially MCWS.
Title: Re: MC EventGhost Plugin
Post by: beginner44 on November 23, 2019, 03:44:28 pm
Hi guys,

the plugin doesn't look to work anymore with the latest versions of JRiver.

Are you experiencing the same issue ?

Many thanks for your feedback.

BG
Title: Re: MC EventGhost Plugin
Post by: Awesome Donkey on November 23, 2019, 04:21:07 pm
If you're using the 64-bit version of JRiver Media Center on Windows, you likely need to use the 32-bit version instead as this is likely a 32-bit plugin.
Title: Re: MC EventGhost Plugin
Post by: jachin99 on November 23, 2019, 09:41:11 pm
Go over to the eventghost forums and someone will help you there.  I don't think this one has been converted to 64 bit but it likely isn't too hard to do so.
Title: Re: MC EventGhost Plugin
Post by: Mans on November 24, 2019, 04:16:56 am
Hi, running MC25.0.114 (x64) and EventGhost 0.5.0 rc6 incl the MCE plugin since a long time.
Having no issues with it:
I'm getting trackinfo and according feedback etc from JRiver into EG.
I can control the JRiver session using the MCWS commands.

Can you reach:
http://localhost:52199/MCWS/v1/doc

Did you checked the network key and authentication to your JRiver application.
In case you aren't 100% sure and want to check this, you might add the user/pw details onto your MCWS command.

I did noticed a while ago a change onto some MCWS commands.
But from memory nothing involving the MCE plugin.

Cheers.
Title: Re: MC EventGhost Plugin
Post by: gvanbrunt on November 24, 2019, 11:25:53 am
I'm still using it without any changes for many years. It's ugly but it works. :)

FYI I've been on x64 version for quite some time...

I'm actually surprised it's still being used as there has been no traffic in this thread for a while. Glad to hear.
Title: Re: MC EventGhost Plugin
Post by: beginner44 on November 27, 2019, 02:26:38 pm
Hello,

thanks to all of you for your answers.  :D

I will dig further during the next week end and let you know.

Take care,

BG
Title: Re: MC EventGhost Plugin
Post by: beginner44 on November 30, 2019, 03:58:17 pm
Hi, running MC25.0.114 (x64) and EventGhost 0.5.0 rc6 incl the MCE plugin since a long time.
Having no issues with it:
I'm getting trackinfo and according feedback etc from JRiver into EG.
I can control the JRiver session using the MCWS commands.

Can you reach:
http://localhost:52199/MCWS/v1/doc

Did you checked the network key and authentication to your JRiver application.
In case you aren't 100% sure and want to check this, you might add the user/pw details onto your MCWS command.

I did noticed a while ago a change onto some MCWS commands.
But from memory nothing involving the MCE plugin.

Cheers.

Hi Mans,

yes I checked that I can access the local host, anf the network key and pw are OK...

I keep on investigating and will post any news here, in case it can be helpfull to others.

Take care.

BG
Title: Re: MC EventGhost Plugin
Post by: beginner44 on November 30, 2019, 04:21:09 pm
OK it's fixed.

It is a pretty stupid mistake : I switched my network adapter from fixed IP to DHCP. I guess it has some impact on the network key.

Back to the original IP, everything is fine.

Thanks to all for your feedback, and especially to gvanbrunt that created this great plugin !

Have a good one :-)

BG
Title: Re: MC EventGhost Plugin
Post by: Mans on December 01, 2019, 01:15:53 pm
Excellent !
Enjoy :-)
Title: Re: MC EventGhost Plugin
Post by: beginner44 on March 17, 2020, 05:32:24 pm
One more thing :

I reseted my router the other day, and since then the MCE pluging wasn't working anymore...

It took me some time to find why. I first blamed a Windows 10 update (you can't blame me for that  ;D).

In the end, it appears that I had to re-configure port forwarding on the router (Linksys WRT54G) like this :

external port : 52199
internal port : 52199
protocol : TCP
to IP address : the internal IP v4 address of my PCHC.

Hope it will help someone sometime !

Cheers
Title: Re: MC EventGhost Plugin
Post by: jjazdk on March 18, 2020, 05:13:42 pm
I have just reinstalled my HTPC, and installed the newest EventGhost (0.5.0-rc6).

But, the plugins are giving me tons of errors.

Any hints on what is happening on my system?

The MCEventPlugin throws this in the log, when I use "Configure Item":
--- start ---
---> Welcome to EventGhost <---
Traceback (most recent call last) (0.5.0-rc6):
  File "C:\Program Files (x86)\EventGhost\eg\Classes\TaskletDialog.py", line 162, in ProcessingTask
    self.Configure(*args, **kwargs)
  File "C:\Program Files (x86)\EventGhost\eg\Classes\ConfigDialog.py", line 106, in Configure
    treeItem.Configure(*args)
  File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionItem.py", line 80, in Configure
    return self.executable.Configure(*args)
  File "C:\Program Files (x86)\EventGhost\plugins\MCEvent\__init__.py", line 60, in Configure
    pollingIntervalCtrl = panel.SpinNumCtrl(pollingInterval)
  File "C:\Program Files (x86)\EventGhost\eg\Classes\ControlProviderMixin.py", line 119, in SpinNumCtrl
    return eg.SpinNumCtrl(self, -1, value, *args, **kwargs)
  File "C:\Program Files (x86)\EventGhost\eg\__init__.py", line 50, in __getattr__
    mod = __import__("eg.Classes." + name, None, None, [name], 0)
  File "C:\Program Files (x86)\EventGhost\eg\Classes\SpinNumCtrl.py", line 27, in <module>
    THOUSANDS_SEP = l.GetInfo(wx.LOCALE_THOUSANDS_SEP)
  File "wx\_gdi.pyc", line 3106, in GetInfo
PyAssertionError: C++ assertion "strcmp(setlocale(LC_ALL, NULL), "C") == 0" failed at ..\..\src\common\intl.cpp(1449) in wxLocale::GetInfo(): You probably called setlocale() directly instead of using wxLocale and now there is a mismatch between C/C++ and Windows locale.
Things are going to break, please only change locale by creating wxLocale objects to avoid this!
--- end ---

Even the Timer plugin gives me errors:
--- start ---
---> Welcome to EventGhost <---
Task.Activated.EventGhost
Traceback (most recent call last) (0.5.0-rc6):
  File "C:\Program Files (x86)\EventGhost\eg\Classes\TaskletDialog.py", line 162, in ProcessingTask
    self.Configure(*args, **kwargs)
  File "C:\Program Files (x86)\EventGhost\eg\Classes\ConfigDialog.py", line 106, in Configure
    treeItem.Configure(*args)
  File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionItem.py", line 80, in Configure
    return self.executable.Configure(*args)
  File "C:\Program Files (x86)\EventGhost\plugins\Timer\__init__.py", line 518, in Configure
    loopCtrl = eg.SpinIntCtrl(panel, -1, loops, 0, size=(200,-1))
  File "C:\Program Files (x86)\EventGhost\eg\__init__.py", line 50, in __getattr__
    mod = __import__("eg.Classes." + name, None, None, [name], 0)
  File "C:\Program Files (x86)\EventGhost\eg\Classes\SpinIntCtrl.py", line 24, in <module>
    class SpinIntCtrl(eg.SpinNumCtrl):
  File "C:\Program Files (x86)\EventGhost\eg\__init__.py", line 50, in __getattr__
    mod = __import__("eg.Classes." + name, None, None, [name], 0)
  File "C:\Program Files (x86)\EventGhost\eg\Classes\SpinNumCtrl.py", line 27, in <module>
    THOUSANDS_SEP = l.GetInfo(wx.LOCALE_THOUSANDS_SEP)
  File "wx\_gdi.pyc", line 3106, in GetInfo
PyAssertionError: C++ assertion "strcmp(setlocale(LC_ALL, NULL), "C") == 0" failed at ..\..\src\common\intl.cpp(1449) in wxLocale::GetInfo(): You probably called setlocale() directly instead of using wxLocale and now there is a mismatch between C/C++ and Windows locale.
Things are going to break, please only change locale by creating wxLocale objects to avoid this!
--- end ---
Title: Re: MC EventGhost Plugin
Post by: jjazdk on March 18, 2020, 05:34:30 pm
Changing Windows display language from:
"English (Denmark)"
to
"English (United Kingdom)"

solves the issue. Some bugged locate stuff it seems.
Title: Re: MC EventGhost Plugin
Post by: beginner44 on March 22, 2020, 05:13:33 am
51299?

For MC, maybe you meant 52199?

yes Jim, you're right ! My bad (typo error)
Title: Re: MC EventGhost Plugin
Post by: JimH on March 22, 2020, 07:47:44 am
I corrected it above.
Title: Re: MC EventGhost Plugin
Post by: landolfi on April 19, 2020, 09:39:25 pm
EDIT: Never mind this post. This error will occur if you try to use EventGhost's Test button on your script. The error makes sense, since the test button causes the script to run out of its intended context.


I am getting this error as a previous poster did trying to set eg.result=True or False based on ZoneName:

Python Script
   Traceback (most recent call last):
     Python script "5", line 3, in <module>
       if eg.event.payload['ZoneName'] == 'Exasound e28':
   TypeError: 'NoneType' object is unsubscriptable

I get events from the plugin just fine and the payload looks complete when I copy it. I tried dragging the event over to the config tree as instructed to the previous poster but it's still not working. Any other ideas what could be wrong?