Difference between revisions of "Projets:Perso:2013:RaspEink FHEM"
(Created page with "== Introduction == The aim of the RaspEink project is to drive a small e-Paper display with a Raspberry Pi. Such a display can be used for many purposes. Here we will create ...") |
|||
Line 14: | Line 14: | ||
* Perl, required to run FHEM | * Perl, required to run FHEM | ||
* Python for extraction of data from logfile and generation of a bitmap | * Python for extraction of data from logfile and generation of a bitmap | ||
− | * | + | * The [[Projets:Perso:2013:RaspEink|driver]] used to send bitmap to display. |
Line 25: | Line 25: | ||
== Step 1: Setup the Hardware and test it == | == Step 1: Setup the Hardware and test it == | ||
− | Follow the | + | Follow the steps from the following article first to install and test the display driver: [[Projets:Perso:2013:RaspEink]] |
− | + | ||
− | + | == Step 2: Install and set up FHEM == | |
− | + | There are numerous guides on how to install FHEM on a Raspberry Pi. Here is one example: [http://binerry.de/post/30300770630/introduction-to-home-automation-with-raspberry-pi|Introduction to Home Automation with Raspberry Pi] | |
− | + | == Step 3: Adapt piper.py to your needs == | |
− | + | Download the complete RaspEink_FHEM archive including piper.py here. | |
− | + | Piper.py uses a number of variables to adapt to your FHEM installation: | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
+ | Path to the fhem log files. Don't forget the "/" at the end | ||
<pre> | <pre> | ||
− | + | log_path = "/opt/fhem/log/" | |
</pre> | </pre> | ||
+ | Names of the heating actuators (e.g. FHT). These have to match the room name of your logfile, e.g. <b>chambre</b>-2015.log. | ||
+ | <i>exterior</i> is the name of the exterior temperature probe (e.g. S300 TH) log file. | ||
− | + | <i>heater</i> is the name of the switch (e.g. FS20) which activates the heating system. | |
− | + | <pre> | |
− | + | room1 = "chambre" | |
+ | room2 = "sdb" | ||
+ | room3 = "salon" | ||
+ | exterior = "exterieur" | ||
+ | heater= "Chauffage" | ||
+ | </pre> | ||
+ | Next, define the öetters used to identify each room on the display: | ||
<pre> | <pre> | ||
− | + | symbol_room1 = "C" | |
− | + | symbol_room2 = "B" | |
− | + | symbol_room3 = "S" | |
− | + | symbol_exterior = "X" | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
</pre> | </pre> | ||
− | + | And lastly, the threshold values for the actuators, i.e. when do they switch on the heater (at 30% open) and when will they shut it down (at 20% open). | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
<pre> | <pre> | ||
− | + | actuator_high_room1 = 30 | |
− | + | actuator_low_room1 = 20 | |
− | + | actuator_high_room2 = 30 | |
− | + | actuator_low_room2 = 20 | |
− | + | actuator_high_room3 = 30 | |
− | + | actuator_low_room3 = 20 | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
</pre> | </pre> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 20:46, 16 July 2015
Contents
Introduction
The aim of the RaspEink project is to drive a small e-Paper display with a Raspberry Pi. Such a display can be used for many purposes. Here we will create a status display for FHEM, a well known home automation software.
Hardware
- Raspberry Pi Model B
- 2.7 inch E-Paper display from Embedded Artists
Software Overview
- Raspian linux from official source
- FHEM home automation software
- Perl, required to run FHEM
- Python for extraction of data from logfile and generation of a bitmap
- The driver used to send bitmap to display.
Software diagram:
The central piece of software is the Python program (piper.py). It processes the FHEM logfiles and extracts all required information (temperatures, valve positions, humidity and burner status). It then creates a bitmap from this information and saves it to a file. The driver, written in C, loads the BMP and sends it to the display through SPI. A cron job executes the two programs sequentially every 5-minutes.
Step 1: Setup the Hardware and test it
Follow the steps from the following article first to install and test the display driver: Projets:Perso:2013:RaspEink
Step 2: Install and set up FHEM
There are numerous guides on how to install FHEM on a Raspberry Pi. Here is one example: to Home Automation with Raspberry Pi
Step 3: Adapt piper.py to your needs
Download the complete RaspEink_FHEM archive including piper.py here.
Piper.py uses a number of variables to adapt to your FHEM installation:
Path to the fhem log files. Don't forget the "/" at the end
log_path = "/opt/fhem/log/"
Names of the heating actuators (e.g. FHT). These have to match the room name of your logfile, e.g. chambre-2015.log.
exterior is the name of the exterior temperature probe (e.g. S300 TH) log file.
heater is the name of the switch (e.g. FS20) which activates the heating system.
room1 = "chambre" room2 = "sdb" room3 = "salon" exterior = "exterieur" heater= "Chauffage"
Next, define the öetters used to identify each room on the display:
symbol_room1 = "C" symbol_room2 = "B" symbol_room3 = "S" symbol_exterior = "X"
And lastly, the threshold values for the actuators, i.e. when do they switch on the heater (at 30% open) and when will they shut it down (at 20% open).
actuator_high_room1 = 30 actuator_low_room1 = 20 actuator_high_room2 = 30 actuator_low_room2 = 20 actuator_high_room3 = 30 actuator_low_room3 = 20