I've set up a github repository and documentation here.
Built-In Foscam HD Motion Detection with ZM
This is the first time I've used github to create anything, so I hope I set it up right.
Please read the Wiki in that page for setup instructions. Please also see the Bugs page in the Wiki
Please note setup is involved, so if you don't know how triggers work, please don't try it - I don't want you to mess up your system

As always, I welcome contributions and further tips from folks who know how ZM works to help me fine tune it.