I've done a home automation/surveillance system with Domoticz. The Domoticz system is running on a Raspberry Pi 3 and currently consists following features:
- Home Easy HE305 door sensors for every door (5pcs altogether)
- Fire alarm KD101
- Power outlet Nexa LGDR-3500 (3pcs altogether). Used for turning on/off electric car heater during winter time and for xmas lights control
- MD-214R wireless alarm siren
- DS18B20 temperature sensor connected to the Raspberry Pi. Used for measuring temperature of living room.
- Arduino based temperature logger (based on DS18B20 sensor). Located in warehouse.
- Arduino based humidity and temperature logger (based on DHT22 sensor). Located in garage.
- Arduino based MQTT gateway and temperature logger (based on DS18B20 sensor). Located in one of the bed rooms.
- Microsoft DC-21 power bank for powering the Raspberry Pi. Acts as a backup battery in a case of power outage.
- RFXtrx433E 433MHz transceiver and external 5dBi 433MHz antenna
- ESP-8266 based RGB LED stripe systems
Please find picture about my system architecture below.
More information including codes and schematics about Arduino and ESP-8266 based devices can be found from the GitHub.
Arduino based MQTT gateway
Arduino based temperature and humidity logger
Arduino based temperature logger
RGB LED control system
I've done several Lua scripts for my home automation/surveillance system that will take care of notifications, turning car heater switch on/off etc.
Please find a brief information about the scripts below:
- script_device_garage.lua - If garage’s temperature is lower than pre-defined temperature limit, email and notification to be sent (I've similar script running about the warehouse sensor too)
- script_time_doorsensorbatterytest.lua - Intention of this script is to inform user that battery of some door sensor could be empty If no data has been received from the door sensor for a pre-defined time period (the HE305 door sensors are not able to tell battery level to the Domoticz).
- script_time_garagedoornotifier.lua - Intention of this script is to inform user via email and notification if garage door has been open over pre-defined time limit when outside temperature is lower than pre-defined limit
- script_time_carheaterswitch.lua - Intention of this script is to turn car heater switch on before car needs to be used. On time is based on outer temperature and is calculated based on the recommendations found from the Trafi website. It is assumed that car heater is needed only during October – April and if outside temperature is <0DegC. This script also turns Off car heater switch whether it’s activated manually or by the script.
- script_device_carheaterswitchcompanion.lua - Intention of this script is to work as a companion script for the ”script_time_carheaterswitch.lua” script. The script triggers if switch is set on manually and calculates time when switch need to be set off.
- script_device_firealarm.lua - Intention of this script is to send notification, SMS and email if fire alarm goes on. If fire alarm device is activated by the security alarm, then fire alarm script doesn’t run.
- script_device_securityalarm.lua - Intention of this script is to turn alarm siren and fire alarm on if one the door sensors changes it’s state to “Open” when state of the security panel is Arm Away or Arm Home. If script is triggered, email, SMS and notification are sent.
- script_security_securityalarmcompanion.lua - Intention of this script is to work as a companion script for the ”script_device_securityalarm.lua” script. The script triggers if security device is set to Normal state. Script turns alarm siren and fire alarm off when triggered.
- script_time_christmaslights.lua - Intention of this script is to turn Christmas lights on and off based on sunrise and sunset. Script will run every third minute and only from November to February.
I've also implemented presence detection (link) to arm/disarm alarm system depending on how people living here are at home. Also, database of the Domoticz is backed up regularly to NAS located on the same LAN.
EDIT 12.4.2020: Xmas lights script and RGB LED control system added. Domoticz system architecture picture updated accordingly. Some old photos deleted.