Coding and Dismantling Stuff

Don't thank me, it's what I do.

About the author

Russell is a .Net developer based in Lancashire in the UK.  His day job is as a C# developer for the UK's largest online white-goods retailer, DRL Limited.

His weekend job entails alternately demolishing and constructing various bits of his home, much to the distress of his fiance Kelly, 3-year-old daughter Amelie, and menagerie of pets.


  1. Fix dodgy keywords Google is scraping from my blog
  2. Complete migration of NHaml from Google Code to GitHub
  3. ReTelnet Mock Telnet Server à la Jetty
  4. Learn to use Git
  5. Complete beta release FHEMDotNet
  6. Publish FHEMDotNet on Google Code
  7. Learn NancyFX library
  8. Pull RussPAll/NHaml into NHaml/NHaml
  9. Open Source Blackberry Twitter app
  10. Other stuff

FHEM Setup on Windows Home Server - Part 1 of 2

For a few weeks now I've been running an FHEM installation on my laptop so I can play around with the software and get a feel for it, the time has come to install on our Windows home server.  Hopefully this will be a straight-forward process, let's see.

This first on a two-part series looks at installing the Perl environment, installing a CUL USB computer controller and testing the hardware using PuTTY.

Installing Perl - Strawberry Perl
The Perl distribution I'll be using is Strawberry Perl.  The standard Perl distribution is missing a few Windows specific extensions we'll be needing, for example access to the serial ports, so we'll also need to add these in.

  1. Download from MSI file - don't think about installing the 64 bit version - it'll blow up when you install the SerialPort extension later!
  2. Install accepting all of the defaults, in my case the installation is going to "c:\strawberry\"
  3. When installation is finished, we need to make the Perl application accessible when we're in a command prompt:
    1. Click Start, then right-click on "My Computer" or "Computer" and choose "Properties"
    2. If you see a window titled "View basic information about your computer", click the link on the right labelled "Advanced System Settings"
    3. In the System Properties window, click the Advanced tab and click the Environment Variables button at the bottom of the window
    4. In the System Variables panel, click Path then the Edit
    5. Add the following to the end of the path entry (note the semi-colon to separate path entries) - ";c:\strawberry\perl\bin"
  4. Open a command prompt and key in "perl -v", if you don't see a Perl version message, something's gone wrong!
  5. We'll come back to the Windows extensions later.
Device Installation
The device I'll be using is a CUL ( - although this device costs only costs around £40, be warned that if you mess it up you're on your own!  Also parts of the following will be different if your CUL device has never been used before, mine has already been flashed with FHEM compatible firmware.
  1. Download the file from the product info page (at the time of writing this link is
  2. Plug the device into a USB socket on your server
  3. Open the Hardware Device Manager window as follows:
    1. Click Start, then right-click on "My Computer" or "Computer" and choose "Properties"
    2. If you see a window titled "View basic information about your computer", click the link on the right labelled "Device Manager"
    3. If you see a window titled "System Properties", select the "Hardware" tab then click the button "Device Manager".
  4. You should see an unrecognised device called "CUL868" or something similar, install the drivers as follows:
    1. Right-click this device select and select "Update Driver"
    2. Choose "Install from a list or specified location" then click Next
    3. Click "Search for the best driver in these locations", uncheck "Search removable media" and check "Include this location in the search"
    4. Click Browse and select the folder where you've downloaded the CUL.inf file
    5. Click Next and Windows should install the "CC1101-USB-Light" drivers
    6. If you see a message about the driver not being Windows Logo Tested that's normal, in my case I just clicked "Continue Anyway".
    7. Click Finish to complete the device installation
So that's it, you should now see a device in your Device Manager called "CC101-USB-Light - CUL (COM3)", where COM3 is the virtual COM port that's been assigned to the device.  Let's test the device now to make sure it's working.
Testing the CUL Device as a Virtual COM Port
To test the device, we're going to need some software that will let us view COM port traffic.  The software that I'm going to use her is called PuTTY, and we'll actually be able to use this for a few other bits later on.  You can download PuTTY from:
You just need the plain putty.exe.  In order for the following testing process to work, you're going to need some devices pushing out suitable wireless traffic, for example some FHT80 devices (wireless room thermostats/actuator controllers).
  1. Download PuTTY from the link above
  2. Run PuTTY, on the Session window that should pop up:
    1. Select "Serial" connection type
    2. Change Serial Line to COM3 (or whichever COM port your device is installed as)
    3. Click Open
  3. You're now staring at a blank screen with nothing happening.
  4. Type "V" and press enter, you should see something like "V 1.39 CUL868", which confirms that the device is connected and responsive.
  5. Enter "X 01" and press enter, initially you won't see any response but after a few moments you'll see commands coming in, in my case I can see they're prefixed with a "T", but I suspect this is device specific.
That's it for this post, by now we've installed Perl, we've installed the device and tested that it works.  Next time we'll install the Win32 Perl extensions, install the FHEM server and use Putty to test the whole thing.  Future parts will maybe look at getting some of the web front ends running on Windows too.

Categories: FHEM
Permalink | Comments (0)

Pingbacks and trackbacks (2)+

Add comment

  Country flag

  • Comment
  • Preview