raspberry-enocean

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
raspberry-enocean [2015/03/26 16:40]
Stéphane Lavirotte [Install the Fhem.de building automation server for testing purposes]
raspberry-enocean [2015/03/27 14:46]
Stéphane Lavirotte [Compile EnOcean Link Library]
Line 8: Line 8:
  
 First of all you have to connect the EnOcean Pi to the Raspberry. Do this before powering up the Raspberry Pi. First of all you have to connect the EnOcean Pi to the Raspberry. Do this before powering up the Raspberry Pi.
-The serial port of the GPIO must be disable (it's normally used for console debugging in standard configuration). ​Tio achieve this, you have to do the following commands:+The serial port of the GPIO must be disable (it's normally used for console debugging in standard configuration). ​To achieve this, you have to do the following commands:
  
 <​code>​ <​code>​
Line 23: Line 23:
 ===== Install the Fhem.de building automation server for testing purposes ===== ===== Install the Fhem.de building automation server for testing purposes =====
  
-Fhem is a building automation server . We will use it to verify that everything is weel configured.+Fhem is a building automation server . We will use it to verify that everything is well configured.
  
 ==== Install Fhem for testing purposes ==== ==== Install Fhem for testing purposes ====
Line 55: Line 55:
  
 Then take all your EnOcean devices and click on them: click on switches to send an event and click on the learn button to send a datagram to discover the equipment. Then you can go the ''​EnOcean''​ and you can find all the equipment recognized by Fhem. Then take all your EnOcean devices and click on them: click on switches to send an event and click on the learn button to send a datagram to discover the equipment. Then you can go the ''​EnOcean''​ and you can find all the equipment recognized by Fhem.
 +
 +So now you know that everything is functional without programming anything.
 +
 +<note warning>​Be careful: you must stop the Fhem server before trying to communicate with another program to listen to events, else you will notice some problems like not receiving all events (some of them may be cacthed by Fhem).</​note>​
 +
 +===== Compile EnOcean Link Library =====
 +
 +To be able to develop your own program with EnOcean protocol, you will have to get and compile the library.
 +
 +  - Download [[https://​www.enocean.com/​it/​enocean-software/​enocean-link/​|EnOcean Link]].
 +  - Instruction to [[https://​www.enocean.com/​fileadmin/​redaktion/​support/​enocean-link/​compile.html#​raspberry|compile the library for Raspberry Pi]].
 +    * Modify ''​Sandbox.cpp''​ to specify ''#​define SER_PORT "/​dev/​ttyAMA0"''​ instead of /​dev/​ttyUSB0 if you use EnOcean Pi (/​dev/​ttyUSB0 is used for EnOcean USB300 key)
 +    * To compile the library on the Raspberry Pi (not using cross-compilation)
 +<​code>​
 +sudo apt-get install autoconf automake autotools-dev m4 libtool
 +cd EOLink
 +chmod +x configure
 +./configure CPPFLAGS="​-Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s"​
 +make
 +</​code>​
 +    * Libraries are compiled in the ''​.libs/''​ directory.
 +
 +To test the library you have multiple programs in ''​Tutorial''​ directory. With the current version tested, there is a problem with missing and depcomp files, so I replaced them.
 +<​code>​
 +cd ../Tutorial
 +chmod +x Tutorial.sh
 +mv depcomp depcom.sav
 +mv missing missing.sav
 +ln -s ../​EOLink/​depcomp .
 +ln -s ../​EOLink/​missing .
 +./​Tutorial.sh
 +cd Tutorials
 +./Tutorial1
 +</​code>​
 +
  • raspberry-enocean.txt
  • Last modified: 2015/03/27 15:56
  • by Stéphane Lavirotte