Pushover message only send after 21:00u

Hi,

I have a few LoRaWan nodes that sends a pushover message to my phone when a door is opened.
That's workinfg fine with an flow (example) as below:

How can I change the flow, that it will only trigger pushover to send messages after 9:00 p.m.?

Add a change node to add the current time to the msg, then pass it to a switch node to check if the time is past your don’t send time. If it is, don’t sent the message on.

you can use inject node to trigger at specific time,
and set a global enable variable

Screenshot-trigger

[
    {
        "id": "cd49d31cc8968e35",
        "type": "inject",
        "z": "fb2254ceefda10c4",
        "name": "trigger at 9:00",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "00 09 * * *",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 460,
        "y": 1800,
        "wires": [
            [
                "be2fca028c871879"
            ]
        ]
    },
    {
        "id": "678d1aae3986da2c",
        "type": "inject",
        "z": "fb2254ceefda10c4",
        "name": "trigger at 0:00",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "00 00 * * *",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 460,
        "y": 1840,
        "wires": [
            [
                "4df727f99c4394cd"
            ]
        ]
    },
    {
        "id": "be2fca028c871879",
        "type": "change",
        "z": "fb2254ceefda10c4",
        "name": "set global.enable=true",
        "rules": [
            {
                "t": "set",
                "p": "enable",
                "pt": "global",
                "to": "true",
                "tot": "bool"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 680,
        "y": 1800,
        "wires": [
            []
        ]
    },
    {
        "id": "7a8b413c3c12031c",
        "type": "switch",
        "z": "fb2254ceefda10c4",
        "name": "check global.enable",
        "property": "enable",
        "propertyType": "global",
        "rules": [
            {
                "t": "true"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 670,
        "y": 1740,
        "wires": [
            [
                "50e70b51a13abf73"
            ]
        ]
    },
    {
        "id": "02a7dbe589e5a674",
        "type": "inject",
        "z": "fb2254ceefda10c4",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "1",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 450,
        "y": 1740,
        "wires": [
            [
                "7a8b413c3c12031c",
                "69d195de52530a52"
            ]
        ]
    },
    {
        "id": "50e70b51a13abf73",
        "type": "debug",
        "z": "fb2254ceefda10c4",
        "name": "debug 9",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 880,
        "y": 1740,
        "wires": []
    },
    {
        "id": "4df727f99c4394cd",
        "type": "change",
        "z": "fb2254ceefda10c4",
        "name": "set global.enable=false",
        "rules": [
            {
                "t": "set",
                "p": "enable",
                "pt": "global",
                "to": "false",
                "tot": "bool"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 680,
        "y": 1840,
        "wires": [
            []
        ]
    },
    {
        "id": "69d195de52530a52",
        "type": "debug",
        "z": "fb2254ceefda10c4",
        "name": "debug 10",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 640,
        "y": 1680,
        "wires": []
    }
]

Stick a switch node between the source sending the notification and the pushover node, with the below settings..

$number($moment().tz('Europe/London').format('HH'))

This gives you some flexibility with a time range + an alternative route the notification will take if outside the range

Import

[{"id":"5148c41b8eff3d58","type":"switch","z":"2d7bf6e3.84c97a","name":"","property":"$number($moment().tz('Europe/London').format('HH'))","propertyType":"jsonata","rules":[{"t":"gte","v":"21","vt":"num"},{"t":"lte","v":"6","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":3,"x":390,"y":660,"wires":[["0232798c6dbd7814"],["0232798c6dbd7814"],[]]},{"id":"f1cee4c82e2658ce","type":"inject","z":"2d7bf6e3.84c97a","name":"Source","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":230,"y":660,"wires":[["5148c41b8eff3d58"]]},{"id":"0232798c6dbd7814","type":"pushover","z":"2d7bf6e3.84c97a","name":"","device":"","title":"","priority":0,"sound":"","url":"","url_title":"","html":false,"x":600,"y":640,"wires":[]}]

Alternatively, you can also consider our alerting service / mobile app SIGNL4 that offers alerting time windows. Dedicated noded for Node-RED are also available.

Dear all,

Thank you for your response, I see interesting solutions that I will look at and test.
Thanks again

You need to try this : Flow No. 2 - flow do the action when those 300s are over:
WHEN: Countdown timers - Specific timer finished door_open
AND: Aqara door sensor - The contact alarm is on (so that the alarm is not sent if I closed the door in the meantime*)
THEN: Push notifications - Send “Door is open for 5 minutes!” to Frank

I opted for the solution of @marcus-j-davies. Just a small adjustment and it works perfect in my case.

image

image

Thank you anyway