<?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>Piethein Strengholt&#039;s Blog</title>
	<atom:link href="http://www.strengholt-online.nl/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.strengholt-online.nl</link>
	<description>Bloggen over van alles en nog wat...</description>
	<lastBuildDate>Mon, 16 Apr 2012 17:28:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Hyper-V backup with volume shadow</title>
		<link>http://www.strengholt-online.nl/hyper-v-backup-with-volume-shadow/</link>
		<comments>http://www.strengholt-online.nl/hyper-v-backup-with-volume-shadow/#comments</comments>
		<pubDate>Mon, 16 Apr 2012 17:26:00 +0000</pubDate>
		<dc:creator>Piethein Strengholt</dc:creator>
				<category><![CDATA[Hyper-V]]></category>
		<category><![CDATA[volume shadow]]></category>

		<guid isPermaLink="false">http://www.strengholt-online.nl/?p=929</guid>
		<description><![CDATA[As promised; Here&#8217;s my Hyper-v volume schadow backup script. I coded this a while ago. It pauses the hyper-v and creates a virtual shadow. The virtual machine will be started while the backup is running. This results in a minimum downtime. Useful for small production or test environments. backup.bat diskshadow -s shadowcreate.txt shadowcreate.txt #DiskShadow script [...]]]></description>
			<content:encoded><![CDATA[<p>As promised; Here&#8217;s my Hyper-v volume schadow backup script. I coded this a while ago.</p>
<p>It pauses the hyper-v and creates a virtual shadow. The virtual machine will be started while the backup is running. This results in a minimum downtime. Useful for small production or test environments.</p>
<p><strong>backup.bat</strong></p>
<p><code>diskshadow -s shadowcreate.txt</code></p>
<p><strong>shadowcreate.txt</strong></p>
<p><code>#DiskShadow script file<br />
delete shadows all<br />
list providers<br />
set context persistent<br />
set metadata D:\MetaData.cab<br />
set verbose on</code></p>
<p><code>#Create network share<br />
EXEC vmnetwork.cmd</code></p>
<p><code>#Write save state files to harddisk before start backup<br />
EXEC vmsavestate.cmd</code></p>
<p><code>begin backup</code></p>
<p><code>add volume d: alias DataVolumeShadow</code></p>
<p><code>#verify the "Microsoft Hyper-V VSS Writer" writer will be included in the snapshot<br />
#writer verify {66841cd4-6ded-4f4b-8f17-fd23f8ddc3de}<br />
create</code></p>
<p><code>expose %DataVolumeShadow% q:</code></p>
<p><code>#Start Virtual Machine<br />
EXEC vmstart.cmd<br />
</code><br />
<code>#copy all files to d:\backup<br />
EXEC vmcopy.cmd</code></p>
<p><code>unexpose q:<br />
end backup<br />
delete shadows all<br />
</code><br />
<code>#End of script</code></p>
<p><strong>vmcopy.vbs</strong></p>
<p><code>'Usage: cscript //NoLogo vmcopy.vbs D:\Backup\<br />
'todo: mailfunctie<br />
'todo: meer logging</code></p>
<p><code>Dim ArgObj, backuppath, count<br />
Set ArgObj = WScript.Arguments<br />
backuppath = ArgObj(0)</code></p>
<p><code>On Error Resume Next</code></p>
<p><code>Set objFS = CreateObject("Scripting.FileSystemObject")</code></p>
<p><code>Dim iSpc<br />
Set objWMIService = GetObject("winmgmts:")<br />
Set objLogicalDisk = objWMIService.Get("Win32_LogicalDisk.DeviceID='X:'")<br />
iSpc = objLogicalDisk.FreeSpace/1024/1024<br />
iSpc = FormatNumber(iSpc,0)<br />
Wscript.Echo "Free space on Harddisk: " &amp; iSpc &amp; "GB"</code></p>
<p><code>Dim Directory<br />
Set Directory = objFS.GetFolder("Q:\Hyper-V")<br />
Dim Dsize<br />
Dsize = Directory.Size/1024/1024<br />
Dsize = FormatNumber(Dsize,0)<br />
Wscript.Echo "Folder size to back-up: " &amp; Dsize &amp; "GB"</code></p>
<p><code>Dim BackupLocation<br />
Set BackupLocation = objFS.GetFolder(backuppath)<br />
Dim Tel<br />
Dim Minimum<br />
Minimum = Dsize + 30*1024<br />
Minimum = FormatNumber(Minimum,0)<br />
Wscript.Echo "Folder size needed: " &amp; Minimum &amp; "GB"</code></p>
<p><code>Wscript.Echo "Amount of Backup* directories found is: " &amp; ArgObj(1)<br />
count = ArgObj(1)</code></p>
<p><code>Wscript.Echo "Looking for " &amp; backuppath<br />
If objFS.FolderExists(backuppath) then<br />
Wscript.Echo "No need to create " &amp; backuppath<br />
Else<br />
objFS.CreateFolder(backuppath)<br />
Wscript.Echo "Path not found.... Creating: " &amp; backuppath<br />
End If<br />
WScript.Sleep 200</code></p>
<p><code>If objFS.FolderExists(backuppath &amp; "Backup0" &amp; count) then<br />
Wscript.Echo "Delete folder: " &amp; backuppath &amp; "Backup0" &amp; count<br />
objFS.DeleteFolder(backuppath &amp; "Backup0" &amp; count)<br />
WScript.Sleep 200<br />
Else<br />
Wscript.Echo "Folder not found.... " &amp; backuppath &amp; "Backup0" &amp; count<br />
WScript.Sleep 200<br />
End If</code></p>
<p><code>Do While count &gt; 1</code></p>
<p><code>If objFS.FolderExists(backuppath &amp; "Backup0" &amp; count - 1) then<br />
Wscript.Echo "Rename folder: " &amp; backuppath &amp; "Backup0" &amp; count - 1 &amp; " to Backup0" &amp; count<br />
objFS.MoveFolder backuppath &amp; "Backup0" &amp; count - 1 , backuppath &amp; "Backup0" &amp; count<br />
WScript.Sleep 200<br />
Else<br />
Wscript.Echo "Path not found.... " &amp; backuppath &amp; "Backup0" &amp; count -1<br />
WScript.Sleep 200<br />
End If</code></p>
<p><code>count = count - 1</code></p>
<p><code>Loop</code></p>
<p><code>Wscript.Echo "Create folder: " &amp; backuppath &amp; "Backup0" &amp; count<br />
objFS.CreateFolder(backuppath &amp; "Backup0" &amp; count)<br />
WScript.Sleep 200</code></p>
<p><code>Wscript.Echo "Copying files to destination folder"<br />
objFS.CopyFolder "Q:\Hyper-V", backuppath &amp; "Backup01\"<br />
Wscript.Echo "Move MetaData.cab to destination folder"<br />
objFS.MoveFile "D:\MetaData.cab", backuppath &amp; "Backup01\"</code></p>
<p><code>Wscript.Echo "Back-up done!"</code></p>
<p><strong>vmsavestate.vbs</strong></p>
<p><code>Option Explicit<br />
Dim WMIService<br />
Dim VMList<br />
Dim VMName<br />
Dim ArgObj<br />
Set ArgObj = WScript.Arguments</code></p>
<p><code>'Specify the name of the virtual machine that I want to start<br />
VMName = ArgObj(0)</code></p>
<p><code>'Get instance of 'virtualization' WMI service on the local computer<br />
Set WMIService = GetObject("winmgmts:\\.\root\virtualization")</code></p>
<p><code>'Get all the MSVM_ComputerSystem object<br />
Set VMList = WMIService.ExecQuery("SELECT * FROM Msvm_ComputerSystem WHERE ElementName='" &amp; VMName &amp; "'")<br />
</code><br />
<code>WScript.Echo "============================================="<br />
WScript.Echo "VM Name: " &amp; VMList.ItemIndex(0).ElementName<br />
WScript.Echo "VM GUID: " &amp; VMList.ItemIndex(0).Name<br />
WScript.Echo "VM State: " &amp; VMList.ItemIndex(0).EnabledState<br />
WScript.Echo "============================================="<br />
</code><br />
<code>If VMList.ItemIndex(0).EnabledState = 3 Then<br />
WScript.Echo "Virtual Machine is turned off, no need for saving"<br />
Else</code></p>
<p><code>'Request a state change on the first VM that is returned<br />
'2 = start, 3 = stop and 32769 = save state<br />
VMList.ItemIndex(0).RequestStateChange(32769)</code></p>
<p><code>'Wait till save state is done<br />
while not VMList.ItemIndex(0).EnabledState = 32769<br />
Set VMList = WMIService.ExecQuery("SELECT * FROM Msvm_ComputerSystem WHERE ElementName='" &amp; VMName &amp; "'")<br />
WScript.Echo "VM State: " &amp; VMList.ItemIndex(0).EnabledState<br />
WScript.Sleep 1500<br />
wend<br />
WScript.Echo "============================================="<br />
Wscript.Echo "Save State-Succeeded!"<br />
WScript.Echo "============================================="</code></p>
<p><code>End If<br />
</code><br />
<strong>vmstart.vbs</strong></p>
<p><code>Option Explicit<br />
Dim WMIService<br />
Dim VMList<br />
Dim VMName<br />
Dim ArgObj<br />
Set ArgObj = WScript.Arguments</code></p>
<p><code>'Specify the name of the virtual machine that I want to start<br />
VMName = ArgObj(0)</code></p>
<p><code>'Get instance of 'virtualization' WMI service on the local computer<br />
Set WMIService = GetObject("winmgmts:\\.\root\virtualization")<br />
</code><br />
<code>'Get all the MSVM_ComputerSystem object<br />
Set VMList = WMIService.ExecQuery("SELECT * FROM Msvm_ComputerSystem WHERE ElementName='" &amp; VMName &amp; "'")</code></p>
<p><code>WScript.Echo "============================================="<br />
WScript.Echo "VM Name: " &amp; VMList.ItemIndex(0).ElementName<br />
WScript.Echo "VM GUID: " &amp; VMList.ItemIndex(0).Name<br />
WScript.Echo "VM State: " &amp; VMList.ItemIndex(0).EnabledState<br />
WScript.Echo "============================================="</code></p>
<p><code>If VMList.ItemIndex(0).EnabledState = 3 Then<br />
WScript.Echo "Virtual Machine is turned off, no need to start it"<br />
Else</code></p>
<p><code>'Request a state change on the first VM that is returned<br />
'2 = start, 3 = stop and 32769 = save state<br />
VMList.ItemIndex(0).RequestStateChange(2)</code></p>
<p><code>'Wait till save state is done<br />
while not VMList.ItemIndex(0).EnabledState = 2<br />
Set VMList = WMIService.ExecQuery("SELECT * FROM Msvm_ComputerSystem WHERE ElementName='" &amp; VMName &amp; "'")<br />
WScript.Echo "VM State: " &amp; VMList.ItemIndex(0).EnabledState<br />
WScript.Sleep 1500<br />
wend<br />
WScript.Echo "============================================="<br />
Wscript.Echo "Start-Succeeded!"<br />
WScript.Echo "============================================="</code></p>
<p><code>End If</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.strengholt-online.nl/hyper-v-backup-with-volume-shadow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AZW Config File</title>
		<link>http://www.strengholt-online.nl/azw-config-file/</link>
		<comments>http://www.strengholt-online.nl/azw-config-file/#comments</comments>
		<pubDate>Fri, 24 Feb 2012 14:06:19 +0000</pubDate>
		<dc:creator>Piethein Strengholt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[openzwave]]></category>

		<guid isPermaLink="false">http://www.strengholt-online.nl/?p=925</guid>
		<description><![CDATA[Config file syntax The XSD scheme of the config file can be found here: File:Config.xsd. The root tag of the config file must be named config. It must contain program, devices, rules or startuprules tags. &#160; program section This tag must have device, host and port attributes (all are mandatory). device path to the device: [...]]]></description>
			<content:encoded><![CDATA[<h1></h1>
<h1>Config file syntax</h1>
<p>The XSD scheme of the config file can be found here: <a title="File:Config.xsd" href="http://z-wave.alsenet.com/index.php?title=Special:Upload&amp;wpDestFile=Config.xsd">File:Config.xsd</a>.</p>
<p>The root tag of the config file must be named <em>config</em>. It must contain <em>program</em>, <em>devices</em>, <em>rules</em> or <em>startuprules</em> tags.</p>
<p><span id="more-925"></span></p>
<p>&nbsp;</p>
<p><a id="program_section" name="program_section"></a></p>
<h2><em>program</em> section</h2>
<p>This tag must have <em>device</em>, <em>host</em> and <em>port</em> attributes (all are mandatory).</p>
<dl>
<dt><em>device</em></dt>
<dd>path to the device: e.g. <em>/dev/ttyACM0</em></dd>
<dt><em>host</em> and <em>port</em></dt>
<dd>host name and port to bind the socket: e.g. <em>host=&#8221;" port=&#8221;12345&#8243;</em></dd>
</dl>
<p><a id="devices_section" name="devices_section"></a></p>
<h2><em>devices</em> section</h2>
<p>Devices are defined using <em>device</em> tag. This tag have the following attributes:</p>
<dl>
<dt><em>id</em> (mandatory)</dt>
<dd>Z-Wave node ID</dd>
<dt><em>name</em> (mandatory)</dt>
<dd>internal name used in config (must be valid as object name in Python)</dd>
<dt><em>description</em> (mandatory)</dt>
<dd>human readable description of the device</dd>
<dt>association (optional)</dt>
<dd>semicolon (;) separated list of comma (,) separated list of node names the device is associated to: e.g. <em>Node1,Node2;Node3,Node4;Node5</em> means that the group 1 is associated with Node1 and Node2, group 2 with Node3 and Node4, group 3 with Node5.</dd>
<dt>association_type (optional)</dt>
<dd>can be <em>auto</em> (meaning that the device associations can be configured automatically) or <em>manual</em> for devices requiring manual association</dd>
</dl>
<p>The association would be useful to restore the network from the scratch if you reset your primary controller or some of devices.</p>
<p><em>device</em> tag can have a child tag <em>config</em> which contains a semicolon (;) separated list of Python commands to be done to make additional configuration. These can be used to inclide devices in All On/Off group of configuring sensors sensitivity, etc. <em>@node@</em> string would be substituted with node id before execution (this is to facilitate copy&amp;paste in config file).</p>
<p><a id="rules_section" name="rules_section"></a></p>
<h2><em>rules</em> section</h2>
<p>This section contains set of <em>rule</em> tags. Each <em>rule</em> tag must contain the following tags:</p>
<dl>
<dt>description</dt>
<dd>human readable description of the rule</dd>
<dt>condition</dt>
<dd>valid Python expression</dd>
<dt>action</dt>
<dd>semicolon (;) separated valid Python commands</dd>
</dl>
<p><a id="startuprules_section" name="startuprules_section"></a></p>
<h2><em>startuprules</em> section</h2>
<p>This section contains set of <em>startuprule</em> tags. Each <em>startuprule</em> tag must contain the following tags:</p>
<dl>
<dt>description</dt>
<dd>human readable description of the rule</dd>
<dt>action</dt>
<dd>semicolon (;) separated valid Python commands</dd>
</dl>
<p>Of course you can put all your start up commands in once <em>action</em> tag using semicolon, but we suggest to split start up commands on logical groups with adequate description.</p>
<p><a id="Program_execution" name="Program_execution"></a></p>
<h1>Program execution</h1>
<p><a id="At_start_up" name="At_start_up"></a></p>
<h2>At start up</h2>
<p>At start up each <em>action</em> is executed before handling events.</p>
<p><a id="Events" name="Events"></a></p>
<h2>Events</h2>
<p>Each Z-Wave <strong>Application Command Handler</strong> class <em>Basic</em>, <em>Switch All</em>, <em>Alarm</em> and <em>Battery</em> and <strong>Application Slave Command Handler</strong> class <em>Basic</em> and <em>Switch Multilevel</em> events are used to check each rule&#8217;s <em>condition</em>. For each <em>condition</em> evaluated to be True the corresponding <em>action</em> is executed. To stop rules execution after a particular rule include <em>breakRules()</em> in it&#8217;s action. Rules are tested and executed in the same order as they appear in the config file.</p>
<p><a id="Condition" name="Condition"></a></p>
<h2>Condition</h2>
<p>The condition must be a valid Python expression. Some special variables are defined:</p>
<dl>
<dt>OnOff, DimBeginUp, DimBeginDown, DimEnd, Timer, AllOnOff, BatteryLevel</dt>
<dd><strong>One</strong> of <em>OnOff, DimBeginUp, DimBeginDown, DimEnd, Timer, AllOnOff, BatteryLevel</em> variable is set to True to mark the current event type.</dd>
<dt>sNode</dt>
<dd>is set to the Node ID of the devices sending the event</dd>
<dt>sNode</dt>
<dd>is set to the Node ID of the devices receiving the event (this is the ID of the PC controller it self or it&#8217;s virtual slave nodes)</dd>
<dt>val</dt>
<dd>array containing arguments passed with the event</dd>
<dt>zw</dt>
<dd>this class contains all objects defined in config file (see <a title="Zw class" href="http://z-wave.alsenet.com/index.php/Zw_class">description of the zw class</a>)</dd>
<dt>STimer</dt>
<dd>this class define timers (see <a title="STimer class" href="http://z-wave.alsenet.com/index.php/STimer_class">description of the STimer class</a>)</dd>
<dt>ZWApi</dt>
<dd>this class contains all Z-Wave relevant functions. Be careful with it! (see <a title="ZWApi class" href="http://z-wave.alsenet.com/index.php/ZWApi_class">description of the ZWApi class</a>)</dd>
</dl>
<p><a id="Action" name="Action"></a></p>
<h2>Action</h2>
<p>The action must be a valid Python command. You can use semicolon (;) to execute more than one command in one action. Don&#8217;t use new line since Python is sensitive to indents. In addition to the standard Python function you can use all the variables and classes allowed in the <em>condition</em> tag (described above). Execution of <em>breakRules()</em> function will stop subsequent rules execution.</p>
<p><a id="Example_of_the_config.xml" name="Example_of_the_config.xml"></a></p>
<h1>Example of the <em>config.xml</em></h1>
<p>See below for <a title="AZW Config File" href="http://z-wave.alsenet.com/index.php/AZW_Config_File#Example_description">detailed description of this example</a>.</p>
<pre>&lt;config&gt;
       &lt;program device="/dev/ttyACM0" host="" port="12345"/&gt;
       &lt;devices&gt;
               &lt;device id="1" name="PC" description="PC Controller" /&gt;
               &lt;device id="2" name="HallButtonEntrance" description="Button in the hall near the entrance (duwi wall controller)" association="Virtual1" association_type="manual"/&gt;
               &lt;device id="3" name="HallButtonRoom" description="Button in the hall near the Room (duwi wall controller)" association="Virtual1" association_type="manual"/&gt;
               &lt;device id="4" name="HallSwitch" description="Hall light switch (ceil mounted relay)"&gt;
                       &lt;config&gt;
                               ZWApi.zwSwitchAllSet(@node@, True)
                       &lt;/config&gt;
               &lt;/device&gt;
               &lt;device id="5" name="BathroomButton" description="Button in the bathroom (ACT ZTH230)" association="Virtual1,Virtual2,Virtual3" association_type="auto" /&gt;
               &lt;device id="6" name="BathroomDimmer" description="Bathroom dimmer (ceil mounted)"&gt;
                       &lt;config&gt;
                               ZWApi.zwSwitchAllSet(@node@, True)
                       &lt;/config&gt;
               &lt;/device&gt;
               &lt;device id="7" name="BathroomMirrorDimmer" description="Bathroom dimmer on the mirror (ceil mounted)"&gt;
                       &lt;config&gt;
                               ZWApi.zwSwitchAllSet(@node@, True)
                       &lt;/config&gt;
               &lt;/device&gt;
               &lt;device id="8" name="Virtual1" description="Virtual node 1" /&gt;
               &lt;device id="9" name="Virtual2" description="Virtual node 2" /&gt;
               &lt;device id="10" name="Virtual3" description="Virtual node 3" /&gt;
       &lt;/devices&gt;
      &lt;rules&gt;
               &lt;rule&gt;
                       &lt;description&gt;
                               1. Switch the hall light off by timer
                       &lt;/description&gt;
                       &lt;condition&gt;
                               sNode == zw.HallSwitch.id and Timer
                       &lt;/condition&gt;
                       &lt;action&gt;
                               zw.HallSwitch.BasicSet(0); zw.BathroomButton.VirtualValue[zw.Virtual2.id] = 0x00
                       &lt;/action&gt;
               &lt;/rule&gt;
               &lt;rule&gt;
                       &lt;description&gt;
                               2. Switch the hall light on with timer (using buttons in the hall or second paddle in the bathroom)
                       &lt;/description&gt;
                       &lt;condition&gt;
                               ((sNode == zw.BathroomButton.id and dNode == zw.Virtual2.id) or sNode in (zw.HallButtonEntrance.id, zw.HallButtonRoom.id)) and (DimBeginUp or (OnOff and val[0] == 0xFF))
                       &lt;/condition&gt;
                       &lt;action&gt;
                               zw.HallSwitch.BasicSet(0xFF); zw.HallSwitch.addTimer("delay off", 300); zw.BathroomButton.VirtualValue[zw.Virtual2.id] = 0xFF
                       &lt;/action&gt;
               &lt;/rule&gt;
               &lt;rule&gt;
                       &lt;description&gt;
                               3. Switch the hall light on pushing on the off-paddle of the button at the entrance
                       &lt;/description&gt;
                       &lt;condition&gt;
                               sNode == zw.HallButtonEntrance.id and (DimBeginDown or (OnOff and val[0] == 0x00)) and zw.HallSwitch.ValueEq(0x00, False)
                       &lt;/condition&gt;
                       &lt;action&gt;
                               zw.HallSwitch.BasicSet(0xFF); zw.HallSwitch.addTimer("delay off", 300); zw.BathroomButton.VirtualValue[zw.Virtual2.id] = 0xFF; breakRules()
                       &lt;/action&gt;
               &lt;/rule&gt;
               &lt;rule&gt;
                       &lt;description&gt;
                               4. Switch the hall light off with timer (using buttons in the hall or second paddle in the bathroom)
                       &lt;/description&gt;
                       &lt;condition&gt;
                               ((sNode == zw.BathroomButton.id and dNode == zw.Virtual2.id) or sNode in (zw.HallButtonEntrance.id, zw.HallButtonRoom.id)) and (DimBeginDown or (OnOff and val[0] == 0x00))
                       &lt;/condition&gt;
                       &lt;action&gt;
                               zw.HallSwitch.BasicSet(0x00); zw.HallSwitch.removeTimer("delay off"); zw.BathroomButton.VirtualValue[zw.Virtual2.id] = 0x00
                       &lt;/action&gt;
               &lt;/rule&gt;
               &lt;rule&gt;
                       &lt;description&gt;
                               5. Turn the light off in the bathroom
                       &lt;/description&gt;
                       &lt;condition&gt;
                               OnOff and sNode == zw.BathroomButton.id and dNode == zw.Virtual1.id and val[0] == 0x00
                       &lt;/condition&gt;
                       &lt;action&gt;
                               zw.BathroomMirrorDimmer.BasicSet(0x00); zw.BathroomMirrorDimmer.BasicSet(0x00); zw.BathroomButton.mode = 1;
                       &lt;/action&gt;
               &lt;/rule&gt;
               &lt;rule&gt;
                       &lt;description&gt;
                               6. Turn the light on in the bathroom: Scene 1/2
                       &lt;/description&gt;
                       &lt;condition&gt;
                               OnOff and sNode == zw.BathroomButton.id and val[0] == 0xFF and dNode == zw.Virtual1.id and (zw.BathroomButton.isDefined("mode") == False or zw.BathroomButton.mode == 1)
                       &lt;/condition&gt;
                       &lt;action&gt;
                               zw.BathroomDimmer.BasicSet(0x63); zw.BathroomMirrorDimmer.BasicSet(0x30); zw.BathroomButton.mode = 2; breakRules()
                       &lt;/action&gt;
               &lt;/rule&gt;
               &lt;rule&gt;
                       &lt;description&gt;
                               7. Turn the light on in the bathroom: Scene 2/2
                       &lt;/description&gt;
                       &lt;condition&gt;
                               OnOff and sNode == zw.BathroomButton.id and val[0] == 0xFF and dNode == zw.Virtual1.id and zw.BathroomButton.mode == 2
                       &lt;/condition&gt;
                       &lt;action&gt;
                               zw.BathroomDimmer.BasicSet(0x30); zw.BathroomMirrorDimmer.BasicSet(0x63); zw.BathroomButton.mode = 1; breakRules()
                       &lt;/action&gt;
               &lt;/rule&gt;
               &lt;rule&gt;
                       &lt;description&gt;
                               8. Dimming in the bathroom (dim start)
                       &lt;/description&gt;
                       &lt;condition&gt;
                               (DimBeginUp or DimBeginDown) and sNode == zw.BathroomButton.id and dNode == zw.Virtual1.id
                       &lt;/condition&gt;
                       &lt;action&gt;
                               zw.BathroomDimmer.DimBegin(1 if DimBeginUp else 0)
                       &lt;/action&gt;
               &lt;/rule&gt;
               &lt;rule&gt;
                       &lt;description&gt;
                               9. Dimming in the bathroom (dim end)
                       &lt;/description&gt;
                       &lt;condition&gt;
                               DimEnd and sNode == zw.BathroomButton.id and dNode == zw.Virtual1.id
                       &lt;/condition&gt;
                       &lt;action&gt;
                               zw.BathRoomDimmer.DimEnd()
                       &lt;/action&gt;
               &lt;/rule&gt;
      &lt;/rules&gt;
       &lt;startuprules&gt;
               &lt;startuprule&gt;
                       &lt;description&gt;
                               Turn the bathroom dimmer off at startup
                       &lt;/description&gt;
                       &lt;action&gt;
                               zw.BathroomDimmer.BasicSet(0)
                       &lt;/action&gt;
               &lt;/startuprule&gt;
       &lt;/startuprules&gt;
&lt;/config&gt;</pre>
<p>Note that you don&#8217;t have to number rules as it is show (in description field). Here we use these numbers to facilitate the explanation.</p>
<p><a id="Example_description" name="Example_description"></a></p>
<h2>Example description</h2>
<p>In section <em>program</em> of this example we ask AZW to use USB device /dev/ttyACM0 and to bind socket 0.0.0.0:12345 for command reception.</p>
<p>In section <em>devices</em> of this example there are 10 definitions of devices:</p>
<ol>
<li>PC controller. It has no properties.</li>
<li>HallButtonEntrance have Node ID = 2. It have a manualy made association with node Virtual1.</li>
<li>Same as for 2.</li>
<li>HallSwitch is defined with one configuration (inclusion in AllOnOff group). This configuration is made via <a title="AZW Installation" href="http://z-wave.alsenet.com/index.php/AZW_Installation#Reconfiguration">reconfiguration</a> process.</li>
<li>BathroomButton is defined to be automatically associated with nodes Virtual1, Virtual2 and Virtual3.</li>
<li>Same as for 4.</li>
<li>Same as for 4.</li>
<li>Definition of Virtual Slave Node</li>
<li>Same as 8.</li>
<li>Same as 8.</li>
</ol>
<p>In section <em>rules</em> there are 9 rules:</p>
<ol>
<li>On timer event HallSwitch
<dl>
<dd>switch the hall light off and set return value for BathroomButton right paddle LED light to off</dd>
</dl>
</li>
<li>On HallButtonEntrance or HallButtonRoom buttons press up or right paddle BathroomButton press up
<dl>
<dd>switch the hall light on, set the timer on HallSwitch to 300 seconds and set return value for BathroomButton right paddle LED light to off. The up press can be short or long (like dim up). The return value is used when ACT button (or other device) request value of the associated device (here Virtual2). On ACT ZxM230 LED light can show if the associated device is on or off</dd>
</dl>
</li>
<li>When HallSwitch is switched off, on HallButtonEntrance long or short press down
<dl>
<dd>switch the hall light on, set the timer for 300 seconds and set return value for BathroomButton right paddle LED light to on. Stop further rules execution (no to execute rule #4)</dd>
</dl>
</li>
<li>On HallButtonEntrance or HallButtonRoom buttons or right paddle BathroomButton press down (short or long)
<dl>
<dd>switch the hall light off, delete the timer on HallSwitch (if exists) and set return value for BathroomButton right paddle LED light to off</dd>
</dl>
</li>
<li>On BathroomButton short press down of left paddle
<dl>
<dd>turn both light off in the bathroom and set <em>mode</em> variable of BathroomButton to 1</dd>
</dl>
</li>
<li>When <em>mode</em>= 1 or undefined, on BathroomButton short press up of left paddle
<dl>
<dd>turn the light on scene 1 (BathroomDimmer to 100% and BathroomMirrorDimmer to ~50%), set <em>mode</em> to 2 and stop further rules execution (no to execute rule #7)</dd>
</dl>
</li>
<li>When <em>mode</em>= 2, on BathroomButton short press up of left paddle
<dl>
<dd>turn the light on scene 1 (BathroomDimmer to ~50% and BathroomMirrorDimmer to ~100%), set <em>mode</em> to 1 and stop further rules execution (not needed here, but keep it for future rules edit: you might once add scene 3)</dd>
</dl>
</li>
<li>On BathroomButton left paddle long press start (up or down)
<dl>
<dd>start BathroomDimmer dimming</dd>
</dl>
</li>
<li>On BathroomButton left paddle long press end
<dl>
<dd>stop BathroomDimmer dimming</dd>
</dl>
</li>
</ol>
<p>In section <em>startuprules</em> there are only one rule:</p>
<ol>
<li>Turn the bathroom dimmer off at startup</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.strengholt-online.nl/azw-config-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AZW openzwave Python scripts</title>
		<link>http://www.strengholt-online.nl/azw-openzwave-python-scripts/</link>
		<comments>http://www.strengholt-online.nl/azw-openzwave-python-scripts/#comments</comments>
		<pubDate>Fri, 24 Feb 2012 14:01:58 +0000</pubDate>
		<dc:creator>Piethein Strengholt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[openzwave]]></category>

		<guid isPermaLink="false">http://www.strengholt-online.nl/?p=921</guid>
		<description><![CDATA[Seems that the following site is down at the moment: http://z-wave.alsenet.com/index.php/Main_Page AZW AZW is a multi-threaded program written on Python and running under Linux. It acts as a central bridge of your Z-Wave network. It allows you to make intelligent home automation giving your PC the possibility to handle Z-Wave events in real-time. This is [...]]]></description>
			<content:encoded><![CDATA[<p>Seems that the following site is down at the moment: <a href="http://z-wave.alsenet.com/index.php/Main_Page">http://z-wave.alsenet.com/index.php/Main_Page</a></p>
<h1><strong>AZW</strong></h1>
<p><em><strong>AZW</strong></em> is a multi-threaded program written on Python and running under Linux. It acts as a central bridge of your Z-Wave network. It allows you to make <em>intelligent</em> home automation giving your PC the possibility to handle Z-Wave events in real-time. This is more a <strong>proof of concept</strong> than an end user program. For now it has no graphical interface at all. So use it on your own risk! AZW is licensed under <a title="http://en.wikipedia.org/wiki/GPL" href="http://en.wikipedia.org/wiki/GPL" rel="nofollow">GNU GPL</a>. This code was originally based on Linux MCE Z-Wave source code by Harald Klein, but we message handling motor was rewritten from scratch.</p>
<p>Note that <em>AZW</em> is discontinued being a proof of concept. Have a look on <a title="http://www.z-wave.me/content/what-z-way" href="http://www.z-wave.me/content/what-z-way" rel="nofollow"><em><strong>Z-Way</strong></em></a> software what implemeted same flexibility as <strong>AZW</strong>. It was written from scratch, it is modular and have a very beautiful GUI.</p>
<p><strong>AZW Peculiarity</strong></p>
<p>The main difference between AZW and other Z-Wave software is that with AZW the PC controller gets all events (such as button press or presence detection) instantaneously and is able to treat these events in an intelligent way. This gives you the possibility to make scenes, make time-managment (timers, schedules) and so on. You can also do all features that <a title="What Z-Wave can not do out of the box?" href="http://z-wave.alsenet.com/index.php/What_Z-Wave_can_not_do_out_of_the_box%3F">Z-Wave can&#8217;t do for you out of the box</a>. Such configuration have <em>star topology</em> — all events pass through the central hub — the PC controller.</p>
<p>Of course this feature makes the system vulnerable: a failure of the PC controller would break the light in your house. To work around this problem we suggest to take direct associations between some buttons and switches/dimmers. In such case two events would be sent from the button:</p>
<ol>
<li>to the controlled device (e.g. dimmer) used as backup association</li>
<li>to the PC controller, which can send another command to the same controlled device overriding the first backup action</li>
</ol>
<p><strong>Download:</strong> <a href="http://www.strengholt-online.nl/wp-content/uploads/2012/AZW.tgz">http://www.strengholt-online.nl/wp-content/uploads/2012/AZW.tgz</a></p>
<p><strong>Installation Guide</strong></p>
<ol>
<li>Prepare you PC Controller: if you need the full functionality from <em>AZW</em>, upgrade the firmware to Bridge one. I suggest <a title="Devices for EU" href="http://z-wave.alsenet.com/index.php/Devices_for_EU#ViaSENS_100_.28USB_controller.29">Seluxit ViaSENS 100 controller</a> (the firmware upgrade utility is also provided on this page). I use Bridge with FLiRS firmware. If you don&#8217;t have FLiRS devices, you can use Bridge with SUC firmware.</li>
<li>Choose your <a title="Z-Wave installation scheme" href="http://z-wave.alsenet.com/index.php/Z-Wave_installation_scheme">installation strategy</a>: choose your Primary and SUC/SIS (if you will have them).</li>
<li>Extract AZW.tgz to some directory on your PC</li>
<li>Update <em>program</em> section in your <em><a title="AZW Config File" href="http://z-wave.alsenet.com/index.php/AZW_Config_File">config.xml</a></em>
<ul>
<li>Change value of the <em>device</em> tag to the device name of your controller (run dmesg command or look in /dev/ directory. e.g. <em>/dev/ttyACM0</em>)</li>
<li>Edit <em>devices</em> and <em>rules</em> sections if you already have devices included and associated (otherwise skip this)</li>
<li>Edit Startup Rules. You can include SUC/SIS activation by adding. e.g. for SIS use <em>ZWApi.EnableSUC(1, 1); ZWApi.zwSetSUCNodeId(ZWS.ournodeid, 1, 1)</em>.</li>
</ul>
</li>
<li>Run <em>./AZW.sh</em>. You can also run <em>./rules.py</em> to have all logs on the terminal (good for debugging your config; Ctrl+C to exit the program).</li>
<li>Run <em>tail -f /var/log/AZW.log</em> to see what happens. If yo are not root, execute in terminal <em>sudo touch /var/log/AZW.log; sudo chown `id -u` /var/log/AZW.log</em></li>
<li>To execute command such as device inclusion, association, etc use <em>telnet localhost &lt;port defined in config.xml&gt;</em>
<ul>
<li><em>ZWApi.zwAddNodeToNetwork(1, 1)</em> to start and <em>ZWApi.zwAddNodeToNetwork(0, 0)</em> to abort inclusion</li>
<li><em>ZWApi.zwAssociationSet(Source, Group, Target)</em> to make associations</li>
<li><em>ZWApi.zwConfigurationSet(Node, Parameter, Value)</em> to configure device</li>
<li><em>ZWApi.zwAddSlaveNodeToNetwork()</em> to add virtual slave device (if you are using Bridge firmware). The maximum number of virtual devices you will need equals to the maximum number of controlled groups on your remote controllers (Duwi and Innovus have the maximum number: 8 buttons).</li>
<li>to see all available commands use <em>dir(ZWApi)</em> command or look the <a title="ZWApi class" href="http://z-wave.alsenet.com/index.php/ZWApi_class">ZWApi class</a> description</li>
</ul>
</li>
<li>Once you have added/removed/configured your Z-Wave devices edit once again <em>devices</em> and <em>rules</em> sections in your <em><a title="AZW Config File" href="http://z-wave.alsenet.com/index.php/AZW_Config_File">config.xml</a></em></li>
<li>Then doing configuration or association (direct or to the PC or to virtual devices), write these into <em>config</em> tag and into &#8216;association<em> attribute correspondingly (in </em>device<em> tag) to be able to restore them in future. This will help you to restore you configuration after controller reset or device replacement. Instead of configuring your devices and association manually by running commands as described above you can write all configurations to </em>config.xml<em> and run </em><a title="Reconfiguration (page does not exist)" href="http://z-wave.alsenet.com/index.php?title=Reconfiguration&amp;action=edit&amp;redlink=1">ConfigureDevices()</a><em>.</em></li>
<li>When done (and after each edit of <em><a title="AZW Config File" href="http://z-wave.alsenet.com/index.php/AZW_Config_File">config.xml</a></em>), restart AZW</li>
<li>Have a lot of fun!</li>
</ol>
<p>More info; <a href="https://sites.google.com/a/thewhytehouse.org/mythtv/modification/zseriesz-wavecontrollerappliancemodule">https://sites.google.com/a/thewhytehouse.org/mythtv/modification/zseriesz-wavecontrollerappliancemodule</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.strengholt-online.nl/azw-openzwave-python-scripts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Howto install domotiga and openzwave on Ubuntu</title>
		<link>http://www.strengholt-online.nl/howto-install-domotiga-and-openzwave-on-ubuntu/</link>
		<comments>http://www.strengholt-online.nl/howto-install-domotiga-and-openzwave-on-ubuntu/#comments</comments>
		<pubDate>Fri, 24 Feb 2012 13:25:32 +0000</pubDate>
		<dc:creator>Piethein Strengholt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[openzwave]]></category>

		<guid isPermaLink="false">http://www.strengholt-online.nl/?p=919</guid>
		<description><![CDATA[Here&#8217;s a quick howto; svn co http://svn.domotiga.nl/domotiga/trunk/ domotiga cd domotiga/wrappers/domozwave sudo apt-get install libxmlrpc-core-c3-dev ln -s ~/open-zwave ./open-zwave make sudo make install cd ~/domogtiga sudo apt-get install gambas2 mysql-client-5.1 mysql-server (enter new mysql root password) mysql -u root -p CREATE DATABASE domogtiga; exit mysql -u root -p -D domotiga nano domotiga.conf change the settings and [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a quick howto;</p>
<p><code>svn co http://svn.domotiga.nl/domotiga/trunk/ domotiga<br />
cd domotiga/wrappers/domozwave<br />
sudo apt-get install libxmlrpc-core-c3-dev<br />
ln -s ~/open-zwave ./open-zwave<br />
make<br />
sudo make install</code></p>
<p><code>cd ~/domogtiga<br />
sudo apt-get install gambas2 mysql-client-5.1 mysql-server</code></p>
<p>(enter new mysql root password)</p>
<p><code>mysql -u root -p </code></p>
<p><code>CREATE DATABASE domogtiga;<br />
exit</code></p>
<p><code>mysql -u root -p -D domotiga </code></p>
<p><code>nano domotiga.conf</code></p>
<p>change the settings and start the server:</p>
<p><code>./DomotiGaServer.gambas</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.strengholt-online.nl/howto-install-domotiga-and-openzwave-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Howto compile open-zwave and openzwave-control-panel on Ubuntu</title>
		<link>http://www.strengholt-online.nl/howto-compile-open-zwave-and-openzwave-control-panel-on-ubuntu/</link>
		<comments>http://www.strengholt-online.nl/howto-compile-open-zwave-and-openzwave-control-panel-on-ubuntu/#comments</comments>
		<pubDate>Fri, 24 Feb 2012 12:41:01 +0000</pubDate>
		<dc:creator>Piethein Strengholt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[openzwave]]></category>

		<guid isPermaLink="false">http://www.strengholt-online.nl/?p=916</guid>
		<description><![CDATA[Here&#8217;s a quick howto on how to compile open-zwave on Ubuntu; Compile open-zwave library svn checkout http://open-zwave.googlecode.com/svn/trunk/ open-zwave cd open-zwave/cpp/build/linux/ sudo apt-get install libudev-dev make cd ~ Compile libmicrohttpd, needed by openzwave-control-panel wget ftp://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-0.9.19.tar.gz tar zxvf libmicrohttpd-0.9.19.tar.gz mv libmicrohttpd-0.9.19 libmicrohttpd cd libmicrohttpd ./configure make sudo make install cd ~ Compile openzwave-control-panel svn checkout http://openzwave-control-panel.googlecode.com/svn/trunk/ openzwave-control-panel [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a quick howto on how to compile open-zwave on Ubuntu;</p>
<p>Compile open-zwave library</p>
<p><code>svn checkout http://open-zwave.googlecode.com/svn/trunk/ open-zwave<br />
cd open-zwave/cpp/build/linux/<br />
sudo apt-get install libudev-dev<br />
make<br />
cd ~</code></p>
<p>Compile libmicrohttpd, needed by openzwave-control-panel</p>
<p><code>wget ftp://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-0.9.19.tar.gz<br />
tar zxvf libmicrohttpd-0.9.19.tar.gz<br />
mv libmicrohttpd-0.9.19 libmicrohttpd<br />
cd libmicrohttpd<br />
./configure<br />
make<br />
sudo make install<br />
cd ~</code></p>
<p>Compile openzwave-control-panel</p>
<p><code>svn checkout http://openzwave-control-panel.googlecode.com/svn/trunk/ openzwave-control-panel<br />
cd openzwave-control-panel<br />
nano Makefile</code></p>
<p>Change the following lines to:</p>
<p><code># for Linux uncomment out next two lines<br />
LIBZWAVE := $(wildcard $(OPENZWAVE)/cpp/lib/linux/*.a)<br />
LIBUSB := -ludev</code></p>
<p>Compile:</p>
<p><code>make</code></p>
<p>To start the openzwave-control-panel, type;<br />
<code>./ozwcp -d -p 1234</code></p>
<p>Point your browser to http://openzwave-machinename:1234/</p>
]]></content:encoded>
			<wfw:commentRss>http://www.strengholt-online.nl/howto-compile-open-zwave-and-openzwave-control-panel-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>chmod directory only or file only</title>
		<link>http://www.strengholt-online.nl/chmod-directory-only-or-file-only/</link>
		<comments>http://www.strengholt-online.nl/chmod-directory-only-or-file-only/#comments</comments>
		<pubDate>Mon, 20 Sep 2010 11:56:42 +0000</pubDate>
		<dc:creator>Piethein Strengholt</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.strengholt-online.nl/?p=913</guid>
		<description><![CDATA[find -type d -print0 &#124;xargs -0 chmod 755 find -type f -print0 &#124;xargs -0 chmod 644]]></description>
			<content:encoded><![CDATA[<p>find -type d -print0 |xargs -0 chmod 755<br />
find -type f -print0 |xargs -0 chmod 644</p>
]]></content:encoded>
			<wfw:commentRss>http://www.strengholt-online.nl/chmod-directory-only-or-file-only/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setup was unable to create a system partition or locate an existing partition</title>
		<link>http://www.strengholt-online.nl/setup-was-unable-to-create-a-system-partition-or-locate-an-existing-partition/</link>
		<comments>http://www.strengholt-online.nl/setup-was-unable-to-create-a-system-partition-or-locate-an-existing-partition/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 18:13:54 +0000</pubDate>
		<dc:creator>Piethein Strengholt</dc:creator>
				<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://www.strengholt-online.nl/?p=910</guid>
		<description><![CDATA[Windows 7 of Windows Vista vanaf een USB stick proberen te installeren en last van de volgende melding: Setup was unable to create a system partition or locate an existing partition. Tip is om even de USB stick waarop de Windows installatie bestanden staan los te halen. Een refresh te doen van de beschikbare schijven. [...]]]></description>
			<content:encoded><![CDATA[<p>Windows 7 of Windows Vista vanaf een USB stick proberen te installeren en last van de volgende melding:</p>
<p><strong>Setup was unable to create a system partition or locate an existing partition.</strong></p>
<p>Tip is om even de USB stick waarop de Windows installatie bestanden staan los te halen. Een refresh te doen van de beschikbare schijven. USB stick weer verbinden en de installatie zou weer verder moeten gaan!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.strengholt-online.nl/setup-was-unable-to-create-a-system-partition-or-locate-an-existing-partition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building a hyper-v enabled linux kernel</title>
		<link>http://www.strengholt-online.nl/building-a-hyper-v-enabled-linux-kernel/</link>
		<comments>http://www.strengholt-online.nl/building-a-hyper-v-enabled-linux-kernel/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 08:52:23 +0000</pubDate>
		<dc:creator>Piethein Strengholt</dc:creator>
				<category><![CDATA[Hyper-V]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.strengholt-online.nl/?p=894</guid>
		<description><![CDATA[Here are the instructions for building a hyper-v enabled linux kernel. The system I&#8217;m using is Ubuntu 9.10. First get all the essential packages: sudo apt-get build-dep linux Install some more build essentials: sudo apt-get install libncurses5 libncurses5-dev sudo apt-get install kernel-package Next step is to download the latest kernel packages from: http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.32/ Install them [...]]]></description>
			<content:encoded><![CDATA[<p>Here are the instructions for building a hyper-v enabled linux kernel. The system I&#8217;m using is Ubuntu 9.10.</p>
<p>First get all the essential packages:</p>
<p><code>sudo apt-get build-dep linux</code></p>
<p>Install some more build essentials:</p>
<p><code>sudo apt-get install libncurses5 libncurses5-dev<br />
sudo apt-get install kernel-package</code></p>
<p>Next step is to download the latest kernel packages from: <a href="http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.32/">http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.32/</a></p>
<p>Install them with the following commands:</p>
<p><code>sudo dpkg -i linux-headers-2.6.32-020632_2.6.32-020632_all.deb<br />
sudo dpkg -i linux-image-2.6.32-020632-generic_2.6.32-020632_i386.deb<br />
sudo dpkg -i linux-headers-2.6.32-020632-generic_2.6.32-020632_i386.deb<br />
sudo dpkg -i linux-source-2.6.32_2.6.32-020632_all.deb</code></p>
<p>Update grub and reboot:</p>
<p><code>sudo update-grub<br />
sudo reboot</code></p>
<p>Verify that you using the new kernel:</p>
<p><code>uname -a<br />
Linux ubuntu 2.6.32-020632-generic #020632 SMP Thu Dec 3 10:58:45 UTC 2009 i686 GNU/Linux</code></p>
<p>Go the /usr/src/ and unzip the kernel source:</p>
<p><code>tar -jxf linux-source-2.6.32.tar.bz2<br />
cd linux-source-2.6.32</code></p>
<p>Copy your current (old) kernel configuration file to the kernel source directory:</p>
<p><code>sudo cp -vi /boot/config-`uname -r` .config</code></p>
<p>Run the make menuconfig wizard</p>
<p><code>sudo make menuconfig</code></p>
<p>Enable the staging drivers</p>
<p><img class="size-full wp-image-895 alignnone" title="staging01" src="http://www.strengholt-online.nl/wp-content/uploads/2009/12/staging01.png" alt="staging01" width="600" height="465" /></p>
<p>And include the hyper-v enabled drivers</p>
<p><img class="size-full wp-image-896 alignnone" title="staging02" src="http://www.strengholt-online.nl/wp-content/uploads/2009/12/staging02.png" alt="staging02" width="600" height="465" /></p>
<p>Press ESC, ESC to return to the main menu&#8217;s and save the new configuration file!</p>
<p>Make clean and start building:</p>
<p><code>sudo make-kpkg clean<br />
sudo fakeroot make-kpkg --initrd --append-to-version=-hyper-v kernel-image kernel-headers</code></p>
<p>You&#8217;ll find your kernel under /usr/src/</p>
<p>Install your kernel with: <code>sudo dpkg -i *.deb</code><br />
Update grub with: <code>sudo update-grub</code></p>
<p>Reboot</p>
<p>After you&#8217;ve rebooted the system your modules are listed under: <code>/lib/modules/2.6.32-hyper-v/kernel/drivers/staging/hv</code> , to load them type:</p>
<p><code>sudo modprobe hv_vmbus<br />
sudo modprobe hv_blkvsc<br />
sudo modprobe hv_netvsc<br />
sudo modprobe hv_storvsc</code></p>
<p>You could verify if the modules are loaded by using <code>lsmod</code>. Also check <code>dmesg</code> and <code>/var/log/messages</code> for any errors.</p>
<p><code>$ lsmod<br />
Module                  Size  Used by<br />
hv_storvsc             21798  0<br />
hv_netvsc              29396  0<br />
hv_blkvsc              25207  0<br />
hv_vmbus               43234  3 hv_storvsc,hv_netvsc,hv_blkvsc<br />
lp                      6868  0<br />
psmouse                52658  0<br />
iptable_filter          2199  0<br />
serio_raw               3812  0<br />
parport                31970  1 lp<br />
i2c_piix4               8052  0<br />
ip_tables               9157  1 iptable_filter<br />
x_tables               13875  1 ip_tables<br />
floppy                 49858  0<br />
tulip                  43835  0</code></p>
<p>The following lines should be present in the /var/log/messages:</p>
<p><code>VMBUS_DRV: Vmbus initializing.... current log level 0x1f1f0006 (1f1f,6)<br />
VMBUS: +++++++ Build Date=Dec 15 2009 06:23:59 +++++++<br />
VMBUS: +++++++ Build Description=Version 2.0 +++++++<br />
VMBUS: +++++++ Vmbus supported version = 13 +++++++<br />
VMBUS: +++++++ Vmbus using SINT 2 +++++++<br />
VMBUS: Windows hypervisor detected! Retrieving more info...<br />
VMBUS: Vendor ID: Microsoft Hv<br />
VMBUS: Interface ID: Hv#1<br />
VMBUS: OS Build:6001-6.0-18-0.18016<br />
VMBUS: Hypercall page VA=e1002000, PA=0x1f9e8000<br />
VMBUS_DRV: irq 0x5 vector 0x35<br />
VMBUS: SynIC version: 1<br />
VMBUS: Vmbus connected!!<br />
VMBUS_DRV: generating uevent - VMBUS_DEVICE_CLASS_GUID={c5295816-f63a-4d5f-8d1a4daf999ca185}<br />
VMBUS: Channel offer notification - child relid 1 monitor id 0 allocated 1, type {32412632-86cb-44a2-9b5c50d1417354f5} instance {00000000-0000-8899-0000000000000000}<br />
VMBUS: Channel offer notification - child relid 2 monitor id 1 allocated 1, type {32412632-86cb-44a2-9b5c50d1417354f5} instance {00000001-0000-8899-0000000000000000}<br />
VMBUS_DRV: generating uevent - VMBUS_DEVICE_CLASS_GUID={32412632-86cb-44a2-9b5c50d1417354f5}</code></p>
<p>Precompiled kernels are here:</p>
<p><a href="http://www.strengholt-online.nl/hyperv/linux-image-2.6.32-020632-hyper-v_i386.deb">http://www.strengholt-online.nl/hyperv/linux-image-2.6.32-020632-hyper-v_i386.deb</a><br />
<a href="http://www.strengholt-online.nl/hyperv/linux-headers-2.6.32-020632-hyper-v_i386.deb"> http://www.strengholt-online.nl/hyperv/linux-headers-2.6.32-020632-hyper-v_i386.deb</a></p>
<p><em>Remark: The synthetic nic loaded by the hv_netvsc module is called seth0</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.strengholt-online.nl/building-a-hyper-v-enabled-linux-kernel/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Linux kernel 2.6.32 en Hyper-V</title>
		<link>http://www.strengholt-online.nl/linux-kernel-2-6-32-en-hyper-v/</link>
		<comments>http://www.strengholt-online.nl/linux-kernel-2-6-32-en-hyper-v/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 13:41:38 +0000</pubDate>
		<dc:creator>Piethein Strengholt</dc:creator>
				<category><![CDATA[Hyper-V]]></category>

		<guid isPermaLink="false">http://www.strengholt-online.nl/?p=891</guid>
		<description><![CDATA[Om Hyper-V te gebruiker onder Linux is het noodzakelijk een nieuwe kernel te compileren. Het makkelijkste is om een kopie van de oude kernel config te gebruiken (http://aligunduz.org/articles/buildkernel.html) en de onderstaande onderdelen aan te zetten. De HV zou dan automatisch gedetecteerd moeten worden. [Y] Microsoft Hyper-V client drivers (CONFIG_HYPERV) [Y] Microsoft Hyper-V virtual storage driver [...]]]></description>
			<content:encoded><![CDATA[<p>Om Hyper-V te gebruiker onder Linux is het noodzakelijk een nieuwe kernel te compileren. Het makkelijkste is om een kopie van de oude kernel config te gebruiken (<a href="http://aligunduz.org/articles/buildkernel.html">http://aligunduz.org/articles/buildkernel.html</a>) en de onderstaande onderdelen aan te zetten. De HV zou dan automatisch gedetecteerd moeten worden.</p>
<p>[Y] Microsoft Hyper-V client drivers (CONFIG_HYPERV)<br />
[Y] Microsoft Hyper-V virtual storage driver (CONFIG_HYPERV_STORAGE)<br />
[Y] Microsoft Hyper-V virtual block driver (CONFIG_HYPERV_BLOCK)<br />
[Y] Microsoft Hyper-V virtual network driver (CONFIG_HYPERV_NET)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.strengholt-online.nl/linux-kernel-2-6-32-en-hyper-v/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bash verder laten gaan na stoppen proces</title>
		<link>http://www.strengholt-online.nl/bash-verder-laten-gaan-na-stoppen-proces/</link>
		<comments>http://www.strengholt-online.nl/bash-verder-laten-gaan-na-stoppen-proces/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 15:56:07 +0000</pubDate>
		<dc:creator>Piethein Strengholt</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.strengholt-online.nl/?p=889</guid>
		<description><![CDATA[Handig stukje code voor bash om een script verder te laten gaan indien een proces stopt: while true; do PROCESS=`ps -A &#124; grep xbmc.bin` if [ "$PROCESS" = "" ] then echo "xbmc no longer running" break fi done]]></description>
			<content:encoded><![CDATA[<p>Handig stukje code voor bash om een script verder te laten gaan indien een proces stopt:</p>
<p><code> while true;<br />
do<br />
PROCESS=`ps -A | grep xbmc.bin`<br />
if [ "$PROCESS" = "" ]<br />
then<br />
echo "xbmc no longer running"<br />
break<br />
fi<br />
done</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.strengholt-online.nl/bash-verder-laten-gaan-na-stoppen-proces/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rsync server op Ubuntu</title>
		<link>http://www.strengholt-online.nl/rsync-server-op-ubuntu/</link>
		<comments>http://www.strengholt-online.nl/rsync-server-op-ubuntu/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 12:19:37 +0000</pubDate>
		<dc:creator>Piethein Strengholt</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.strengholt-online.nl/?p=886</guid>
		<description><![CDATA[Het installeren van een rsync server onder Ubuntu gaat als volgt: Open het rsync default bestand: pico /etc/default/rsync Pas de volgende waarde aan naar true RSYNC_ENABLE=true Maak een password file aan met de volgende permissies: chmod 600 /etc/rsyncd.scrt Maak een rsync config bestand aan met de volgende inhoud: /etc/rsyncd.conf max connections = 2 log file [...]]]></description>
			<content:encoded><![CDATA[<p>Het installeren van een rsync server onder Ubuntu gaat als volgt:</p>
<p>Open het rsync default bestand:<br />
<code>pico /etc/default/rsync</code></p>
<p>Pas de volgende waarde aan naar true<br />
<code>RSYNC_ENABLE=true</code></p>
<p>Maak een password file aan met de volgende permissies:<br />
<code>chmod 600 /etc/rsyncd.scrt</code></p>
<p>Maak een rsync config bestand aan met de volgende inhoud:<br />
<code>/etc/rsyncd.conf</code></p>
<p><code>max connections = 2<br />
log file = /var/log/rsync.log<br />
timeout = 300<br />
motd file = /etc/rsyncd.motd</code></p>
<p><code>[Music]<br />
path = /home/xbmc/Music<br />
comment = Music<br />
uid = xbmc<br />
gid = xbmc<br />
read only = yes<br />
auth users = xbmc<br />
secrets file = /etc/rsyncd.scrt</code></p>
<p>Maak een welkom bestand aan:<br />
<code>/etc/rsyncd.motd<br />
Welcome to my rsync server!</code></p>
<p>Vul het rsync bestand met een password:<br />
<code>/etc/rsyncd.scrt<br />
xbmc:xbmc</code></p>
<p>Start rsync:<br />
<code>/etc/init.d/rsync start</code></p>
<p>Vanaf een andere machine content kopieren met:<br />
<code>rsync -aPv rsync://xbmc@192.168.0.104/Music /home/xbmc/Music</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.strengholt-online.nl/rsync-server-op-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rsync excluden van bestanden en of mappen</title>
		<link>http://www.strengholt-online.nl/rsync-excluden-van-bestanden-en-of-mappen/</link>
		<comments>http://www.strengholt-online.nl/rsync-excluden-van-bestanden-en-of-mappen/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 07:37:56 +0000</pubDate>
		<dc:creator>Piethein Strengholt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.strengholt-online.nl/?p=878</guid>
		<description><![CDATA[Voorbeelden: --exclude 'public_html/database.txt' nano /home/backup/exclude.txt sources public_html/database.* downloads/test/* --exclude-from '/home/backup/exclude.txt' Meer info: http://articles.slicehost.com/2007/10/10/rsync-exclude-files-and-folders]]></description>
			<content:encoded><![CDATA[<p>Voorbeelden:</p>
<p><code>--exclude 'public_html/database.txt'<br />
</code><br />
<code>nano /home/backup/exclude.txt<br />
</code><br />
<code>sources<br />
public_html/database.*<br />
downloads/test/*</code></p>
<p><code>--exclude-from '/home/backup/exclude.txt'</code></p>
<p>Meer info:</p>
<p><a href="http://articles.slicehost.com/2007/10/10/rsync-exclude-files-and-folders">http://articles.slicehost.com/2007/10/10/rsync-exclude-files-and-folders</a></p>
<p><code><br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.strengholt-online.nl/rsync-excluden-van-bestanden-en-of-mappen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cache leeggooien squid proxy</title>
		<link>http://www.strengholt-online.nl/cache-leeggooien-squid-proxy/</link>
		<comments>http://www.strengholt-online.nl/cache-leeggooien-squid-proxy/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 07:12:10 +0000</pubDate>
		<dc:creator>Piethein Strengholt</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.strengholt-online.nl/?p=874</guid>
		<description><![CDATA[Het leeggooien van de cache op een squid proxy doe je met de volgende commandline regels: /etc/init.d/squid stop rm -rf /var/lib/squid/cache/* squid -z /etc/init.d/squid start]]></description>
			<content:encoded><![CDATA[<p>Het leeggooien van de cache op een squid proxy doe je met de volgende commandline regels:</p>
<p><code>/etc/init.d/squid stop</code></p>
<p><code>rm -rf /var/lib/squid/cache/*<br />
</code><br />
<code>squid -z</code></p>
<p><code>/etc/init.d/squid start</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.strengholt-online.nl/cache-leeggooien-squid-proxy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Movie Maker Vista onder Windows 7</title>
		<link>http://www.strengholt-online.nl/movie-maker-vista-onder-windows-7/</link>
		<comments>http://www.strengholt-online.nl/movie-maker-vista-onder-windows-7/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 14:58:27 +0000</pubDate>
		<dc:creator>Piethein Strengholt</dc:creator>
				<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://www.strengholt-online.nl/?p=872</guid>
		<description><![CDATA[Voor de gebruikers die nog gebruik willen maken van hun oude Movie Maker versie. Kopieer de map &#8220;Movie Maker&#8221; uit de Program Files. Sla deze elders op. Na de upgrade of installatie van Windows 7, plaats de map terug. Ga met cmd in de map &#8220;Movie Maker&#8221; staan en voer de volgende regels uit: regsvr32 [...]]]></description>
			<content:encoded><![CDATA[<p>Voor de gebruikers die nog gebruik willen maken van hun oude Movie Maker versie. Kopieer de map &#8220;Movie Maker&#8221; uit de Program Files. Sla deze elders op. Na de upgrade of installatie van Windows 7, plaats de map terug. Ga met cmd in de map &#8220;Movie Maker&#8221; staan en voer de volgende regels uit:</p>
<p><code>regsvr32 WMM2AE.dll<br />
regsvr32 WMM2CLIP.dll<br />
regsvr32 WMM2EXT.dll<br />
regsvr32 WMM2FILT.dll</code></p>
<p>Let wel dat je als Administrator cmd moet hebben opgestart. Als je nu MOVIEMK.exe start zul je zien dat alles werkt! Zo kan je dus gebruik maken van twee verschillende movie maker versies onder Windows 7</p>
]]></content:encoded>
			<wfw:commentRss>http://www.strengholt-online.nl/movie-maker-vista-onder-windows-7/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Disk2vhd v1.0</title>
		<link>http://www.strengholt-online.nl/disk2vhd-v1-0/</link>
		<comments>http://www.strengholt-online.nl/disk2vhd-v1-0/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 14:24:01 +0000</pubDate>
		<dc:creator>Piethein Strengholt</dc:creator>
				<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://www.strengholt-online.nl/?p=870</guid>
		<description><![CDATA[Handig tool voor mensen die vanaf Windows xp willen migreren naar Windows 7: http://technet.microsoft.com/en-us/sysinternals/ee656415.aspx]]></description>
			<content:encoded><![CDATA[<p>Handig tool voor mensen die vanaf Windows xp willen migreren naar Windows 7:</p>
<p><img class="alignnone" title="disk2vhd" src="http://i.technet.microsoft.com/ee656415.Disk2vhd_01r(en-us,MSDN.10).png" alt="" width="313" height="251" /></p>
<p><a href="http://technet.microsoft.com/en-us/sysinternals/ee656415.aspx">http://technet.microsoft.com/en-us/sysinternals/ee656415.aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.strengholt-online.nl/disk2vhd-v1-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

