<?xml version="1.0" encoding="UTF-8"?>
<component xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:noNamespaceSchemaLocation="racepoint_component_profile.xsd" manufacturer="Mobotix"
	model="T24DS" device_class="Security_camera_ptz" unique_identifier="hostname"
	alias="SIP Doorbell Client" minimum_component_engine_version="0"
	minimum_compatible_xml_version="0.0" rpm_xml_version="$Revision: 2.4 $">
	<notes> 
		If the camera is password protected, use this format in the hostname field in Blueprint's
		device inspector: username:password@cameraAddress. If you don't want password protection, login
		into the camera and go to Basic Configurations->Users and enable anonymous viewer login.
		
		Output Relay: The name of the signal out profile defined in the door station, 
		must be passed to the "OutputRelay" action for the ENV_GENERALRELAYCONTROLLEDDEVICE_SOURCE resource. 
	
	</notes>
	<component_properties>
		<telephony_allowed>true</telephony_allowed>
		<telephony_endpoint_type>third_party_door_entry_system</telephony_endpoint_type>
	</component_properties>
	<control_interfaces preferred="ip">
		<ip port="80" response_time_length_ms="12000" name_on_component="ETHERNET" protocol="http">
			<send_prefix>control</send_prefix>
			<receive_end_condition test_condition="data">3</receive_end_condition>
			<response_codes>
				<!-- 1xx is ignored -->
				<rspcode type="character" status="success">2</rspcode>
				<!-- i.e. 2xx responses -->
				<rspcode type="character" status="failure">3</rspcode>
				<!-- i.e. 3xx responses -->
				<rspcode type="character" status="failure">4</rspcode>
				<!-- i.e. 4xx responses -->
				<rspcode type="character" status="failure">5</rspcode>
				<!-- i.e. 5xx responses -->
			</response_codes>
		</ip>
	</control_interfaces>
	<media_interfaces>
		<data name_on_component="Ethernet">
			<combined_media>
				<data_media type="ethernet"/>
				<control port="80"/>
			</combined_media>
		</data>
		<internal name_on_component="Security Camera">
			<environmental_media/>
			<resource resource_type="ENV_SECURITYCAMERA_SOURCE"/>
		</internal>
		<internal name_on_component="SIP Endpoint">
			<audio_media/>
			<resource resource_type="COMM_TELEPHONY_SIP_ENDPOINT_SOURCE"/>
		</internal>
		<internal name_on_component="Relay">
			<environmental_media/>
			<resource resource_type="ENV_GENERALRELAYCONTROLLEDDEVICE_SOURCE"/>
		</internal>
	</media_interfaces>
	<logical_component logical_component_name="Security_camera">
		<implementation>
			<internal name_on_component="Security Camera"/>
		</implementation>
		<image_access>
			<image_format format="jpg" resolution="default">/cgi-bin/image.jpg</image_format>
			<image_format format="mjpg" resolution="default" is_default="yes"
				>/control/faststream.jpg?stream=full</image_format>
		</image_access>

		<resource_component_actions resource_type="ENV_SECURITYCAMERA_SOURCE">
			<action name="PanLeft">
				<action_argument name="PanValue" note="Not Used"/>
				<command_interface interface="ip">
					<command response_required="yes">
						<command_string type="character">/click.cgi?moverel&amp;x=30</command_string>
					</command>
				</command_interface>
			</action>
			<action name="PanRight">
				<action_argument name="PanValue" note="Not Used"/>
				<command_interface interface="ip">
					<command response_required="yes">
						<command_string type="character">/click.cgi?moverel&amp;x=-30</command_string>
					</command>
				</command_interface>
			</action>
			<action name="TiltUp">
				<action_argument name="TiltValue" note="Not Used"/>
				<command_interface interface="ip">
					<command response_required="yes">
						<command_string type="character">/click.cgi?moverel&amp;y=30</command_string>
					</command>
				</command_interface>
			</action>
			<action name="TiltDown">
				<action_argument name="TiltValue" note="Not Used"/>
				<command_interface interface="ip">
					<command response_required="yes">
						<command_string type="character">/click.cgi?moverel&amp;y=-30</command_string>
					</command>
				</command_interface>
			</action>
			<action name="ZoomIn">
				<action_argument name="ZoomValue" note="Not Used"/>
				<command_interface interface="ip">
					<command response_required="yes">
						<command_string type="character">/click.cgi?zoomrel=250</command_string>
					</command>
				</command_interface>
			</action>
			<action name="ZoomOut">
				<action_argument name="ZoomValue" note="Not Used"/>
				<command_interface interface="ip">
					<command response_required="yes">
						<command_string type="character">/click.cgi?zoomrel=-200</command_string>
					</command>
				</command_interface>
			</action>
		</resource_component_actions>
		<custom_component_actions>
			<action name="CenterPanPosition">
				<command_interface interface="ip">
					<command response_required="yes">
						<command_string type="character">/click.cgi?center=yes</command_string>
					</command>
				</command_interface>
			</action>
			<action name="SetNormalView">
				<command_interface interface="ip">
					<command response_required="yes">
						<command_string type="character"
							>/control?set&amp;section=general&amp;display_mode=lenscorr_l11</command_string>
					</command>
				</command_interface>
			</action>
			<action name="SetSurroundView">
				<command_interface interface="ip">
					<command response_required="yes">
						<command_string type="character"
							>/control?set&amp;section=general&amp;display_mode=surround</command_string>
					</command>
				</command_interface>
			</action>
			<action name="SetPanoramaView">
				<command_interface interface="ip">
					<command response_required="yes">
						<command_string type="character"
							>/control?set&amp;section=general&amp;display_mode=panorama</command_string>
					</command>
				</command_interface>
			</action>
			<action name="SetPanoFocusView">
				<command_interface interface="ip">
					<command response_required="yes">
						<command_string type="character"
							>/control?set&amp;section=general&amp;display_mode=pano_focus</command_string>
					</command>
				</command_interface>
			</action>
		</custom_component_actions>
	</logical_component>
	<logical_component logical_component_name="telephony">
		<implementation>
			<internal name_on_component="SIP Endpoint"/>
		</implementation>
	</logical_component>
	<logical_component logical_component_name="Relay">
		<implementation>
			<internal name_on_component="Relay"/>
		</implementation>

		<custom_component_actions>
			<action name="OutputRelay">
				<action_argument name="SigOutProfile" note="eg. 'SO_Door' or '~Door'"/>
				<update_state_variable name="Current_relay_state" update_type="set" update_source="constant">close</update_state_variable>
				<update_state_variable name="Current_relay_state" update_type="set" update_source="constant">open</update_state_variable>
				<command_interface interface="ip">
					<command response_required="no">
						<command_string>/rcontrol?action=customfunction&amp;action=sigout&amp;profile=</command_string>
						<parameter_list>
							<parameter parameter_data_type="character" action_argument="SigOutProfile"/>
						</parameter_list>
						<delay ms_delay="500"/>
					</command>
				</command_interface>
			</action>
		</custom_component_actions>
	</logical_component>
</component>
