|
1 | | -# node-red-contrib-pushsafer |
| 1 | +# node-red-contrib-pushsafer |
| 2 | + |
| 3 | +A [Pushsafer](https://www.pushsafer.com/) API wrapper for Node-RED. |
| 4 | + |
| 5 | +Supports rich notifications and notification templates. |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | +## Install |
| 10 | + |
| 11 | +Run the following command in your Node-RED user directory - typically `~/.node-red` |
| 12 | + |
| 13 | + npm install node-red-contrib-pushsafer |
| 14 | + |
| 15 | +Or use the palette manager inside of Node-RED |
| 16 | + |
| 17 | +[](https://www.npmjs.com/package/node-red-contrib-pushsafer) |
| 18 | + |
| 19 | +## Required inputs |
| 20 | + |
| 21 | +- `msg.payload` (any): The message of the notification, [see description](https://www.pushsafer.com/pushapi_ext#API-M), [HTML format](https://www.pushsafer.com/pushapi_ext#API-HTML) can be used |
| 22 | + |
| 23 | +## Optional inputs, if provided they will override the template values |
| 24 | + |
| 25 | +- `msg.title` (string): Subject / title of a push-notification, max. 255 characters, [see description](https://www.pushsafer.com/pushapi_ext#API-T) |
| 26 | +- `msg.icon` (number): Instead of the default Pushsafer icon, which is displayed with the push notification, you can choose between 177 other icons, [see description](https://www.pushsafer.com/pushapi_ext#API-I) |
| 27 | +- `msg.iconcolor` (color): Color of the background of the icon, [see description](https://www.pushsafer.com/pushapi_ext#API-C) |
| 28 | +- `msg.sound` (number): Ringtone / Sound which should be played when receiving the push notification, [see description](https://www.pushsafer.com/pushapi_ext#API-S) |
| 29 | +- `msg.vibration` (number): How often the device should vibrate when receiving a push-notification, [see description](https://www.pushsafer.com/pushapi_ext#API-V) |
| 30 | +- `msg.priority` (number): This priority value determines where the push notification will be put in the notification shade (this sorting affects Android devices only), [see description](https://www.pushsafer.com/pushapi_ext#API-PR) |
| 31 | +- `msg.devices` (string): This parameter controls to which devices or device groups the message is sent to, [see description](https://www.pushsafer.com/pushapi_ext#API-D) |
| 32 | +- `msg.timetolive` (number): Specifies how long a message should be kept in the client APP until it is automatically deleted, [see description](https://www.pushsafer.com/pushapi_ext#API-L) |
| 33 | +- `msg.retry` (number): With the retry / resend parameter, a message will be resent after a certain time, [see description](https://www.pushsafer.com/pushapi_ext#API-RE) |
| 34 | +- `msg.expire` (number): With the retry / resend Parameter re, a message will be resent after a certain time, [see description](https://www.pushsafer.com/pushapi_ext#API-EX) |
| 35 | +- `msg.answer` (number): To respond to push notifications, pass the parameter with the value 1, [see description](https://www.pushsafer.com/pushapi_ext#API-A) |
| 36 | +- `msg.url` (string): This URL can be opened directly from the push notification or from the client-app, [see description](https://www.pushsafer.com/pushapi_ext#API-U) |
| 37 | +- `msg.urltitle` (string): Can set the title of the url, [see description](https://www.pushsafer.com/pushapi_ext#API-UT) |
| 38 | +- `msg.image` (string): The path of an image, which will be shown directly in the notification. Local file path or http(s) url, [see description](https://www.pushsafer.com/pushapi_ext#API-P) |
| 39 | +- `msg.image2` (string): The path of a second image, which will be shown in the Pushsafer app. Local file path or http(s) url, [see description](https://www.pushsafer.com/pushapi_ext#API-P) |
| 40 | +- `msg.image3` (string): The path of a third image, which will be shown in the Pushsafer app. Local file path or http(s) url, [see description](https://www.pushsafer.com/pushapi_ext#API-P) |
0 commit comments