It's easy to drive your TrendNet camera using curl. This is how you can make it scan to different preset positions.
Note that Curl must be used in Digest mode.
Assuming you have a ~/.netrc file containing your device username and password, first fetch the preset elements (look for the xml section).
curl --digest -n http://camera.local/eng/liveView.cgi
You should see elements in the resulting document such as:
<preset>
<presetName>Bottom-Stairs</presetName>
<presetID>1</presetID>
</preset>
<preset>
<presetName>Top-Stairs</presetName>
<presetID>2</presetID>
</preset>
NB: It looks like the presetId element is one-based, but the "index" parameter that you need to use is zero-based. So, to access the presetID 1
above, subtract one and to access the first preset.
Once you have the list of presets, you can issue a standard GET request to change the camera position:
curl --digest -n http://camera.local/cgi/ptdc.cgi?command=goto_preset_position&index=0
The response document has a field for success or failure, however this seems like it may be buggy or have weird behavior - my camera moves when I access an index above the number of presets I've defined and the response document indicates success.
You can go home using the following URL:
curl --digest -n http://camera.local/cgi/ptdc.cgi?command=go_home
The response document always tells me this operation failed, however it seems to work and actually move the camera to the home position.
Note that it should be easy to figure out the other commands to issue to the camera using Chrome developer tools (Network tab). Just click something in the interface, and see what the URL is that is requested from the camera.