Execute Shell script when Video starts

I want to execute a shell script to dim the lights every time any video starts.
Also everytime a video is paused or stopedd. How can I achieve this?
Do I needd to make a feature request?

I found this XBMC Monitor but how do I use it?
How do I use onPlayBackStarted() to do what I want to do?
the lights are dimmable via a http request

Have a look at cinema vision addon. It lets you do automation tasks before and after playing videos.

It is there to create a cinema like experience.
You can also play intro videos trailers and so on. You can put your requests in simple bash or python scripts.

Try this addon: http://forum.kodi.tv/showthread.php?tid=256170

That solved my problem. Many Thanks.