Home BMS – Smart Home

An important project for me in the last few years is the complete automation of a house that does not have smart home infrastructure. For this project i designed and built electronic boards, microprocessors and programs for the following key control areas in order to contol all the critical systems from a touch screen in house and remotely from a mobile phone or tablet :

  1. Gas Boiler Control & Thermostat
  2. Solar Hot Water Control
  3. Lights Control
  4. Intrusion system Control
  5. CCTV Control
  6. Power monitoring
  7. Weather Station & forecast

Main Topology

In order to interconnect different systems in a different points inside and outside the house with out cables interconnections i build several autonomous panel with Wifi connection and I programmed the corresponding communication bridges for data exchange between them. The main topology includes a control unit of the boiler and the external sensors, a unit on the roof for monitoring the solar boiler, an indoor unit for controlling the temperature, humidity as well as the connection with the Philisp Hue. Another unit for the interconnection with the intrusion panel & cameras and one last unit inside the electrical panel in order to monitoring the power consumption.

House example topology
Home Automation Module Topology

Gas Boiler Control & Thermostat

For the Boiler Control i build an indoor module with Temp & Humidity Sensor in order to mesure the temp and transfer this data to outdoor boiler untit. For the Gas Boiler procedure this unitl only provide indoor temp.

Outdoor unit recaive the indoor temp and with outdoor temp control the house heating with PID control.

PID control with Relay output

PID control belongs to the “optimal” category of control theory which specifies that a certain process variable is optimally achieved. For temperature controller PID, the optimal variable is maintaining the process temperature at the setpoint for the desired period of time, avoiding any severe changes from lag, overshoot or disturbances.

 The three elements of the PID algorithm are the Proportional, the Integral, and the Derivative. These elements each relate to the variance in the process temperature versus the setpoint in a period of time.

  • Proportional – the variance between the setpoint and the current process temperature
  • Integral – the previous variance from the setpoint
  • Derivative – the predicted future variance based on previous and current variance

These variances over time are then calculated using a PID formula automatically by the controller, and the result is how much power needs to be applied to the process to maintain the temperature at the setpoint.

With PID algorithm ensure the minimum gas consumption for heating the house. The system has 10 minutes sampling and automatic training from the thermal behavior of the house. In the same time system recaive information from Intrusion panel status and if the system arm, close the boiler in the same time. From the other hand if i have indoor temp. below a critical leve (Risk Temp), system start up automatically the heating in order to keep the temp at the level we have set in the application. Finally from the application we can choose whether the system will operate manually or automatically (Auto/Manual). In the automatic selection we can set an operating schedule (start/stop time) from the Settings tab.

Solar Hot Water Control

For this function the goal is to save energy, taking advantage of 100% the availability of hot water from the solar boiler for the operation of the house. For this reason, Solar unit measure the water inside the boiler and control the 3-way valve. If the water if above the threshold what we have in the application, system drive water from Sonal boiler. If the water if below the threshold system turn the valve and startup the gaz boiler in order to provide hot water.

For security reason i have a manual valve button in order to drive the valve manual to boiler line. Finally Pyranometer provide information about the sun light and with poth informations (solar boiler temp & Pyranometer) better manage the system with maximum economy efficiency through the algorithm I have included.

Αυτή η εικόνα δεν έχει ιδιότητα alt. Το όνομα του αρχείου είναι fgh646.jpg
Αυτή η εικόνα δεν έχει ιδιότητα alt. Το όνομα του αρχείου είναι screenshot_20210221-191123_blynk.jpg

The system, when activating the need for hot water in the house, checks the availability of the solar boiler and if there is water available above the threshold the valve supplies water from the specific route. In case where the water temperature from the solar boiler decreases or does not have adequate heat from the beginning, the valve selects the gas boiler and corresponding activation from the water flow that it locates in the specific route (water flow switch).

Lights Control

The Phillips HUE platform has been chosen for the lighting. The control extends to all the lighting elements of the house. For the operation of the lighting through the automation platform, an interconnection was made through the API provided by Phillips. In this way it is possible to control the on/off of all the lights as well as their dimming and choice of lighting color.

Group of lights per room

Intrusion system Control

The home Intrusion system was interconnected with the automation system, in order to provide the possibility of ARM, STAY ARM and DISARM and of course a detailedlog file of the above status.

CCTV Control

CCTV interconnect with house cameras via RTSP protocol and i virtual menu in Automation platform in order to choice the camera that you want to check in real time.

Power monitoring

To measure the consumption of the house, a relevant induction measurement ring was placed on the electrical panel. With this automation there is control of consumption as well as alarm in case of exceeding the time limit or total limit of one month or 6 months period.

Weather Station & forecast

For the utilization of meteorological data, an interconnection of the automation platform with the OpenWeather service and the relevant API was provide. In this way the system is informed 24/7 about the evolution of weather phenomena in the specific area of the house. All the icons is dynamic with interconnection with relevant online library.

Platform Senarios

Upon completion of this interface, find same of the scenarios were created :

  1. Disarm Intrusion, lights specific lights groups if out is night.
  2. Turn on spesific ligts groups when the sun goes down.
  3. Arm Intrusion, turn all the lights off, close the boiler and hot waters.
  4. Intusion Alarm, turn all the lights on.
  5. Intrusion ARM more that 12h system create random senarions with lights and Home google speakers.
  6. When inside temp is under ctritical level, start a automation process in order to keep it in a specific “temp window” (minimize the heating time when ask from the system to heat the house).

Google Home Assistant

Romote Control the system from House Touch Screen, Mobiles phones and tablets. In the same time the whole Automation platform can be remotely controlled via Google Home Assistant.

Construction

All the automation boards, their programming, the configuration of the systems were done exclusively by me.