Johannes Krug 5 years ago
parent
commit
e0e17d489f
5 changed files with 69 additions and 0 deletions
  1. 1
    0
      .gitignore
  2. 22
    0
      camera/camera.py
  3. BIN
      camera/image.jpg
  4. BIN
      camera/image2.jpg
  5. 46
    0
      doc/smart_home_technical_paper

+ 1
- 0
.gitignore View File

@@ -0,0 +1 @@
camera/venv

+ 22
- 0
camera/camera.py View File

@@ -0,0 +1,22 @@
#!/usr/bin/env python2

import time
import RPi.GPIO as GPIO

IR_PIN = 3

GPIO.setmode(GPIO.BOARD)
GPIO.setup(IR_PIN, GPIO.OUT)

try:
while True:
print "Gpio Low"
GPIO.output(IR_PIN, GPIO.LOW)
time.sleep(20)
print "Gpio High"
GPIO.output(IR_PIN, GPIO.HIGH)
time.sleep(20)
except Exception as e:
print e
finally:
GPIO.cleanup()

BIN
camera/image.jpg View File


BIN
camera/image2.jpg View File


+ 46
- 0
doc/smart_home_technical_paper View File

@@ -0,0 +1,46 @@
Presence detection in a smart home environment

Sebastian DOHLE <dohlese65595@th-nuernberg.de>
Lennart HEIMBS <heimbsle69869@th-nuernberg.de>
Kevin HOLZSCHUH <holzschuhke56905@th-nuernberg.de>
Johannes KRUG <krugjo67713@th-nuernberg.de>

Georg-Simon-Ohm University of Applied Sciences Nuremberg (Germany)

Abstract - In this paper, we present a smart home setup, based on a raspberry pi, that allows for the implementation of custom sensors, developed by this team, as well as of the shelf commercial sensors. We describe the necessary software used for sensor implementation, networking, logic and user interface. Detecting the presence of persons in a room demonstrates the usefulness of the setup.

Keywords: Smart Home, Presence detection, Node-red, mqtt, gateway, raspberry pi

1. INTRODUCTION
The market for smart home ecosystems is currently heavily fragmented. https://www.statista.com/study/42112/smart-home-report/
A couple of market-leaders like eq-3, Amazon and Control4 have already established their own ecosystems with their own networking protocolls.
Since the market is still growing, more companies join the smart home market with their own solutions and the vast variety of communication protocolls is ever growing.
Existing community projects like FHEM, ioBroker and openHAB try to address this by providing a unified interface for a number of protocolls.
Because these projects either lack in usability (FHEM), require the knowledge of a specifiy programming language (openHAB and Java) or lack customizability (ioBroker) we will describe in this paper a three-layered implementation of a highly customizable and easy to program solution.
Section 2 covers the used hardware and communications design for the smart home environment.
The used software, why the software was used and how it works is described in section 3 and in section 3
Section 2 contains the outline of the setup used and we will describe the specific components and explain why they are used in Section 3

2. THE GATEWAYs HARDWARE AND NETWORK COMMUNICATION
A Raspberry Pi is used as the basis of the smart home gateway.
It provides a full linux installation with raspbian lite which is well equipped to run headless, has only basic applications preinstalled and uses few resources by passing on a graphical user interface.
To make the project controllable a graphical user interface will be provided, which is accessible over the university's network.
For this, the gateway uses a static ip-address in the university's lan-network, which makes the gui accessible in the entire university's network.
Additionally, the sensors developed in the scope of this project will communicate with the gateway via wifi.
This would ideally be done by using the universitv's provided network as well, but the networks configuration does not allow for this, since the used security protocol used by eduroam is not supported by the used microcontroller ESP8266 and ESP32.
To circumvent this limitation, the raspberry pi is used as a wireless access point running a standalone network.
the sensors will connect to this standalone network, in which the gateway is the host with a static ip-address, and send their gathered data via the network to the gateway for further processing.
To communicate with commercial sensors the radio-tranciever HM-MOD-RPI-PCB from ELV is used.
It provides an easy to use 868,3/869,525 MHz radio tranciever which connects to the raspberry pis GPIO-Pins
3. THE SETUPs SOFTWARE
[IMAGE]
The smart home environment is comprised of three key layers:
the logic-layer uses node-red and node-red-dashboard to implement the smarthome logic and graphical user interface.
the networking-layer uses the protocol mqtt to use the raspberry pis wifi capabilities to communicate to wifi-sensors and to connect the third - interface - layer with the logic layer.
the interface-layer serves as the connection to proprietary sensors from companies like phillips and homematic.
It is comprised by software (homegear and piVCCU) which speak the vendor-specific protocols used by commercial sensors and actuators.
The communication with the sensors is done via the 433MHz or 866MHz radio band

Loading…
Cancel
Save