Repair Design Furniture

Automated home. Smart home: automation systems for residential premises and buildings. Smart home system costs

Films often show a living space that seems to take on a life of its own. Light bulbs light up at the wave of a hand, curtains open, after a certain word music plays. All this equipment is an intelligent home system, and we propose to consider how to make a smart home with your own hands, what is needed for this, and also what is the scheme of such a system.

Smart home - what is it

Smart House is home automation, which is a residential extension of building automation. Home automation can include centralized control of lighting, HVAC (heating, ventilation and air conditioning), home appliances, unlock gates, doors, GSM and other systems to provide improved convenience, comfort, energy efficiency and security. It should be noted that for some categories of the population (the elderly, the disabled) this event may become necessary.

Photo - Smart home distribution ideas
Photo - Simple smart home

With the latest introduction of SMART technologies into our lives, many no longer imagine their lives without automatic installations, software equipment, we need wireless internet, household appliances.

Home automation refers to the use of computer and information technology to control household appliances and their functions. It can vary from simple remote control lighting to complex computer/micro-controller based networks with varying degrees of intelligence and automation. Home automation should preferably be as simple as possible.


Photo - Smart door lock

Benefits of using " smart home» in an apartment based on PIC or WAVE:

  1. Economical time spent on daily setting up various mechanisms, receiving calls, sending mail;
  2. The use of gaseous or liquid fuels, and later the use of electricity, allowed increased automation in heating systems, reducing the labor required to manually refuel the heater and stove.
  3. The development of thermostats has made it possible to adjust more automated control heating and later cooling;
  4. So often the protection of industrial facilities, residential premises is carried out;
  5. As the number of managed devices in a home increases, their relationship rises. For example, an oven can send notifications when it needs cleaning, or a refrigerator when it needs maintenance.
  6. In simple installations, the smart can turn on the light when a person enters the room. Also, depending on the time of day, the TV can tune in to the desired channels, set the air temperature, lighting.

Smart home can provide interface-access to household appliances or automation to provide control and monitoring on your smartphone, via a server, mini Smart for iPhone, iPod touch, as well as using a laptop computer (requires special software: AVR Studio).


Photo - Home control via tablet

Video: Schneider Electric smart home system

Smart home elements

Home automation elements include sensors (such as temperature, daylight or motion detection), controllers, and actuators such as motorized valves, switches, motors, and others.


Photo - House control scheme

These are heating, ventilation and air conditioning, HVAC can control temperature and humidity, for example, the Internet control thermostat allows the homeowner to remotely control the heating and air conditioning systems of the building, the system can automatically open and close windows, turn on radiators and boilers, and underfloor heating.

Lighting

These lighting control mechanisms can be used to control household light appliances. Also here can be attributed the system of natural lighting, the work of blinds or curtains.

Photo - Scheme of a smart home

Audio visual

  • Remote Control Presence Effect (This is the latest technology used to increase security). It consists in lighting the light, musical accompaniment.
  • Imitation of presence
  • Temperature control
  • Brightness control (electric lamps, street lighting)
  • Security (alarm, blinds).

How to make a smart home

You can make an intelligent system with your own hands, the most a budget option- This is a setting to control the lighting in the house or turn on the computer.


Photo - Smart home control option

To make a lamp that will “light up” by itself, you will need to connect special equipment to it. There are several options for solving this problem:

  1. Install an acoustic relay (1 or x10-wire);
  2. Connect dimmer;
  3. Connect motion sensor.

The easiest way to work with the sensor. Its sale is carried out in any online store, you can buy a channel device, you can develop your own according to your own parameters. The only remark is that you cannot install an incandescent lamp with such a device, it may not withstand the load and explode, it is better to work with LED.


Photo - Smart home concept

Another "smart" silent option is a dimmer. Here you will need to touch the lamp, depending on the number of touches, the talking device will change the brightness. It is very convenient to use on the lamp in the bedroom, nursery.

To set up temperature control and regulation, we need a multi-channel system. The central temperature and humidity control circuit consists of:

  • Sensors (ds1820) that measure the physical state of the liquid, air.
  • Controllers (rfm12) which can be simple physical components and complex devices special purpose or embedded computers.
  • Lunex drives that respond to controller signals.

The most modern way is to buy all the components of a smart home, wires, thermostats. After installing the appliances in each room, one thermostat per radiator and one per boiler. You will also need a controlled unit, or the "brain" of the entire system. It is recommended to mount it on the heating inlet pipe.


Photo - Smart home system

The easiest way to install a video surveillance and alarm system. Fundamental provisions for the installation of security systems:

  1. You need to connect sensors on the windows, doorways, there the electrician will be the most productive;
  2. The board is the most difficult to select, the smart home controller, the operation of mediocre parts, the level of signals depend on it;
  3. Many experts believe that indicators should be mounted at floor level. About 20 cm from the baseboard, this increases efficiency;
  4. It is desirable to establish permanent monitoring, to establish a digital system of contact with the security service. Often, responsible owners install a special program on their personal computer that allows you to control the operation of the system from anywhere where there is an Internet connection (this is what Elena Teslya and her book: “Smart Home: How to Do it Yourself”, also have other solutions ). You can enable SMS alerts.

A smart home is a very convenient way to make your life easier, often the whole system is bought completely (Arduino, KNX, Linux).

The cost of each system is individual. The most popular brands are: beckhoff, gira, lpt, redeye, Smart Switch IOT screen, teleco. We recommend that before you build such housing, consult with experts, they will help you calculate the load level, calculate the power consumption.


Photo - Light control via phone

To get ideas, you can scroll through V.N. Gololobov's "Smart Home" with your own hands, DJVU or PDF, see our photo and video instructions for free, read the advice of famous masters.

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 yet become as popular 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 it makes practical sense to centrally automate:
> climate control of temperature (heating/air conditioning) and humidity (humidifier/dehumidifier),
> management natural light(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 switching on of the backlight) triggered by motion (presence) sensors, low-power LED lighting for stairs (sometimes the floor) and parts of tables in the kitchen that are shaded from the usual ceiling lighting hanging 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: closets, 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 web cameras 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. Later I switched the system to a radio outlet, 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, together 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 robotic toy) application of her house is very doubtful and based on a powerful microcontroller, sequentially lighting up LED rulers to illuminate the steps of the stairs (instead of one shift register and a generator) is just from a sparrow gun 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 should 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 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 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 to 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 didn’t choose it at all and didn’t think that it would turn out to be so worthless (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) 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 two-story house but half 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 it through the duct system to each room. 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, condo) 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 controls 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. Put the 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 by the 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. Accordingly, if the current state of the control lines (Y, O, W, G) does not correspond to 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 outputs of the arduino, so you either need to pile up a transistor for each relay or buy finished 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 built many years ago, the biggest problem is usually running new wires, so I tried to make the most of the current wiring. 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 telephone (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 somehow I couldn’t 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 sharpened 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 bunch) 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 (sixth), emulated pressing a button on the remote control (by opening the remote control and soldering 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 Arduino will not 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 to delve 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. To 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). Pressurized green relative humidity outside.

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 room settings 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 sockets (pool). Let's say you have one large room to heat which at -5 overboard one battery is not able to 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. What about relatively warm temperature 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

The main reason that home automation systems have not yet become as popular 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 it makes 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 switching on of the backlight) triggered by motion (presence) sensors, low-power LED lighting for stairs (sometimes floors) and parts of tables in the kitchen that are shaded from conventional ceiling lighting by hanging 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: closets, 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 web cameras 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. Later I switched the system to a radio outlet, 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, together with a neighbor, unobtrusively dripped on my head about the huge role of the miraculous miracle - Arduino in modern society, and that I, as a person who knows how and loves to hold a soldering iron, simply must get infected with 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 robotic toy) application of her house is very doubtful and based on a powerful microcontroller, sequentially lighting up LED rulers to illuminate the steps of the stairs (instead of one shift register and a generator) is just from a sparrow gun 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 should 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 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 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 to 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 didn’t choose it at all and didn’t think that it would turn out to be so worthless (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 it through the duct system to each room. 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, condo) 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 sure that our new system will complement the existing one. Those controls 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. Put the 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 by the 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. Accordingly, if the current state of the control lines (Y, O, W, G) does not correspond to 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 up 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 built many years ago, the biggest problem is usually running new wires, so I tried to make the most of the current wiring. 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 telephone (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 somehow I couldn’t 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 many sometimes unnecessary additional functions but are much 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 sharpened 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 bunch) 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 (sixth), emulated pressing a button on the remote control (by opening the remote control and soldering 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 Arduino will not 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 to delve 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. To 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). Pressurized green relative humidity outside.

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 sockets are always on (for example, in summer), OFF - all sockets are always off (for example, if you are on vacation), Split - individual settings for groups and rooms come into effect. 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 room settings 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 sockets (pool). Let's say you have one large room to heat which at -5 overboard one battery is not able to 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

A house that fulfills all desires is not a fantasy, but a completely feasible reality using modern intelligent automation systems. They allow you to significantly improve the quality of life, achieve maximum comfort and safety, allowing you to feel the continuous "care" of the house for all its inhabitants.

Smart House

Managing personal space with the Smart Home automation system is not just a set of devices that perform certain functions, but an individually created project that meets all the requirements and wishes of a particular family. At the same time, the system can be easily reprogrammed in accordance with changing conditions and the “mood” of the household, while continuing to adapt flexibly to the family as a whole and to each person individually.

Home automation allows you to avoid searching for remotes for various devices, manually turning appliances on and off, opening blinds every day, etc. Now, there is no need to get up at night if the house becomes hot or stuffy, Smart Home will avoid this situation by installing a functional climate control system. The house itself will reduce or increase the intensity of heating when the temperature in the rooms deviates from the desired norm, if necessary, turn on the air conditioner and perform all other actions to maintain the most comfortable conditions.

Who is Smart Home for?

An intelligent home automation system provides many benefits for its owners. Its installation is equally expedient, both for active people and for those who prefer a calm, measured life.

Smart home is perfect for all population groups:

  • many working, busy people - an automated house will take care of most of the worries about its owner, opening windows in a timely manner, turning on the light, watering the backyard, etc., even if a person lives alone, his life will become as comfortable as possible, without requiring additional spending time;
  • families with small children - an intelligent system will ensure maximum safety for small households, while freeing up a lot of time for their parents;
  • people who often go on business trips, travel - home automation will create a complete illusion of the daily presence of a person, which will protect the home from the risk of theft and other similar threats, will monitor the serviceability of appliances, in case of water leakage, smoke and other problems, it will give a signal to the appropriate service;
  • elderly and people with limited mobility - many have relatives, whose health and well-being often causes excitement of friends and relatives. The Smart Home automation system will allow you to easily solve this problem. Whether it is an elderly person or people who, for health reasons, find it difficult to maintain a living space in full, an intelligent system will help with this. Thanks to various sensors, controllers and alerts, neither a burner turned on, nor a forgotten iron or an open window will become a threat. With proper programming, the House itself will do everything right or give a signal, warning of an unfinished action.

Everyone will be able to find their advantages in the Smart Home automated system and set it up exactly as they see fit, the most comfortable.

Features and Benefits

Buy home automation equipment important step in the right direction. Today, many large foreign and Russian manufacturers provide a wide range of devices responsible for security, heating, lighting, energy efficiency, ventilation, air humidification, etc. The variety of sensors, controllers, valves and other equipment allows you to create and configure a well-coordinated system that will work as a whole.

Our online store sells automation devices from the best manufacturers. Products are reliable and have a manufacturer's warranty.

It is possible to set up an intelligent system with sound and voice control, as well as a function for solving problems in accordance with external parameters, for example, changing the intensity of lighting or air temperature.

The equipment is easy and quick to program. In the future, the owner can independently make their own adjustments.

The price of home automation depends on the project and, directly, on the selected equipment. If necessary, our experts are always ready to advise you.

He wrote it in response to numerous requests to talk about his vision of what a "smart home" should look like.

Perfect home automation

People often ask me about my vision for Home Assistant (literally, home assistant, hereinafter HA). Before describing where we want to go with HA, I should first talk about what home automation should look like in my ideal world. This will be the purpose of this post. I'm not going to focus on protocols, networks, or specific smart home controllers. These are all implementation details. Instead, this post will focus on what really matters: the interaction between a person and their home.

You don't have to adapt to technology

When people start using home automation, they always start with control: the ability to control devices in new ways, using a phone or a computer. They believe that the future has arrived and their phone app will be the control panel of their lives. They are focused only on what they get, not on what they lose. You install a few "smart" light bulbs and suddenly lose the ability to use the switches in the wall. When you come home at night, you have to take out your phone, open the app, wait for it to connect to your home network, and finally get the chance to turn on the light.

Yes, you can fix this problem by setting it to detect your presence, but what if your phone runs out of battery? You will still have to use the switch.

If you suddenly find that using your new smart devices has become burdensome, then you will get the feeling that home automation technology has not lived up to your expectations. Your light should work both with a switch (or button) when entering the room, and using the presence detection method. To be honest, there are hardly any more or less adequate solutions for controlling lighting from your phone, except for demonstration purposes.

You are not the only smart home user

People tend to forget that they are not alone in the house. As a decision maker in your home, you delight in the opportunities you get, but you ignore the downsides. The chances that other people in your home are passionate about other things and want to do their own thing are very high.

This means that whatever you automate must work flawlessly. If you manage to achieve a 90% success rate, you have a 10% chance of failure. For example, you have set up a smooth fading of light in the living room when you start watching a movie or series. But it only really works if everyone in the family sits down to watch a movie.

Limit the impact of pseudo-utilities and negative influences

When you create a new script, you should always first think about what the consequences will be if it doesn't work? All smart systems are made up of different devices created by different manufacturers that communicate with each other using different protocols: sometimes things go wrong. And you must do everything in your power to minimize the negative impact if things do not go as planned. Ideally, devices should become "stupid" and start working the way they did before automation. For example, Philips Hue lamps work like regular light bulbs if you use a simple switch in the wall and do not connect them to a control system. If things get worse when the system breaks down, the people you live with will revolt. For example, problems with the Nest thermostat, which, due to a logical error in its firmware, suddenly stopped heating the house. Horror.

The perfect app - no app

A smart home should fit in with your rhythm of life, not replace it. For most devices, there is no faster control than what you already control. In most cases, the best app is no app. The only interface that could be more convenient or accessible to you and your guests of any age is the voice interface. Manufacturers have already implemented it, and the largest of them have focused on it. Take Apple for example: the only way to voice control your HomeKit devices is with Siri. Amazon went further and created the Amazon Echo, which constantly listens to everything that happens through the connected microphones. I expect more more companies join this trend in 2016.

The voice interface isn't perfect either. The speed at which you can issue commands is slow because you have to wait for a response. There is also the issue of understanding commands, recognizing accents, and depending on cloud services to process your voice. I believe that all but the first problem will eventually be solved.

However, that doesn't mean that apps don't have a place in your life, they definitely do. They're great for checking the status of your home when you're not there, or for entertaining when you turn on the lights remotely when the kids are visiting.

Your system should work in-house, not in the cloud.

Cloud services are real magic. Somewhere in the world, there are computers that collect all the data your house generates, check it for correctness, and send commands back when needed. Cloud services will be updated over time to become better and more convenient. But so far this is not the case. There are many reasons why your home may lose its connection to cloud services. The Internet may stop working, or an update installed with an error, or the servers in the cloud are broken.

When this happens, your home should be able to function normally. You should not use cloud services to create home automation, but to expand their functionality - completely. In this way, you will avoid problems that can happen when, for example, Amazon AWS crashes and Amazon Echo stops working.

It was written 2.5 years ago, but today, the technology market has not made much progress in the formation of the main ideology for building home automation systems. Yes, they have become smarter, and voice control has become better, but the basics of how a smart home should look like have not yet been particularly formed.

Why are all marketing models based on what blinks or glows? Because it's the wow factor. But the essence of automation is completely different. It should solve the problematic issues of your life. That is, if something that can be automated becomes easier than doing it manually - then this is a worthwhile goal.

Let's take a look at examples. Here we take smart sockets. In fact, they are there to turn on something that is basically off, and only when it's really needed. That is, we must first understand this situation and understand when and what we need, and how much we really need to automate this process. Moreover, this invention of situations sometimes takes much more money and resources than if we just approached this device and turned it on.

Or take, for example, smart light bulbs. Especially with RGB color. In principle, smart bulbs were invented in order to either zone the lighting if necessary, but basically they are required when it is not possible to control wired bulbs the way we want, due to the impossibility of converting old wiring to new requirements. In addition, there are many cases when, at the repair stage, all sorts of niches are made with illumination of vases that are planned to be placed in them, and in fact this illumination turns on a couple of times, and then is not used at all. Well, either colored light bulbs, or diode strips, which are sometimes installed with a ceiling alteration, and then used as a demonstration of a "cool chip" but does not carry any payload. Most people do not bother about how the color of lighting affects the emotional background or biorhythms. Many do not even know that lighting affects this in principle. And that in theory, lighting can be used for relaxation or vice versa to cheer up. But no, the wow factor rules.

But the main goal of smart processes in the house is to solve really serious problems. Well, for example, the organization of ventilation of the premises in which we live. After all, everyone knows that new technologies make it possible to make an apartment or house practically isolated from the external environment. New windows, means of heat and moisture insulation make the apartment almost impenetrable. But at the same time, for example, in winter, people do not think that the air needs to be humidified, and that the necessary comfortable humidity in the apartment should be within 30-45% in winter and 30-60% in summer. What about carbon dioxide levels? We often do not even think about what kind of air we breathe. And there are rules and regulations. For example, GOST 30494-2011 states that the permissible values ​​​​of carbon dioxide content measured in units of CO 2 * cm / m ( international designation- ppm), should be in the range of 600-1000ppm. And these are valid values. Although many modern physiologists argue that 1000 is no longer acceptable. Values ​​​​of 600-800ppm are considered acceptable.

And this is really important aspects of your life. And in order to achieve such parameters in a modern city, with modern living conditions, it is necessary to use not one device, but a complex of ventilation, air conditioning, dehumidification and humidification devices. And to achieve optimal parameters in manual mode is almost impossible.

And that's what home automation is for. Which really improve the quality of our lives.

Or, for example, there is a lot of controversy regarding leak prevention systems. Now there are a huge number of leakage sensors on the market. Well, what is the use of them if the riser in the apartment is not blocked, and you have an hour to go home? Of course, it's good that you find out about this and you may arrive home earlier than the neighbors whom you flood will block the riser on their own before your arrival (which is unlikely, of course, but possible). And yes, there are many autonomous technical solutions who know how to close the taps. But for some reason, many people want to manage this process. That is, when creating a leak protection system, they use some kind of central smart home controller. And they don’t want to use, for example, autonomous solutions that are on the market, but are not yet integrated into smart home systems. Question What for? After all, the main task is to prevent flooding. The ability to close or open the faucet at will is a nice bonus, but the main task is to close the faucet and prevent the flood. Even if the electricity goes out, or the smart home controller freezes, or the battery runs out in the sensor. The faucet should close and that's it.

Therefore, my personal opinion consists in very simple theses:

  1. Too complex automation - harm the quality of your life, especially if you do not live alone
  2. It is necessary to simplify the complex, and not to complicate the simple.
  3. Automations should improve the quality of life, but not create problems if they suddenly stop working.

The ideal automation system should be intuitive. And not require a tutorial to turn on the light in the bathroom, and wave your hand or press a button to update the value of the timer that automatically turns off the light .... you get the idea....