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.
TroubleshootingIf 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:
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!