Skip to content

zorro2000se/haiot

 
 

Repository files navigation

haiot

Home Automation & Internet of Things

System capabilities

Application is split in modules, each with a set of features. Modules can be enabled or disabled.

admin (mandatory)

This is a mandatory module that includes db setup, thread pool and events processing System configuration via a web interface, accessible usually at http://localhost:5000/admin/modules

mqtt_io (mandatory)

Module used for communication with other application modules

health_monitor

Monitors CPU , memory usage, hard drives temperature, disk health

webui

Web interface to manage the application

node

Cluster capability, multiple nodes can run at the same time with failover capability enabled

sensor

Monitors 1-wire sensors based on owserver and RFXCOM compatible sensors. RFXCOM device tested is RFXtrx433.

alarm

heat

io_bbb

IO input capability for beaglebone, detects contact states, used as a basis for alarm system

graph_plotly

Automatically creates graphics online using free plot.ly service. Check some samples here.

relay

Turns on and off relays

Target Platforms

- Linux (tested mostly with Debian) - Windows (tested with Windows 8.1

Application was tested on:

- Raspberry Pi model B - Beaglebone Black - Debian (Openmediavault based install) - OpenWrt/Linaro GCC 4.8-2014.04 r42625 ( - Windows 8.1 64 bit

How to setup the application

General prerequisites:
- python 2.7 - several python packages listed in requirements.txt - connection to a mqtt server, tested with mosquitto

Specific prerequisites for Windows 8.1

  • hdparm
  • smartmoontools
  • bash, nohup, sudo Ensure hdparm.exe and smartctl.exe are added in the PATH

Specific prerequisites for Linux

  • Enable sudo access for hdparm and smartctl
  • virtualenv usage recommended
  • for pyserial, set access rights to open /dev/ttyUSBx device: sudo usermod -a -G dialout $USER

On Linux, grant execute rights and run setup.sh.bat. This will install virtualenv and setup a python venv context with all required packages

How to start / stop the application

Run startserver.sh OR python run_all.py Run stopserver.sh to stop the application

Startup parameters

- db_disk or db_mem parameters specify where the database file will be created. for db_disk option, db is created in the current path. for db_mem option, db is created in /tmp folder, on constrained devices (PI, BBB) this is usually mapped to ramfs. Note that db content will be lost at restarts if db is created in ram - model_auto_update, automatically updates db schema if changes are detected (implies drop tables and default values)

Other packages used

https://github.com/woudt/pyRFXtrx

About

Home Automation & Internet of Things

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 63.2%
  • HTML 27.8%
  • Shell 8.8%
  • Batchfile 0.2%