Enocean Sensor Kit: Bringing Home Automation To The Raspberry Pi
Enocean Sensor Kit: Bringing Home Automation To The Raspberry Pi
Enocean Sensor Kit: Bringing Home Automation To The Raspberry Pi
BY
&
User Manual
Version 1
1 Introduction ...................................................................... 1
www.openhab.org
Wireless, energy autonomous sensors and switches are ideal for home
automation projects as no cabling is required. Sensors and actuators can directly
communicate with each other or they can be controlled by an intelligent smart
home server. This allows users to set up home automation for remote sensing
and remote control via PC or smart phone. Raspberry-Pi is the ideal platform to
setup a smart home server where the EnOcean-Pi acts as a bridge (Gateway-
Controller) to the EnOcean radio world. We recommend using self-powered
switches and sensors from the EnOcean starter kit ESK300/ESK300U or the
Sensor Kit for Raspberry-Pi.
Page | 1
Raspberry-Pi when used with FHEM server software becomes a home automation
server. The server can be used to automate common tasks such as switching
lamps, scene illuminations or closing blinds, measurement and visualization of
power consumption, temperature and humidity.
The server receives and sends EnOcean radio telegrams via the EnOcean-Pi.
The Solar powered radio sensors (STM330 temperature sensor & STM320 reed
contact sensor) periodically send values which will be interpreted and displayed
via the FHEM web interface. Self-powered switches and FHEM send on/off and
dim commands to actuators (not included in the kit) or to a PiFace relay board (if
connected)
Sensor Kit
o HDMI cable
o SD card (e.g. 4GB)
Ethernet cable or USB WLAN stick
Figure 2: Top to Bottom - EnOcean-Pi,
Page | 2
2 Step by step installation of the
Raspberry-Pi
2.1 Installation of Raspian (Debian Linux for Raspberry-Pi)
If the Raspian image is not already installed on the SD card, download NOOBS
(New Out of the Box Software) and follow the instructions at:
http://www.raspberrypi.org/downloads
Page | 3
2.3 Software and Firmware update
Prior to updating you need to connect to internet. This can be done in one of two
ways:
1. Via Ethernet, plug into the connector and let the Raspberry
Pi handle the rest
2. WiFi (if drivers are available), start the GUI (using the startx
command) and click on WiFi config. Follow the on screen
prompts.
Raspian (the Linux operating system) can be updated via APT (Advanced Package
Tool).
RPi-update:
https://github.com/Hexxeh/rpi-update
NOTE:
As default the serial port of the GPIO interface is used for console debug outputs. In
order to use this port for EnOcean-Pi, this feature has to be disabled. Read more about
this at:
http://elinux.org/RPi_Serial_Connection
Page | 4
A script can be downloaded from Github which will automatically adapt boot up
settings:
https://github.com/lurch/rpi-serial-console
5. You can test the connection via the FHEM event monitor
(Refer to section 2.8)
You can discover the allocated (by the DHCP server) IP address by typing in the
following command:
ifconfig
Example output:
You can see that in this example output text the IP address is 192.167.1.121
Page | 5
Download “putty.exe” from:
http://www.putty.org/
to your PC and run it to open the PuTTY Configuration window then configure
it as shown below, substituting the IP address (192.168.7.2) for the IP address
you discovered in section 2.5
Now you have a command line interface to remotely control your Raspberry Pi
via PC
http://fhem.de/fhem.html
Page | 6
2.7.1 Installation of the Perl environment including libraries for
FHEM
1. Please check the FHEM website for the latest version and modify the
installation commands below as required:
wget http://fhem.de/fhem-5.5.deb
sudo dpkg –i fhem-5.5.deb
Note:
Check the FHEM website for updates and any path changes in new versions.
http://<Raspberry_Pi_IP>:8083/fhem
You will get the following user interface on the screen:
Page | 7
http://fhem.de/HOWTO.html
http://forum.fhem.de/
Start the configuration file editor via the FHEM menu item “Edit files”.
http://fhem.de/commandref.html#EnOcean
Page | 8
2.7.7 Configure the STM sensor:
Press learn button of STM330 sensor and you will get (the ID may be different):
2.7.8 Visualization:
Following visualization example has been generated by an STM330 (temperature
sensor) with a HSM 100 (humidity sensor) connected:
Page | 9
2.8 Interpretation of EnOcean radio telegrams via
the FHEM event monitor
Start PuTTy and configure it to connect to the IP address of the Raspberry-Pi
with telnet and port 7072. Switch on “implicit CR in every LF” within the
terminal configuration to get a line feed after carriage return.
Start a telnet session and type inform timer to display the FHEM event
monitor. Receiving events with EnOcean telegrams will be shown with a time
stamp.
Page | 10
Appendix 1: Useful Links
1.1 EnOcean radio modules:
http://www.enocean.com/en/enocean_modules/epk-350/
http://www.enocean.com/de/enocean_module/usb-300-oem/
http://www.enocean.com/de/enocean-pi/
http://www.enocean.com/en/knowledge-base/
http://www.element14.com/raspberrypi
http://www.element14.com/enocean_pi
1.3 Raspberry-Pi
http://www.debian.org/doc/manuals/refcard/refcard.en.pdf
http://www.danielspage.de/index.php/technik/raspberry-pi-blog/44-
enocean-auf-dem-pi
http://developer-blog.net/hardware/raspberry-pi-backup/
http://www.datenreise.de/raspberry-pi-wlan-einrichten-edimax/
http://www.mikrocontroller.net/articles/Raspberry_Pi
http://pibeginners.com/ftp-server/
1.4 FHEM:
http://fhem.de/fhem.html
http://forum.fhem.de/
http://fhem.de/Heimautomatisierung-mit-fhem.pdf
Page | 11
Appendix 2: Regulatory Compliance
and Safety Information
WARNINGS:
Devices or Modules containing RF components must meet the essential
requirements of the local legal authorities.
The modules must not be used in any relation with equipment that supports,
directly or indirectly, any form of life or with applications that can endanger life or
value.
Any changes or modifications not expressly approved by the party responsible for
compliance may ‘void’ the user’s authority to operate this equipment
These modules must not be modified or used outside of their specification limits
These modules may only be used to transfer digital or digitized data; Analogue
speech and/or music is not permitted
The modules must not be used with gain antennas, otherwise resulting in
exceeded ERP or spurious emission levels.
COMPLIANCE INFORMATION:
The Sensor Kit for Raspberry-Pi complies with the relevant provisions of the RoHS
Directive for the European Union.
Page | 12
FEDERAL COMMUNICATIONS COMMISSION (FCC) EMISSIONS COMPLIANCE
STATEMENT
This equipment has been tested and complies with the limits f or a Class B digital device,
pursuant to Part 15 of the FCC Rules. These limits are designed to provide reasonable
protection against harmful interference when the equipment is operated in a domestic
environment.
Operation is subject to the following two conditions:
(1) this device might not cause harmful interference, and
(2) this device must accept any interference received, including interference that might
cause undesired operation.
Compliant with:
www.element14.com/legislation
Premier Farnell UK, 150 Armley Road,
Leeds LS12 2QQ, United Kingdom
Revision 1.1 April 2012
Page | 13