re-categorise Geohash node as location

This commit is contained in:
Dave C-J
2014-12-12 23:15:09 +00:00
parent 5f78aa10ad
commit c128184d6a
4 changed files with 20 additions and 10 deletions

View File

@@ -32,11 +32,17 @@ module.exports = function(RED) {
}
else { msg.payload = msg.payload.toString(); }
if (node.pushkey) {
try {
nma(node.pushkey, "Node-RED", titl, msg.payload, 0 );
} catch (e) {
node.warn("NMA error: "+ e);
}
nma({
"apikey": node.pushkey,
"application": "Node-RED",
"event": titl,
"description": msg.payload,
"priority": 0
}, function (error) {
if (error) {
node.warn("NMA error: " + error);
}
});
}
else {
node.warn("NMA credentials not set.");