Automatyzacja rolet na podstawie natężenia światła i temperatury

Automatyzacja rolet na podstawie natężenia światła i temperatury

Praca z domu i zmieniające się ciągle warunki atmosferyczne? Raz za ciemno, raz za jasno. To za gorąco, to znowu wieczór a rolety dalej spuszczone - ile można wstawać i ciągle coś poprawiać, przecież tak się żyć nie da ;) Czas coś z tym zrobić w wydaniu smart!

To będzie jeden z tych szybkich artykułów jak sobie z tym poradzić i konkrety przykład, który cały czas udoskonalam.

Idea

Na początku musiałem sobie zobrazować jak automatyzacja ma działać. Pokój jest od zachodu pomiędzy słońcem a moimi oknami mamy blok, czyli słońce zachodzi za blokiem.

  1. Rano żaluzje się otwierają po wejściu do pokoju.
  2. Jak jest średnio dużo słońca to żaluzje lekko w dół, tak abym widział tylko bloki a nie niebo.
  3. Jak jest dużo słońca żaluzje w dół, tak abym widział tylko małą szparkę słońca.
  4. Jak słońce zajdzie już za blok to żaluzje w górę.
  5. Jak słońce zachodzi całkowicie to żaluzje w dół (10% otwarcia).

Co potrzebujemy?

  1. Sterowanie żaluzjami, ja używam tego: Tuya Zigbee Moes AM43 
  2. Czujnik natężenia światła, ja używam tego: Xiaomi Aqara Mija Zigbee 
  3. Czujni temperatury, ja używam tego: Xiomi Aqara Zigbee 
  4. Pilot do sterowania ręcznego, ja preferuję ten: Aqara Opple Zigbee 
  5. Czujnik ruchu, ja preferuję te: Xiaomi Aqara Zigbee 

Oczywiście wszystko złączone w jedno przez Home Assistant. A czujnik temperatury jest wystawiony na zewnątrz, wsadzony w domek

Przykład graficzny 

Cała automatyzacja rozpisana w NodeRED

 

Przykład do skopiowania

Wystarczy wkleić w NodeRED i dostosować.

[
    {
        "id": "644d10a9.8d203",
        "type": "server-state-changed",
        "z": "150a1916.ccd1e7",
        "name": "3_double (prawy górny)",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "exposeToHomeAssistant": false,
        "haConfig": [
            {
                "property": "name",
                "value": ""
            },
            {
                "property": "icon",
                "value": ""
            }
        ],
        "entityidfilter": "sensor.0x5c0272fffed9c1bb_action",
        "entityidfiltertype": "exact",
        "outputinitially": false,
        "state_type": "str",
        "haltifstate": "3_double",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "outputs": 2,
        "output_only_on_state_change": true,
        "for": "",
        "forType": "num",
        "forUnits": "minutes",
        "ignorePrevStateNull": false,
        "ignorePrevStateUnknown": false,
        "ignorePrevStateUnavailable": false,
        "ignoreCurrentStateUnknown": false,
        "ignoreCurrentStateUnavailable": false,
        "x": 140,
        "y": 2840,
        "wires": [
            [
                "bed29798.73fe98"
            ],
            []
        ]
    },
    {
        "id": "80c4a49e.b31a38",
        "type": "server-state-changed",
        "z": "150a1916.ccd1e7",
        "name": "2_double (prawy dolny)",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "exposeToHomeAssistant": false,
        "haConfig": [
            {
                "property": "name",
                "value": ""
            },
            {
                "property": "icon",
                "value": ""
            }
        ],
        "entityidfilter": "sensor.0x5c0272fffed9c1bb_action",
        "entityidfiltertype": "exact",
        "outputinitially": false,
        "state_type": "str",
        "haltifstate": "2_double",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "outputs": 2,
        "output_only_on_state_change": true,
        "for": "",
        "forType": "num",
        "forUnits": "minutes",
        "ignorePrevStateNull": false,
        "ignorePrevStateUnknown": false,
        "ignorePrevStateUnavailable": false,
        "ignoreCurrentStateUnknown": false,
        "ignoreCurrentStateUnavailable": false,
        "x": 140,
        "y": 2900,
        "wires": [
            [
                "a253cf5c.d5929"
            ],
            []
        ]
    },
    {
        "id": "2e2adf96.1808a",
        "type": "api-call-service",
        "z": "150a1916.ccd1e7",
        "name": "Cover Open",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "debugenabled": false,
        "service_domain": "cover",
        "service": "open_cover",
        "entityId": "cover.0x847127fffe1a9b11, cover.0x847127fffe0b6e16",
        "data": "",
        "dataType": "json",
        "mergecontext": "",
        "output_location": "",
        "output_location_type": "none",
        "mustacheAltTags": false,
        "x": 370,
        "y": 2720,
        "wires": [
            []
        ]
    },
    {
        "id": "ca955cc9.2c4c1",
        "type": "api-call-service",
        "z": "150a1916.ccd1e7",
        "name": "Cover Close",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "debugenabled": false,
        "service_domain": "cover",
        "service": "close_cover",
        "entityId": "cover.0x847127fffe0b6e16, cover.0x847127fffe1a9b11",
        "data": "",
        "dataType": "json",
        "mergecontext": "",
        "output_location": "",
        "output_location_type": "none",
        "mustacheAltTags": false,
        "x": 370,
        "y": 2780,
        "wires": [
            []
        ]
    },
    {
        "id": "11c13feb.ebdc7",
        "type": "api-call-service",
        "z": "150a1916.ccd1e7",
        "name": "Cover Stop",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "debugenabled": false,
        "service_domain": "cover",
        "service": "stop_cover",
        "entityId": "cover.0x847127fffe1a9b11, cover.0x847127fffe0b6e16",
        "data": "",
        "dataType": "json",
        "mergecontext": "",
        "output_location": "",
        "output_location_type": "none",
        "mustacheAltTags": false,
        "x": 710,
        "y": 2740,
        "wires": [
            []
        ]
    },
    {
        "id": "8ff56e2d.aa70e",
        "type": "server-state-changed",
        "z": "150a1916.ccd1e7",
        "name": "3_single",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "exposeToHomeAssistant": false,
        "haConfig": [
            {
                "property": "name",
                "value": ""
            },
            {
                "property": "icon",
                "value": ""
            }
        ],
        "entityidfilter": "sensor.0x5c0272fffed9c1bb_action",
        "entityidfiltertype": "exact",
        "outputinitially": false,
        "state_type": "str",
        "haltifstate": "3_single",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "outputs": 2,
        "output_only_on_state_change": true,
        "for": "",
        "forType": "num",
        "forUnits": "minutes",
        "ignorePrevStateNull": false,
        "ignorePrevStateUnknown": false,
        "ignorePrevStateUnavailable": false,
        "ignoreCurrentStateUnknown": false,
        "ignoreCurrentStateUnavailable": false,
        "x": 520,
        "y": 2720,
        "wires": [
            [
                "11c13feb.ebdc7"
            ],
            []
        ]
    },
    {
        "id": "1fc6f17.0e8860f",
        "type": "server-state-changed",
        "z": "150a1916.ccd1e7",
        "name": "2_single",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "exposeToHomeAssistant": false,
        "haConfig": [
            {
                "property": "name",
                "value": ""
            },
            {
                "property": "icon",
                "value": ""
            }
        ],
        "entityidfilter": "sensor.0x5c0272fffed9c1bb_action",
        "entityidfiltertype": "exact",
        "outputinitially": false,
        "state_type": "str",
        "haltifstate": "2_single",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "outputs": 2,
        "output_only_on_state_change": true,
        "for": "",
        "forType": "num",
        "forUnits": "minutes",
        "ignorePrevStateNull": false,
        "ignorePrevStateUnknown": false,
        "ignorePrevStateUnavailable": false,
        "ignoreCurrentStateUnknown": false,
        "ignoreCurrentStateUnavailable": false,
        "x": 520,
        "y": 2780,
        "wires": [
            [
                "11c13feb.ebdc7"
            ],
            []
        ]
    },
    {
        "id": "ed4c421b.0588e",
        "type": "server-state-changed",
        "z": "150a1916.ccd1e7",
        "name": "2_hold (prawy dolny)",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "exposeToHomeAssistant": false,
        "haConfig": [
            {
                "property": "name",
                "value": ""
            },
            {
                "property": "icon",
                "value": ""
            }
        ],
        "entityidfilter": "sensor.0x5c0272fffed9c1bb_action",
        "entityidfiltertype": "exact",
        "outputinitially": false,
        "state_type": "str",
        "haltifstate": "2_hold",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "outputs": 2,
        "output_only_on_state_change": true,
        "for": "",
        "forType": "num",
        "forUnits": "minutes",
        "ignorePrevStateNull": false,
        "ignorePrevStateUnknown": false,
        "ignorePrevStateUnavailable": false,
        "ignoreCurrentStateUnknown": false,
        "ignoreCurrentStateUnavailable": false,
        "x": 130,
        "y": 2780,
        "wires": [
            [
                "ca955cc9.2c4c1"
            ],
            []
        ]
    },
    {
        "id": "3a618758.427a08",
        "type": "server-state-changed",
        "z": "150a1916.ccd1e7",
        "name": "3_hold (prawy górny)",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "exposeToHomeAssistant": false,
        "haConfig": [
            {
                "property": "name",
                "value": ""
            },
            {
                "property": "icon",
                "value": ""
            }
        ],
        "entityidfilter": "sensor.0x5c0272fffed9c1bb_action",
        "entityidfiltertype": "exact",
        "outputinitially": false,
        "state_type": "str",
        "haltifstate": "3_hold",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "outputs": 2,
        "output_only_on_state_change": true,
        "for": "",
        "forType": "num",
        "forUnits": "minutes",
        "ignorePrevStateNull": false,
        "ignorePrevStateUnknown": false,
        "ignorePrevStateUnavailable": false,
        "ignoreCurrentStateUnknown": false,
        "ignoreCurrentStateUnavailable": false,
        "x": 140,
        "y": 2720,
        "wires": [
            [
                "2e2adf96.1808a"
            ],
            []
        ]
    },
    {
        "id": "a253cf5c.d5929",
        "type": "api-call-service",
        "z": "150a1916.ccd1e7",
        "name": "Cover S set 62",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "debugenabled": false,
        "service_domain": "cover",
        "service": "set_cover_position",
        "entityId": "cover.0x847127fffe1a9b11",
        "data": "{\"position\":57}",
        "dataType": "json",
        "mergecontext": "",
        "output_location": "",
        "output_location_type": "none",
        "mustacheAltTags": false,
        "x": 580,
        "y": 2900,
        "wires": [
            [
                "c35d2ab4.441698"
            ]
        ]
    },
    {
        "id": "5df02d8c.266334",
        "type": "api-call-service",
        "z": "150a1916.ccd1e7",
        "name": "Cover B set 40",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "debugenabled": false,
        "service_domain": "cover",
        "service": "set_cover_position",
        "entityId": "cover.0x847127fffe0b6e16",
        "data": "{\"position\":36}",
        "dataType": "json",
        "mergecontext": "",
        "output_location": "",
        "output_location_type": "none",
        "mustacheAltTags": false,
        "x": 940,
        "y": 2900,
        "wires": [
            []
        ]
    },
    {
        "id": "872626bc.2c4da8",
        "type": "server-state-changed",
        "z": "150a1916.ccd1e7",
        "name": "Sun below horizon",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "exposeToHomeAssistant": false,
        "haConfig": [
            {
                "property": "name",
                "value": ""
            },
            {
                "property": "icon",
                "value": ""
            }
        ],
        "entityidfilter": "sun.sun",
        "entityidfiltertype": "exact",
        "outputinitially": false,
        "state_type": "str",
        "haltifstate": "below_horizon",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "outputs": 2,
        "output_only_on_state_change": true,
        "x": 130,
        "y": 2960,
        "wires": [
            [
                "a4c73a73.467b08"
            ],
            []
        ]
    },
    {
        "id": "57ad6238.7b6e6c",
        "type": "server-state-changed",
        "z": "150a1916.ccd1e7",
        "name": "Sun above horizon",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "exposeToHomeAssistant": false,
        "haConfig": [
            {
                "property": "name",
                "value": ""
            },
            {
                "property": "icon",
                "value": ""
            }
        ],
        "entityidfilter": "sun.sun",
        "entityidfiltertype": "exact",
        "outputinitially": false,
        "state_type": "str",
        "haltifstate": "above_horizon",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "outputs": 2,
        "output_only_on_state_change": true,
        "x": 130,
        "y": 2480,
        "wires": [
            [
                "a9a473c6.8f49f"
            ],
            []
        ]
    },
    {
        "id": "a9a473c6.8f49f",
        "type": "ha-wait-until",
        "z": "150a1916.ccd1e7",
        "name": "Sonoff moition on",
        "server": "b3e9b226.7fd0c",
        "outputs": 2,
        "entityId": "binary_sensor.0x00124b001cd60ca8_occupancy",
        "entityIdFilterType": "exact",
        "property": "state",
        "comparator": "is",
        "value": "on",
        "valueType": "str",
        "timeout": "8",
        "timeoutType": "num",
        "timeoutUnits": "hours",
        "entityLocation": "",
        "entityLocationType": "none",
        "checkCurrentState": true,
        "blockInputOverrides": true,
        "x": 370,
        "y": 2460,
        "wires": [
            [
                "5f4e893a.ff9a58"
            ],
            []
        ]
    },
    {
        "id": "5f6177d8.40da78",
        "type": "api-current-state",
        "z": "150a1916.ccd1e7",
        "name": "Sun above_horizon",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "outputs": 2,
        "halt_if": "above_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": 690,
        "y": 2400,
        "wires": [
            [
                "bed29798.73fe98"
            ],
            []
        ]
    },
    {
        "id": "a4c73a73.467b08",
        "type": "trigger",
        "z": "150a1916.ccd1e7",
        "name": "",
        "op1": "",
        "op2": "",
        "op1type": "nul",
        "op2type": "payl",
        "duration": "15",
        "extend": true,
        "units": "min",
        "reset": "",
        "bytopic": "all",
        "outputs": 1,
        "x": 330,
        "y": 2960,
        "wires": [
            [
                "f9abf641.ee9168"
            ]
        ]
    },
    {
        "id": "f9abf641.ee9168",
        "type": "api-call-service",
        "z": "150a1916.ccd1e7",
        "name": "Cover S set 10",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "debugenabled": false,
        "service_domain": "cover",
        "service": "set_cover_position",
        "entityId": "cover.0x847127fffe1a9b11",
        "data": "{\"position\":10}",
        "dataType": "json",
        "mergecontext": "",
        "output_location": "",
        "output_location_type": "none",
        "mustacheAltTags": false,
        "x": 520,
        "y": 2960,
        "wires": [
            [
                "e9b362f6.a8cf3"
            ]
        ]
    },
    {
        "id": "3643eb65.ab7e74",
        "type": "api-call-service",
        "z": "150a1916.ccd1e7",
        "name": "Cover B set 10",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "debugenabled": false,
        "service_domain": "cover",
        "service": "set_cover_position",
        "entityId": "cover.0x847127fffe0b6e16",
        "data": "{\"position\":10}",
        "dataType": "json",
        "mergecontext": "",
        "output_location": "",
        "output_location_type": "none",
        "mustacheAltTags": false,
        "x": 880,
        "y": 2960,
        "wires": [
            []
        ]
    },
    {
        "id": "bed29798.73fe98",
        "type": "api-call-service",
        "z": "150a1916.ccd1e7",
        "name": "Cover S set 80",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "debugenabled": false,
        "service_domain": "cover",
        "service": "set_cover_position",
        "entityId": "cover.0x847127fffe1a9b11",
        "data": "{\"position\":80}",
        "dataType": "json",
        "mergecontext": "",
        "output_location": "",
        "output_location_type": "none",
        "mustacheAltTags": false,
        "x": 920,
        "y": 2400,
        "wires": [
            [
                "2515a447.cf02bc"
            ]
        ]
    },
    {
        "id": "8b5675b0.e25ae8",
        "type": "api-call-service",
        "z": "150a1916.ccd1e7",
        "name": "Cover B set 57",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "debugenabled": false,
        "service_domain": "cover",
        "service": "set_cover_position",
        "entityId": "cover.0x847127fffe0b6e16",
        "data": "{\"position\":57}",
        "dataType": "json",
        "mergecontext": "",
        "output_location": "",
        "output_location_type": "none",
        "mustacheAltTags": false,
        "x": 1240,
        "y": 2400,
        "wires": [
            []
        ]
    },
    {
        "id": "449a1c11.1a1024",
        "type": "server-state-changed",
        "z": "150a1916.ccd1e7",
        "name": "Bedroom Greg Button LONG",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "exposeToHomeAssistant": false,
        "haConfig": [
            {
                "property": "name",
                "value": ""
            },
            {
                "property": "icon",
                "value": ""
            }
        ],
        "entityidfilter": "sensor.0x00158d000403e1e1_click",
        "entityidfiltertype": "exact",
        "outputinitially": false,
        "state_type": "str",
        "haltifstate": "long",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "outputs": 2,
        "output_only_on_state_change": true,
        "for": "",
        "forType": "num",
        "forUnits": "minutes",
        "ignorePrevStateNull": false,
        "ignorePrevStateUnknown": false,
        "ignorePrevStateUnavailable": false,
        "ignoreCurrentStateUnknown": false,
        "ignoreCurrentStateUnavailable": false,
        "x": 160,
        "y": 2380,
        "wires": [
            [
                "5f6177d8.40da78"
            ],
            []
        ]
    },
    {
        "id": "e1e4c866.05b928",
        "type": "server-state-changed",
        "z": "150a1916.ccd1e7",
        "name": "Bedroom Kate Button LONG",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "exposeToHomeAssistant": false,
        "haConfig": [
            {
                "property": "name",
                "value": ""
            },
            {
                "property": "icon",
                "value": ""
            }
        ],
        "entityidfilter": "sensor.0x00158d0003d18c0b_click",
        "entityidfiltertype": "exact",
        "outputinitially": false,
        "state_type": "str",
        "haltifstate": "long",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "outputs": 2,
        "output_only_on_state_change": true,
        "for": "",
        "forType": "num",
        "forUnits": "minutes",
        "ignorePrevStateNull": false,
        "ignorePrevStateUnknown": false,
        "ignorePrevStateUnavailable": false,
        "ignoreCurrentStateUnknown": false,
        "ignoreCurrentStateUnavailable": false,
        "x": 160,
        "y": 2420,
        "wires": [
            [
                "5f6177d8.40da78"
            ],
            []
        ]
    },
    {
        "id": "a5cfdf6d.94cbe",
        "type": "server-state-changed",
        "z": "150a1916.ccd1e7",
        "name": "Lux Office < 5,5k",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "exposeToHomeAssistant": false,
        "haConfig": [
            {
                "property": "name",
                "value": ""
            },
            {
                "property": "icon",
                "value": ""
            }
        ],
        "entityidfilter": "sensor.0x54ef4410000c1aa8_illuminance_lux",
        "entityidfiltertype": "exact",
        "outputinitially": false,
        "state_type": "str",
        "haltifstate": "5500",
        "halt_if_type": "num",
        "halt_if_compare": "lt",
        "outputs": 2,
        "output_only_on_state_change": true,
        "for": "5",
        "forType": "num",
        "forUnits": "minutes",
        "ignorePrevStateNull": false,
        "ignorePrevStateUnknown": false,
        "ignorePrevStateUnavailable": false,
        "ignoreCurrentStateUnknown": false,
        "ignoreCurrentStateUnavailable": false,
        "x": 120,
        "y": 2540,
        "wires": [
            [
                "a9a473c6.8f49f",
                "f2eb3bf7.925838"
            ],
            []
        ]
    },
    {
        "id": "732ba6ca.cab178",
        "type": "api-current-state",
        "z": "150a1916.ccd1e7",
        "name": "Balcony temperature > 24",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "outputs": 2,
        "halt_if": "24",
        "halt_if_type": "num",
        "halt_if_compare": "gt",
        "override_topic": false,
        "entity_id": "sensor.0x00158d00044b336a_temperature",
        "state_type": "str",
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "blockInputOverrides": false,
        "x": 390,
        "y": 2580,
        "wires": [
            [
                "66da5f59.8fe77"
            ],
            [
                "a253cf5c.d5929"
            ]
        ]
    },
    {
        "id": "66da5f59.8fe77",
        "type": "api-call-service",
        "z": "150a1916.ccd1e7",
        "name": "Cover S set 10",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "debugenabled": false,
        "service_domain": "cover",
        "service": "set_cover_position",
        "entityId": "cover.0x847127fffe1a9b11",
        "data": "{\"position\":10}",
        "dataType": "json",
        "mergecontext": "",
        "output_location": "",
        "output_location_type": "none",
        "mustacheAltTags": false,
        "x": 620,
        "y": 2560,
        "wires": [
            [
                "e44fdd50.15a82"
            ]
        ]
    },
    {
        "id": "611f194e.6c6328",
        "type": "api-call-service",
        "z": "150a1916.ccd1e7",
        "name": "Cover B set 0",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "debugenabled": false,
        "service_domain": "cover",
        "service": "set_cover_position",
        "entityId": "cover.0x847127fffe0b6e16",
        "data": "{\"position\":0}",
        "dataType": "json",
        "mergecontext": "",
        "output_location": "",
        "output_location_type": "none",
        "mustacheAltTags": false,
        "x": 940,
        "y": 2560,
        "wires": [
            []
        ]
    },
    {
        "id": "bc894fea.40562",
        "type": "inject",
        "z": "150a1916.ccd1e7",
        "name": "",
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 120,
        "y": 2660,
        "wires": [
            [
                "732ba6ca.cab178"
            ]
        ]
    },
    {
        "id": "5f4e893a.ff9a58",
        "type": "api-current-state",
        "z": "150a1916.ccd1e7",
        "name": "Lux Office < 5500",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "outputs": 2,
        "halt_if": "5500",
        "halt_if_type": "num",
        "halt_if_compare": "lt",
        "override_topic": false,
        "entity_id": "sensor.0x54ef4410000c1aa8_illuminance_lux",
        "state_type": "str",
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "blockInputOverrides": false,
        "x": 630,
        "y": 2480,
        "wires": [
            [
                "5f6177d8.40da78"
            ],
            []
        ]
    },
    {
        "id": "2515a447.cf02bc",
        "type": "trigger",
        "z": "150a1916.ccd1e7",
        "name": "",
        "op1": "",
        "op2": "",
        "op1type": "nul",
        "op2type": "payl",
        "duration": "1",
        "extend": true,
        "overrideDelay": false,
        "units": "s",
        "reset": "",
        "bytopic": "all",
        "topic": "topic",
        "outputs": 1,
        "x": 1080,
        "y": 2400,
        "wires": [
            [
                "8b5675b0.e25ae8"
            ]
        ]
    },
    {
        "id": "e44fdd50.15a82",
        "type": "trigger",
        "z": "150a1916.ccd1e7",
        "name": "",
        "op1": "",
        "op2": "",
        "op1type": "nul",
        "op2type": "payl",
        "duration": "1",
        "extend": true,
        "overrideDelay": false,
        "units": "s",
        "reset": "",
        "bytopic": "all",
        "topic": "topic",
        "outputs": 1,
        "x": 780,
        "y": 2560,
        "wires": [
            [
                "611f194e.6c6328"
            ]
        ]
    },
    {
        "id": "e9b362f6.a8cf3",
        "type": "trigger",
        "z": "150a1916.ccd1e7",
        "name": "",
        "op1": "",
        "op2": "",
        "op1type": "nul",
        "op2type": "payl",
        "duration": "1",
        "extend": true,
        "overrideDelay": false,
        "units": "s",
        "reset": "",
        "bytopic": "all",
        "topic": "topic",
        "outputs": 1,
        "x": 700,
        "y": 2960,
        "wires": [
            [
                "3643eb65.ab7e74"
            ]
        ]
    },
    {
        "id": "f2eb3bf7.925838",
        "type": "api-current-state",
        "z": "150a1916.ccd1e7",
        "name": "Computer On? ",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "outputs": 2,
        "halt_if": "on",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "override_topic": false,
        "entity_id": "switch.office_computer",
        "state_type": "str",
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "blockInputOverrides": false,
        "x": 360,
        "y": 2520,
        "wires": [
            [
                "5f4e893a.ff9a58"
            ],
            []
        ]
    },
    {
        "id": "df7e205c.4a2ee",
        "type": "server-state-changed",
        "z": "150a1916.ccd1e7",
        "name": "Lux Office > 15kk",
        "server": "b3e9b226.7fd0c",
        "version": 1,
        "exposeToHomeAssistant": false,
        "haConfig": [
            {
                "property": "name",
                "value": ""
            },
            {
                "property": "icon",
                "value": ""
            }
        ],
        "entityidfilter": "sensor.0x54ef4410000c1aa8_illuminance_lux",
        "entityidfiltertype": "exact",
        "outputinitially": false,
        "state_type": "str",
        "haltifstate": "15000",
        "halt_if_type": "num",
        "halt_if_compare": "gt",
        "outputs": 2,
        "output_only_on_state_change": true,
        "for": "5",
        "forType": "num",
        "forUnits": "minutes",
        "ignorePrevStateNull": false,
        "ignorePrevStateUnknown": false,
        "ignorePrevStateUnavailable": false,
        "ignoreCurrentStateUnknown": false,
        "ignoreCurrentStateUnavailable": false,
        "x": 120,
        "y": 2600,
        "wires": [
            [
                "732ba6ca.cab178"
            ],
            []
        ]
    },
    {
        "id": "c35d2ab4.441698",
        "type": "trigger",
        "z": "150a1916.ccd1e7",
        "name": "",
        "op1": "",
        "op2": "",
        "op1type": "nul",
        "op2type": "payl",
        "duration": "1",
        "extend": true,
        "overrideDelay": false,
        "units": "s",
        "reset": "",
        "bytopic": "all",
        "topic": "topic",
        "outputs": 1,
        "x": 760,
        "y": 2900,
        "wires": [
            [
                "5df02d8c.266334"
            ]
        ]
    }
]

Podsumowanie

Jak widzicie nie jest to ani jakoś wielce skomplikowane, no może na początku ;) Ale z czasem dodając coraz więcej to mocno to upraszczamy i działa naprawdę świetnie! 

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

Czujnik ruchu, obecności i upadku Tuya (mm doppler radar) Zigbee MIR-HE200-TY_fall 230V

Od: 403 zł 668 zł | Powiadom gdy cena spadnie

Prawdziwy czujnik obecności, który w porównaniu z czujnikami PIR używa do rozpoznawania obecności (również statycznej) millimeter wave Doppler Radar, dzięki czemu jest w stanie stwierdzić obecność nawet jak siedzimy na tronie. Jest to najlepszy czujnik obecności jaki testowałem!

Dziwi brak reklam? Przeczytaj dlaczego i wesprzyj bloga na  lub