Skip to content
Smart home - master thesis
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
espProgram
frontend
manager
.gitignore
README.md
deploy.sh
mysql_schema.sql
run.sh

README.md

BonAmi - more than just smart home

BonAmi

Why?

BonAmi is a master thesis project. It is a model for smart home in a smart settlement. The thesis is aimed to project and release a prototype of an intelligent house, that would collaborate with other flats in a smart settlement. Main model's assumption is to increase habitants' security and alarm them when a fire or flood is detected.

Quick start for impatient

To deploy platform on Raspberry Pi download the repo and run ./deploy.sh. The Raspberry will restart.

After it's up and running again go to localhost:5000 to see the UI.

Default user: admin password: admin

Block 8080 port. Edit /etc/services and add line:

/sbin/iptables -A OUTPUT -p tcp --dport {PORT-NUMBER-HERE} -j DROP

at the end.

To enable e-mail notifications see How to enable email notifications

Features

  • alarming when fire detected and "sound codes":
    • nearest sensor beeps continuously,
    • sensors in the same flat - periodically 5 sec. beep, 2 sec. silence,
    • other sensors in the settlement - periodically 1 sec. beep, 1 sec silence,
    • platform sends emails to all habitants with the exact location of a fire.
  • alarming when flood detected and "sound codes":
    • flat in which flood was detected - periodically 0.25 sec. beep, 0.25 sec. silence,
    • other flats - periodically 0.25 sec. beep, 0.75 sec. silence,
    • platform sends emails to all habitants with the exact location of a fire.
  • additionally, you can connect any input-output 1-0 device to ESP8266's pins for example light switches,
  • every habitant has his own account in the system
  • habitants can turn on and off devices in their flats.

Architecture

BonAmi architecture

This platform has 4 basic logic elements:

Frontend uses manager's REST API to communicate with it.

Communication between sensors and manager uses MQTT and Mosquitto broker. 4 topics are used:

  • input - sensor sends messages to manager. Format: <pin number>,<sensor number>,<pin state>, for example: 2,39,0
  • output - manager sends requests to change pin state. Format as above,
  • setup - just after connection, sensor sends information about its pins. Format: <sensor number>|<pin nr>,<name>,<interval>,<is acrive>,<pin type>,<is alarm pin>|<pin nr>,<name>...
  • alarm - information about alarm. Format: <sensor number>,<flat number>,<alarm type>, where alarm type is 1 for fire, 2 for flood.

Mysql schema

All Database documentation is linked here.

Manual tests

For now, only manual tests in Polish were prepared. Scenarios are listed here.

Room for improvement

  • more documentation,
  • more security,
  • digital thermometer and other digital devices handling,
  • RFID tags handling,
  • flat maps and visualization,
  • user's rules
  • system/devices states (f.e. alarm armed/disarmed)
  • automatic tests
You can’t perform that action at this time.