I've just prepared an update for
node-red-node-pushover and would like to invite comments.
Pushover currently provides 5 levels of priority, where
Level -2 is the lowest, and creates no notification - just a message in the Pushover app, whilst
Level 2 is the highest level which generates audio & visual alerts which bypass a user's quiet hours. In this level, the Pushover app alert contains an 'Acknowledgment' button to confirm that the message was received.
If however the message remains un-acknowledged, the Pushover server will continue to send further push messages at least every 30 seconds (user determined time), for up to 3hrs (user determined time) until acknowledgement is confirmed or the time expires.
In addition to this Pushover also provide
Receipts to indicate if the acknowledgement has been made, by whom and what time.
I've tried to expose these features in the node, making them available to use within the flow.
Examples of uses could include; if an alert is not acknowledged within 5 minutes, then another alert could be sent to a different person.
Maybe to log medication alerts, or just to ensure that you don't miss alerts by being away from your phone for a few minutes...
I've added an output to the node which provides confirmation that the message has been received by the Pushover server;
and a receipt, which can then be used to ask the Pushover server for a status report to see if the msg was acknowledged.
I've added 3 further options to the node config which are exposed if Level 3 is selected;
Retrywhere the time between each alert can be set, with a minimum period of every 30 seconds.
Expiresets the amount of time that the alerts will continue before expiration (maximum 3hrs)
Receipt URLentering a publicly accessible url where the Pushover server can send a POST request when the alert has been acknowledged.
There are two ways to find out if an alert has been acknowledged;
The first is to send a GET request to the Pushover server in the following format;
https://api.pushover.net/1/receipts/(your receipt).json?token=(your app token)
The response will take the format;
The second way is to create a public accessible HTTP endpoint, where Pushover can POST confirmation as soon as the alert is acknowledged (to the
receipt URL described above);
1(no or yes)
acknowledged_atshows the time it was acknowledged.
acknowledged_by_deviceshows the device (in my case - a Pixel phone)
Further details of Pushover receipts can be found here.
The changes so far can be seen in my repo, but I have not yet documented the changes in the readme or node html as yet.