Control SHC devices by FHEM

FHEM is a home automation server written in Perl to set up complex control tasks using home automation devices. It can be used in conjunction with a variety of different systems. FHEM can run on any Linux based device supporting Perl and a (USB-)serial connections like PCs / servers, NAS, routers and so on.

To support SHC, a Perl module is used to translate between the FHEM interfaces and the syntax of the base station. This is the normal way in FHEM to support different hardware devices.

Installation

Follow these easy steps for a simple FHEM installation:

  • Download FHEM and install it as described there.
  • Install the XML::LibXML library for perl ("cpanm XML::LibXML" or "sudo apt-get install libxml-libxml-perl").
  • Download the perl modules for smarthomatic.
  • Extract all files from this archive into the "FHEM" subdirectory of your FHEM installation. You can see several other files starting with a two-digit number there.
  • Attach the base station to your host and look which device it is connected to. Call "dmesg" on the console after connecting. It should say someting like "usb 1-1.3: FTDI USB Serial Device converter now attached to ttyUSB0". The default device name is /dev/ttyUSB0 under Linux if no other similar devices are attached.
  • Start FHEM, usually by calling "perl fhem.pl fhem.cfg". If FHEM is already running, restart it by entering "shutdown restart" into the FHEM command line field.
  • If not done already, connect to FHEM with your browser, usually to port 8083, e.g. http://myrouter:8083
  • Define your SHC base station by entering "define SHC1 SHC /dev/ttyUSB0@19200" into the FHEM command line field.
  • You should now see SHC devices in the list after messages are received from them. If not, look into the logs, read the FHEM documentation or ask your questions in the smarthomatic forum.

If everything worked well, you should see something like this after you configured your devices: