How a smart home did not let the cat freeze



    The smart home, in the minds of most people, is still a kind of toy that turns on the light when entering the toilet and allows you to automate the inclusion of sockets on a schedule. Those who have already acquired their own home try to automate routine processes as much as possible, since the home really requires a lot of attention. I was faced with the fact that my cat, in spite of any frost, goes hunting, and just go for a walk. He always returns to the same place - the porch, and can sit there for hours until someone looks out the window and goes to open the doors. And the frosts this year were up to -28 degrees. Today I want to talk about how a smart home saved a cat from freezing.
    First, I’ll show you how it was before. The cat comes and always waits on the porch of the door opening. Sometimes it can wait an hour or more until someone looks out the window.


    I decided to use the automation of a smart home and here, by the way, I read about Z-Wave technology. About how the smart home did not let the cat freeze, read under the cat.



    The first idea was to teach the cat to press the call button, simply by setting him a separate button. But the cat-animal is wayward and not at all necessary he will press the button. Yes, and this would be at odds with the idea of ​​process automation.
    The second idea that I started to implement was somehow to detect the appearance of the cat on the porch and the warning that it was time to open the doors.

    It is necessary to make a small digression and say why I preferred the Z-Wave technology. Since the house is already ready, laying additional wires for the motion sensor is difficult, which means that you need to choose a wireless signal transmission method. Z-Wave technology has already been tested and sensors are mass-produced, which means that childhood diseases have already been cured. The protocol itself operates at a frequency of 869.2 MHz (in Russia) and has data protection during transmission. The sensors can be configured so that information is updated at a certain frequency, which will positively affect the battery life (do not forget that the sensor is wireless). Finally, the Z-Wave controllers themselves are widespread, a bunch of plugins are written for them, and finding answers to questions will not be difficult even in Russian-language forums. So, I decided to try Z-Wave.

    First acquaintance
    To solve my problem, I selected three devices:
    1. Fibaro Home Center Lite controller
    2. Aeotec 4-in-1 multisensor
    3. Although Fibaro Universal Sensor was a universal sensor

    And although I didn’t expect to use the latter in this project, it came in handy, which is what I’m talking about I’ll tell you later.

    The idea was as follows:
    1. A motion sensor detects the appearance of a pet on the porch and transmits a signal to the controller.
    2. The controller uses available methods to notify tenants that it is time to open the door.
    3. The door opens and the cat is saved from imminent freezing!

    I'll start in order
    The controller itself is somewhat reminiscent of a compact router, with the only exception that it has only one Ethernet port.


    Description of the connection and first setup of the smart home controller
    On the front panel are a series of indicators that indicate statuses. Among the unusual: receiving \ transmitting a signal and adding new devices.


    And on the other hand, everything is simple: power and Ethernet port. It should be noted that the power adapter is equipped with a very bright light indicator, so when installing in the bedroom, it is better to stick this LED at least with electrical tape.


    Initial setup comes down to entering network settings and creating users and passwords. A properly configured device immediately communicates with the server and checks for the latest firmware. It is curious that the latest firmware is not installed immediately, but are downloaded sequentially, so you can stop at the most stable version.
    In principle, it is already possible to start connecting sensors and configuring devices, but if you want to work with the controller remotely, two options appear:
    1. Port forwarding on the home router. (80 and 22)
    2. Registration on the server home.fibaro.com

    The last option will allow you to use the proprietary application on your smartphone and eliminates the problem of having a "gray" IP address.


    Registration is carried out in two steps. The first step is to create a user profile, which indicates the username and password. Registration ends with confirmation of a click on the link that came to the email. The second step is to add a controller. This requires a serial number and login / password from the controller. After the operations done, you can connect remotely to the controller, both from smartphones and from any computer on the Internet.


    We start connecting the sensor.
    To register the sensor on the controller, you need to perform the simplest procedure of two actions.
    1. Select the item “Devices” - “Add remove devices”
    2. Press the button 3 times on the external sensor. (A single tap wakes up the sensor and initiates data transfer, double tap most often causes registration. But if a double tap is recognized as a single tap, then a triple tap will be recognized correctly.)
    It takes 10-60 seconds to register the sensor. When the sensor is registered, we begin to create our scene.

    Scene creation, reaction to events
    A scene is a task that will be performed under certain conditions. You can create scenes from logical blocks or using the simplest constructor. I decided to resort to logical blocks, since this is very clear. Before that, I downloaded the official fibaro application on my smartphone and entered the account information that I registered a little earlier on the website home.fibaro.com. Now the smartphone saw all the sensors and events occurring on the controller.

    Alerts can be sent in the form of SMS (if an SMS distribution center is connected), push notifications to a smartphone or e-mail messages. I was interested in the second option, since it is the fastest.

    So, we create a scene that will force the controller to send me an alert on my smartphone. For reliability, I connected two smartphones and sent a notification to both at once.


    From this moment, the debugging and long-term sensitivity adjustment of the motion sensor begins, since it has a very wide angle of coverage. I had to lower the sensitivity and turn the sensor as far as possible, because it worked even on birds flying low. The sensor itself was temporarily fixed to the window grill.



    It is very convenient that the controller allows you to configure the operating time of this condition so that the smartphone does not wake up with false positives at night. But still, there were up to 50% incorrect alerts. If you look closely at the photo above, you can notice the video surveillance camera with which the first video was made. Since the porch and steps fall into the frame, it was decided to use the DVR in this operation.

    Universal sensor and DVR
    The DVR also has its own settings and even has its own emergency outputs. Therefore, it was decided to use its ability to determine movement in a certain area and notify the controller. A universal sensor came in handy for this. It allows you to connect a pair of binary sensors (on, off) or up to 4 temperature sensors.


    The sensor itself is very compact and requires a constant current voltage of 9 to 30 V. I have a CCTV camera powered by 12 V, so this was not a problem.



    Since the sensor can only detect contact closure, I used the relay built into the DVR. It closes when movement is detected in the specified zone.



    The picture below shows that in case of motion detection, the first relay closes. The response time of this relay is also set if you do not want to receive alerts at night. (in the picture, the relay works around the clock) The



    universal sensor was connected to the controller in the same way as the motion sensor, and the block diagram underwent minimal changes - the operation of one sensor was replaced by the operation of another. As a result, the following chain was obtained:
    1. The cat appears on the porch
    2. The DVR detects movement in this area and closes the relay
    3. The universal sensor sees a short circuit at its outputs and sends a signal to the controller
    4. The controller processes the signal according to the given scene and sends a push notification to smartphone
    5. The notification arrived prompts the hosts to open the door.

    And it looks like this.


    Conclusion The
    non-trivial task was solved in 3 days with a detuning of the sensitivity and without the need to lay new wires. Wireless communication technology Z-Wave has fully justified itself. The functionality and flexibility of the system setup were pleasantly pleased. Ahead is the task of transferring the current functionality of a smart home, which is entrusted to a set of Arduino, which I wrote about earlier . If, dear readers, you are interested in an overview of certain functions, or maybe some smart home sensors, then please respond in the comments, and I will try to test them and write a review.

    PS I decided to add how the appearance of a cat at the threshold looks like from a computer:

    Also popular now: