<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Troy Kelly &#187; Dynalite Tutorials</title>
	<atom:link href="http://troykelly.com/category/work/dynalite-work/feed/" rel="self" type="application/rss+xml" />
	<link>http://troykelly.com</link>
	<description>Why are you here? ...really</description>
	<lastBuildDate>Thu, 15 Jul 2010 11:26:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Dynalite:: Using the LED&#8217;s in User Panels</title>
		<link>http://troykelly.com/2010/01/05/dynalite-ledonoff/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=dynalite-ledonoff</link>
		<comments>http://troykelly.com/2010/01/05/dynalite-ledonoff/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 23:00:12 +0000</pubDate>
		<dc:creator>Troy Kelly</dc:creator>
				<category><![CDATA[Dynalite Tutorials]]></category>
		<category><![CDATA[dynalite]]></category>
		<category><![CDATA[LED]]></category>
		<category><![CDATA[user panels]]></category>

		<guid isPermaLink="false">http://troykelly.com/?p=578</guid>
		<description><![CDATA[Accessing LED's on User Panels within the Dynalite network is via the command LEDOnOff]]></description>
			<content:encoded><![CDATA[<p><em>I have only tested the following with UPan9 Devices, but it should hold true for any &#8211; as the command seems to be the same.</em></p>
<p>The LED&#8217;s on the User Panels are controlled via the command <strong>LEDOnOff()</strong></p>
<p>It takes four hexadecimal values to determine which primary, and which auxiliary/backlight LED&#8217;s to turn on or off.</p>
<p>eg LEDOnOff(0x0f,0x0f,0x0f,0x0f)</p>
<p>The above example will turn off ALL LED&#8217;s on the User Panel.</p>
<p>LED&#8217;s are addressed from the top down, and in groups of four in a binary fashion. So &#8211; if you had a UPan9 with 8 buttons (only the first 6 have LED&#8217;s) Their addresses would be:</p>
<p>BUTTON 1 = (0&#215;80,0,0,0)<br />
BUTTON 2 = (0&#215;40,0,0,0)<br />
BUTTON 3 = (0&#215;20,0,0,0)<br />
BUTTON 4 = (0&#215;10,0,0,0)<br />
BUTTON 5 = (0,0&#215;80,0,0)<br />
BUTTON 6 = (0,0&#215;40,0,0)</p>
<p>You add the binary equivalent of these values to turn more then one LED on at once. Eg. Turning on Button&#8217;s 1 + 2</p>
<p>LEDOnOff(0xc0,0,0,0)</p>
<p>As you can see above 8 + 4 = 12 (which is expressed as &#8220;c&#8221; hexadecimally)</p>
<p>The first &#8220;bit&#8221; of each pair is for ON, the second is for OFF. So, to turn LED&#8217;s 1 and 2 off, the command would be</p>
<p>LEDOnOff(0x0c,0,0,0)</p>
<p>The backlights (where available) are accessed in exactly the same fashion, but in the third and fourth sets. So &#8211; to turn backlights ON for button 5</p>
<p>LEDOnOff(0,0,0,0&#215;80)</p>
<p>And again, by adding the values, you can access more at once. Turning backlights on for 3 and 4 and turning LED&#8217;s off for 1 and 2</p>
<p>LEDOnOff(0x0c,0,0&#215;30,0)</p>
<p><em>The above are examples for Dynalite / DyNet Event (.EVT) code. I have had no formal Dynalite Training, and this is based on the ~scarce~ information available online. Your comments about errors / omissions are encouraged.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://troykelly.com/2010/01/05/dynalite-ledonoff/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynalite:: Tasks</title>
		<link>http://troykelly.com/2010/01/04/dynalite-tasks/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=dynalite-tasks</link>
		<comments>http://troykelly.com/2010/01/04/dynalite-tasks/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 07:12:50 +0000</pubDate>
		<dc:creator>Troy Kelly</dc:creator>
				<category><![CDATA[Dynalite Tutorials]]></category>
		<category><![CDATA[dynalite]]></category>
		<category><![CDATA[tasks]]></category>

		<guid isPermaLink="false">http://troykelly.com/?p=574</guid>
		<description><![CDATA[Dynalite systems are controlled by Tasks, this is a brief introduction setting you on a path to harnessing their power.]]></description>
			<content:encoded><![CDATA[<p>Dynalite programs are executed inside functions called &#8220;Tasks&#8221;.</p>
<p>Tasks can be triggered by various means: </p>
<p>Events (eg At 9pm every day, run the first Task);<br />
By buttons in User Panels (eg Button 2 executes the seventh task);<br />
DyNet traffic (eg &#8220;5c f3 53 10 37 00 00&#8243; will trigger the fifty-fifth task in a D2Brg box 83);<br />
Area Presets (eg Start(P=1,A=1));<br />
Other Tasks (eg StartTask())</p>
<p>Tasks can also be stopped by similar means above. That means you can have a looping task, or a task that has long delays in it that can be &#8220;aborted&#8221; if you need. This comes in handy when you want to automate lighting changes after a long delay, unless something (like a motion detector) is triggered.</p>
<p><code>Task2()<br />
{<br />
	// Monitor the Garage Movement Event<br />
	Name="MOVE Garage"<br />
	Start(P=36,A=255)<br />
	Delay(0.2)<br />
	Preset=17<br />
	Join=0xff<br />
	Fade=1.00<br />
	Preset(A=15)<br />
}</code></p>
<p>Looking at the above, the first line shows we are declaring a Task. This is the second task within this event file, so it is written &#8220;Task2()&#8221;. Some devices are capable of more tasks then others, but most are able to store at least 8.</p>
<p>The Event Code supports comments, and they start with a double forward slash.</p>
<p>This task is triggered by area 255 going to preset 36. In our installs we use this area as a &#8220;Functional&#8221; zone.</p>
<p>Our automation panel sets area 255 to 36 whenever their is movement in the Garage area. Eg, the Garage Door is open, or the PIR&#8217;s are triggered.</p>
<p>In this example, all this task does is to set Area 15 to Preset 17 whenever it is triggered. This is the most elementary of tasks, and you could consider it some sort of a message relay.</p>
<p>Tasks are incredibly powerful, and through &#8220;Assembly&#8221; like constructs support variables, conditions etc. I will try and provide examples of these in other posts.</p>
<p>A slightly more powerful adaption of the above would be in the following situation. Assume you have several areas serviced by one User Panel. Your customer would like one button to turn the lighting on in those areas. You have selected Preset 3 as the preset you would like to apply to all the areas.</p>
<p><code>Task8()<br />
{<br />
	// Entertainment Lighting<br />
	Name="Lower House Entertainment"<br />
	Preset=3<br />
	Join=0xff<br />
	Fade=4.00<br />
	Preset(A=3)<br />
	Delay(0.2)<br />
	Preset(A=5)<br />
	Delay(0.2)<br />
	Preset(A=6)<br />
	Delay(0.2)<br />
	Preset(A=7)<br />
}</code></p>
<p>This code will set areas 3, 5, 6 and 7 to preset 3. The delay&#8217;s are important after each preset message to not bombard the network with too much traffic.  The above could also be written:</p>
<p><code>Task8()<br />
{<br />
	// Entertainment Lighting<br />
	Name="Lower House Entertainment"<br />
	Preset(A=3,P=3,F=4.00,J=0xff)<br />
	Delay(0.2)<br />
	Preset(A=5,P=3,F=4.00,J=0xff)<br />
	Delay(0.2)<br />
	Preset(A=6,P=3,F=4.00,J=0xff)<br />
	Delay(0.2)<br />
	Preset(A=7,P=3,F=4.00,J=0xff)<br />
}</code></p>
<p>But given that we are setting several areas to the same preset, I feel the initial example is a little easier to read.</p>
<p><em>The above are examples for Dynalite / DyNet Event (.EVT) code. I have had no formal Dynalite Training, and this is based on the ~scarce~ information available online. Your comments about errors / omissions are encouraged.</em></p>
<p>Cheers, Troy</p>
]]></content:encoded>
			<wfw:commentRss>http://troykelly.com/2010/01/04/dynalite-tasks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
