Well      06/15/2019

Automation of engineering systems in the house or how I taught the house to mind. Smart home: residential and building automation systems Video surveillance as such

Improving the home and making it more comfortable is common to any person. Regardless of whether he lives in a small studio apartment or in country house several floors which are surrounded by hectares of personal plot.

Modern technologies make it possible to create fully automated houses and transfer many functions for managing life support systems to automated devices, and in some cases, fully automate processes when human intervention is not required at all.


What is the difference between home automation and smart home

Many property owners consider any automatic or semi-automatic device that performs the functions of turning on / off a device or consider it an element of a “smart home”. This is far from true. And even the possibility remote control separate functions using the Internet does not make the house "smart".

A truly "smart" home is a complex smart automation management of the entire complex of life support systems based on artificial intelligence of a computerized control system and operating in a completely autonomous mode. Human intervention in the work is required only in emergency situations or in the programming process.

Therefore, numerous installers of home automation elements do not always objectively and reliably convey the meaning of innovations to a potential user-customer.

It is not always explained that the vast majority of household appliances included in the "smart home" do not need automation, since they already have built-in functions:

  • Refrigerators are fully automatic appliances that operate according to a rigid program;
  • Air conditioners do not require outside intervention to maintain the set temperature;
  • Washing machines have a delayed start timer;
  • Lighting on / off systems are easily controlled by relays with photodiodes that react to the level of illumination and so sorry.

The creation of specialized channels for managing life support systems - the actual "smart home" is necessary only in cases where the living quarters operate in a completely autonomous mode. These include country houses (cottages), where the only boon of civilization is the access road.

It is in them that you can fully realize all the advantages of remote control and monitoring.


Apartment automation

An apartment in an MKD is just a cell included in a well-functioning system public utilities building. It rarely needs the full operation of smart home automation equipment. The owner does not need to take care of heating, lighting, ventilation. The water supply system, in general, lies beyond the possibility of influencing its availability in any way. In the event that the hot water supply is turned off for the period of preventive repairs, those who have the financial means install storage or flow-through boilers that operate automatically and do not need outside control.

Any arbitrary do-it-yourself interference in the work of general house life support networks is not at all welcomed by management companies. Therefore, to implement the concept of "smart home" in apartment building possible on a very limited scale.

  • Install several remotely controlled outlets to which to connect devices, turn on / off the lighting with a timer or an antediluvian iron that does not have a shutdown relay in case of overheating or time or other non-automatic electrical appliance.
  • Forcibly intervene in the operation of the automation of the air conditioner or electric underfloor heating by completely turning them off, or, on the contrary, turning them on.
  • Automate the closing/opening of curtains or blinds on windows.
  • Turn on/off the audiovisual monitoring system.
Attention! With the installation of hidden video cameras or microphones, even in own house you have to be extremely careful. All, without exception, devices that do not have a sensor-alarm about the work, or disguised as other objects in the Russian Federation are prohibited for use. Their acquisition is already a crime, which in the most unfavorable case can result in a real term of imprisonment.

Therefore, when choosing components for home (apartment) equipment, remember that the vast majority of Chinese-made gadgets are prohibited for sale in the Russian Federation, and their possession is a criminal offense.

Security and fire alarm are usually not included in the list of "smart home" elements, since they work regardless of the owner's desire, being in the on state. And when they are turned off, they lose any meaning.


Private home automation

Majority country houses are built within the allocated areas for individual housing construction and, according to the improvement requirements, have a supply of electrical and gas networks. Some settlements are more comfortable and have central water supply and sewerage complexes.

All this facilitates the maintenance of suburban real estate, without completely freeing up the care of maintaining comfortable conditions inside and outside the premises.

A private house can be fully equipped with an intelligent control system based on the "smart home" concept.

Even at the design stage, automation elements related to:

  1. With power supply (from an autonomous power generator).
  2. Temperature control by controlling the gas/oil boiler.
  3. Management of the water supply system (for well / well water supply).
  4. Air temperature control system in various premises (residential, utility, utility).
  5. Control system for indoor and outdoor lighting of a personal plot.
  6. Management of the irrigation and feeding system for farm animals.
  7. A system of visual control inside and outside the premises and a review of the local area.
  8. It is possible to implement an emergency shutdown of gas supply and power supply systems in case of emergencies.

For some owners, most time away from home, "smart home" is an automation system for residential buildings, which is urgent need.


Choosing a smart home control system

Modern systems allow you to control electrical appliances connected to the control module: sensors, thermostats, electrovalves using wireless technologies. It is not required to lay wires and cables inside the walls or skirting boards of the room, ditch the walls and break existing communications or finishes.

The most common is the way of control over a Wi-Fi channel. The inconvenience lies in the fact that this function is designed to transmit significant amounts of information and is not adapted for most smart home devices that work with short commands: “on / off”, “add / decrease”, “up / down”, etc. . P.

  • Z-Wave- a specialized protocol for managing "smart home" operating at a frequency of 869 MHz and having high security from extraneous influences and interference.
  • ZigBee- a similar specialized protocol, specially designed for the operation of devices in the smart home kit, but using a different frequency of 2400-2485 MHz.

Until now, the wide automation of residential buildings in the Russian Federation is stalling due to high prices for equipment and installation, adjustment and maintenance of equipment. After all, it should work around the clock 24 hours a week without any failures. Otherwise, faulty smart home equipment can itself become a source of emergency - fire, flooding of the premises, defrosting of heating systems.

First of all, the economic effect of the introduction of automation systems is calculated. In order to roughly assess the effectiveness and payback period of investments, it would be useful to re-read the instructions for the electrical appliances available in the house. Most owners use only the basic, most common functions, without bothering to program the full functionality of the TV, air conditioner or water heater.

It is quite possible that the “new” opportunities that seem to you that will open up after installing the “smart home” system have already been incorporated and implemented in your existing technology, and for more high level than "turn on / off" or "add / subtract".

Calculate whether the ability to remotely control the air temperature in different rooms is so critical? This function pays off only for the owners of country houses, when during the absence of the owners the temperature drops to an acceptable minimum, and by the time the owners arrive it rises to a comfortable residential.

Most of the functions implemented in the "smart home" are interesting only for the first time after they are installed. The possibility of remote visual control satisfies only the curiosity of the owner of the premises, in no way hindering the actions of intruders who entered the house. A centralized security system is much more effective. Using the automatic opening/closing function of the curtains in the bedroom or the ability to control the volume of music in the next room is so dubious that only true fans of continuous communication with a mobile device may be of interest, instead of a physical movement of the hand.

Probably because the functionality offered within the smart home is small and irrelevant for most, home automation is not very popular.











The article is borrowed and translated from the Control4 website.

Home automation is much more than just a narrowly focused system capable of demonstrating just one trick. Its functionality and possibilities are almost limitless. They will become available to you after building a powerful foundation, such as an advanced operating system that can command the entire house. Ideas for using home automation systems can be listed around the clock (many of them are listed in our "gallery of inspiration"













mood lighting scenes







Warm house, cool house - Hot House Cool Home






Automated Wine Cellar


































CLIMATE CONTROL IDEAS








78. Program your lawn sprinklers to automatic switch on depending on the weather conditions (thus, the sprinklers will not water the lawns even in rainy weather).
"gallery of inspiration"), but in this article we will give for starters only 78 of them.

INTELLIGENT LIGHTING IDEAS

1. With one touch of a button, turn on or off all the lights in the room, not just one lamp.
2. Press the same button twice to turn off all devices (lights, electronics, etc.) in the room.
3. If the visitor rings the doorbell, then the light in the garage will start flashing.
4. If you open the garage door in the dark, the lights will turn on automatically to help you get to the front door.
5. Motion sensors installed in key areas give a signal to the system to turn off the lighting in rooms that are empty at a certain time.
6. Courtyard lighting can automatically turn on when the sun sets and turn off when it rises.
7. The “Bedtime” setting will allow you to adjust the evening lighting to a weaker one, just enough for comfortable reading in bed.
8. The “All Off” button provides turning off the lights in the entire house with one touch.
9. Midnight snacks - the system will light the way to the refrigerator and back to the room without disturbing the rest of the family.
10. At night, motion sensors will work, illuminating the room by only 15%, which will be enough for movement and will not blind you after sleep.
11. The system will automatically turn off all the lights in the house after the children leave for school.
12. If the natural light in the room is below 50%, the system will add artificial light up to 50%. If daylight is below 40%, the system will add lighting up to 60%, and so on. This is very convenient during sunset or on a cloudy day.
13. Yard Lighting - The lamps will burn brighter during sunset, but to save energy after 11 pm the lamps will only burn at 20% power.

Find out several options for decorative lighting - according to your mood mood lighting scenes

IDEAS FOR INTELLIGENT MUSIC PLAYBACK

14. Stream music to every room in your home with a control panel in every room.
15. Play any stored music files in all rooms of the house with distributed audio zones, which you can access from your smartphone, tablet or touch control panel.
16. Touch the button on the control panel to activate the music playback area. When selecting music, you can set the highlight color to change for each family member (when selecting their favorite playlists/settings).
17. Double-tap the volume control button to turn off a specific listening area.
18. Automatically start playing music in the bathroom when the shower light is turned on.
19. Install the touch panel behind the waterproof wall in the shower and control music playback while bathing.
20. Program your own audio playback settings - “His and Her”. Set the time for different days, specific buttons or audio zones.

Warm house, cool house - Hot House Cool Home

21. Select the piano as the audio source for all in-ceiling speakers in your home.
22. Connect your piano to the Control4 system and the global network, and your performance will be heard anywhere in the world when connected to your home system.
23. Create music scenes “Music”, which will determine the brightness of the lighting, for example, 30%, and the desired volume level - optimal for nightly work on a project.

ENTERTAINMENT AUTOMATION IDEAS

24. Scenario "Party" are designed to create the right atmosphere for the holiday at the touch of a button. Each scene is provided with automatic lighting, decorative elements and certain musical accompaniment.
25. Did the guest come without an invitation? Don't worry. The system will notify you of the approach of guests through the built-in speakers in the selected area.
26. Built-in microphones in a multi-room audio system in the house will allow you to transmit messages from all rooms.
27. Use your iPad to tell the refrigerator that, for example, you are out of ice. Then he will be able to increase the volume of its production.

Wine Cellar Automation - Automated Wine Cellar

HOME CINEMA/VIDEO AUTOMATION IDEAS

28. Remote Search - Touch the switch three times and your remote will start beeping.
29. The ability to automatically lock the doors of the house at the time the movie starts playing.
30. When playback starts, the light will fade out gradually over 7 seconds.
31. And when playback is stopped, the light will become brighter up to 30%.
32. When you press the button, the 4K Ultra High Definition TV will slowly rise from the nightstand, the in-ceiling speakers will turn down, the surround speakers will be activated, the blinds will be closed, and the lights will be dimmed.
33. Program the golf simulator room settings to be the same as the home theater settings.

Home automation for the whole family! - Home Automation for the Whole Family!

34. Program every TV in your home to play your favorite channel when you get home from work when you open your garage door.
35. Adjust the volume of the TV in the children's room to a certain level.
36. The “Good Night” scene you set sends a reminder to the children's iPad to turn off their TV. The lights in each bedroom will flash as a reminder and after 10 minutes the TV will automatically turn off and all control panels in the children's room will be off until the morning.

IDEAS FOR INTELLIGENT SECURITY SYSTEM

37. Set up your bedroom touch screen to display a visitor at your front door.
38. After the call, you will hear the message “Who can it be now” through the speakers (Who can it be?), The security camera will turn to the door, and the broadcast of the TV or movie will be stopped. At night, the lighting in the yard will be turned on with a brightness of 20% - 75%.
39. Are you watching TV while the doorbell rings? Set the system to display camera data on the TV screen after it stops broadcasting or playing a movie for 15 seconds.
40. The system will remind you of the front door not closed for more than five minutes or the gate open for more than ten minutes.
41. A picture from security cameras can be displayed on your smartphone anywhere in the world.
42. Receive text messages when motions are detected by security cameras.
43. Create a “Cat” scenario that will temporarily disable the security system and turn off lights and cameras during nighttime cat walks.
44. Program the lighting (including the light in the shower) to report the opening of the front door with a triple flash.
45. If any security breach is detected, program the system to turn on the lights in all rooms at maximum brightness. Simultaneously with the automatic locking of the entrance door, the blinds will be opened and video from the surveillance cameras will be displayed on each TV.

Smart Security Ideas for the Whole Family

46. ​​Program strategically placed cameras to stream video to your chosen TV or touch screens.
47. Mockupancy scenes contain lighting settings that will make it look like someone is in the house while you are away.
48. You left, but you want to let guests into the house? Create temporary access codes for guests to enter into smart locks to let you know when they arrive at your home.
49. Create personal access codes for individual family members.
50. Set a timer that will automatically close garage doors that have been open for more than 10 minutes. The motion sensor is used to keep the garage doors open when you work there.

A Home Automation Project with All the Bells and Whistles

51. Motion sensors - if motion is detected, the cameras will return to their original position and start recording, the ambient light will be turned on, and text messages will be sent to your smart devices.
52. Did you forget to close the doors? - Program the doors to automatically lock three minutes after you leave for work and close the garage door.
53. If backdoor garage opens, program the lighting to turn on at the same time with a brightness of less than 50%.
54. If the garage door is closed and the motion sensor installed in the garage area does not detect any movement, then the lighting will be turned off and the door will be locked after ten seconds.

DAILY MESSAGES AND WARNINGS

55. Set your mailbox access - if you receive a letter, you will hear a signal through all the speakers in the house, the LED indicators will turn red, and text messages will be sent to smart devices.
56. The system transmits warning messages about an open garage door.
57. The system sends warning messages about various problems that have occurred, such as a leaking pipe in the basement.
58. Do you need to be reminded to take out the trash? Schedule reminders to appear on the touch screen and mobile devices at the same time once a week.
59. Program to receive messages on smart devices about overheating of the oven.
60. Instead of teens constantly waiting late at night, program the lights in their rooms to turn on automatically when the front door is opened. You can also set up notifications to your phone when the front door is closed.
61. Program to receive notifications about the return of children from school.
62. Program to receive notifications about the opening of a home bar by children.
63. Program the transmission of motion detection messages in a specific room (for example, in your office or wine cellar).
64. Receive emails or text messages to remind you to take your medication.
65. Receive emails reminding you to periodically replace air conditioning and heating (HVAC) filters, built-in central vacuum filters, etc.

AUTOMATION IDEAS FOR DAILY COMFORT AND LUXURY

66. Program your touchpad to start streaming music or your favorite TV channel in your kitchen with the push of a button.
67. Create a personal scene for each personal lock code. For example, if one of the family members enters a personal code on the front door, then his favorite channel will be turned on on the TV and the TV volume will be set to 50%.

Beautiful Bahamas Automation Ideas - Beautiful and Brilliant Home Automation in the Bahamas

68. Heated towel holders during an early shower.
69. Underfloor heating depending on the outside temperature: Install a temperature sensor in the attic or garage. If the temperature outside is below +4 C, then the floor heating in the bathroom will be automatically turned on from 4 to 9 in the morning. Then at 9 o'clock the heating will be automatically turned off.

AUTOMATION IDEAS FOR HER AND AUTOMATION IDEAS FOR HIM - Home Automation Ideas for Her & Home Automation Ideas for Him

CLIMATE CONTROL IDEAS

70. Program the automatic opening and closing of blinds and curtains depending on the position of the sun and the location of the house.
71. “Wakeup” scenario – “Wakeup” opens the curtains, gradually increasing the light in the room for five minutes and adjusting the temperature in the room to a comfortable level.
72. Heating automatically turns off after you leave the house.
73. The system will light the fireplace after receiving a message from your smartphone or tablet. You don't even have to get up from the couch.
74. The “Exercise” scenario lowers the temperature in the exercise room, turns on your favorite TV channel, or starts playing your favorite music.

Enjoy climate control settings - Get Comfortable With Beautiful New Climate Control

AUTOMATION IDEAS FOR ENERGY SAVINGS

75. Possibility of energy management as a result of continuous monitoring of solar panels by the system.
76. Automatically perform power consumption measurements for each circuit separately.
77. Automation of home lighting. Lamps will no longer flash unnecessarily on full power.
78. Program your lawn sprinklers to turn on automatically based on weather conditions (this way the sprinklers won't water your lawns even when it rains).

chouck December 4, 2012 at 06:16 pm

From home automation and smart homes in general to specific example

  • DIY or DIY

The main reason that home automation systems have not become so popular yet is the emphasis on lighting that is usually put in their promotion. After all, blinking light (like LEDs on Arduino) without getting up from the couch is a prank that has no practical significance and repels people from serious thoughts about introducing and using home automation systems in their homes and apartments. No one needs to flash the light (which is usually used for 90% of the functionality), but for example, controlling the heating individually in each room is convenient and saves energy = money. The exorbitant prices for the (penny at cost) components of ready-made home automation systems for sale, together with the prices for integrating them, only add fuel to the fire. I hasten to assure you that the most expensive component we will have is the $20 Arduino Mega. If we consider the issue as a whole, then I see only the following list of tasks that make practical sense to centrally automate:
> climate control of temperature (heating/air conditioning) and humidity (humidifier/dehumidifier),
> natural light control (blinds, shutters, awnings)
> and management of watering lawns, flower beds and lawns around the house (if any and they still need to be watered).
Of the decentralized systems, it is convenient to have a local (without central control, 1-2 sensors that directly control the backlight), triggered by motion (presence) sensors, low-power LED backlight stairs (sometimes floors) and parts of tables in the kitchen that are shaded from normal ceiling lighting wall cabinets and shelves. The same lighting, in combination with those listed above, is indispensable at night when it is necessary, without waking anyone, and first of all yourself, to get into the kitchen (and cut something from something there and eat without sharing with anyone) or to another institution without stumbling about prudently scattered children's toys. It also makes sense to turn on the main lighting with motion sensors ONLY in technical rooms: cabinets, pantries, garages, laundries, etc. Motion sensors and centralized systems are not practical for basic residential lighting. External and decorative holiday lighting at home is most conveniently turned on from cheap ready-made blocks with light sensors and / or timers. Real security systems connected to response services (not just sensors and webcams scattered around the house) usually do not make sense to mix with smart home systems for many reasons.

So let's start with the most relevant. The ideal object is heating that can be controlled, for example: electric (batteries on wheels in the socket and wall batteries) and centralized or not very heating of a private house. In my example, we will consider working with a Thermo Pump system (Heat Pump in North America) with oil heating by means of direct connection to an existing Control Unit (thermostat) and additional devices. In the first version of the system, I used X10 protocol devices and sockets. But unfortunately they did not perform well, due to the slow interface and very loud switches when switching, which woke up everyone at home. Subsequently, I switched the system to a radio socket, which turned out to be much easier and quieter than x10. These sockets are available in a huge range of RF frequencies and voltages. All this is applicable to a huge variety of other systems. It all started with the fact that my friend, along with a neighbor, unobtrusively dripped on my head about the huge role of a wonderful miracle - Arduino in modern society and that I, as a person who knows how and loves to hold a soldering iron, is simply obliged to catch this Arduino mania as soon as possible. I shrugged it off in every possible way and said that the area of ​​\u200b\u200bpractical (not a robot toy) application of her house is very doubtful and making sequentially lit LED rulers based on a powerful microcontroller to illuminate the stairs (instead of one shift register and a generator) is just from a cannon on sparrows and the rest is prank . But still, they managed to plant the grain of Arduino in my head, and like all the grains, with the advent of spring and on the outskirts of summer, the sprout began to break through. I don't like hobby projects for projects' sake. Some practical side should be present, and even more so since resource ($ and time) capacious projects for a family person must also have a high WAF (Wife acceptance factor) or, as my Dad says, it is easy to legalize it.

And as always, laziness was the engine of progress. We sat a little after noon on the veranda, the sun was pleasantly hot, and at the same time, my son was sleeping in the bedroom on the top floor and, judging by the Chinese thermometer for $ 2 (which we still had to walk to and see without waking my son) the temperature was over 26. So now we need to go to the living room and turn on the central air conditioner, and then we also need to turn it off so that it does not turn on every time the temperature rises a little. It is especially unpleasant to do this in the summer at night, freezing under a light blanket, you have to jump up and, again, without disturbing all the household members, run into the living room to the remote control and cut down this achievement of the last century. Then I realized that it was time to stop such a disgrace and call a friend with the words "Where is your vaunted Ardunya, Let her here right now, we'll see what she's capable of!". I must say right away that I did not choose it at all and did not think that it would turn out to be so useless (for example, in working with strings) and even out of anger and impotence to fight it further, I almost moved in the middle of the project to STM32. In the end, he still stayed with her, but first things first.

To make it easier to understand why everything is done this way and how you can spread my experience and achievements on bread, let's start with a description of what I have / had at hand:
1) A private house in Canada (I would like to say that it is mine, but of course it belongs to the bank and no matter how absurd it may sound, it is not even profitable to have it fully paid at current rates) built in 1959, as they are called here Split Level those house two-story but half of it is shifted vertically relative to the other half to the floor of the floor.
2) Arduino Uno(subsequently, due to the small number of I / O for X10 and radio, Mega was required)
3) expensive and native Ethernet Shield. I didn’t manage to launch something and find an adequate library for ENC28J60
4) Desire, time and some money.
As is customary here, the bedrooms are on the top floor, and for me it turns out to be half a floor above the living room, where the ominous control panel for the heating and cooling system is screwed to the wall. Here such systems are called HVAC (heating, ventilation, and air conditioning) but in fact it is a usual huge (tens of thousands of BTUs or they measure them here in tons of something) split air conditioner whose external heat exchanger and compressor are located outside and inside the heat exchanger is built into the central ventilation system, which takes air from the floor level of the living room with a one and a half kilowatt fan, drives it through two heat exchangers (one to the air conditioner, the other from the oil or gas burner) and drives into each room according to the system of boxes. The convenience and the very name of the heat pump is due to the fact that this device can drive freon in both directions and, accordingly, not only cool but also heat the air in the house. It should be noted that he can heat it more or less effectively only if it is warm enough outside 0 or -5 (depending on the model and design). If it is cold, then the heat pump will not work, and for this, a tank with fuel oil or gas is needed.

I started my project and ambitions small, so let's take a look at how this HVAC is made and how to manage it. In fact, it turns out that the devil is not so terrible. One of the conveniences is the liquid standardization of everything homemade and not very in America, this allows you to cross hedgehogs with snakes according to an open, simple (sometimes too much) and well-known (usually ancient, condom) protocol / standard. In our case, the system itself (a fan, a burner, heat exchangers, you can buy an air conditioner from a second manufacturer, a humidifier from a third, and a Control Unit for all this from a fourth. To be honest, I don’t know if similar devices are also called / controlled in Europe, but I think that everything is either licked or very similar As far as I understand, such systems already exist in Russia and they are transported from anywhere / cheaper, so you have a good chance of encountering just such a system.Let's look at a diagram of a typical system connection before we start crashing into the system.

As we can see, almost everything is clear at a glance. The only thing that needs to be clarified is that the control unit is powered and the heat pump itself is controlled by alternating 24 volts. which are supplied from the input transformer R and C. Line C is common and is always connected. Accordingly, when applying R (short circuit) to Y, O, W or G, it turns on respectively. block. This is what we will deviate from. So if they include, then the worse we are? Let's make it ours new system will complement the existing one. Those control can be carried out from the old console and controller as before, but only when necessary, the Arduino can disconnect the old system from control and take the furrows into its own hands and then give them back. We put relays.


Moreover, we set them so that without power and generally disconnected, they retain their previous design. R-0 disables the standard control module and transfers control to our Arduino. R-1-4 apply the desired voltage to the corresponding line. This control voltage R is applied to each relay green wire. Of course, it’s good to manage, but the system is serious and if we accidentally or not really turn on something wrong or in the wrong combination. For example, the heat exchanger will heat up and the fan will not drive air and remove heat from it, it can overheat and lead to a fire, but we don’t need it at all. To avoid such situations, let's make a triple protection. And so the first bastion will be the voltage sensors on each line S1-4 (there should be 4 of them).


They are a diode, two resistors (divider) and a small electrolyte. It can be a hinged assembly as in the photo. As a result, we can know in Arduino whether there is actually voltage on each of the control lines or not. Corresponding if Current state control lines (Y, O, W, G) does not match what it should be, we display an error code and turn off the system. The next bastion is our additional temperature sensor in the heat exchanger chamber (plenum sensor). If it is too hot or cold there (close to 0C), then we again display the code and turn off the system. Obviously, it is impossible to power the relay directly from the arduino outputs, so you either need to pile on a transistor for each relay or buy a ready-made module with several relays and transistors on one board. I buy 99% of my components from eBay. For example, Ibee is full of such 8 channel modules (8 Channel Electronic Relay Module) for about $ 9. or you can buy 4+2 (because we really only need 5 and one spare)

I used Chinese digital DHT22 as temperature and humidity sensors which have performed well. They need only three wires +5, GNd and Data. The wires can be quite long without loss of accuracy and signal. One sensor is thrown outside into the shade and under a canopy from direct moisture. One sensor in the house.
In a house already built many years ago, usually the most a big problem it is to run new wires, so I tried to use the current wiring as much as possible. There are several libraries for DHT22. I've had problems with all but this one. I placed an internal DHT22 next to the wall control. If your house, like mine, once had an HVAC control system, then you should already have a 6-wire cable going from the control unit to the place where the remote control itself hangs with an indicator and buttons. Modern remotes (like mine) require only 2 wires. Thus, we have at our disposal 4 already laid wires. In them we run +5V, GND, Data for the internal DHT22 and on the last Serial (UART) Tx from Arduino to display information on the display.

As a display, I used a small (2.5 cm) OLED screen with a serial interface.
YES, it is a bit expensive, but there are several unique differences from similar ones available: The presence of a Serial (UART) interface, which allows you to use only one wire to connect it, the presence of five digital pins on the screen controller (where we will connect an RGB LED to additionally display the system status) and finally, compactness combined with contrast and excellent readability both in bright light and at night, and it does not illuminate the entire corridor at night like any LCD with a permanently on backlight.

Then the problem arose of how to place temperature sensors in each room, without additional wires, power and radio modules. As a sensor, I chose a digital DS18B20, (having a good accuracy of + - 0.5C) which needs only two wires (ground and signal). You can hang a lot of them on these 2 wires in parallel (each has its own unique MAC address). But even stretching two wires all over the rooms is a hell of a job. Here it dawned on me. After all, a telephone cable is laid in all rooms and it is 4-core and at best 2 wires are used for the phone (usually red and green) and the rest (yellow and black) pass through all the places I need and remain free. Thus, without cutting the wires, but only exposing the necessary two, I soldered DS18B20 to them in each room.
The total length of the wires turned out to be quite large, and if the signal wire was supported (at + 5V) by the recommended 4.7 kOhm, then in my case the sensors were practically unreadable and I reduced the supporting resistance by half to 2.3 kOhm and everything worked fine.

Then I got confused by the pressure sensor and settled on an expensive BMP085 but it has an I2C interface, which again saves legs and the number of wires. Since he can still read the temperature, I put him in the basement, where it was closest and easiest to pull new wires (already 4). I tried to use standard telephone cables and connectors (RJ11) to the maximum so that the design was disassembled and repairable - replacement suitable.
When connecting this barometer to the same I2C bus as the RTC (non-volatile clock module), not very clear problems arose. They interfered with each other, and until I set a small delay before reading the barometer, everything was not stable. Since short temporary power outages are not uncommon and the RTC module worth a penny I added it for non-volatile time. basically needed when using x10. Using it, there was a desire to automatically synchronize it with NTP via the Internet (since we already have it), but something didn’t work out for me to cross the webduino server and NTP. As a result, the NTP time (Unix epoch) is sent to the Arduino (and updated by the RTC) every time any settings or modes are changed in the web interface. Which has its drawbacks as it is taken by JavaScript from the time on the current computer or mobile device and is not always accurate and in the correct time zone.

I send commands to my radio sockets Arduins on the air using a penny ($ 2) transmitter module. They are a dime a dozen on eBay (search for "RF transmitter 315 Mhz ..") and in any store. The only thing you need to do is choose the correct radio frequency for your sockets. Unfortunately my sockets were not correctly supported by the standard RCswitch library. in the description of the library there is a list of supported chips, but do not be upset if yours is not on the list, it worked for me after analyzing the ether manually and without the library. A lot has been written about similar sockets, working with the library. In particular, here: http://habrahabr.ru/post/213425 http://habrahabr.ru/post/212215 I used 110V sockets
. Despite the fact that radio control requires a non-standard solution, it is the simplest and most cost-effective solution to the task at hand. Namely, turn on and off electric batteries or any other device (not necessarily resistive) in time or manually, and sometimes turn on / off the outside light. Insteon, Zwave and others have a lot of sometimes unnecessary additional features but an order of magnitude more expensive and have problems with the openness of the interface so that Arduino can send simple commands to devices. The only problem with x10 sockets, Insteon and others is that they click very loudly during switching. This is especially annoying on a quiet night. One more nuance: x10 was imprisoned and popular in North America and, accordingly, under 110 volts. Here everyone chooses for himself. Or pay a lot for:
Z-Wave - there are no ready-made sockets, there are relay modules of a strange shape that also click quietly, and they have to be hidden somewhere, somehow in the walls, then immured, it is not clear how to service them - change / repair. But there were USB modules for sending commands. But for this you still need a microcomputer (perhaps a router is suitable) with the correct OS drivers, etc.;
Insteon - there are sockets, but they also click nasty like x10 and as far as I understand there is no open module for sending commands and the system is again sharpened for 110V;
You decide to bother with integration and sending commands to this network or pay 5-10 times less for each radio device and, if necessary, undermine the code for it. Like any other thing, everything for 110V is cheaper. Of course, there are still extreme ways, such as, for example, the idea described by several authors here, to entangle the entire apartment (house) with a pair (and in fact a bundle) of hammer wires and manually assemble each control and controlled device from scratch using the 1-Wire protocol. Some have gone even further and are developing their own protocols…

Also, as a kiter, I screwed an anemometer (wind speed sensor). To measure it, I used a cup sensor at hand with a reed switch closing 1 kOhm between two contacts when the cups rotated. The program uses an interrupt and measures the number of times + 5V is applied (transition from 0 to 1) to a digital input (powered by 5 kOhm to the same + 5V). This value is multiplied by a factor suitable for your sensor and the wind speed in knots is obtained from the number of short circuits in one second. Also, for each hour, the maximum and minimum speed values ​​\u200b\u200b(gusts) are measured and the maximum per hour is displayed. In the web, the current and maximum are given. Each sensor must be calibrated individually and the correct coefficient must be selected. To control the garage door, I used a spare radio remote control from it and, using an additional relay (the sixth one), emulated pressing a button on the remote control (having opened the remote control and soldered it into the button contacts).

The communication protocol of a standard thermopump control unit with its remote control (usually 2 wires) is usually closed and our arduina cannot know what mode and settings are set in the standard control unit, but with the help of our sensors we can know what mode HVAC is in now and although they also there is a temperature sensor in the heat exchanger additional protection With the help of an Arduino, it won't hurt. I am often asked: Isn't it scary for me to trust Arduino to manage such a responsible system from my own house? My code is open and transparent. I understand what is happening and I can always catch and correct the inaccuracy (if there are any left after six months of using the system). And most importantly, I can add any features that I need. In the same box, most likely a less powerful controller and of course there is nothing to change or add. Without an arduino, adding again limited functions like access from the Internet to a standard CU costs a new box of hundreds of dollars. It all started Not from the fact that I wanted to save money, and I needed functions that were convenient for me that could not be bought from equipment manufacturers for any money. But of course, if we take into account the price of man-hours spent by me, and even by you, if you just decide to do something similar based on my and other developments, it’s certainly cheaper to buy a ready-made project for this project, but say goodbye to flexibility and necessary functions. It's about how to install FreeBSD and painstakingly long and for every reason dig into the flea market of Internet knowledge and manually tweak it from the command line for yourself in comparison with Mac OS, beautiful ready-made but limited based on the same BSD. The main one is the inclusion of heating / cooling to the desired temperature not forever or on schedule, but only for an hour or 2-4. It sounds simple and convenient but is not present in standard BU.

If you want to control only a thermal pump without RF, RTC, barometer and other memory and leg problems, Uno will also have enough (I did this in the first phase of my project). In the full version, Mega is indispensable. Let's take a look at the resulting functions and interface.

The interface itself is made within just one html page using Ajax technology to exchange data with the Arduino web server (webduino) and is based on the JQuery Mobile libraries. Therefore, several image files and libraries themselves are needed to work, which can be replaced by links.

In the upper left corner, we see the moon, which means that according to the day and night settings (in the first line of the blue block), the night mode is now. If the day mode there will be sun. Next we see our house. In the house there are a lot of temperatures in each room and in the center the temperature is with tenths, this is the temperature in the living room at the main level. In green at the bottom of the house we see the relative humidity inside the house. To the right of it is a snowflake, this is an indicator that the air conditioner is working now. In this place, other operating modes are displayed with different icons (heating with a thermopump or AUX or x10). If the icon is muted (translucent), then the system is in this mode but not active. Those. for example, in air conditioning mode, up to a temperature of 21 degrees, but since it is now 20 degrees, the air conditioner is not active. If two modes are working at the same time, for example heating x10 and heating with a thermopump, then two icons will flash in sequence. On the left and right of the house, we see the rays, when you click on which they become bright and when you press them again, they are muted. This is the inclusion of external lighting near the house. I have outside lights in my backyard and front of the house. Control is transferred by x10 and the numbers of the corresponding devices are written in the html (JS) code, Arduina only sends commands to the device numbers transferred to it from HTML. To the right of the house we see an automatic garage door. which opens and closes when you click on it. On the top right of the house, we see the current (averaged over 1-2 minutes) or the maximum per hour wind speed in knots. The wind speed value is highlighted in different colors from blue to red depending on the speed and in accordance with the internationally accepted colors of the Beaufort scale. On the top right, we see the temperature outside and below the current atmospheric pressure. The pink background for the pressure value is a graph of its relative change over the past 24 hours (x-time, y-relative pressure value). Pressed green relative humidity on the street.

Now consider a group of white selects and a SET button. The desired temperature/mode is selected with the left selector. Right for how long to enable this mode. If the mode is active, then the inscriptions will change a little, as in this example
If the heating mode is active, then the button will additionally be tinted red and if the cooling mode is blue. To turn off, leave the temperature and the selected mode on the left and the remaining minutes on the right, and then the SET button will change to OFF and pressing it will turn off the mode. The cooling or heating mode is selected automatically depending on the outside temperature. If the street is less than the value of the heat_temp constant described in the html(JS) file, then only heating will be offered, otherwise only cooling.

Now let's look at the blue x10 block. Clicking on the first line opens the general settings: ON - All Outlets Always On (for example, in summer), OFF all sockets are always off (for example, if you are on vacation), Split - take effect individual settings groups and rooms. Then you can choose from what hour the day begins and from what night. To save the settings, do not forget to click the Apply button below. then each line represents a group of rooms which can consist of one or more rooms. I made a grouping by floors in my house. Some floors have only one room and some have more. For each group, we can set the ON mode - all sockets in this group are always on, OFF all sockets in this group are always turned off (for example, you need to turn on the vacuum cleaner and if the battery works at the same time, it will blow the fuse), Split (only available for groups with more than one room) - individual settings of rooms within the group take effect, Day - maintain the specified temperature only during the day (always off at night), Day&Night - maintain the specified temperature for the day and another temperature at night. Each room has all of the above, with the exception of Split. For the changes to take effect, do not forget to click Apply at the bottom.

The very last line is the Override mode setting. This mode was made to force the sockets in the selected room or lamp to turn on for a while. For example, you need to heat the room as much as possible for a certain period in order for the child to massage there and after an hour continue to maintain the normal temperature in it. Or turn on the lights outside for half an hour. On the left, you select the room on the right for how long to enable the mode and press the Overrride button. If you need to prematurely disable the mode on the right, select OFF and click Override. All information is updated every upd_interval (constant from html file) seconds. Default = 60 seconds. When the information is updated, the entire upper part of the page with the house blinks.

I would also like to talk about the concept of combining outlets (pool). Let's say you have one a large room one battery is not able to heat which at -5 overboard or it will heat up for a very long time. You can supply a second RF socket with the same code/address and plug a second battery into it and they will both always turn on. Which, at relatively warm temperatures, will cause the two or more batteries to click and turn on and off frequently. There is another option, you combine these batteries into a pool in the arduino code x10pools=(0,0,0,0,0,12,0,0,13,0,0,0,0,0,0,0,0) . Zero means that the socket address does not have a pool. Number means the address of the pool's child socket. The child is turned on if it is colder outside than poolt (constant from the html file) or the gap between the desired temperature in the room and the current one is greater than delta_temp * poolf (constant from the html file). I would like to say more about delta_temp (constant from the html file) is Delta temperature. It is needed so that the modes do not often turn on or turn off, since the sensor readings can jump a little + -. Heating is switched on if the current temperature is less than (desired - delta_temp) and switched off if it is higher than (desired + delta_temp). The default is 0.5 deg C.

Now consider the issue of security. Of course, you cannot leave the management of your home available to everyone. Since our system consists of a client (JS Ajax html page) and a server (Arduino) you can arrange different levels of security. For example, you can put an HTML page on your computer, phone, tablet, etc. (without exposing it to a public hosting) and then only you (from devices that have this file) will be able to open this control panel for your home systems. Arduino web server weighs on the internal IP and therefore if you do not forward it on the router to the outside world, then the Arduino itself can only be reached from your internal network. Access to the HTML page itself can be password-protected on the Web server where you want to post it. It is also fashionable to raise an HTTPS server in relation to it. The simplest and, in my opinion, quite reliable is the public hosting of the page, but the page itself does not connect anywhere at startup unless the address of the Arduino server is passed to it as a parameter (pre-configured Dinamic DNS and Port Foewarding). It looks like this in the browser, such a link http://myhosting.com/index.html?http://myhome.slyip.net:8081/hvac is entered. If an attacker accidentally stumbles upon your client page, then he will not be able to do anything with it without knowing the address of the Arduino server. This is the simplest and most convenient compromise option that I currently use. Yes, I also don’t like this whole construction with a poor (slow, not supporting HTTPS, etc.) Arduino Web Shield server, in addition to which I still need to separately host the client page from the icon somewhere. And as soon as I get the famous TP-LINK TL-WR703N from China
a router that in the blink of an eye turns into a wifi bridged web server with a Serial (UART) interface to Arduine, I will immediately screw it to the arduino (or it to it) and throw out this shield and wire it. Thus, it will turn out even more than what I wanted so unsuccessfully to achieve from the STM32 controller, namely, that everything be in one device (not a separately hosted client page and a separate executive server) and a normal web server on which you can implement a decent degree of speed and security convenience.






B for last

Automation is increasingly being introduced into everyday life modern people. And if earlier automated production could be considered the pinnacle of progress, now even everyday life, an apartment or a private house, can be quite simply radically improved by introducing the concept of "smart home" there. After all, today "smart home" systems are designed not only to optimize energy costs, but first of all - to make a person's life more comfortable. The possibilities of modern "smart home" systems will be discussed in our article.

To combine home theater, lighting control, water supply, video surveillance system, climate control, power supply and access control, gas supply and multi-room into one system is the task that the smart home system solves today. Let's go through each of the points in sequence, consider what modern automation systems can do in relation to our everyday life.

Climate control

The microclimate of public and residential premises greatly affects our performance, and health in general. The conditions of the air environment in the premises vary depending on the modes of operation of the climatic equipment. Heating and ventilation equipment, lighting equipment, other devices - all this together has a certain total effect on the human body, on well-being, on health in the end. And technology is getting more and more complex.

Automated systems allow not only to quickly control and manage all this equipment, but ultimately take care of our health. With the help of sensors, the current state of the air in the room is monitored, and through the control panels, the operating modes of air conditioners and supply ventilation, and heating are adjusted. That is, the climate is adjusted automatically to the requirements of a person, which are set by preliminary settings.

So climate control allows the following. Air quality control depending on the weather outside the window and on the time of day. Timely ventilation of the premises by controlling the heating and opening windows.

Underfloor heating control. Maintaining optimal temperature and humidity individually in each room. For example, a food storage room requires its own special climate, which is different from the climate in the living room or in the kitchen, etc.

Control of temperature, humidity, fresh air intake, air purification system and ozonation. In each room, the conditions should be different, most suitable for each family member, taking into account the place in the house where this room is located: some to the north, some to the south, and control in each case will be individual.

Drafts are unacceptable in the nursery, the bedroom should be warmer, the bathroom floor should be warmed up in time, and you don’t need to keep it warm all the time. That is, the control turns out to be optimal so that the energy saving effect would also take place.

The setting varies according to the lifestyle of the family or the collective. On weekends, the heat supply to the working premises is reduced or switched off.

Autonomous heating system country house- on the contrary, it is included on the weekend. The boiler is remotely turned on or switched to an economy mode, etc. Everything is rationalized to combine efficiency and comfort of life. This is especially true for water supply, electricity and heat supply.

Entertainment

For a long time you will not surprise anyone with a home theater. But manage out different places sound and video, as well as stereo systems located throughout the apartment - these functions are just implemented using the "smart home" system.

The home cinema is connected to an automated system, and the whole complex of multimedia equipment, together with auxiliary devices, is harmoniously integrated into the apartment. There can be several sources of sound and video, and they can be multi-channel: speakers, receivers, plasma panels, projectors - everything is controlled directly or remotely from anywhere in the room.

You can watch movies and shows, listen to music in all rooms or just a few, program a scenario and activate it with one button from the touch panel or from the remote control. The script program can be written in individual conditions: blinds close, lights dim or dim, plasma panel turns on, projector pops up, player starts.

Scenario programs can be edited, set in time for automatic start, set related settings for watching movies, for example, turn on the air conditioner near the place where the home theater is installed, if the weather is hot.

The "multi-room" function is exactly the function that allows you to hear sound or watch video in several independent areas of the apartment. It becomes possible to control the volume from any room, each of which has push-button or touch, wall or desktop control panels, as well as remote controls.

What could be a more expressive sign of the intelligence of the "smart home" system than smart control lighting? Smart home lighting is truly intelligent and therefore economical. Electricity resources in an apartment, house or office are used as economically as possible, without unnecessary extravagance.

The advantage of an automated lighting control system is that, based on data from external and outdoor lighting sensors, as well as timer data, it allows you to turn on and off the light of the desired brightness and only where it is really needed. In addition, they open up a wide scope for creativity. In addition, the option to simulate the presence of the owners is available.

The modern "smart home" system is a complex of technologies for comfort, safety and efficiency. Stability is ensured by integration in the event of a centralized power outage, so that the electronics remain operational at all times.

Batteries and inverters, chargers and liquid fuel generators are installed in the system and software integrated. At the time of a power outage, the system will automatically switch to a backup source, in last resort the batteries will continue to power security systems and critical equipment.

Automated security system

The smart home system includes, as part, security and fire alarm and video surveillance, so that both the stay of the owners in the house and their absence would be safe both for the house and for the owners themselves. A video intercom and a perimeter security system can be installed here to protect against uninvited guests.

As for safety in general, the “smart home” system is able to provide: protection against short circuits in the electrical wiring, protection against water leaks, protection against gas leaks, by triggering a smoke detector and turning on an autonomous fire extinguishing system, autonomous power supply, alarm, automatic call to the rescue service .

Thus, a "smart home" will protect itself and its owners from any dangerous situations, because the system can include: automated gates and doors, automatic security shutters, a video surveillance system, security alarm, sensors for presence, smoke, gas leakage, etc.

Access control to the premises, video surveillance of adjacent territories, turning on searchlights when penetrating through the perimeter are three more pluses in the treasury of advantages. Through the Internet, the owner will be able to remotely receive a picture from any of the cameras of the video surveillance system, and the baby monitor function can also be attributed here.

Video surveillance as such

Intelligent video surveillance is one of the main constituent parts modern "smart houses". Video cameras are connected to the Internet, and allow you to access yourself from anywhere in the world.

The owner can be abroad, while quickly monitoring any of the zones, and the video cameras here can be controlled. For example, controlled cameras are usually equipped with gates, courtyards, nearby buildings, and platforms near the doors of apartments. The operation of the video camera can be paired with a motion sensor, and signals can be sent to the control center.

The Internet and satellite television networks, as the main sources of information, are conveniently integrated into smart home systems today. Being inside the house, the owner can receive information and send it to various rooms, to TVs and monitors. This also applies to the transmission of information received from video surveillance systems. Thanks to the "multi-room" function, all these possibilities open up. Of course, via the Internet it is possible to configure, if desired, remote control.

Control from a mobile phone through direct voice commands and via SMS is available today for owners of smart home systems. You can also set up call forwarding to your mobile phone if you are away from home, even if you are in another country.

If necessary, you can let guests into the house by simply sending the appropriate command from your mobile phone to your automated system. Similar opportunities are conveniently implemented via the Internet, it will be enough to find Wi-Fi for a smartphone or laptop.

Andrey Povny

The "smart home" system is designed for maximum comfort in an apartment or private house. Full or partial automation of the house will allow you to forget about large bills for electricity and heating, make household appliances work without the participation of the owner and increase the efficiency of the security system. The ability to control the whole house from one panel or even remotely guarantees comfort in your home. When you return home, you can be sure that the room is warm, a hot bath is filled, and the robot vacuum cleaner has cleaned without reminders. All these and many other functions are available in the "smart home" system.

Automation options

The unique home automation system allows not only achieve comfort but also save utility costs. The light turns on only when a person appears, and the heating works at full power only at the programmed time or in the presence of the owner - this is far from all that a “smart home” can do.

Key benefits of automation:

  1. The room will always have a microclimate that is ideal for the owner of the home. Air temperature, humidity and other parameters are constantly maintained or adjusted in each room at a certain time. This allows you to forget about discomfort after waking up or irritation upon returning from work.
  2. Every object is under control, and you can control it even from a great distance. By setting up the system for yourself, you can get hot coffee with toast in the morning without any effort, enjoy the sauna immediately after returning from work without waiting for it to heat up, heat the water in the pool without leaving your home.
  3. If any malfunction occurs, the system will not allow the object to be turned on and will send data about the breakdown to the owner. This avoids short circuits and other troubles.

The constantly improving production process allows you to install the system in a house or apartment without overhaul. The entire wiring system will now be replaced by switches with radio sensors, which transmit information to the control center.

Smart home system costs

You can install a smart home system in any room: in an apartment, in a country house, in a private house or even an office. By automating the place where you have to be most often, you can save a lot of time and not be distracted from important things by trifles, like making coffee.

Costs depend on many factors:

  • type of system and equipment used;
  • way to control "smart home";
  • quantity household appliances and other features of the premises;
  • area of ​​housing and the presence of adjacent territory.

It is quite logical that the automation of a private house will cost its owner much more than installing the system in small apartment. This is due to the fact that your home often contains more equipment, the heating system is individual.

Additional costs associated with the maintenance of the local area:

  • video surveillance is often necessary, protection extends not only to front door and windows, but on the entire area of ​​​​the site;
  • garden care, watering plants;
  • a bath or pool connected to the system also require additional costs.

Automation has more advantages, and all expenses are paid off with small bills from resource-supplying organizations and saving time that can be spent doing what you love.

What are the costs

The cost of the finished system depends on the capabilities and imagination of the owner of the house. The final price is made up of the following:

  1. The cost of the selected equipment. The needs of people in the automation of housing and offices is constantly increasing, so manufacturers are trying to develop and release new products. The owner of a house or apartment must initially decide whether he will be satisfied with not the most modern, but budget equipment, or if he wants to equip the house with the latest technology.
  2. Ready-made model of the system or individual selection. Ready-made systems include a limited range of features that are needed in every room. If you want to automate your home the smallest details, you will need an individual design, for which you will have to pay extra.
  3. Installation of equipment. Older and cheaper options require cable installation, so they are best installed during the repair process. Otherwise, after automating the house, you will have to re-glue the wallpaper. Modern equipment works with the help of radio transmitters and does not require installation of cables.
  4. Installation software. The complexity depends on the chosen control method. Budget options, controlled using different remotes, are not as expensive as providing your comfort with a single touch panel or through a computer.

Possible and additional expenses associated with non-standard placement engineering networks, which will have to be bypassed during the installation process.

A simple smart home allows you to install it yourself, while the costs will be much less. This option has one minus - it will not be able to control all the processes in the house, but only the main ones: light, heating, closing curtains at night. This is the minimum set, some manufacturers offer a wider range. Turnkey installation requires confidence in your skills, care and accuracy, therefore, at the slightest doubt as a result, you should entrust the work to specialists.

The result of automation

Automation of your house or apartment will allow free up a lot of time, not be distracted by household chores and enjoy a good rest after work. The costs required to purchase and install the equipment will quickly pay off with a significantly reduced amount in the bills. Own comfort and confidence that all equipment, lighting and heating devices work exclusively in accordance with the wishes of the owner, will not let you doubt the correctness of the decision made.