# Pushover message only send after 21:00u

**URL:** <https://discourse.nodered.org/t/pushover-message-only-send-after-21-00u/88101>\
**Category:** General\
**Created:** [19 May 2024 15:11 UTC](https://discourse.nodered.org/t/pushover-message-only-send-after-21-00u/88101 "2024-05-19T15:11:58Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![maru](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/maru/32/99601_2.png) [@maru](https://discourse.nodered.org/u/maru)\
**Post date:** [19 May 2024 15:11 UTC](https://discourse.nodered.org/t/pushover-message-only-send-after-21-00u/88101/1 "2024-05-19T15:11:58Z")

</div>

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:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/3/135d5b43b8f3bfc5b6ef240ef3ec745eff1202a8.png)

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

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [19 May 2024 15:44 UTC](https://discourse.nodered.org/t/pushover-message-only-send-after-21-00u/88101/2 "2024-05-19T15:44:22Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![RedTom](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/redtom/32/88014_2.png) [@RedTom](https://discourse.nodered.org/u/RedTom)\
**Post date:** [19 May 2024 16:14 UTC](https://discourse.nodered.org/t/pushover-message-only-send-after-21-00u/88101/3 "2024-05-19T16:14:52Z")

</div>

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

![Screenshot-trigger](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/7/37764b242d55a0e73f94c1a00f52fff03433225b.jpeg)

```auto
[
    {
        "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": []
    }
]

```

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [19 May 2024 17:26 UTC](https://discourse.nodered.org/t/pushover-message-only-send-after-21-00u/88101/4 "2024-05-19T17:26:04Z")

</div>

> [@maru](#):
>
> How can I change the flow, that it will only trigger pushover to send messages after 9:00 p.m.?

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

 ![Screenshot 2024-05-19 at 18.24.18](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/8/582fc33e203db3f535e04c79d7d2ccedbc7758ac.png)

```auto
$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

```auto
[{"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":[]}]

```

 ![Screenshot 2024-05-19 at 18.26.17](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/c/7c5e0b9dd8210edc49fe6ab027b4c6b69b56ad54.png)

---

<div class="post-metadata">

**Author:** ![rons4](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rons4/32/94440_2.png) [@rons4](https://discourse.nodered.org/u/rons4)\
**Post date:** [20 May 2024 06:57 UTC](https://discourse.nodered.org/t/pushover-message-only-send-after-21-00u/88101/5 "2024-05-20T06:57:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![maru](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/maru/32/99601_2.png) [@maru](https://discourse.nodered.org/u/maru)\
**Post date:** [20 May 2024 08:22 UTC](https://discourse.nodered.org/t/pushover-message-only-send-after-21-00u/88101/6 "2024-05-20T08:22:48Z")

</div>

Dear all,

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

---

<div class="post-metadata">

**Author:** ![elbertelena](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/elbertelena/32/91270_2.png) [@elbertelena](https://discourse.nodered.org/u/elbertelena)\
**Post date:** [24 May 2024 09:55 UTC](https://discourse.nodered.org/t/pushover-message-only-send-after-21-00u/88101/7 "2024-05-24T09:55:24Z")

</div>

> [@maru](#):
>
> 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:

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

---

<div class="post-metadata">

**Author:** ![maru](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/maru/32/99601_2.png) [@maru](https://discourse.nodered.org/u/maru)\
**Post date:** [24 May 2024 10:38 UTC](https://discourse.nodered.org/t/pushover-message-only-send-after-21-00u/88101/8 "2024-05-24T10:38:39Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/3/33409e16afa5245533a3c239dc4ba20d30e6c577.png)

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/c/5c0dd72afe76538615a68d2b47564350021789c7.png)

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/0/a0bbabb9c3d38ec5f249977cbe0451e859ac3820.png)

Thank you anyway

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [7 June 2024 10:39 UTC](https://discourse.nodered.org/t/pushover-message-only-send-after-21-00u/88101/9 "2024-06-07T10:39:08Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
