Configuration for script and camera form

Configuration is set in xml format and is placed as a comment at the beginning of script or camera profile.

Example of configuration structure for script form:

/*
<?xml version="1.0" encoding="UTF-8"?>
<xml>
  <description>
    <b>Script for remote control LG</b>
    <br/>
   6711A20010B from conditioner LG
  </description>
  <tag value="import-script"/>
  <target value="IRT"/>
  <selectArea value="1"/>
  
  <additems>
    <additem tag="item" id="%TARGET%" name="Conditioner_LG_6711A20010B" sub-id="%SUBID%" type="conditioner" t-delta="14" t-min="16" vane-hor="0" vane-ver="0"/>
  </additems>

  <item type="devices-list" name="IRT" filter="ir-transmitter" required="1" comment="IR-transmitter/>
   <item type="string" name="NAME" comment="Conditioner name" value="Conditioner"  min="3" max="40" regexp=""  required="1"/>
  <item type="hidden" name="COND" value="%TARGET%:%SUBID%"/>
 
</xml>
*/

Example of configuration structure for Foscam FI8918W camera form:

<?xml version="1.0" encoding="UTF-8"?>
<profile>
    <fields>
        <name value="Foscam FI8918W"/>
        <line>
            <item type="string" name="LHOST" comment="Local address of camera" value="192.168.1.151" required="1" min="7" max="15" regexp="" mask="099.099.099.099" weight="6"/>
            <item type="number" name="LPORT" comment="Port for video stream" value="554" required="1" min="1" max="65535" regexp="" weight="3"/>
        </line>
        <line>
            <item type="string" name="RHOST" comment="Remote address of camera" value="192.168.1.158" required="1" min="7" max="100" regexp="" weight="6"/>
            <item type="number" name="RPORT" comment="Port for video stream" value="554" required="1" min="1" max="65535" regexp="" weight="3"/>
        </line>
        <line>
            <item type="string" name="VLOGIN" comment="Login" value="admin" required="1" min="3" max="50" regexp="" weight="4"/>
            <item type="string" name="VPASSWD" comment="Password" value="123456" required="0" min="1" max="30" regexp="" weight="4"/>
            <item type="checkbox" name="AUTOPLAY" comment="Auto playback" value="0" required="0" weight="4"/>
        </line>
    </fields>

<xml><item 
name="%NAME%" 
id="2048"  
type="rtsp" 
url="http://%LOGIN%:%PASSWD%@%LHOST%:%LPORT%" 
url-remote="http://%LOGIN%:%PASSWD%@%RHOST%:%RPORT%" 
http-auth="%LOGIN%:%PASSWD%" 
video-uri="/videostream.cgi" 
ffmpeg-opt="fmt=mjpeg;analyzeduration=100" 
top-uri="/decoder_control.cgi?command=0" 
bottom-uri="/decoder_control.cgi?command=2" 
left-uri="/decoder_control.cgi?command=6" 
right-uri="/decoder_control.cgi?command=4" 
stop-uri="/decoder_control.cgi?command=1" 
auto-play="%AUTOPLAY%"/>
</xml>
</profile>