diff --git a/social/pushover/57-pushover.html b/social/pushover/57-pushover.html index a88700f9..30563134 100644 --- a/social/pushover/57-pushover.html +++ b/social/pushover/57-pushover.html @@ -55,6 +55,14 @@ +
+ + +
+
+ + +
@@ -76,8 +84,9 @@ @@ -90,7 +99,9 @@ device: {value:""}, title: {value:""}, priority: {value:0}, - sound: {value:""} + sound: {value:""}, + url: {value:""}, + url_title: {value:""}, }, credentials: { deviceid: {type:"text"}, diff --git a/social/pushover/57-pushover.js b/social/pushover/57-pushover.js index 867daf12..3adf2ada 100644 --- a/social/pushover/57-pushover.js +++ b/social/pushover/57-pushover.js @@ -48,6 +48,8 @@ module.exports = function(RED) { var pri = this.priority || msg.priority || 0; var dev = this.device || msg.device; var sound = this.sound || msg.sound || null; + var url = this.url || msg.url || null; + var url_title = this.url_title || msg.url_title || null; if (isNaN(pri)) {pri=0;} if (pri > 2) {pri = 2;} if (pri < -2) {pri = -2;} @@ -65,6 +67,8 @@ module.exports = function(RED) { }; if (dev) { pushmsg.device = dev; } if (typeof(sound) === 'string') { pushmsg.sound = sound; } + if (typeof(url) === 'string') { pushmsg.url = url; } + if (typeof(url_title) === 'string') { pushmsg.url_title = url_title; } //node.log("Sending "+JSON.stringify(pushmsg)); pusher.send( pushmsg, function(err, response) { if (err) { node.error("Pushover Error: "+err); } diff --git a/social/pushover/README.md b/social/pushover/README.md index 837901e5..86c592f9 100644 --- a/social/pushover/README.md +++ b/social/pushover/README.md @@ -19,6 +19,10 @@ Uses Pushover to push the `msg.payload` to a device that has the Pushover app in Optionally uses `msg.topic` to set the title, `msg.device` to set the device and `msg.priority` to set the priority, if not already set in the properties. +Optionally uses `msg.topic` to set the title, `msg.device` to set the device, +`msg.priority` to set the priority, `msg.url` to add a web address and `msg.url_title` +to add a url title - if not already set in the properties. + The User-key and API-token are stored in a separate credentials file. Uses Pushover. See Pushover.net for more details. diff --git a/social/pushover/package.json b/social/pushover/package.json index 77b24c6d..4aceeab9 100644 --- a/social/pushover/package.json +++ b/social/pushover/package.json @@ -1,9 +1,9 @@ { "name" : "node-red-node-pushover", - "version" : "0.0.7", + "version" : "0.0.8", "description" : "A Node-RED node to send alerts via Pushover", "dependencies" : { - "pushover-notifications" : "0.2.2" + "pushover-notifications" : "~0.2.3" }, "repository" : { "type":"git",