<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>FHEM on Windows</title> <script type="text/javascript" src="fhemdoc.js"></script> <noscript> <link rel="stylesheet" type="text/css" href="../www/pgm2/style.css" /> </noscript> <meta http-equiv="Content-type" content="text/html;charset=ISO-8859-1"/> </head> <body> <div id="menuScrollArea"> <div id="logo"></div> <div id="menu"> <h3>FHEM on Windows</h3> </div> </div> <div id="right"> <h2><a href="fhem.html">FHEM</a> on Windows</h2> The following description will show you how to install FHEM on Windows on a separate USB-Drive, without any Windows-registry modifications. You can use the internal HD for installation too, and you can register fhem as a service, see below. <br><br> <h3>Install FHEM:</h3> <ul> Download the latest fhem-X.Y.tar.gz package from http://fhem.de#Download (currently it is fhem-5.4.tar.gz), and unpack it into a directory where you have at least 350MB+ free space. I will use F:\tmp for this purpose, after unpacking the .tar.gz file we will have a new directory F:\tmp\fhem-5.4 </ul> <h3>Install perl:</h3> <ul> Download a Strawberry perl Portable-Edition (this version won't generate Registry-Entries, and can be installed on USB disks) from http://strawberryperl.com/releases.html, and extract it into the previously created directory, in our case F:\tmp\fhem-5.4 My file was called strawberry-perl-5.16.2.1-32bit-portable.zip </ul> <h3>Start FHEM:</h3> <ul> Open a command line window (cmd), change to the previous directory, and start FHEM: <ul><code> C:> F:<br> F:> cd \tmp\fhem-5.4<br> F:\tmp\fhem-5.4> mkdir log<br> F:\tmp\fhem-5.4> perl\bin\perl fhem.pl fhem.cfg<br> </code></ul> Note: <ul> There is no visible output and the command won't terminate. You probably have to confirm a Firewall exception (Do not block), as FHEM opens a Web-Server Port. </ul> </ul> <h3>Connect to the FHEM Web frontend (FHEMWEB):</h3> <ul> Start your browser (Firefox, Chrome or Safari are preferred) and open <ul><code> http://localhost:8083/fhem </code></ul> You'll see a smiling-house icon on a light-yellow background. </ul> <h3>Update FHEM to get access to the latest development version (recommended but not mandatory):</h3> <ul> In the browser window, on the FHEMWEB page, in the command line (upper text input field, right of the smiling house icon), type in the following 4 commands one-by-one, confirming each one with Enter: <ul><code> notice confirm update-20130127-001<br> attr global backup_before_update 0<br> save<br> update<br> </code></ul> Note: <ul> <li>the last command will take a while (around a minute), and after finished it will ask you to "shutdown restart". Ignore this, and just type shutdown in the FHEMWEB command line. <li>Switch to the command line window, and restart FHEM with the last command, i.e. arrow up and RETURN or type in again: <ul><code> perl\bin\perl fhem.pl fhem.cfg </ul></code> </li> </ul> </ul> <h3>Install FHEM as a service (better to install perl on the internal hard-disk for this scenario):</h3> <ul> Terminate fhem by typing shutdown again in the FHEMWEB command line. Install the missing perl modules by typing in the command window: <ul><code> F:\tmp\fhem-5.4> PATH=F:\tmp\fhem-5.4\c\bin;F:\tmp\fhem-5.4\perl\bin;%PATH%<br> F:\tmp\fhem-5.4> perl\bin\cpan -i Win32::Daemon<br> F:\tmp\fhem-5.4> perl\bin\cpan -i Win32::Console<br> </ul></code> Install FHEM as a service <ul><code> F:\tmp\fhem-5.4> perl\bin\perl fhem.pl fhem.cfg -i<br> </code></ul> </ul> </body>