Automatyzacje wejścia i wyjścia z domu

Automatyzacje wejścia i wyjścia z domu

Oglądając dziś zamieszczony filmik z 2016 roku i czytając komentarze dotyczące przywitania Małgorzaty w domu (filmik w artykule). Zacząłem się zastanawiać jakie automatyzacje sam posiadam.

Moje automatyzacje 

Mam je podzielone na dwa etapy - jeden to bazujący na wejściu/wyjściu z mieszkania. Czujnik ruchu w korytarzu + czujnik otwarcia drzwi/zamka - (opis po kliknięciu).

Wykrywanie wejścia/wyjścia

Gdy czujnik nie wykryje ruchu a zamek zostanie otwarty - to znaczy, że wchodzi ktoś z zewnątrz. 

Gdy czujnik wykrywa ruch a następnie otwierają się drzwi, to znaczy, że ktoś wychodzi. 

Ktoś domownikowi otwiera drzwi? Bazuję na wykrywaniu połączenia z WiFi - jeżeli telefon zalogował się do WiFi i przez 5 minut drzwi się otworzą, to znaczy, że domownik wraca. 

Jeżeli otwieralibyśmy gościom - to dodatkowy czujnik po drugiej stronie drzwi rozwiązałby sprawę - gdy oba wykrywają ruch to znaczy, że raczej nikt nie wychodzi. 

[
    {
        "id": "6b0b731c.4386ec",
        "type": "server-state-changed",
        "z": "5a0ef976.d066b8",
        "name": "Awesome w domu",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "entityidfilter": "group.awesome_people",
        "entityidfiltertype": "exact",
        "outputinitially": false,
        "state_type": "str",
        "haltifstate": "home",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "outputs": 2,
        "output_only_on_state_change": true,
        "x": 120,
        "y": 180,
        "wires": [
            [
                "a5b12fe3.cf487"
            ],
            []
        ]
    },
    {
        "id": "a5b12fe3.cf487",
        "type": "time-range-switch",
        "z": "5a0ef976.d066b8",
        "name": "od 9:00 do 23:00",
        "lat": "50.2443",
        "lon": "19.04186",
        "startTime": "9:00",
        "endTime": "23:00",
        "startOffset": 0,
        "endOffset": 0,
        "x": 330,
        "y": 180,
        "wires": [
            [
                "71a20977.6dd878"
            ],
            []
        ]
    },
    {
        "id": "71a20977.6dd878",
        "type": "looptimer",
        "z": "5a0ef976.d066b8",
        "duration": "2",
        "units": "Second",
        "maxloops": "150",
        "maxtimeout": "5",
        "maxtimeoutunits": "Minute",
        "name": "",
        "x": 540,
        "y": 180,
        "wires": [
            [
                "d4065640.9dcd68"
            ],
            []
        ]
    },
    {
        "id": "d4065640.9dcd68",
        "type": "api-current-state",
        "z": "5a0ef976.d066b8",
        "name": "Lock Door Hallway open? ",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "outputs": 2,
        "halt_if": "on",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "override_topic": false,
        "entity_id": "binary_sensor.0x00158d00044b7364_contact",
        "state_type": "str",
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "blockInputOverrides": false,
        "x": 750,
        "y": 180,
        "wires": [
            [
                "5c79544.0d0c6ac",
                "d948f426.b6c828"
            ],
            []
        ]
    },
    {
        "id": "d948f426.b6c828",
        "type": "change",
        "z": "5a0ef976.d066b8",
        "name": "STOP",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "STOP",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 530,
        "y": 320,
        "wires": [
            [
                "71a20977.6dd878"
            ]
        ]
    },
    {
        "id": "5c79544.0d0c6ac",
        "type": "trigger",
        "z": "5a0ef976.d066b8",
        "op1": "",
        "op2": "{\"occupancy\":false}",
        "op1type": "nul",
        "op2type": "json",
        "duration": "5",
        "extend": true,
        "units": "s",
        "reset": "",
        "bytopic": "all",
        "name": "",
        "x": 980,
        "y": 180,
        "wires": [
            [
                "d39bc727.d0e308"
            ]
        ]
    },
    {
        "id": "d39bc727.d0e308",
        "type": "api-call-service",
        "z": "5a0ef976.d066b8",
        "name": "Witaj w domu!",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "debugenabled": false,
        "service_domain": "tts",
        "service": "google_translate_say",
        "entityId": "media_player.mini_hallway",
        "data": "{\"message\":\"Witaj w domu!\",\"language\":\"pl\"}",
        "dataType": "json",
        "mergecontext": "",
        "output_location": "payload",
        "output_location_type": "msg",
        "mustacheAltTags": false,
        "x": 1160,
        "y": 180,
        "wires": [
            []
        ]
    }
]

System

Wszystko oparte mam na Home Assistant i dzięki temu mogę zrobi to co opisuję (tak "rozbudowane" automatyzacje).

W sumie głównie wykorzystuję głośnik Google Home który jest w przedpokoju przy wyjściu. 

Automatyzacje przy wchodzeniu

Pierwszą automatyzacją jak widzieliście jest witanie domowników. Tutaj uproszczone i zrobione bo mogę. Wcześniej były dwa i w zależności kto się logował do sieci to jego witało - przypomniał mi się Powrót do przyszłości gdzie pierwszy raz coś takiego widziałem ;) 

Kolejną jest wchodzenie do mieszkania a jak jest ciemno w przedpokoju to oświeci mi się światło.

[
    {
        "id": "cc0f9ada.0cb3d8",
        "type": "api-call-service",
        "z": "5a0ef976.d066b8",
        "name": "Hallway Light On",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "debugenabled": false,
        "service_domain": "switch",
        "service": "turn_on",
        "entityId": "switch.shelly_shsw_1_59e9b3",
        "data": "",
        "dataType": "json",
        "mergecontext": "",
        "output_location": "",
        "output_location_type": "none",
        "mustacheAltTags": false,
        "x": 930,
        "y": 1700,
        "wires": [
            []
        ]
    },
    {
        "id": "8ee3ea1f.1be668",
        "type": "api-current-state",
        "z": "5a0ef976.d066b8",
        "name": "Illuminance Hallway < 30",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "outputs": 2,
        "halt_if": "30",
        "halt_if_type": "num",
        "halt_if_compare": "lt",
        "override_topic": false,
        "entity_id": "sensor.0x00158d000449923f_illuminance",
        "state_type": "str",
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "blockInputOverrides": false,
        "x": 650,
        "y": 1760,
        "wires": [
            [
                "cc0f9ada.0cb3d8"
            ],
            [
                "837f0dbb.f7e5e"
            ]
        ]
    },
    {
        "id": "837f0dbb.f7e5e",
        "type": "api-current-state",
        "z": "5a0ef976.d066b8",
        "name": "",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "outputs": 2,
        "halt_if": "below_horizon",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "override_topic": false,
        "entity_id": "sun.sun",
        "state_type": "str",
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "blockInputOverrides": false,
        "x": 920,
        "y": 1780,
        "wires": [
            [
                "cc0f9ada.0cb3d8"
            ],
            [
                "d60e0787.b49c18"
            ]
        ]
    },
    {
        "id": "b5f18571.24d6e8",
        "type": "server-state-changed",
        "z": "5a0ef976.d066b8",
        "name": "Lock Door Hallway close? ",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "exposeToHomeAssistant": false,
        "haConfig": [
            {
                "property": "name",
                "value": ""
            },
            {
                "property": "icon",
                "value": ""
            }
        ],
        "entityidfilter": "binary_sensor.0x00158d00044b7364_contact",
        "entityidfiltertype": "exact",
        "outputinitially": false,
        "state_type": "str",
        "haltifstate": "off",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "outputs": 2,
        "output_only_on_state_change": true,
        "x": 370,
        "y": 1680,
        "wires": [
            [],
            [
                "a03add2d.c8623"
            ]
        ]
    },
    {
        "id": "a03add2d.c8623",
        "type": "api-current-state",
        "z": "5a0ef976.d066b8",
        "name": "Hallway motion on?",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "outputs": 2,
        "halt_if": "on",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "override_topic": false,
        "entity_id": "binary_sensor.0x00158d000449923f_occupancy",
        "state_type": "str",
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "blockInputOverrides": false,
        "x": 370,
        "y": 1760,
        "wires": [
            [],
            [
                "8ee3ea1f.1be668"
            ]
        ]
    },
    {
        "id": "d60e0787.b49c18",
        "type": "looptimer",
        "z": "5a0ef976.d066b8",
        "duration": "1",
        "units": "Second",
        "maxloops": "120",
        "maxtimeout": "2",
        "maxtimeoutunits": "Minute",
        "name": "1 sekunda przez 2 minuty",
        "x": 550,
        "y": 1880,
        "wires": [
            [
                "a35b9bab.3b98b8"
            ],
            []
        ]
    },
    {
        "id": "a35b9bab.3b98b8",
        "type": "api-current-state",
        "z": "5a0ef976.d066b8",
        "name": "Hallway motion on?",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "outputs": 2,
        "halt_if": "on",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "override_topic": false,
        "entity_id": "binary_sensor.0x00158d000449923f_occupancy",
        "state_type": "str",
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "blockInputOverrides": false,
        "x": 830,
        "y": 1880,
        "wires": [
            [
                "8ee3ea1f.1be668"
            ],
            []
        ]
    },
    {
        "id": "b3e9b226.7fd0c",
        "type": "server",
        "z": "",
        "name": "Home Assistant"
    }
]

Oczywiście nic nie szkodzi na przeszkodzie abym jak wracał do domu po pracy (mały problem jest taki, że pracuję z domu) to z głośników zaczynała lecieć moja ulubiona muzyka ;) 

Automatyzacje przy wychodzeniu

Przy wychodzeniu jest informacja na głośnik o temperaturze i czy będzie padać oraz jakości powietrza  bazujący na api Airly.

Jeżeli mam zostawione jakieś okno otwarte a będzie padać albo jest zimno to też otrzymam na głośnik taką informację + mail, gdybym go nie usłyszał bo to jest akurat mega ważne. 

Po wyjściu a następnie wylogowaniu z WiFi wyłączają mi się oczywiście wszystkie światła, oczyszczacz, nawilżacz, komputery oraz ogrzewanie - oczywiście ponownie warunek otwarcia drzwi i przez 10 minut sprawdzanie czy telefon się wylogował - głupio było by jak by zerwał połączenie lub się rozładował i wyłączył wszystko w domu... a bym zapomniał o tym, czy zamknąłem zamek też mnie powiadomi ;) 

[
    {
        "id": "b763100b.a171e",
        "type": "api-call-service",
        "z": "5a0ef976.d066b8",
        "name": "Google say",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "debugenabled": false,
        "service_domain": "tts",
        "service": "google_translate_say",
        "entityId": "media_player.mini_hallway",
        "data": "{\"message\":\"Temperatura na zewnątrz to {{payloada}} stopni Celcjusza. {{payloadp}} A zanieczyszczenie powietrza to {{payloadb}}.\",\"language\":\"pl\"}",
        "dataType": "json",
        "mergecontext": "",
        "output_location": "",
        "output_location_type": "none",
        "mustacheAltTags": false,
        "x": 990,
        "y": 980,
        "wires": [
            []
        ]
    },
    {
        "id": "9a6ab6c4.d7ba98",
        "type": "api-current-state",
        "z": "5a0ef976.d066b8",
        "name": "temp",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "outputs": 1,
        "halt_if": "",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "override_topic": false,
        "entity_id": "sensor.weather_tmp",
        "state_type": "str",
        "state_location": "payloada",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "blockInputOverrides": false,
        "x": 350,
        "y": 880,
        "wires": [
            [
                "ff793fe3.405a8"
            ]
        ]
    },
    {
        "id": "ff793fe3.405a8",
        "type": "api-current-state",
        "z": "5a0ef976.d066b8",
        "name": "AQI",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "outputs": 1,
        "halt_if": "",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "override_topic": false,
        "entity_id": "sensor.airly_pm25",
        "state_type": "str",
        "state_location": "payloadb",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "blockInputOverrides": false,
        "x": 470,
        "y": 880,
        "wires": [
            [
                "24941b3.2f8fbe4"
            ]
        ]
    },
    {
        "id": "24941b3.2f8fbe4",
        "type": "api-current-state",
        "z": "5a0ef976.d066b8",
        "name": "Pochmurnie?",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "outputs": 2,
        "halt_if": "cloudy",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "override_topic": false,
        "entity_id": "weather.graniczna",
        "state_type": "str",
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "blockInputOverrides": false,
        "x": 670,
        "y": 780,
        "wires": [
            [
                "2f26af02.2d4a"
            ],
            [
                "7a4c3f21.35d7"
            ]
        ]
    },
    {
        "id": "7a4c3f21.35d7",
        "type": "api-current-state",
        "z": "5a0ef976.d066b8",
        "name": "Deszczowo?",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "outputs": 2,
        "halt_if": "rainy",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "override_topic": false,
        "entity_id": "weather.graniczna",
        "state_type": "str",
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "blockInputOverrides": false,
        "x": 670,
        "y": 860,
        "wires": [
            [
                "6ee7422b.ab484c"
            ],
            [
                "b763100b.a171e"
            ]
        ]
    },
    {
        "id": "2f26af02.2d4a",
        "type": "function",
        "z": "5a0ef976.d066b8",
        "name": "",
        "func": "msg = {\n    payloada : msg.payloada,\n    payloadt : \"Niebo jest zachmurzone.\",\n    payloadb : msg.payloadb\n};\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 870,
        "y": 780,
        "wires": [
            [
                "b763100b.a171e"
            ]
        ]
    },
    {
        "id": "6ee7422b.ab484c",
        "type": "function",
        "z": "5a0ef976.d066b8",
        "name": "",
        "func": "msg = {\n    payloada : msg.payloada,\n    payloadt : \"Może padać.\",\n    payloadb : msg.payloadb\n};\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 830,
        "y": 840,
        "wires": [
            [
                "b763100b.a171e"
            ]
        ]
    },
    {
        "id": "1c66c45.f951c3c",
        "type": "server-state-changed",
        "z": "5a0ef976.d066b8",
        "name": "Lock Door Hallway close? ",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "exposeToHomeAssistant": false,
        "haConfig": [
            {
                "property": "name",
                "value": ""
            },
            {
                "property": "icon",
                "value": ""
            }
        ],
        "entityidfilter": "binary_sensor.0x00158d00044b7364_contact",
        "entityidfiltertype": "exact",
        "outputinitially": false,
        "state_type": "str",
        "haltifstate": "off",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "outputs": 2,
        "output_only_on_state_change": true,
        "x": 170,
        "y": 780,
        "wires": [
            [],
            [
                "a52691ba.0edc3"
            ]
        ]
    },
    {
        "id": "a52691ba.0edc3",
        "type": "api-current-state",
        "z": "5a0ef976.d066b8",
        "name": "Hallway motion on?",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "outputs": 2,
        "halt_if": "on",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "override_topic": false,
        "entity_id": "binary_sensor.0x00158d000449923f_occupancy",
        "state_type": "str",
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "blockInputOverrides": false,
        "x": 150,
        "y": 880,
        "wires": [
            [
                "9a6ab6c4.d7ba98",
                "bd42cfbc.ced6f"
            ],
            []
        ]
    },
    {
        "id": "bd42cfbc.ced6f",
        "type": "api-current-state",
        "z": "5a0ef976.d066b8",
        "name": "Window bedroom Open?",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "outputs": 2,
        "halt_if": "on",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "override_topic": false,
        "entity_id": "binary_sensor.bedroom_window",
        "state_type": "str",
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "blockInputOverrides": false,
        "x": 250,
        "y": 1000,
        "wires": [
            [
                "8845c47e.eacd08"
            ],
            [
                "e3716beb.ce4a28"
            ]
        ]
    },
    {
        "id": "e3716beb.ce4a28",
        "type": "api-current-state",
        "z": "5a0ef976.d066b8",
        "name": "Balcony window open?",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "outputs": 2,
        "halt_if": "on",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "override_topic": false,
        "entity_id": "binary_sensor.balcony_window",
        "state_type": "str",
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "blockInputOverrides": false,
        "x": 380,
        "y": 1060,
        "wires": [
            [
                "8845c47e.eacd08"
            ],
            [
                "d1854fad.48bb2"
            ]
        ]
    },
    {
        "id": "d1854fad.48bb2",
        "type": "api-current-state",
        "z": "5a0ef976.d066b8",
        "name": "Balcony door open?",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "outputs": 2,
        "halt_if": "on",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "override_topic": false,
        "entity_id": "binary_sensor.balcony_door",
        "state_type": "str",
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "blockInputOverrides": false,
        "x": 380,
        "y": 1120,
        "wires": [
            [
                "8845c47e.eacd08"
            ],
            [
                "91d39252.2c284"
            ]
        ]
    },
    {
        "id": "85b69fec.102cb",
        "type": "e-mail",
        "z": "5a0ef976.d066b8",
        "server": "smtp.iq.pl",
        "port": "465",
        "secure": true,
        "tls": true,
        "name": "Ten adres pocztowy jest chroniony przed spamowaniem. Aby go zobaczyć, konieczne jest włączenie w przeglądarce obsługi JavaScript.",
        "dname": "",
        "x": 950,
        "y": 1060,
        "wires": []
    },
    {
        "id": "8845c47e.eacd08",
        "type": "function",
        "z": "5a0ef976.d066b8",
        "name": "",
        "func": "msg = {\n    payload : \"Jedno z okien jest otwarte!\",\n    topic : \"Okno jest dalej otwarte!\"\n};\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 710,
        "y": 1080,
        "wires": [
            [
                "85b69fec.102cb",
                "9b5f0256.62b62"
            ]
        ]
    },
    {
        "id": "91d39252.2c284",
        "type": "api-current-state",
        "z": "5a0ef976.d066b8",
        "name": "Office window open?",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "outputs": 2,
        "halt_if": "on",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "override_topic": false,
        "entity_id": "binary_sensor.office_window",
        "state_type": "str",
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "blockInputOverrides": false,
        "x": 414,
        "y": 1182,
        "wires": [
            [
                "8845c47e.eacd08"
            ],
            []
        ]
    },
    {
        "id": "27c1dfdd.692d9",
        "type": "api-call-service",
        "z": "5a0ef976.d066b8",
        "name": "Google say",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "debugenabled": false,
        "service_domain": "tts",
        "service": "google_translate_say",
        "entityId": "media_player.mini_hallway",
        "data": "{\"message\":\"{{payload}}\",\"language\":\"pl\"}",
        "dataType": "json",
        "mergecontext": "",
        "output_location": "",
        "output_location_type": "none",
        "mustacheAltTags": false,
        "x": 1030,
        "y": 1120,
        "wires": [
            []
        ]
    },
    {
        "id": "9b5f0256.62b62",
        "type": "trigger",
        "z": "5a0ef976.d066b8",
        "op1": "",
        "op2": "",
        "op1type": "nul",
        "op2type": "payl",
        "duration": "10",
        "extend": false,
        "units": "s",
        "reset": "",
        "bytopic": "all",
        "name": "",
        "x": 870,
        "y": 1120,
        "wires": [
            [
                "27c1dfdd.692d9"
            ]
        ]
    },
    {
        "id": "b3e9b226.7fd0c",
        "type": "server",
        "z": "",
        "name": "Home Assistant"
    }
]

Automatyzacje przy braku naszej obecności

Gdy nie ma nikogo z domowników zalogowanego w WiFi i zamek się otworzy to oczywiście otrzymuję powiadomienie na telefon. 

[
    {
        "id": "6eb94779.187888",
        "type": "server-state-changed",
        "z": "af8908f3.ef9e38",
        "name": "Lock Door Hallway close? ",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "exposeToHomeAssistant": false,
        "haConfig": [
            {
                "property": "name",
                "value": ""
            },
            {
                "property": "icon",
                "value": ""
            }
        ],
        "entityidfilter": "binary_sensor.0x00158d00044b7364_contact",
        "entityidfiltertype": "exact",
        "outputinitially": false,
        "state_type": "str",
        "haltifstate": "on",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "outputs": 2,
        "output_only_on_state_change": true,
        "x": 190,
        "y": 600,
        "wires": [
            [
                "57385ace.5de4e4"
            ],
            []
        ]
    },
    {
        "id": "ed8b6fcf.6158e",
        "type": "api-current-state",
        "z": "af8908f3.ef9e38",
        "name": "Lock Door Hallway close? ",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "outputs": 2,
        "halt_if": "on",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "override_topic": false,
        "entity_id": "binary_sensor.0x00158d00044b7364_contact",
        "state_type": "str",
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "blockInputOverrides": false,
        "x": 590,
        "y": 600,
        "wires": [
            [
                "a52a261a.4ffe08"
            ],
            []
        ]
    },
    {
        "id": "57385ace.5de4e4",
        "type": "trigger",
        "z": "af8908f3.ef9e38",
        "op1": "",
        "op2": "",
        "op1type": "nul",
        "op2type": "payl",
        "duration": "5",
        "extend": true,
        "units": "min",
        "reset": "",
        "bytopic": "all",
        "name": "",
        "x": 390,
        "y": 600,
        "wires": [
            [
                "ed8b6fcf.6158e"
            ]
        ]
    },
    {
        "id": "82bf21f4.ef8df",
        "type": "api-call-service",
        "z": "af8908f3.ef9e38",
        "name": "Zamek w drzwiach...",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "debugenabled": false,
        "service_domain": "tts",
        "service": "google_translate_say",
        "entityId": "media_player.mini_hallway",
        "data": "{\"message\":\"Zamek w drzwiach wejściowych dalej otwarty!\",\"language\":\"pl\"}",
        "dataType": "json",
        "mergecontext": "",
        "output_location": "payload",
        "output_location_type": "msg",
        "mustacheAltTags": false,
        "x": 1020,
        "y": 600,
        "wires": [
            [
                "a2706f29.cc3e4"
            ]
        ]
    },
    {
        "id": "c963c44e.3ecce8",
        "type": "server-state-changed",
        "z": "af8908f3.ef9e38",
        "name": "Awesome w domu",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "exposeToHomeAssistant": false,
        "haConfig": [
            {
                "property": "name",
                "value": ""
            },
            {
                "property": "icon",
                "value": ""
            }
        ],
        "entityidfilter": "group.awesome_people",
        "entityidfiltertype": "exact",
        "outputinitially": false,
        "state_type": "str",
        "haltifstate": "home",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "outputs": 2,
        "output_only_on_state_change": true,
        "x": 170,
        "y": 360,
        "wires": [
            [],
            [
                "50faca3f.514f54"
            ]
        ]
    },
    {
        "id": "50faca3f.514f54",
        "type": "trigger",
        "z": "af8908f3.ef9e38",
        "op1": "",
        "op2": "",
        "op1type": "nul",
        "op2type": "payl",
        "duration": "5",
        "extend": true,
        "units": "min",
        "reset": "",
        "bytopic": "all",
        "name": "",
        "x": 390,
        "y": 360,
        "wires": [
            [
                "e2551bfc.564ca8"
            ]
        ]
    },
    {
        "id": "e2551bfc.564ca8",
        "type": "api-current-state",
        "z": "af8908f3.ef9e38",
        "name": "Awesome w domu?",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "outputs": 2,
        "halt_if": "home",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "override_topic": false,
        "entity_id": "group.awesome_people",
        "state_type": "str",
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "blockInputOverrides": false,
        "x": 570,
        "y": 360,
        "wires": [
            [],
            [
                "39a3f3d9.572c8c"
            ]
        ]
    },
    {
        "id": "4512b0fb.4688a",
        "type": "function",
        "z": "af8908f3.ef9e38",
        "name": "",
        "func": "msg = {\n    payload : \"Jak to tak, co to ma być?\",\n    topic : \"Nikogo w domu a zamek otwarty!\"\n};\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 1030,
        "y": 360,
        "wires": [
            [
                "1916726d.2dad6e"
            ]
        ]
    },
    {
        "id": "39a3f3d9.572c8c",
        "type": "api-current-state",
        "z": "af8908f3.ef9e38",
        "name": "Lock Door Hallway close? ",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "outputs": 2,
        "halt_if": "on",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "override_topic": false,
        "entity_id": "binary_sensor.0x00158d00044b7364_contact",
        "state_type": "str",
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "blockInputOverrides": false,
        "x": 830,
        "y": 360,
        "wires": [
            [
                "4512b0fb.4688a"
            ],
            []
        ]
    },
    {
        "id": "1916726d.2dad6e",
        "type": "e-mail",
        "z": "af8908f3.ef9e38",
        "server": "smtp.iq.pl",
        "port": "465",
        "secure": true,
        "tls": true,
        "name": "Ten adres pocztowy jest chroniony przed spamowaniem. Aby go zobaczyć, konieczne jest włączenie w przeglądarce obsługi JavaScript.",
        "dname": "",
        "x": 1030,
        "y": 480,
        "wires": []
    },
    {
        "id": "a2706f29.cc3e4",
        "type": "function",
        "z": "af8908f3.ef9e38",
        "name": "",
        "func": "msg = {\n    payload : \"Jak to tak, co to ma być? Wstań i go zamknij ale to już!\",\n    topic : \"Zamek w drzwiach wejściowych dalej otwarty!\"\n};\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 1190,
        "y": 600,
        "wires": [
            [
                "1916726d.2dad6e"
            ]
        ]
    },
    {
        "id": "a52a261a.4ffe08",
        "type": "api-current-state",
        "z": "af8908f3.ef9e38",
        "name": "Awesome w domu?",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "outputs": 2,
        "halt_if": "home",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "override_topic": false,
        "entity_id": "group.awesome_people",
        "state_type": "str",
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "blockInputOverrides": false,
        "x": 810,
        "y": 600,
        "wires": [
            [
                "82bf21f4.ef8df"
            ],
            []
        ]
    },
    {
        "id": "b01f253d.bbe048",
        "type": "server-state-changed",
        "z": "af8908f3.ef9e38",
        "name": "Wather Bathroom",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "exposeToHomeAssistant": false,
        "haConfig": [
            {
                "property": "name",
                "value": ""
            },
            {
                "property": "icon",
                "value": ""
            }
        ],
        "entityidfilter": "binary_sensor.0x00158d0002478b53_water_leak",
        "entityidfiltertype": "exact",
        "outputinitially": false,
        "state_type": "str",
        "haltifstate": "on",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "outputs": 2,
        "output_only_on_state_change": true,
        "x": 160,
        "y": 480,
        "wires": [
            [
                "2ec366c3.7f47da"
            ],
            []
        ]
    },
    {
        "id": "433b53e9.913eac",
        "type": "function",
        "z": "af8908f3.ef9e38",
        "name": "",
        "func": "msg = {\n    payload : \"Zrób coś z tym szybko!\",\n    topic : \"Woda w łazience!\"\n};\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 530,
        "y": 500,
        "wires": [
            [
                "1916726d.2dad6e"
            ]
        ]
    },
    {
        "id": "168649ab.0580c6",
        "type": "api-call-service",
        "z": "af8908f3.ef9e38",
        "name": "Woda w łazience! ",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "debugenabled": false,
        "service_domain": "tts",
        "service": "google_translate_say",
        "entityId": "media_player.mini_hallway",
        "data": "{\"message\":\"Woda w łazience!\",\"language\":\"pl\"}",
        "dataType": "json",
        "mergecontext": "",
        "output_location": "payload",
        "output_location_type": "msg",
        "mustacheAltTags": false,
        "x": 570,
        "y": 440,
        "wires": [
            []
        ]
    },
    {
        "id": "2ec366c3.7f47da",
        "type": "looptimer",
        "z": "af8908f3.ef9e38",
        "duration": "10",
        "units": "Second",
        "maxloops": "4",
        "maxtimeout": "2",
        "maxtimeoutunits": "Minute",
        "name": "4x",
        "x": 350,
        "y": 480,
        "wires": [
            [
                "168649ab.0580c6"
            ],
            [
                "433b53e9.913eac"
            ]
        ]
    },
    {
        "id": "b3e9b226.7fd0c",
        "type": "server",
        "z": "",
        "name": "Home Assistant"
    }
]

 

Mam jeszcze czujnik wibracji od Aqara (recenzję wrzucę na dniach). Jeżeli on wykryje wibracje na drzwiach to też otrzymam powiadomienie a głośnik zacznie szczekać - bo czemu nie.  Jak to zrobiłem? Przeczytasz tutaj: Alarm szczekający pies 

A jakie są Wasze automatyzacje przy wchodzeniu/wychodzeniu z domu? 

 


Chcesz wiedzieć więcej? Dołącz do naszej grupy na FB - będzie nam też miło jak polubisz nasz Fanpage!