title: How to trigger motion detection event for camera via api with Synology Surveillance Station
body: <p>I have a doorbird video doorbell with motion push button and PIR motion sensor. The camera can also provide a continuous feed which I'm recording via Synology Surveillance Station as a generic ONVIF camera. This ONVIF camera <strong>does not</strong> define the motion sensor or bell push button as digital inputs, which is the normal way to interact with them in Surveillance Station. However, the DoorBird can fire GET requests (at least on button push, possibly for PIR sensor) so I'm hoping to use this GET request feature instead of proper ONVIF event support. </p>
  
  <h1>Action Rules and External Events</h1>
  
  <p>Using the Surveillance Station 'Action Rules' available from the WEB UI, I hoped to wire this up to a motion event.  I added a new event, using 'External Device' (web request call). </p>
  
  <p><a href="https://i.stack.imgur.com/GbhGD.png" rel="noreferrer"><img src="https://i.stack.imgur.com/GbhGD.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/QzJrx.png" rel="noreferrer"><img src="https://i.stack.imgur.com/QzJrx.png" alt="enter image description here"></a></p>
  
  <p>The 'external event' will generate a link like this.</p>
  
  <p><a href="http://192.168.1.5:5000/webapi/entry.cgi?api=SYNO.SurveillanceStation.ExternalEvent&amp;method=" rel="noreferrer">http://192.168.1.5:5000/webapi/entry.cgi?api=SYNO.SurveillanceStation.ExternalEvent&amp;method=</a>"Trigger"&amp;version=1&amp;eventId=1&amp;eventName="This is external event1"&amp;account="doorbird"&amp;password="changeme"</p>
  
  <p>This works, I get a 'success' json response and an event it registered. The problem is that I want to register a camera motion event that appears in the camera timeline as normal.</p>
  
  <p>The problem here is that there is no way to utilise this event as a 'motion' detection event within Surveillance Station. You can only switch home mode on and off or invoke an audio output. I want the motion event triggered so that it shows up in the camera timeline as I continuously record the camera. </p>
  
  <h1>WEB API</h1>
  
  <p><a href="https://global.download.synology.com/download/Document/DeveloperGuide/Surveillance_Station_Web_API_v2.7.pdf" rel="noreferrer">https://global.download.synology.com/download/Document/DeveloperGuide/Surveillance_Station_Web_API_v2.7.pdf</a></p>
  
  <p>To get the current version of Surveillance Station. </p>
  
  <p><a href="http://192.168.1.5:5000/webapi/entry.cgi?api=SYNO.SurveillanceStation.Info&amp;method=GetInfo&amp;version=1&amp;account=" rel="noreferrer">http://192.168.1.5:5000/webapi/entry.cgi?api=SYNO.SurveillanceStation.Info&amp;method=GetInfo&amp;version=1&amp;account=</a>"doorbird"&amp;password="changeme"</p>
  
  <p>To get the current camera information. Note that 'basic=true' sends addition basic data, it is not 'just' basic data. For example, the camera ID is not sent <strong>unless</strong> basic=true.</p>
  
  <p><a href="http://192.168.1.5:5000/webapi/entry.cgi?privCamType=1&amp;version=" rel="noreferrer">http://192.168.1.5:5000/webapi/entry.cgi?privCamType=1&amp;version=</a>"8"&amp;basic=true&amp;streamInfo=true&amp;api="SYNO.SurveillanceStation.Camera"&amp;camStm=1&amp;method="List"&amp;account="doorbird"&amp;password="changeme"</p>
  
  <p>So I have the camera id, but at this point I'm stuck. I'm not sure if it is possible to trigger the equivalent motion event against the camera feed.</p>