FHEM Installation Windows/en: Unterschied zwischen den Versionen

Aus FHEMWiki
(→‎basic Installation: english improvements)
K (FHEM 6.0)
 
(6 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt)
Zeile 3: Zeile 3:
==basic Installation==
==basic Installation==
===Installation FHEM===
===Installation FHEM===
Download the current [https://fhem.de/#Download fhem-X.Y.zip package] (currently fhem-5.8.zip).
Download the current [https://fhem.de/#Download fhem-X.Y.zip package] (currently fhem-6.0.zip).


Create a new folder for FHEM. For this article the folder  <code>f:\my-fhem</code> was created.
Create a new folder for FHEM. For this article the folder  <code>f:\my-fhem</code> was created.


Extract the entire content of the folder <code>fhem-5.8\fhem-5.8</code> from the .zip-package to <code>f:\my-fhem</code>.  
Extract the entire content of the folder <code>fhem-6.0\fhem-6.0</code> from the .zip-package to <code>f:\my-fhem</code>.  


''For control:'' In <code>f:\my-fhem</code> there is the file <code>fhem.pl</code>.
''For control:'' In <code>f:\my-fhem</code> there is the file <code>fhem.pl</code>.
Zeile 16: Zeile 16:
In this case, the content of the package "strawberry-perl-5.24.1.1-32bit-portable.zip" was extracted to <code>f:\my-fhem</code>.  
In this case, the content of the package "strawberry-perl-5.24.1.1-32bit-portable.zip" was extracted to <code>f:\my-fhem</code>.  


''For control:'' In <code>f:\my-fhem</code> there is an additional folder <code>perl</code>.
''For control:'' In <code>f:\my-fhem</code> there is now an additional folder <code>perl</code>.


===Start of FHEM===
===Start of FHEM===
Open a command prompt (cmd), change to the previously created folder, and start FHEM:
Open a command prompt (cmd), change to the previously created folder, and start FHEM:


<source lang="doscon">
<syntaxhighlight lang="doscon">
C:\> cd f:\my-fhem
C:\> cd f:\my-fhem
F:\my-fhem> perl\bin\perl fhem.pl fhem.cfg
F:\my-fhem> perl\bin\perl fhem.pl fhem.cfg
</source>
</syntaxhighlight>


Now a Windows security alert appears that Windows Firewall is blocking the Perl interpreter. To access FHEM, you must set up a firewall exception. For this purpose, the security note must be terminated with the button {{Taste| Allow Access}}.
Now a Windows security alert appears that Windows Firewall is blocking the Perl interpreter. To access FHEM, you must set up a firewall exception. For this purpose, the security note must be terminated with the button {{Taste|Allow Access}}.


''Note:'' There is no visible output and the command won't terminate. The command prompt cannot be closed as long as FHEM is running.
''Note:'' There is no visible output and the command won't terminate. The command prompt cannot be closed as long as FHEM is running.
Zeile 56: Zeile 56:
Now return to the command prompt window. Restart the updated FHEM; For example by the {{Taste|arrow up}} followed by {{Taste|Enter}} or re-entering
Now return to the command prompt window. Restart the updated FHEM; For example by the {{Taste|arrow up}} followed by {{Taste|Enter}} or re-entering


<source lang="doscon">F:\my-fhem> perl\bin\perl fhem.pl fhem.cfg</source>
<syntaxhighlight lang="doscon">F:\my-fhem> perl\bin\perl fhem.pl fhem.cfg</syntaxhighlight>


This completes the installation of FHEM and [[First steps in FHEM]] invites you to try it out.
This completes the installation of FHEM and [[First steps in FHEM]] invites you to try it out.
Zeile 62: Zeile 62:
==Installations Options==
==Installations Options==
===Installation Win32::SerialPort===
===Installation Win32::SerialPort===
{{Hinweis|In the Strawberry Perl Portable versions released since 12/2018 Win32::SerialPort is one of the standard installed modules (see release notes for Strawberry Perl - List of distributions installed on top of Perl). This section is not required for these versions.}}
The Win32:SerialPort module is required for most USB gateways (CUL, Z-Wave, EnOcean, ..). The module should be installed only after successful Windows driver installation for the gateway. Install the missing perl module by typing in the command window:  
The Win32:SerialPort module is required for most USB gateways (CUL, Z-Wave, EnOcean, ..). The module should be installed only after successful Windows driver installation for the gateway. Install the missing perl module by typing in the command window:  


<source lang="doscon">
<syntaxhighlight lang="doscon">
F:\my-fhem> PATH=F:\my-fhem\c\bin;F:\my-fhem\perl\bin;%PATH%
F:\my-fhem> PATH=F:\my-fhem\c\bin;F:\my-fhem\perl\bin;%PATH%
F:\my-fhem> perl\bin\cpan -i Win32::SerialPort
F:\my-fhem> perl\bin\cpan -i Win32::SerialPort
</source>
</syntaxhighlight>


===Installation of FHEM as a service===
===Installation of FHEM as a service===
Zeile 74: Zeile 76:
Exit FHEM by entering <code>shutdown</code> in the command input field.  
Exit FHEM by entering <code>shutdown</code> in the command input field.  


Open an input prompt and install missing Perl modules using the following commands::
Open an command prompt and install missing Perl modules using the following commands::


<source lang="doscon">
<syntaxhighlight lang="doscon">
F:\my-fhem> PATH=F:\my-fhem\c\bin;F:\my-fhem\perl\bin;%PATH%
F:\my-fhem> PATH=F:\my-fhem\c\bin;F:\my-fhem\perl\bin;%PATH%
F:\my-fhem> perl\bin\cpan -i Win32::Daemon
F:\my-fhem> perl\bin\cpan -i Win32::Daemon
F:\my-fhem> perl\bin\cpan -i Win32::Console
F:\my-fhem> perl\bin\cpan -i Win32::Console
</source>
</syntaxhighlight>


Eine Eingabeaufforderung als Administrator öffnen und FHEM als Dienst einrichten:
Run an command prompt as administrator and install FHEM as a service:


<source lang="doscon">F:\my-fhem> perl\bin\perl fhem.pl fhem.cfg -i</source>
<syntaxhighlight lang="doscon">F:\my-fhem> perl\bin\perl fhem.pl fhem.cfg -i</syntaxhighlight>


In the Windows Administration Tool "services", the FHEM service is listed with the name "fhem server" after it has been successfully set up. FHEM starts invisible (without open prompt) during Windows startup after installation as a service.
In the Windows Administration Tool "services", the FHEM service is listed with the name "fhem server" after it has been successfully set up. After installation as a service FHEM starts invisible (without opened command prompt) during Windows startup.


Unlike the start of FHEM via the input prompt, the <code>shutdown restart</code> command can be successfully executes with FHEM as a service
Unlike the start of FHEM via the command line, the <code>shutdown restart</code> command can be successfully executes with FHEM as a service.


==What's next?==
==What's next?==
[[First steps in FHEM]]
[[First steps in FHEM]]
[[Kategorie:HOWTOS]]

Aktuelle Version vom 26. Januar 2020, 15:40 Uhr

FHEM Installation Windows/en describes the installation of FHEM as a portable software for Windows (no intervention in the registration database). The instructions are applicable for installation on a removable disk, for example a USB stick, and on an internal drive. When installed on an internal drive, you can register FHEM as a service.

basic Installation

Installation FHEM

Download the current fhem-X.Y.zip package (currently fhem-6.0.zip).

Create a new folder for FHEM. For this article the folder f:\my-fhem was created.

Extract the entire content of the folder fhem-6.0\fhem-6.0 from the .zip-package to f:\my-fhem.

For control: In f:\my-fhem there is the file fhem.pl.

Installation Perl

Download a current Strawberry Perl Portable Edition and extract it in the FHEM folder.

In this case, the content of the package "strawberry-perl-5.24.1.1-32bit-portable.zip" was extracted to f:\my-fhem.

For control: In f:\my-fhem there is now an additional folder perl.

Start of FHEM

Open a command prompt (cmd), change to the previously created folder, and start FHEM:

C:\> cd f:\my-fhem
F:\my-fhem> perl\bin\perl fhem.pl fhem.cfg

Now a Windows security alert appears that Windows Firewall is blocking the Perl interpreter. To access FHEM, you must set up a firewall exception. For this purpose, the security note must be terminated with the button Allow Access.

Note: There is no visible output and the command won't terminate. The command prompt cannot be closed as long as FHEM is running.

Calling the FHEM Web Interface (FHEMWEB)

Start a browser (Firefox, Chrome and Safari are recommended) and open:

http://localhost:8083/fhem

The FHEM main page appears:

ErsteSchritteInFhem01.png

Update of FHEM

FHEM is continuously being developed. Therefore, an update should be made to get the most recent version.

In the command input field of FHEM, this is the white, rectangular text input field to the right of the FHEM logo. Type

update

and then press Enter.

It starts the update process, which can take a while. FHEM is showing progress. At the end of the update process, FHEM prompts for a "shutdown restart". Please ignore this and type in the command input field only

shutdown

followed by Enter to exit FHEM.

Now return to the command prompt window. Restart the updated FHEM; For example by the arrow up followed by Enter or re-entering

F:\my-fhem> perl\bin\perl fhem.pl fhem.cfg

This completes the installation of FHEM and First steps in FHEM invites you to try it out.

Installations Options

Installation Win32::SerialPort

Info blue.png
In the Strawberry Perl Portable versions released since 12/2018 Win32::SerialPort is one of the standard installed modules (see release notes for Strawberry Perl - List of distributions installed on top of Perl). This section is not required for these versions.


The Win32:SerialPort module is required for most USB gateways (CUL, Z-Wave, EnOcean, ..). The module should be installed only after successful Windows driver installation for the gateway. Install the missing perl module by typing in the command window:

F:\my-fhem> PATH=F:\my-fhem\c\bin;F:\my-fhem\perl\bin;%PATH%
F:\my-fhem> perl\bin\cpan -i Win32::SerialPort

Installation of FHEM as a service

Note: Setting up FHEM as a service requires an entry in the registration database created automatically in the following installation process.

Exit FHEM by entering shutdown in the command input field.

Open an command prompt and install missing Perl modules using the following commands::

F:\my-fhem> PATH=F:\my-fhem\c\bin;F:\my-fhem\perl\bin;%PATH%
F:\my-fhem> perl\bin\cpan -i Win32::Daemon
F:\my-fhem> perl\bin\cpan -i Win32::Console

Run an command prompt as administrator and install FHEM as a service:

F:\my-fhem> perl\bin\perl fhem.pl fhem.cfg -i

In the Windows Administration Tool "services", the FHEM service is listed with the name "fhem server" after it has been successfully set up. After installation as a service FHEM starts invisible (without opened command prompt) during Windows startup.

Unlike the start of FHEM via the command line, the shutdown restart command can be successfully executes with FHEM as a service.

What's next?

First steps in FHEM