My "Smart Home" on the PLC and with a web interface. Part 1. Introduction
Introduction
On Habré there are a lot of articles about smart home projects, but almost all of them were on home-made equipment and Chinese lotions. In my article I wanted to talk about another approach, which shows how much easier it is to carry out projects using ready-made solutions from world manufacturers ( and it looks more solid ), and also demonstrates the possibility of using equipment not only in industrial facilities, but in the private sphere. The result was a symbiosis of technology and automation. On the one hand, using a PLC, which is mainly designed for the needs of industry, which allows you to perform tasks of any complexity without the restrictions of rigorous algorithms for finished smart home devices (for example, using KNX technology) coupled with html / javascript web technology gives an unlimited flight of fantasies for expanding projects .
Current expenses - 170 thousand rubles (at the old euro exchange rate).
Let's get started.
What i'm up to
We
control lighting and power supply - Basically, the control will be carried out with a signal on / off, dimming I do not want and do not need;
- I want control from different places, for example, went into the bedroom - turned on the chandelier, lay down on the bed - pressed turned off the chandelier. If you forgot to turn off the lights in the hall (or in the toilet ...), clicked the button "turn off the lights everywhere." Conveniently;
- When leaving the apartment I press one button - the light in the whole apartment turns off, etc .;
- Read the reading from the electric meter;
- Uninterrupted power supply of control systems and apartment security;
- Without exception, all lighting groups must be controlled by the PLC. In case of fire, outlet groups must be disconnected from the PLC in the machine - disconnect the power supply in the apartment in case of emergency;
- Each lighting group must come into the switchboard and pass through the nearest switch in order to be able to remake the lighting control into a regular circuit (if I sell an apartment, I will take everything);
- In the corridor, provide a human movement sensor to control the lighting + tied into a burglar alarm;
- Warm floor on the balcony, in the toilet, bathroom, in the hallway - with the ability to control depending on the outdoor temperature, by time.
We
control heating and ventilation - Heating control - a valve with an actuator is installed on each battery (for room temperature control, for measuring room temperature, it is necessary to provide temperature sensors);
- Provide control of the air conditioners via the IR channel (no current solution to the problem has been found yet; we put the twisted pair on the indoor unit of the kondeya to come up with later);
- Temperature sensors for street temperature (sunny and non-sunny side);
- In the winter, two problems are quite common - it is cold and there is nothing to breathe. The decision to install a supply system. Further, control the supply system (channel temperature, outdoor temperature sensor, three heating levels, fan);
- Management of exhaust fans (sanitary unit, bathroom).
Security alarm;
Alarm signaling the state of the front door (archiving the state of the door - opening / closing time);
Arming via the Web interface or via the light control switch.
Video surveillance
Recording from the camera of the front door, street parking place;
Archiving records on a remote server.
Equipment
- Since I’m already used to ABB PLCs, AC500-eco PLCs ( PM554-ETH CPUs with Ethernet support) were chosen as the brains for the apartment management system ;
- Then I started to count money and ... I had to choose an information display environment, with the ability to display information about the house web-based. There are many options, but basically everything is based on non-cross-platform solutions, which is not suitable for me. Everything that with the words SCADA and WEB, was with a prohibitive price tag. I had to google a little, as a result, it was decided to use not a SCADA system, but a framework with great functionality for HTML5. Came to CSWorks. This freemark gives you the opportunity to use for free with a limit of 999 variables, 1 client. Which completely suited me.
- JUNG, Serie A was chosen as switches and sockets (light control) . Of the pluses - they can carry up to 4 buttons per button post (switch without latching), they also have indication LEDs with a voltage of 24V (this voltage is the standard industrial supply voltage of automation systems). I have not seen these functions in any of the manufacturers of electrical installations (not counting China);
Beginning of work
1. The method of wiring lighting. Each group comes directly to the power cabinet. In the cabinet are contactors and relays for control. Relay and contactor coils are controlled by PLC signals (DC24V). I use manual contactors for redundant control. The supply wire made a switch passing through the cup so that it was possible to remake the wiring to the usual circuit.
Schematic:

Manual contactor itself:

Cabinet assembled and mounted:

Schematic:

As I wrote above, I chose the switches without latching with led indicators. A maximum of 4 buttons, it is possible to switch off these buttons into 8 groups (see the documentation for the JUNG 4248TSM switch .


In the next parts, the project will be discussed in more detail.
I get ahead of myself, I open the screenshots of the web interface:

