Not sure if there is a binding for this or any other solution

Looking for a software or idea to accomplish the following. I am building my home automation solution with different pieces of software mainly on my tablet and dedicated PC.

I have been trying to see how to accomplish the following.

I want to be able to set my IP cameras to detect motion only when my alarm system is armed.

My alarm system can send emails when different events happen. I can intercept them and send them to Eventghost or react to them with Tasker plugins. Now I need to find a software that will allow me to enable motion detection on my Dlink cameras via and email or an Eventghost plugin.

Not sure if there something like this out there. Any ideas??

Have you thought about replacing the motion detection on the cameras with control software that has its own motion detection (more reliable and sophisticated), and then controlling that with openHAB? Perhaps Zoneminder on Linux or iSpy on PC?