UNPKG

node-red-contrib-chronos

Version:

Time-based Node-RED scheduling, repeating, queueing, routing, filtering and manipulating nodes

140 lines (139 loc) 4 kB
[ { "id": "671609705841dfab", "type": "tab", "label": "Five states", "disabled": false, "info": "", "env": [] }, { "id": "04b2823017743f50", "type": "comment", "z": "671609705841dfab", "name": "", "info": "# Five states\nState node that is configured with five states and no conditions.\n1. First state with string value \"MORNING\" is activated at 08:00.\n2. Second state with string value \"NOON\" is activated at 12:00.\n3. Third state with string value \"AFTERNOON\" is activated at 13:00.\n4. Fourth state with string value \"EVENING\" is activated at 18:00.\n5. Fifth state with string value \"NIGHT\" is activated at 23:00.\n6. Initial state value is sent to the output port when node starts.", "x": 120, "y": 60, "wires": [] }, { "id": "c2900ff315be9284", "type": "chronos-state", "z": "671609705841dfab", "name": "", "config": "5e581578.25c88c", "outputValue": "payload", "outputType": "msg", "states": [ { "trigger": { "type": "time", "value": "8:00", "offset": 0, "random": false }, "state": { "type": "str", "value": "MORNING" } }, { "trigger": { "type": "time", "value": "12:00", "offset": 0, "random": false }, "state": { "type": "str", "value": "NOON" } }, { "trigger": { "type": "time", "value": "13:00", "offset": 0, "random": false }, "state": { "type": "str", "value": "AFTERNOON" } }, { "trigger": { "type": "time", "value": "18:00", "offset": 0, "random": false }, "state": { "type": "str", "value": "EVENING" } }, { "trigger": { "type": "time", "value": "23:00", "offset": 0, "random": false }, "state": { "type": "str", "value": "NIGHT" } } ], "conditions": [], "evaluation": "", "evaluationType": "and", "outputOnStart": true, "outputOnStartDelay": 0.1, "passiveMode": false, "x": 170, "y": 140, "wires": [ [ "ff49410550fef9fa" ] ] }, { "id": "ff49410550fef9fa", "type": "debug", "z": "671609705841dfab", "name": "state value", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 340, "y": 140, "wires": [] }, { "id": "5e581578.25c88c", "type": "chronos-config", "name": "Berlin", "timezone": "", "sunPositions": [ { "angle": -4, "riseName": "blueHourDawn", "setName": "blueHourDusk" }, { "angle": -8, "riseName": "blueHourDawnBegin", "setName": "blueHourDuskEnd" } ] } ]