Page 1 of 2

Domoticz Home Automation Workbook

Posted: Wednesday 06 February 2019 15:15
by rwblinn
To share my Domoticz Home Automation Workbook (PDF, ~790 pages) Changelog.
Objectives
  • Explore & learn Domoticz & Scripting.
  • Build a Home Automation & Information System.
  • Write up & share experiences during development.
  • Use as a supplemental reference.
Notes
  • This is a working document, solution changes, idea’s & to-do’s will probably never cease to exist.
  • There might be better solutions for what is shared = updates or changes made as progressing.
  • Source code for the scripts & flows not fully shared in this document or have changed … check GitHub src folder for latest source codes.
  • Automation scripts mainly developed with dzVents Lua.
  • Domoticz Hardware Plugin development in Python.
  • Some functions make use of Node-RED.
  • Functions that have been replaced by another solution are kept in this document as reference – might be of use.
  • Screenshots shared might not be update as functionality is evolving.
  • To-do’s tagged with <TODO>. The To-do list, with prefix, i.e. NEW, UPD …, are captured in the file TODO.md.
  • Ideas logged in IDEAS.md.
Functions
(full list see the workbook)
  • Air Quality monitor .
  • Ambient light (from ESP8266 running ESP Easy) with threshold.
  • Battery Status - Daily check & notify for all devices (Domoticz & External Systems) the battery level against a threshold set via user variable.
  • Charts for selective weather items, room temperature & humidity.
  • Climate Environment - UV Index & Category, Pollen Index.
  • Coffee machine monitor – start and end time, info message.
  • Control Somfy roller shutters with RTS motors in rooms.
  • Control Volumio music player whilst listening to web radio.
  • Custom icons.
  • Custom Pages - simple to more complex examples.
  • Custom Settings - Custom page to change the value of selective user variables.
  • Device Status - Custom page to quickly view all device properties of a used device.
  • Display temperature & humidity measured in rooms.
  • Electricity power & energy for selected devices / rooms (washer, MakeLab etc.).
  • Electricity power & energy for the house from “volkszaehler” with charts.
  • Event monitor for selected devices.
  • Garage door monitor.
  • Hardware Monitor for the Raspberry Pi's used (see HardwareMonitor.zip).
  • HomematicIP support selective devices using RaspberryMatic. Developed plugins HmIP-eTRV, HmIP-PSM or Python scripts (triggered via dzVents Lua).
  • Hue Light controlled via ESP8266 with slide potentiometer & 4-digit-7-segment-display.
  • Indoor Air Quality - Measure in regular intervals, the IAQ Index VOC, assign to a custom sensor (VOC) and set the color of a Hue White & Color Ambiance bulb accordingly.
  • Key Dates management and information organised in a roomplan.
  • MQTT Logger (Node-RED)
  • MQTT subscribe & publish messages to trigger actions or information.
  • Monitor stock quotes.
  • Music Player using LibreELEC with Kodi and another test with Volumio.
  • Key Dates management and information organised in a roomplan.
  • Notes with a subject & content and save, copy or notify.
  • Philips Hue Lighting System control via Hue Bridge for ZigBee devices.
  • Postbox Notifier.
  • RaspberryMatic DutyCycle monitor.
  • RaspberryMatic Statelist with devices and data points (Node-RED).
  • Raspberry Pi system information with charts and threshold email notification.
  • Remote Control via Homematic IP device (HmIP-RC8) for 8 specific functions.
  • Remote Control Domoticz devices using Email client - includes a simple Android test app
  • Security door & window wireless contact detectors.
  • Soil Moisture monitor for plants (Info).
  • Time Control to track & control the time spent in hours, per activity block (with start- & end-time) and total/day, on a generic task.
  • Timers for single devices or complex tasks (Automation events dzVents).
  • Utility Dashboard Heating, Power, Water dashboard using Grafana & FlowCharting plugin. This is a process engineering prototype (SCADA).
  • Weather 9-DAYS forecast from Norwegian Meteorological Institute (Meteorologisk) as a Custom Page with Highcharts Custom Chart.
  • Web UI Domoticz Quick Access Mobile - customized web frontend to control dedicated functions mainly accessed from mobile devices.
  • Web UI Web App Site Control - Node-RED alternative to the standard Domoticz Web UI (Note: Not developed further as replaced by Domoticz Quick Access Mobile).
Explore How To Use
  • Domoticz running on a Raspberry Pi (setup, configure).
  • Scripting Python, Lua, dzVents, JavaScript.
  • Python Plugin Development (mainly with Tinkerforge Building Blocks)
  • API interaction
  • MQTT messaging
  • Custom Pages with Highcharts & Google Charts for single & multiple devices.
  • Node-RED as an alternative script engine and User Interface.
  • SQLite
  • ESP8266
  • ESP Easy for sensors.
  • RFXCOM RFXtrx433E USB RF Transceiver for Temperature & Humidity devices, External Wind device (only for RFXCOM tests), Other 433Mhz devices, i.e. door & window contacts.
  • Philips Hue Light Control.
  • External services
  • Domoticz Android App (native client, to be determined).
  • Advanced User Interfaces, i.e. Node-RED, Bootstrap …
Credits
To the developers of Domoticz and to all sharing information about Domoticz. Without these, it would not be possible to build this project and write the workbook.

Re: Workbook setting up Domoticz Home Automation System

Posted: Wednesday 06 February 2019 17:22
by zenit
Hi,

This is really good documentation for a (advanced) user/beginner! :ugeek: As a user of Domoticz for a few years now (2015) it's perfect to look up some things very quickly. Even some new thoughts occur how to implement stuff.

Big thumbs up! Thanks rwblinn.

Re: Workbook setting up Domoticz Home Automation System

Posted: Tuesday 12 February 2019 9:56
by rwblinn
zenit wrote: Wednesday 06 February 2019 17:22 This is really good documentation for a (advanced) user/beginner!
Thanks a lot - good motivation to progress = see next post.

Re: Workbook setting up Domoticz Home Automation System

Posted: Tuesday 12 February 2019 9:59
by rwblinn
Update r20190212
  • NEW: Function Volumio Web Radio - Listen to & control, via Domoticz Dashboard, Web Radio provided by Volumio
  • NEW: Appendix Tools - Domoticz Internal Script Viewer
  • UPD: Appendix TODO List and the specific TODOs in the document
View

Re: Workbook setting up Domoticz Home Automation System

Posted: Tuesday 19 February 2019 9:10
by rwblinn
Update r20190218
  • NEW: Function Monitor Stock Quotes - Obtain quotes from Alpha Vantage, set thresholds with notifications, Roomplan, Node-RED Dashboard
  • UPD: Reworked User Variables section
View

Re: Workbook setting up Domoticz Home Automation System

Posted: Tuesday 19 February 2019 20:37
by Brandjuh
Amazing bookwork! I am pretty new with Domoticz and this is going be very helpful.

Re: Workbook setting up Domoticz Home Automation System

Posted: Wednesday 27 February 2019 16:37
by rwblinn
Update r20190227
  • NEW: Function Ambient Light w/ threshold. The Ambient Light is connected to an ESP8266 NodeMCU running ESPEasy
  • NEW: Function Hue Lights - Control the lights via Node-RED Dashboard UI
  • NEW: User Variables - Example how to use Node-RED Dashboard UI to set threshold value
  • UPD: Function Volumio - Reworked checking Volumio server response (using ping)
  • FIX: Function Hue Lights - Bug in dzVents script Timed Switch Light
Thanks for Feedback and the GitHub stars.

View

Re: Workbook setting up Domoticz Home Automation System

Posted: Wednesday 27 February 2019 18:15
by Herman-H
Thanks for book, really helpful.

Re: Workbook setting up Domoticz Home Automation System

Posted: Monday 13 May 2019 9:34
by Jessiryan
This is really good documentation for user/beginner. I am totally new to Domoticz. Thanks a lot for sharing such nan awesome documentation on Workbook setting up.

Re: Workbook setting up Domoticz Home Automation System

Posted: Monday 20 May 2019 12:58
by sincze
Kudo's to the writer of the document.
Very nice. WIKI material ;-)

Re: Workbook setting up Domoticz Home Automation System

Posted: Monday 03 June 2019 10:04
by rwblinn
Update version 20190603

See Changelog.
Updated also the first post.

Thanks for the feedback. Welcome any ideas.

Re: Workbook setting up Domoticz Home Automation System

Posted: Thursday 06 June 2019 13:24
by gajotnt
Great work :)

Re: Workbook setting up Domoticz Home Automation System

Posted: Thursday 06 June 2019 13:45
by poudenes
Great Work... Within a year we can all buy this book in the bookshop :D love this kind of ideas

Re: Workbook setting up Domoticz Home Automation System

Posted: Friday 21 June 2019 12:17
by rwblinn
Update 20190621
Domoticz Home Automation Workbook (PDF, ~280 pages).
  • NEW: Function Hardware Monitor for all Raspberry Pi's used.
  • NEW: Function Indoor Air Quality Monitor - Plugin [more]
  • NEW: Appendix Tools MQTT Logger - Log and analyse Domoticz MQTT messages, Node-RED flow
  • UPD: Function Custom Icons reworked
  • UPD: Explore Python Plugin Development - Hints on Domoticz log errors
  • UPD: Various smaller enhancements & corrections
(Again) many thanks for feedback :D

Re: Workbook setting up Domoticz Home Automation System

Posted: Tuesday 09 July 2019 16:48
by rwblinn
Update 20190709
Domoticz Home Automation Workbook (PDF, ~295 pages).
  • NEW: Explore RaspberryMatic CCU solution, addons XML-API & CUxD and Domoticz integration
  • NEW: Function Electric Usage Rooms/Devices - RaspberryMatic CCU with device HMIP-PSM (Plugin)
  • NEW: Function Radiator Thermostat - RaspberryMatic CCU with device HMIP-eTRV-2 (Plugin)
  • NEW: Function Postbox Watcher - RaspberryMatic CCU with device HMIP-SDWO
  • NEW: User Variables - List with Python3 script
  • UPD: Alert Message - improved dzVents Lua scripts; Alert Level 4 sends Email notifications
  • UPD: Various smaller enhancements & corrections
Created also two homematicIP plugins - tested against RaspberryMatic 3.45.7.20190622.

Re: Workbook setting up Domoticz Home Automation System

Posted: Saturday 07 December 2019 12:43
by rwblinn
Update 20191207
Domoticz Home Automation Workbook (PDF, ~325 pages).
  • NEW: Function Email Control - Experiment to Remote Control Domoticz devices using Email client - includes simple Android test app
  • NEW: Function River Elbe Tide - watch the tide of the river "Elbe" at "Schulau" near Hamburg Germany
  • NEW: Function Radiator Thermostat HMIP-eTRV-2 - Event to ensure not heating overnight (switch off)
  • NEW: Function Stock Quotes - Automation script (dzVents Lua) instead Node-RED flow (disabled)
  • NEW: Explore RaspberryMatic - Reworked, added more examples using the XML-API addon
  • NEW: Explore ESP Easy - ESP BMP280 to Domoticz
  • UPD: Function BMP280 - Sensor replaced by BME280 (T+H+P), function renamed & automation scripts updated
  • UPD: Function Postbox Watcher - Renamed to Postbox Notifier; new second solution with reset switch
  • UPD: Function RaspberryMatic - update 3.47.22.20191130
  • UPD: Explore ESP Easy - Firmware update, chapter reviewed and polished up
  • UPD: Function Coffee Machine Monitor - User Variable to set the power threshold
  • UPD: Setup - Added ethernet configuration and network overview
  • UPD: Functions and Explore - Reordered chapters
  • UPD: Various smaller enhancements & corrections

Re: Workbook setting up Domoticz Home Automation System

Posted: Saturday 07 December 2019 13:40
by jf2020
Many thanks for putting this together and sharing. Very nice work!

Re: Workbook setting up Domoticz Home Automation System

Posted: Sunday 12 January 2020 18:21
by rwblinn
Update 20200112
Domoticz Home Automation Workbook (PDF, ~30 pages).
  • NEW: Function Domoticz Web App Site Control - Node-RED based GUI
  • NEW: Function Roomplan - Created room plans with associated devices; defined device naming convention
  • NEW: Function Timers - Started to use timers for simple tasks like thermostat setting setpoint or switch on or off
  • NEW: Function Postbox Notifier - Solution with Alert + Switch + Voltage
  • NEW: Explore RaspberryMatic - Added more push & pull examples; HTTP XML-API URL replaced config by addons
  • NEW: Explore RaspberryMatic - Experiment Node-RED dashboard with two radiator thermostats
  • UPD: Explore Events - bundled the test scripts to files explore_automation_events*.md
  • UPD: Explore Node-RED - updated installation information as Node-RED installation/update script has changed (Linux Installers for Node-RED)
  • UPD: Function Radiator Thermostat reworked; NEW plugin HmIP-eTRV; Timers to control heating; New device valve position
  • UPD: Explore SQL - Chapter reworked and added more SQL select examples
  • UPD: TODO.md
  • UPD: Various smaller enhancements & corrections

Re: Workbook setting up Domoticz Home Automation System

Posted: Wednesday 18 March 2020 10:36
by rwblinn
Update 20200318
Domoticz Home Automation Workbook (PDF, ~430 pages).
  • NEW: Function Notes - Create notes with a subject & content and save, copy or notify.
  • NEW: Function Philips Hue - Examples to direct access a device using HTTP API.
  • NEW: Function Time Control - Track & control time spent in hours, per activity block (with start- & end-time) and total/day, on a generic task.
  • NEW: Explore Custom Pages - First examples setting & getting data; Alert Message, Quick Check Raspberry Pi data, Switch Light.
  • NEW: Explore SQL - read from file; execute sql-command-line using Lua; more examples.
  • NEW: Explore Tinkerforge - Various concepts how to interact between Domoticz and the Tinkerforge Building Blocks.
  • NEW: Tool: RaspberryMatic Statelist - Obtain the datapoint id's for all RaspberryMatic devices configured on the CCU.
  • UPD: Function Domoticz Web App Site Control - Dark theme instead default light blue.
  • UPD: Function Hardware Monitor - fixed get RAM data for Raspberry Pi Buster.
  • UPD: Function Postbox Notifier - At midnight reset notification in case not done manually.
  • UPD: Function Waste Calendar - Renamed to Key Dates Calendar as also including other key dates in the list. Removed interval entry.
  • UPD: Explore MQTT > Python: Scripts reworked.
  • UPD: Explore RaspberryMatic - Release 3.51.6.20200229; Additional examples to get data & set Domoticz devices.
  • UPD: Tool MQTT Logger - Node-RED solution completely reworked; select MQTT broker Domoticz Production or Development.
  • UPD: Setup > Raspberry Pi > Samba - Added full log installing Samba and set share.
  • UPD: User Variables > List > Python: Script reworked; improved error handling for the request, HTTP & URL.
  • UPD: Various chapters reviewed and smaller updates including scripts, flows.

Re: Workbook setting up Domoticz Home Automation System

Posted: Wednesday 18 March 2020 11:11
by waaren
rwblinn wrote: Wednesday 18 March 2020 10:36 Update 20200318
Domoticz Home Automation Workbook (PDF, ~430 pages).
@rwblinn
Many thx for sharing. Is it OK to publish a link to your github page on the domoticz wiki ?