<?xml version="1.0"?>


<Devices>
	<!-- This device illustrates how a plugin can inherit Indigo's sensor
	device behavior including on/off and numerical value states and will
	support Indigo and Indigo Touch's native UI for sensor type devices.
	-->
	<Device type="custom" id="LevitonZoneController1">
    
		<Name>Leviton Zone Handler (VRCS2)</Name>
		<ConfigUI>
			<!-- The ConfigUI here is just an example of the type of device
			specific UI that might be needed. Here you might specify a text
			field for an IP address, a serial port popup, or other device
			specific options.
			-->
			<Field id="address" type="menu">
				<Label>Leviton Zone Controllers:</Label>
				<List class="self" filter="stuff" method="fillListLevitonZoneDevices"  dynamicReload="true"/>
				<CallbackMethod>controllerChanged</CallbackMethod>
			</Field>
			<Field type="checkbox" id="autoSendStatusRequest" defaultValue="true">
				<Label>Auto Status Update:</Label>
			</Field>			
			<Field type="checkbox" id="showHelpCheckbox" defaultValue="true">
				<Label>Show Help:</Label>
			</Field>			
			<Field type="checkbox" id="zwaveCommandsSent" defaultValue="false" hidden="true">
				<Label>Z-Wave Command Sent:</Label>
			</Field>			
			
			<!--
			<Field id="deviceId" type="list">
				<Label>ZWave Controller:</Label>
				<List class="self" filter="indigo.zwave" dynamicReload="true" method="assocDevices"/>
				<CallbackMethod>listChanged</CallbackMethod>
			</Field>
			-->
			<Field id="simpleSeparator1" type="separator"> </Field>
<!--			<Field id="label1" type="label" alignWithControl="true" alignText="left">-->
<!--				<Label>Button 1</Label>-->
<!--			</Field>-->

			<Field id="labelx" type="label" alignWithControl="true" alignText="left" >
				<Label>Button 1</Label>
			</Field>
			<Field id="assoc1" type="textfield" defaultValue="" readonly="true">
    			<Label>Associated Z-Wave Devices</Label>
			</Field>
			<Field id="label01" type="label"  alignText="left" fontSize="small" fontColor="blue" alignWithControl="true" visibleBindingValue="true"  visibleBindingId="showHelpCheckbox" >
				<Label>Associated Devices are set using Indigo's Z-Wave - Mannage Associations command. Set the Associated devices first then return here after changing the associated devices. Include the Z-Wave interface (device 1) to recieve events and status changes.</Label>
			</Field>

			<Field id="group1" type="textfield" defaultValue="0" readonly="false">
    			<Label>On - Scene# (group 1)</Label>
				<CallbackMethod>scene1Changed</CallbackMethod>
			</Field>
			<Field id="labeld" type="label"  alignText="left" fontSize="small" fontColor="blue" alignWithControl="true" visibleBindingValue="true"  visibleBindingId="showHelpCheckbox" >
				<Label>Each Button requires a different scene number to be assigned to both the On and Off. All scene numbers should be unique with in your network</Label>
			</Field>
			<Field type="menu" id="level1" >
				<List class="self" filter="stuff" method="fillBrightnessList"  />
				<Label>On - Level</Label>
			</Field>			
			<Field id="label02" type="label"  alignText="left" fontSize="small" fontColor="blue" alignWithControl="true" visibleBindingValue="true"  visibleBindingId="showHelpCheckbox" >
				<Label>Sets the brightness level for dimmer type devices. Current brightness means what condition the switch is in now, including if its off.</Label>
			</Field>
				<Field id="group3" type="textfield" defaultValue="0" readonly="false">
    			<Label>Off - Scene# (group 3) </Label>
			</Field>

			<Field id="simpleSeparator2" type="separator"> </Field>

			<Field id="label2" type="label" alignWithControl="true" alignText="left">
				<Label>Button 2</Label>
			</Field>
			<Field id="assoc2" type="textfield" defaultValue="0" readonly="true">
    			<Label>Associated Z-Wave Devices</Label>
			</Field>
			<Field id="group2" type="textfield" defaultValue="0" readonly="false">
    			<Label>On - Scene# (group 2)</Label>
				<CallbackMethod>scene2Changed</CallbackMethod>
			</Field>
			<Field type="menu" id="level2" defaultValue="onDefault">
				<Label>On - Level</Label>
				<List class="self" filter="stuff" method="fillBrightnessList" />
			</Field>			
			<Field id="group4" type="textfield" defaultValue="" readonly="false">
    			<Label>Off - Scene# (group 4) </Label>
			</Field>

			<Field id="simpleSeparatorZ" type="separator"> </Field>
			
			<!-- Hidden because not yet implemented by Indigo, but might have UI to edit
			sensor values at some point. -->

			<Field id="idSendZwave" type="button" tooltip="Send Z-Wave commands to configure Zone Controller" >
				<Label>Configure Zone Ctrl</Label>
				<Title>Send Z-Wave Commands</Title>
				<CallbackMethod>btnSendZwaveCommands</CallbackMethod>
			</Field>			
		</ConfigUI>

	</Device>
	
	<Device type="custom" id="LevitonZoneController2">

		<Name>Leviton Zone Handler (VRCZ4)</Name>
		<ConfigUI>
			<!-- The ConfigUI here is just an example of the type of device
			specific UI that might be needed. Here you might specify a text
			field for an IP address, a serial port popup, or other device
			specific options.
			-->
			<Field id="address" type="menu">
				<Label>Leviton Zone Controllers:</Label>
				<List class="self" filter="stuff" method="fillListLevitonZoneDevices"  dynamicReload="true"/>
				<CallbackMethod>controllerChanged</CallbackMethod>
			</Field>
			<Field type="checkbox" id="autoSendStatusRequest" defaultValue="true">
				<Label>Auto Status Update:</Label>
			</Field>			
			<Field type="checkbox" id="showHelpCheckbox" defaultValue="true">
				<Label>Show Help:</Label>
			</Field>			
			<Field type="checkbox" id="zwaveCommandsSent" defaultValue="false" hidden="true">
				<Label>Z-Wave Command Sent:</Label>
			</Field>			
			
			<!--
			<Field id="deviceId" type="list">
				<Label>ZWave Controller:</Label>
				<List class="self" filter="indigo.zwave" dynamicReload="true" method="assocDevices"/>
				<CallbackMethod>listChanged</CallbackMethod>
			</Field>
			-->
			<Field id="simpleSeparator1" type="separator"> </Field>
<!--			<Field id="label1" type="label" alignWithControl="true" alignText="left">-->
<!--				<Label>Button 1</Label>-->
<!--			</Field>-->
			<Field id="labelx" type="label" alignWithControl="true" alignText="left" >
				<Label>Button 1</Label>
			</Field>

			<Field id="assoc1" type="textfield" defaultValue="" readonly="true">
    			<Label>Associated Z-Wave Devices</Label>
			</Field>
			<Field id="label01" type="label"  alignText="left" fontSize="small" fontColor="blue" alignWithControl="true" visibleBindingValue="true"  visibleBindingId="showHelpCheckbox" >
				<Label>Associated Devices are set using Indigo's Z-Wave - Mannage Associations command. Set the Associated devices first then return here after changing the associated devices. Include the Z-Wave interface (device 1) to recieve events and status changes.</Label>
			</Field>

			<Field id="group1" type="textfield" defaultValue="0">
    			<Label>On - Scene# (group 1)</Label>
				<CallbackMethod>scene1Changed</CallbackMethod>
			</Field>
			<Field id="labeld" type="label"  alignText="left" fontSize="small" fontColor="blue" alignWithControl="true" visibleBindingValue="true"  visibleBindingId="showHelpCheckbox" >
				<Label>Each Button requires a different scene number to be assigned to both the On and Off. All scene numbers should be unique with in your network</Label>
			</Field>
			<Field type="menu" id="level1" >
				<List class="self" filter="stuff" method="fillBrightnessList"  />
				<Label>On - Level</Label>
			</Field>			
			<Field id="label02" type="label"  alignText="left" fontSize="small" fontColor="blue" alignWithControl="true" visibleBindingValue="true"  visibleBindingId="showHelpCheckbox" >
				<Label>Sets the brightness level for dimmer type devices. Current brightness means what condition the switch is in now, including if its off.</Label>
			</Field>
						<Field id="group5" type="textfield" defaultValue="" readonly="true">
    			<Label>Off - Scene# (group 5) </Label>
			</Field>

			<Field id="simpleSeparator2" type="separator"> </Field>
			<Field id="label2" type="label" alignWithControl="true" alignText="left">
				<Label>Button 2</Label>
			</Field>
			<Field id="assoc2" type="textfield" defaultValue="" readonly="true">
    			<Label>Associated Z-Wave Devices</Label>
			</Field>
			<Field id="group2" type="textfield" defaultValue="" readonly="true">
    			<Label>On - Scene# (group 2)</Label>
			</Field>
			<Field type="menu" id="level2" defaultValue="onDefault">
				<Label>On - Level</Label>
				<List class="self" filter="stuff" method="fillBrightnessList" />
			</Field>			
			<Field id="group6" type="textfield" defaultValue="" readonly="true">
    			<Label>Off - Scene# (group 6) </Label>
			</Field>

			<Field id="simpleSeparator3" type="separator"> </Field>
			<Field id="label3" type="label" alignWithControl="true" alignText="left">
				<Label>Button 3</Label>
			</Field>
			<Field id="assoc3" type="textfield" defaultValue="" readonly="true">
    			<Label>Associated Z-Wave Devices</Label>
			</Field>
			<Field id="group3" type="textfield" defaultValue="" readonly="true">
    			<Label>On - Scene# (group 3)</Label>
			</Field>
			<Field type="menu" id="level3" defaultValue="onDefault">
				<Label>On - Level</Label>
				<List class="self" filter="stuff" method="fillBrightnessList" />
			</Field>			
			<Field id="group7" type="textfield" defaultValue="" readonly="true">
    			<Label>Off - Scene# (group 7) </Label>
			</Field>

			<Field id="simpleSeparator4" type="separator"> </Field>
			<Field id="label4" type="label" alignWithControl="true" alignText="left">
				<Label>Button 4</Label>
			</Field>
			<Field id="assoc4" type="textfield" defaultValue="" readonly="true">
    			<Label>Associated Z-Wave Devices</Label>
			</Field>
			<Field id="group4" type="textfield" defaultValue="" readonly="true">
    			<Label>On - Scene# (group 4)</Label>
			</Field>
			<Field type="menu" id="level4" defaultValue="onDefault">
				<Label>On - Level</Label>
				<List class="self" filter="stuff" method="fillBrightnessList" />
			</Field>			
			<Field id="group8" type="textfield" defaultValue="" readonly="true">
    			<Label>Off - Scene# (group 8) </Label>
			</Field>


			<Field id="simpleSeparatorZ" type="separator"> </Field>
			
			<!-- Hidden because not yet implemented by Indigo, but might have UI to edit
			sensor values at some point. -->

			<Field id="idSendZwave" type="button" tooltip="Send Z-Wave commands to configure Zone Controller" >
				<Label>Configure Zone Ctrl</Label>
				<Title>Send Z-Wave Commands</Title>
				<CallbackMethod>btnSendZwaveCommands</CallbackMethod>
			</Field>			
		</ConfigUI>
		
			<!-- By default sensor type devices automatically inherit:

				onOffState state IF property SupportsOnState is True
				sensorValue state IF property SupportsSensorValue is True

			The plugin can specify additional custom states and custom
			actions (in Actions.xml) to modify custom states. As an example
			here, we define a new custom state, backlightBrightness, which
			is used to control the brightness of the backlit display of
			the module.
			-->
					

	</Device>
</Devices>
