IP Camera + Arduino Uno + Ultrasonic Sensor

Am working on this project, an automated home security system which i need to send an image by a motion detection through an IP camera.Currently using an ultrasonic sensor with arduino uno for motion detection as for now i need to connect the arduino uno to my ip camera through itsalarm I/O pins(as an external sensor)....will this connection work? can someone help me with the codes that will enable the IP camera to receive signals from the arduino through the alarm inputs???

Am using a HC-SR04 ultrsonic sensor and a Foscam IP camera.

For informed help, post a link to the full interface specification for the camera you plan to use.