Let's talk about the heating control unit for a country house. Features of remote control. Programmers and thermostats are the main heating control elements

Creation of heating in own home implies as its mandatory element use of automation. You won’t constantly sit in the boiler room and manually monitor the operation of the boiler and other operating parameters of the system itself. Yes and comfortable conditions in the house it is better to provide not with open windows, although no one has canceled ventilation in the rooms, but by establishing desired temperature. These are the tasks that the automation of heating systems performs.

Components of a heating control system

What needs to be automated?

Considering how a house is heated, it should be noted that the operation of the automatic heating system should cover at least the following components:

  • heating boiler operation;
  • providing comfortable living conditions;
  • saving fuel and operating equipment in a gentle manner.

As a rule, when choosing a heating boiler, we already partially determine what kind of heating automation will be used. The fact is that manufacturers of high-quality similar equipment include a heating control unit in the design.

Its task is to create a safe operating mode for the boiler, for which additional sensors are used. As a rule, such a heating system controller monitors safety and provides:

  • protection against coolant overheating;
  • protection against increases and decreases in pressure in the system;
  • control of boiler filling with water;
  • control of gas pressure in the line (for gas heating);
  • exhaust gas pressure control.

Some of these functions can be installed at the customer’s request (optional), but automatic heating control, at least the operation of the boiler, will be complete with this approach.

The operation of a modern boiler is controlled using a special panel

About automatic control of the heating system

When considering the automation of heating systems, it should be borne in mind that heating can be controlled by temperature:

  • coolant;
  • air in the house;
  • outside air, weather dependent.

Control systems based on coolant temperature control operate regardless of current conditions. The consequence of this will be high inertia of the entire process, low efficiency and wastefulness. top scores shows automatic system heating, working to maintain set temperature in the house.

Elements of a weather-compensated heating control system

Weather-dependent regulation is considered the most progressive and effective, since it allows you to quickly respond to changing environmental conditions. However, conventional means that monitor and control the heating system can ensure its fairly efficient operation.

How it works

It should be noted here that automation for heating a private house can be built using the most different devices, operating both autonomously and under the control of centralized systems.

Control using a heating boiler

With this approach, all heating control comes down to setting the temperature of the coolant on the boiler. In this case, the automation built into it begins to work; for heating that works in this way, control on the boiler is quite sufficient. It will maintain the required coolant temperature regardless of its value in the premises.

More details in the article - automation for a heating boiler.

Thermostatic valve

This is probably the simplest automatic regulator heating temperature. It is placed on each radiator, and on it (on its head) you can set the desired value. In cases where it becomes too hot, the regulator operates and cuts off the flow of coolant into the battery. When the temperature drops below the set value, the valve opens and water begins to flow into the radiator, heating the room.

Thermostatic valve

Such automation of heating of a private house works without reference to the temperature of the coolant, in fact being universal and independent of the type of boiler used (gas, solid fuel, liquid, etc.).

In this case, a special temperature controller is installed in the room - in fact, a heating controller. It changes the heating of the coolant (turning on or off the burners, regulating the water supply, etc.), providing the desired mode.

Room temperature controller

In fact, in this case, the control is completely electronic; the heating of the house operates according to commands from a special center and can implement any given operating mode. If such a control and regulation structure is equipped with remote communication units, GSM module, then it will be formed automated unit heating system control with remote access.

Combined control option

It is worth noting that the joint work of the regulator and thermostatic valve creates for the operation of the system optimal conditions. The heating control controller will ensure economical fuel consumption and air temperature control, and the valve will allow you to maintain the desired mode in each room.

For creating optimal parameters For the heating system to operate, it requires automation tools that not only maintain comfortable conditions, but also provide significant cost savings on heating the house.

Spend a couple of weekends in the winter at the dacha - what could be better if you want to take a break from the city noise and crowd? And even more so to come to a country house, pre-heated to a comfortable temperature.

We have already written about why it is beneficial to use a starter for remote heating of a summer house controlled via a smartphone or tablet. Now let's talk about how to install it yourself. Don't worry: you won't need any electrician's help, installation tools, wires or special technical knowledge. If you can program, say, a microwave oven with a delay timer, then you can easily handle installing the Switching Lite kit.

Electric heaters with a power of up to 3 kW can be connected to the included smart clip-on relays. They are quite enough to warm up the rooms country house medium size in two to three hours. Ready to try? Begin!

Control circuit heating devices via the Internet in country house


Estimated time to connect

Maximum 1 hour.

What you need


Switching Lite Starter Kit

2. Internet connection and Wi-Fi router (not included). If your holiday village does not have a landline Internet connection, consider purchasing a mobile Internet router with built-in Wi-Fi.

We are starting to assemble a system for remotely switching on electrical appliances via the Internet

  1. Install on your smartphone or tablet free program Z-wave Home Mate.

For Apple mobile devices it can be downloaded from itunes.apple.com, and for Android devices from play.google.com. Owners of Android tablets will benefit from the Z-wave Home Mate version, and owners of smartphones will benefit from the Z-wave Home Mate (Phone).

  1. Carefully read the instructions for the mobile application, Z-Wave controller and relay.

Instructions in Russian can be downloaded here:

It is more convenient to print these documents in advance so as not to read from the smartphone screen - you will need your mobile device to make the settings.

  1. Connect the Z-Wave controller to the WiFi router.

The procedure is simple. In short, launch the mobile application, scan the QR code on the back of the controller with your smartphone camera and enter the factory password and username specified in the instructions. Then go to the device list screen and click on the controller name. See more details. And it will help you complete the task even faster.

Important! After connecting, be sure to change the factory password of the Z-Wave controller. Changing your password is a standard security procedure for any smart device connected to the Internet.

  1. Connect the relay to the controller.

To do this, select “Add device” in the application: for 60 seconds the controller will go into search mode for a new device. Then plug the new relay into the outlet. The controller will detect it and add it to the network. The relay name will be displayed in the general list of connected devices. Try turning the relay on/off via the app.

Important! When adding a new device for the first time, the controller should be no more than 1 m away from it. After successfully adding it to the network, the relay can be connected to any outlet no more than 30 m away from the controller.

  1. Connect your heaters to smart relays and try controlling them through the app.

Happened? Your system is ready to go! Now, when leaving home for the dacha, just launch the program on your smartphone and turn on the heating remotely. In the app, you can program outlets to start and stop working automatically at set times.

You can connect not only heaters to smart sockets, but also other household electrical appliances. And most importantly, the Switching Lite kit will become the basis of your future smart home. Unlike devices that use the GSM mobile network and SMS messages for control, a system based on Z-Wave technology is easy to expand. Just buy additional sensors for motion, temperature, opening and closing doors and windows, water leaks, alarms, etc. Moreover, you do not have to purchase a SIM card for each module, as required by GSM products. And the convenient and intuitive Z-wave Home Mate application will help you manage your smart home without any hassle.

The topic of this article is a GSM module for heating control. We will try to find out what it can do, what additional devices it comes with and what characteristics it has.

First meeting

What is the heating control system that interests us?

In fact, this is a low-power and economical highly specialized computer that allows you to control the inclusion and parameters heating system remotely. He's asking external sensors and signals via SMS about any problems and deviations in the operation of the system it manages.

Let's try to describe the possibilities it offers more clearly.

Imagine that you are going to arrive at your dacha in 30-degree frost. In general, you will have to go into a frozen room, and then wait several hours for all the rooms to warm up to an acceptable temperature.

Here you simply send a message in advance to the SIM card with which the GSM module for heating is equipped - and the house will already be warm by the time you arrive.

The capabilities of the module do not end there:

  • If the supply of gas or electricity stops, you receive a notification on your mobile phone.
  • If you receive an error message, you receive an SMS.
  • If there is a coolant or gas leak, the heating control unit again notifies you of this.
  • In order to maintain an economical heating mode in the house during your absence, you give a command by message or call (many modules are equipped with a navigation system by pressing buttons on the phone with voice comments).
  • Finally, at any time, via a call or message, you can receive an SMS with information about the temperature of the coolant and air in the room, the condition of the boiler and some other parameters.

Disclaimer: of course prerequisite is the coverage of the node location area by the cellular network of any operator. In addition, many heating system control units can receive commands via the Internet.

Description

To get more detailed information about how remote heating control works, let's just study the description of one of the modules. The domestically produced “XITAL GSM-4T” complex will serve as an example for us.

The photo shows a GSM control module in the basic configuration.

Service

Let's start with the main thing - ease of use. What can the system manufacturer offer us?

The official website of the Xital company contains:

  • User manual including detailed description functions of the device, algorithms for its connection and configuration.
  • Diagram of the control unit indicating the order of connecting temperature sensors, coolant spill sensors and other peripheral devices.
  • Message codes for requests for key information.
  • Software for smartphones that allows you to fully control the heating operation through a convenient graphical interface. Any novice user of a mobile operating system can install and configure the program with their own hands. It should be noted, however, that the manufacturer provides versions of the program only for IOS and Android.

Characteristics

Of course, to connect a GSM node you need a digitally controlled boiler. It's obvious that central heating and its heating control frame (so sometimes called for its specific shape elevator unit) be controlled electronic device cannot: alas, weak currents are unable to rotate the valve handles.

What characteristics does the system offered to us have?

  • The total number of remote temperature sensors can reach 5 items. A wired connection is used, and the wire for it is supplied separately. However, at a cost of 5 rubles per linear meter, purchasing it is not burdensome.

The maximum distance from the sensor to the central station is 100 meters.

  • Operating temperature range - from -55 to +125C. Obviously, it covers any reasonable temperature values ​​both in the house and in the heating system.

A caveat: regular SIM cards are designed to operate at positive temperatures. If the house is left without heating most of the time, the manufacturer recommends purchasing a special low-temperature SIM card.

  • All GSM alarm functions are supported: it is possible to connect fire sensors and notify of a burglary, turn on a siren and listen to premises. You can even attach a gate opener to the unit, the main function of which is to control the heating by telephone.
  • The peak consumption of the entire system does not exceed 10 watts.

  • GSM heating control can be carried out from 10 numbers registered in the system. Notifications can be sent to all numbers.

Contents of delivery

It includes:

  1. The actual controller with a built-in cellular module and power supply.
  2. A remote antenna that amplifies the signal and ensures communication even in places with poor reception.
  3. Battery that allows the module to operate when disconnected mains power. It is clear that in this case the module will only be able to send out: for work gas boiler with electronic ignition you will need an uninterruptible power supply.
  4. Electronic key reader and master key that cancels all locks.
  5. Two remote temperature sensors.

In addition, you can order separately:

  • Thermal sensors. As already mentioned, you can poll up to five at a time.
  • Detectors and sensors fire alarm, water spills, opening doors and windows.
  • Actuating devices (for example, the same relay that supplies power to the electric motor that opens the gate).
  • External microphone for transmitting audio over a cellular network.

Cost and reviews

The price of the Xital GSM-4T described by us in the basic configuration is 7,200 rubles. The cost of other modules offered via the Internet ranges from 3,500 to 25,000 rubles, depending on the configuration, functionality and self-confidence of the seller.

What kind of feedback has the heating control in a country house via GSM received using this device?

In general, studying the forums confirms that in terms of the ratio of cost and functionality, the device is quite worthy. Control of the boiler and other heating devices via an external relay, security alarm tested and works quite adequately.

Conclusion

Information about other implementation options remote control for the heating system you will find in the video attached to the article. Warm winters!

Heating systems using heating element film tape electric heater (PLEN) have found wide application and popularity. This is due to ease of installation, affordable price, large selection of modifications and long service life of the heating element itself (warranty service life of 50 years). In this material we would like to present some variants of circuit solutions and heating system control units based on the PLEN film tape electric heater. To control and regulate small rooms, thermostats with temperature sensors are usually used. We would like to present a circuit for controlling more complex system heating system, which is connected to a three-phase network, is divided into groups and has the ability to turn off a non-priority load when the current consumption increases. The number of PLEN groups in our case is four – Gr.1…Gr.4. The operating power of the PLEN in each group is limited by an 8A automatic machine. A thermostat with a temperature sensor for each control group is used as an element that measures and regulates temperature. The thermostat in the diagram is shown conditionally for understanding the operation. Closed contacts of the internal thermostat relay signal the need to turn on the heating. For ease of understanding and description, let’s consider the operation of the circuit for one phase. An example of the circuit diagram of the PLEN film heating control unit for one phase is shown in the figure below.

"Feedback"

The diagram shows a heating system control unit consisting of the following elements:

Input three-phase circuit breaker Q1. Input, single-phase circuit breaker QF1 connected to phase L1. Below it is installed (priority load relay, priority relay, current relay) with a CT current transformer. Below the current transformer, a network noise suppression filter F1 (FS-16-M) is installed (mounted on a standard 35mm din rail. GK Polygon) to the output, which is connected to the power supply of the programmable relay A1 (PR110), temperature controllers (thermostats) TR1 ... TR4 and priority loads via circuit breakers FS1…FS4 (the purpose and rating of the machines are indicated as an example). cuts off high-frequency interference through the power supply network of loads connected through circuit breakers FS1...FS4, power circuits of the programmable relay A1 (PR110) and thermostats TR1...TR4. The circuit uses a current transformer TTI-A 15/5A (IEK) or similar with a transformation ratio of 3, i.e. 15/5=3. Therefore, if you set the “Current” adjustment slot on the front panel to the 3A position, the relay will operate at a current of 3x3A=9A. This is the maximum permissible current for the priority load in phase L1. If the value of the load current is greater than or equal to 9A, then the protection (current control) relay K1 will close contacts 11-14 and send a “1” signal to the input I1, programmable relay A1 (PR110), which will prohibit the inclusion of outputs Q1...Q4 of relay A1 (PR110). Input I1, programmable relay A1 (PR110), has the highest priority in relation to other inputs. The outputs Q1, Q2, Q3, Q4, programmable relay A1 (PR110) are connected to modular contactors K2...K5 brand KM (IEK), which, by closing the corresponding contacts 1/L1-2/T1, supply a voltage of 220V, through circuit breakers FS5...FS8 to film tape electric heater PLEN, each in its own group (Gr.1 ... Gr.4). Information about the temperature in each PLEN group is taken from the corresponding temperature sensors working with thermostats TR1 ... TR4. The PLEN heating temperature control range is set using the adjustments located on the front panel TR1… TR4. Closed and/or open contacts of internal relays TR1 ... TR4 provide signals to the inputs I2, I3, I4, I5 of the programmable relay A1 (PR110) to turn on and/or turn off the PLEN heaters in the corresponding group (Gr.1 ... Gr.4). Control (regulation) of temperature and time of the on state occurs according to an algorithm recorded in the memory of the programmable relay A1 (PR110). Switches SA1 and SA2 are connected to inputs I6 and I7 of the programmable relay A1 (PR110), which set the heating time for groups Gr.1…Gr.4 PLEN. Combinations and set times are indicated in the table “Table for setting heating time, min.” on the diagram. As can be seen from the table, the time interval for heating the PLEN can be set to 6 minutes, 9 minutes and 12 minutes in accordance with the position of the switches SA1 and SA2. Input I8 of the programmable relay A1 (PR110) is not used in this circuit, but it can be used, for example, to interrogate fire alarm sensors, which, when triggered, block the operation of the heating system. Alternatively, connect a limit switch to it from the entrance and/or balcony door and/or large windows, to block the heating system when open doors and/or windows, etc.

Let's look at how the programmable relay A1 (PR110) works. To do this, let's agree:

“0” - no voltage or open contact

“1” - presence of voltage or closed contact.

The temperature control process is inertial. If the temperature relay is turned off (the contacts of the internal thermostat relay are open = “0”), then it may not turn on immediately, but after some time, which is determined by the “cooling down” time, the hysteresis of the thermostat, and other factors. It is known from open sources that on average the temperature in a well-insulated room increases at a rate of 0.5 C/min. Taking into account the allowed power supplied to the house, the number and power of each of the PLEN groups, the quality of thermal insulation, we determine the optimal time for us to turn on one PLEN group. The scale of temporary settings can be changed programmatically by writing in relay A1 (PR110) new code(program). This operation can be ordered from our company. The A1(PR110) design allows removal and/or replacement of the installed relay from the electrical panel without disconnecting the external wires.

After power is applied, A1(PR110) polls the status of inputs I1…I7. A current control relay (priority relay) is connected to input I1; its operation is described above. Inputs I2…I5 receive information about the temperature status in groups (Gr.1…Gr.4) PLEN. A closed contact of the internal relay TR1…TR4 is a signal to turn on the heating, an open contact is a signal to turn off the heating of the corresponding PLEN group. Inputs I6, I7 are connected to switches that set the on-state time of relay outputs A1(PR110) Q1…Q4, in minutes in accordance with the table (see above). When a signal is received at input I2 = “1” (the contacts of the internal thermostat relay TR1 are closed), output Q1 turns on for a specified time (6, 9 or 12 minutes) and turns off after the specified time has elapsed. Next, the program polls the state of input I3 and, if there is a “1” at the input, output Q2 is turned on for a specified time and turns off after the specified time has elapsed. For inputs I4 and I5, the procedure is repeated, the program ends the cycle and automatically proceeds to polling input I2 and further in a circle. The sequence of polling inputs is I2->I3->I4->I5. If at some point in time a signal to turn on does not arrive at one of the inputs of relay A1 (PR110), the program will skip it, proceed to polling the state of the next input and turn on the heating if there is an enabling signal from the thermostat TR1...TR4. At any time, only one output of the programmable relay A1 (PR110) can be switched on; the switching on of the others is blocked. LED indication of the status of all inputs I1...I8 and outputs Q1...Q4 of the programmable relay A1 (PR110), as well as a power supply indicator and emergency status are displayed on the front panel.

The diagram shown in another figure shows the control unit for the PLEN infrared film heating system with output switches organized on HD-1044.ZA2 TTR solid-state relays. Obvious advantage is the quietness of switching on. The disadvantage is the need to install cooling radiators, which adds a certain amount to the total cost of components. Equipment specifications for heating control units with contactors and solid state relays are summarized in the corresponding tables. Prices were taken from open retail sources.

The diagram in *.pdf format can be requested via “Feedback” by indicating your login received when registering on our website.

Specification of the PLEN heating control unit on modular contactors of the KM brand. Quantities are per phase, excluding thermostats, cabinet, busbars, terminals and consumables.

No.

Designation on the diagram

Name

Qty

Unit.

Price

Sum

PC.

RUB 1,947.00

RUB 1,947.00

PC.

RUB 1,899.00

RUB 1,899.00

PC.

RUB 1,518.00

RUB 1,518.00

PC.

466.20 rub.

466.20 rub.

K2,K3,K4,K5

Modular contactor KM20-20 AC/DC (MKK10-20-20) IEK

PC.

426.27 rub.

RUB 1,705.08

FS5,FS6,FS7,FS8

PC.

68.88 rub.

275.52 rub.

FS1,FS2,FS3,FS4

PC.

54.78 rub.

219.12 rub.

QF1

PC.

54.78 rub.

54.78 rub.

PC.

164.37 rub.

164.37 rub.

RUB 8,249.07

Specification of the PLEN heating control unit based on TTR brand solid-state relays HD-1044.ZА2 . Quantities are per phase, excluding thermostats, cabinet, busbars, terminals and consumables.

No.

Designation on the diagram

Name

Qty

Unit.

Price

Sum

Programmable relay PR110 (Pr110-220.8DF.4R)

PC.

RUB 1,947.00

RUB 1,947.00

Current control relay RT-05 (Polygon)

PC.

RUB 1,899.00

RUB 1,899.00

Network noise suppression filter FS-16M (Polygon)

PC.

RUB 1,518.00

RUB 1,518.00

Current transformer TTI-A 15/5A (ITT10-2-05-0015) IEK

PC.

466.20 rub.

466.20 rub.

Cooling radiator (for TTR HD-1044.ZA2) RTR060

PC.

RUB 177.00

RUB 708.00

PVR1,PVR2,PVR3,PVR4

Solid state relay (SSR) HD-1044.ZА2

PC.

413.00 rub.

RUB 1,652.00

FS5,FS6,FS7,FS8

Auto. VA47-29 1P 8A 4.5kA x-ka S IEK

PC.

68.88 rub.

275.52 rub.

FS1,FS2,FS3,FS4

Auto. VA47-29 1P 10A 4.5kA x-ka S IEK

PC.

54.78 rub.

219.12 rub.

QF1

Auto. VA47-29 1P 16A 4.5kA x-ka S IEK

PC.

54.78 rub.

54.78 rub.

Auto. VA47-29 3R 16A 4.5kA x-ka S IEK

PC.

164.37 rub.

164.37 rub.

RUB 8,903.99

As can be seen from the given specifications, the difference in the price of the PLEN heating control unit on modular contactors for one phase and the PLEN heating control unit on solid-state relays for one phase is 654.92 rubles. It is worth understanding that this is a difference only in price and assembly costs will be added to the final cost. Therefore, the choice is yours.

We can send diagrams in *.pdf format to those interested who are registered on our website and send a request via “Feedback” and/or by email. When requesting, please indicate the login you received during registration. Requests without a login will not be processed.

It is possible to assemble custom panels.

The cost of writing program code into a programmable relay is 300 rubles.

Changing program settings and writing a new program to a programmable relay -300 rub.

The Internet of Things (IoT, Internet of Things) is a promising area, as analysts say. One of the main IoT trends is home automation or, as marketers like to put it, the creation of a “smart home.”

Let's leave the verbal exercises alone and consider a specific project.

Formulation of the problem

I live in my own house near Moscow. In addition to the obvious advantages of this type of accommodation, there are some nuances. If in apartment building takes care of most utility tasks Management Company, then in your own home you have to solve them yourself.

One of these tasks for me was the need for remote monitoring and control of the heating system. It is true that in middle lane In Russia, heating in winter is not a matter of comfort, but of survival. According to a repeatedly proven empirical law, all troubles happen at the most inopportune times. After more than a decade of experience living in my own home, I also became convinced of the validity of this law.

But if, for example, the failure of a water supply pump in 30-degree frost can still be survived somehow, then the failure of a heating boiler turns into a disaster. In such frost, a normally insulated house gets cold in less than a day.

I have to leave home often for long time, including in winter. Therefore, the ability to remotely monitor the condition of the heating system and its control has become an urgent task for me.

In my house, the heating system has two boilers, solar (alas, there is no gas and is not expected) and electric. This choice is due not only to issues of redundancy, but also to optimization of heating costs. At night, with the exception of severe frosts, the electric boiler works, since the house has a two-tariff electric meter. The power of this boiler is quite enough for a comfortable night temperature (18-19 degrees). During the day, the solar boiler comes into operation, raising the temperature to 22-23 degrees. The heating system has been operating in this mode for several years and allows us to conclude that this option is economical.

It is clear that daily manual switching of the operating modes of the heating system is not the most reasonable choice, so the decision was made to automate this process and, at the same time, provide the possibility of remote control.

Technical task

Following the developer’s habit, the first thing I did was systematize the requirements for the control system being created and wrote out something similar to a technical specification for myself.

Here is a short list of the main requirements for the designed solution:

  • control the temperature in the house and outside
  • provide three modes for selecting heating boilers (more details below)
  • provide remote monitoring of the system status and its control
Initially, there were several more items on the list, but then they were excluded for various reasons. For example, I planned to equip the system with a screen displaying current parameters and the ability to control it via a touchscreen. But this seemed to me an unnecessary duplication of remote control via the Internet. Of course, you can come up with completely real-life situations when local indication and control are necessary. I don’t argue, but we shouldn’t forget that this possibility would require additional complexity and increased cost of the system.

The heating system control algorithm includes an apocalypse scenario associated with a complete power outage. Of course, in this case there is no need to talk about remote control. But those in the house can switch to emergency heating mode with a few simple manipulations. It is enough to switch one external four-pole toggle switch and start the backup gasoline electric generator. This will ensure that the solar boiler operates autonomously. In practice, this has already happened a couple of times, when freezing rains led to massive breakdowns of power line wires.

Modern heating boilers, as a rule, have remote control units connected by a regular two-core wire. In order not to interfere with the factory control circuits, it was decided to switch these wires themselves. A break in the wire, carried out by a conventional electromechanical relay, leads to a stop in the operation of the boiler.

IoT Security Method

Having read horror stories about the consequences of hacking smart homes, I decided to play it safe and minimize the possibility of external hacking. Someone will say, who needs to hack your smart home? I agree that the probability is minimal, but observing regular attempts to hack my web servers, I decided to act on the principle: it is better to sleep than to be underfed. Joke.

To do this, I abandoned the common paradigm where a central server initiates control of distributed smart sensors (devices). It was decided to use a classic client-server scheme, where the client is a smart sensor.
Choosing such an architecture is not always possible in IoT, but in in this case quite acceptable, since heating systems have a fairly large inertia. Even the ability to instantly and arbitrarily change settings in the system, for example, the room temperature, does not lead to instantaneous achievement of the specified parameters.

Transferring the initiative in data exchange to the side smart sensor allows you to almost completely prevent it from being hacked by unauthorized persons. After all, the sensor only receives a response from the server to its request. Theoretically, it is possible to intercept such a request and replace the response, but this threat is minimized, for example, by the https protocol. If there is no desire to raise this protocol in the sensor, then there is an option to calculate checksums taking into account parameters that are a priori unknown to the attacker. But this cryptographic issue is beyond the scope of the topic under consideration.

If the request does not receive a response from the server, the smart sensor, after waiting a certain timeout, continues to operate in the previously set mode.

As a server, it was decided to create a small website with a MySQL database, which was deployed on a third-level domain of one of my sites. The site was written using adaptive layout, which allows you to comfortably work from a smartphone.
A five-minute period was selected for exchanging information with the server.

This choice is partly due to one nuance of the operation of the electric boiler. To prevent water from boiling in the heater bulb from the residual heat of the heating elements, the so-called boiler run-down is used. In other words, after the heating elements are turned off, the circular pump continues to work for some time. My boiler defaults to a 4-minute run-on time, although it can be increased to a longer time. Therefore, the five-minute exchange interval fit well into the logic of the heating system. And more frequent data exchange did not provide any benefit; it only led to an increase in the number of records in the server database.

Work algorithm

The operation of the smart sensor, called the weather module, does not contain anything unusual. The cycle interrogates temperature and humidity sensors. This lasts approximately 4.5 minutes. Then a GET request is generated to the server and the received response is processed. As a result, the period (main cycle) is approximately 5 minutes long. Perfect accuracy is not required here; in practice, the period turned out to be several seconds shorter, which leads to a gradual shift. With an ideal five-minute period, 288 readings would be transmitted per day, but in reality it turns out to be 289-290. This does not affect the operation of the system at all.

The main sketch of the program with detailed comments is given in the listing. Due to the extensive amount of code, I did not publish implementations of the subroutines used. The listing contains diagnostic messages for output to the terminal.

Main sketch of the program

/* * Sketch Meteo Control Mega2560 * ver. 13.0 * simplified automation algorithm: day - diesel, night - electric. Initial threshold 21 degrees, step - 0.5 degrees * exchange with server via http 1.0 */ // libs #include #include "DHT.h" // wired connections // connecting the timer via the I2C bus, address on the bus 104 #define DS3231_I2C_ADDRESS 104 // define #define HYSTERESIS 0.5 // temperature threshold hysteresis, degrees #define LONG_CYCLE 9 // duration of the measurement cycle , 9 - about 5 minutes, taking into account the exchange time with the server #define SHORT_CYCLE 13 // duration of the small measurement cycle, 13 sec. taking into account the time of data collection from sensors, a small cycle turns out to be about 30 sec #define DAY_BEGIN 6 // start of the daily tariff period #define DAY_END 22 // end of the daily tariff period #define MIN_INTERVAL 3000 // temperature sensor reading interval 3 sec #define PIN_DHT_IN 23 / / input of temperature and humidity sensor inside AM2301 #define PIN_DHT_OUT 22 // input of temperature and humidity sensor outside AM2301 #define DHTTYPE DHT21 DHT dhtin(PIN_DHT_IN, DHTTYPE); DHT dhtout(PIN_DHT_OUT, DHTTYPE); #define RELAY_E 25 // control output of the electric boiler relay #define RELAY_D 24 // control output of the solar boiler relay #define LED_R 27 // LED RGB #define LED_G 29 // LED RGB #define LED_B 31 // LED RGB #define LED 13 / / internal LED #define LEAP_YEAR(_year) ((_year%4)==0) // to calculate leap year // vars uint32_t workTime; // boiler operating time from the moment the relay is turned on float hIn; // humidity inside float tIn; // temperature inside float hOut; // humidity outside float tOut; // outside temperature float tModule; // temperature inside the weather module float tInSet; // set temperature value inside float tOutSet; // set outside temperature value. Not used in the current version. The parameter is left for development byte seconds, minutes, hours, day, date, month, year; byte del; // large cycle counter, counts small cycles as decrement char weekDay; byte tMSB, tLSB; float temp3231; static byte monthDays = (31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); uint32_t unixSeconds; // UNIX timestamp uint16_t timeWorkElectro; // operating time (sec) of the electric boiler between exchange sessions with the server uint16_t timeWorkDiesel; // operating time (sec) of the solar boiler between exchange sessions with the server uint32_t unixSecondsStartCycle; // UNIX timestamp of the beginning of the cycle between communication sessions with the server int modeWork; // operating mode of the weather module, 0 - auto, 1 - manual-off, 2 - manual-electric, 3 - manual-diesel, 4 - semi-automatic-electric, 5 - semi-automatic-diesel byte typeBoiler; // type of working boiler, 0 - boilers are not working, 1 - electric, 2 - solar char statusBoiler; // status of a running boiler for the server char unit = "1"; // module id char mode; // label of the weather module operating mode for the server String message; // string to send to the server char ans; // character from the buffer String answerServer; // initial string of the server response String tInSer; // string from the server = internal temperature threshold String tOutSer; // string from the server = outside temperature threshold String timeSer; // string from the server = setting the time char datetime; // array for setting the module time void setup() ( Serial.begin(115200); // set the speed of the COM port for the terminal Serial.println("Start setup()"); Serial.println("Meteo Module. Ver.13.0 Unit Number: " + String(unit)); pinMode(LED, OUTPUT); //LED flash pinMode(LED_R, OUTPUT); //LED_R pinMode(LED_G, OUTPUT); //LED_G pinMode(LED_B, OUTPUT ); //LED_B // initializing the external timer Wire.begin(); //set control register to output square wave on pin 3 at 1Hz Wire.beginTransmission(DS3231_I2C_ADDRESS); // 104 is DS3231 device address Wire.write(0x0E) ; Wire.write(B00000000); Wire.endTransmission(); // set the default temperature tInSet = -15; // enable the external thermometer pinMode(PIN_DHT_OUT, INPUT_PULLUP); .begin(); // enable the internal thermometer pinMode(PIN_DHT_IN, INPUT_PULLUP); // set the boiler control pins to the output pinMode(RELAY_D, OUTPUT); / automatic mode // boilers are off relayElectroSwitchOff(); relayDieselSwitchOff(); timeWorkElectro = 0; // reset the boiler operating time timeWorkDiesel = 0;< 10) Serial.print("0"); Serial.print(date, DEC); Serial.print("."); if (month < 10) Serial.print("0"); Serial.print(month, DEC); Serial.print("."); Serial.print(year, DEC); Serial.print(" - "); if (hours < 10) Serial.print("0"); Serial.print(hours, DEC); Serial.print(":"); if (minutes < 10) Serial.print("0"); Serial.print(minutes, DEC); Serial.print(":"); if (seconds < 10) Serial.print("0"); Serial.println(seconds, DEC); // сбор данных с датчиков Serial.println("Getting temperature and himidity"); getSensors(); // подготовка сообщения для отправки на сервер collectServerData(); // БЛОК ОБМЕНА С СЕРВЕРОМ И ИНИЦИАЛИЗАЦИИ // отправка данных на сервер и прием управляющей строки Serial.println("Send data to server"); connectServer(); // анализ управляющей строки и установка новых режимов controlServer(); // БЛОК УПРАВЛЕНИЯ КОТЛАМИ В ЗАВИСИМОСТИ ОТ УСТАНОВЛЕННОГО РЕЖИМА switch(modeWork){ case 0: // автоматический режим Serial.println("Current Mode: Auto"); autoMode(); break; case 1: // ручной режим Serial.println("Manual Mode"); manualMode1(); break; case 2: // ручной режим Serial.println("Manual Mode"); manualMode2(); break; case 3: // ручной режим Serial.println("Manual Mode"); manualMode3(); break; case 4: // полуавтоматический режим Serial.println("Semi Auto Mode Electro"); semiAutoMode4(); break; case 5: // полуавтоматический режим Serial.println("Semi Auto Mode Diesel"); semiAutoMode5(); break; } del = LONG_CYCLE; // устанавливаем счетчик большого цикла while (del >0) ( Serial.print("Start short cycle #"); Serial.println(del); // displaying the short cycle number mDelay(SHORT_CYCLE); // collecting data from sensors Serial.println("Getting temperature and himidity") ; getSensors(); del--; // decrement the counter in a large loop ) )


As I mentioned above, the weather module has three operating modes:
  • auto
  • semi-automatic
  • manual
In automatic mode, the weather module uses the built-in real-time clock to select which boiler to turn on at one time or another. During the hours of reduced electricity tariff, the electric boiler is started.

The original version of the system provided for the possibility of operating the electric boiler during the daytime in order to save diesel fuel. In this version, the weather module monitored the duration of operation of the electric boiler during the day. If within an hour it was not possible to reach the set temperature in the house, the electric boiler was turned off and after a pause for a run-down, the solar boiler was switched on.

Based on the experience of the first winter, this option was removed. The reason was the insufficient power of the electric boiler, which could not ensure the achievement of the specified comfortable temperature in relatively severe frosts (below -10 degrees). Therefore, it was decided to unambiguously start the solar boiler during the day in automatic mode.

Semi-automatic mode implies a strict choice of one boiler or another with maintaining automatic adjustment his work on the temperature sensors of the weather module. This mode has proven useful in several cases. Firstly, when one boiler fails, the operation of the other boiler is forced, regardless of the time of day. Secondly, in mild frosts and thaws you can turn on the electric boiler around the clock, or, conversely, in very severe frosts you can start only the solar boiler.

I almost never use manual mode. It involves not only choosing a specific boiler for operation, but also transferring control over it to a standard remote unit. In other words, the boiler will be controlled by the set temperature parameters on this unit. The weather module in this mode continues to work only as a temperature and humidity monitoring station.

In its request to the server, the weather module transmits a data packet that includes information about the current state of the boilers (which boiler is selected, whether it is working or not), the current local time of the weather module, the duration of operation of the boilers in the previous five-minute period, the current temperature and humidity inside and outside the house. The request also includes the weather module identifier. In my case this is unnecessary, but the habit of designing for scaling made itself felt.

After sending a request, the weather module waits for a server response within 20 seconds. The resulting response is parsed using regular expressions. The server response contains four parameters:

  • threshold value of temperature inside the house
  • threshold value of temperature outside the house
  • specified operating mode
  • initial setup time for the module's real-time clock
In the current version, the threshold value outside temperature not used. This feature was provided to implement the choice of heating patterns, depending on the temperature “overboard”. Perhaps I will implement this function someday.

The last parameter is required quite rarely. I only asked it twice. During initial startup of the module and after replacing the battery in the real-time clock module. If temporary settings do not require changes, then this parameter is zero.

After parsing the response from the server, the current boiler operating time counters are reset. After all, the previous value has already been sent to the server. When resetting, the pause time waiting for a response from the server is taken into account.

It should be noted that the transmitted boiler operating time has an estimated value. This parameter cannot be used to judge, say, the electricity consumed. This is due to the operating characteristics of heating boilers. For example, when the temperature in the boiler reaches 80 degrees, it turns off, but the circular pump continues to operate. When the coolant temperature drops to 60 degrees, the boiler starts working again. The weather module only measures the total time it took the boiler to reach the temperature threshold inside the house.

After reaching the set temperature, the boiler turns off, and the weather module continues to read temperature readings every 30 seconds. When the temperature drops by more than 0.5 degrees, the heating boiler comes back into operation. This hysteresis value was selected experimentally, taking into account the inertia of the heating system.

To visually indicate the functionality of the weather module, flashing of the built-in LED has been added to the delay subroutine between temperature measurement cycles.

I would like to note that the selection of the boiler operating mode occurs at the end of the five-minute period. When the module is initially turned on or when it is rebooted, the default mode is set to automatic.

Implementation

To implement the idea, I used what was at hand. It was decided to build a weather module using Arduino modules. The Mega 2560, left over from previous experiments, was used as a processor board. This board is obviously redundant for this task, but it was available. In addition, it had a prototyping shield on which almost all other modules were located. These are the DS3231 real-time clock and the ESP8266(01) WiFi module. A switching unit with two relays was purchased for separate control of electric and solar boilers.

The existing computer power supply was used as a power source. As you know, such a unit has a fairly wide selection of secondary supply voltage. There is +5V and, which is especially important when working with the ESP8266 WiFi module, +3.3V. In addition, these units are very reliable, taking into account the continuous nature of the weather module’s operation.

The figure shows the board switching diagram. Schematic diagram was not depicted due to its obviousness. There is an RGB LED in the figure for visual indication of the operating modes of the weather module. Green color indicates that the boilers are turned off, red means the solar boiler is operating, blue means the electric boiler. I didn't have 220 Ohm resistors on hand, so the RGB LED was connected directly to the board's outputs, without current-limiting resistors. I confess that I was wrong, but I took the risk consciously. The current consumption of each LED pin is only 20 mA, the board output allows you to connect up to 40 mA. In three years of operation there have been no problems so far.

DHT21 (AM2301) were used as temperature sensors. Initially, I used the DHT11 sensor to measure the temperature inside the house, but it has very poor measurement accuracy and, for an unknown reason, the DTH.h library did not work correctly when used in a circuit of two different types sensors But since the replacement of DHT11 due to its excessive error was obvious, I did not bother to deal with the library problem.

The numbers in the squares indicate the numbers of wires connecting external devices to the main board.

The entire circuit was assembled in a hanging metal panel used for installing electrical wiring. The choice of such a body was also related to what was at hand.

But then a completely predictable surprise awaited me. When the door was completely closed, the shield body shielded the WiFi signal. I had to leave the door ajar, since there was no desire to look for another suitable case and reinstall everything again. So I’ve been living with the door ajar for three years now.

Management Server

The web server used for monitoring and management is written in pure PHP and has an adaptive layout. Initially, there was an idea to write an application for Android, but I abandoned this idea, since a server would still be necessary.

After authorization, several pages with information become available. This is the current state of the system according to the last request received from the weather module, a table of values ​​in the current hour and a graphical representation of summary information for an arbitrary period of time. There is also a page with a choice of settings for controlling the weather module.

At the time of writing, the weather module was already turned off, because the heating season had ended. Therefore, all parameters on home page of the site are current at the time of shutdown. The attentive reader will notice that this was May 2.

The values ​​for January 25, 2018 are shown as an example of the graphs. Histograms show the operating time of the boilers.

Settings page

As I already mentioned, this solution for monitoring and controlling the heating system of a private home has already worked for three heating season. During this time, there were only two freezes caused by a long-term loss of the Internet channel. Moreover, not the entire weather module froze, but only the ESP8266 WiFi module.

In general, I am completely satisfied with the functionality of the system, but given the obvious redundancy of the platform used, I am thinking about expanding it.