Have a look at pushbullet - http://flows.nodered.org/node/node-red-node-pushbullet
Nick
Hi, I currently use the email node to send a email to my iphone to notify if something is triggered on node-red but its a bit slow, I was wondering what other options are available, just need something to go bing and popup a message on the iphone, any suggestions welcome, thanks.
--
http://nodered.org
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
msg.topic to set the title, if not already set in the properties. but I cannot even see how to do that. I think you just about described the answer yourself :-)
In your function node set msg.topic to be what you want it to be... In this case, msg.payload.
(And don't set it on the edit dialogue)
Describing it and doing it appears to be 2 different things I am having big trouble with the msg.topic bit ...
msg1={};msg2={};var d=new Date();var h = d.getHours();var m = d.getMinutes();var s = d.getSeconds();if (h<10){h="0"+h}if (m<10){m="0"+m}if (s<10){s="0"+s}time = (h+":"+m+":"+s);if (msg.payload == 1){
msg1.payload = time+" Sonoff s1 Garage Light On";msg2.payload = null;
}if (msg.payload === 0){msg1.payload = null;msg2.payload = time+" Sonoff s1 Garage Light Off";
}return [msg1,msg2];
var d=new Date();var h = d.getHours();var m = d.getMinutes();var s = d.getSeconds();if (h<10){h="0"+h}if (m<10){m="0"+m}if (s<10){s="0"+s}time = (h+":"+m+":"+s);if (msg.payload == 1){
msg.payload = time+" Sonoff s1 Garage Light On";msg.topic = msg.payload;
}
if (msg.payload === 0){msg.payload = time+" Sonoff s1 Garage Light Off";
}return msg;
Describing it and doing it appears to be 2 different things I am having big trouble with the msg.topic bit ...Here's my working function node which when connected to a a couple of pushbullet nodes works as described in the previous post
msg1={};msg2={};var d=new Date();var h = d.getHours();var m = d.getMinutes();var s = d.getSeconds();if (h<10){h="0"+h}if (m<10){m="0"+m}if (s<10){s="0"+s}time = (h+":"+m+":"+s);if (msg.payload == 1){
msg1.payload = time+" Sonoff s1 Garage Light On";msg2.payload = null;
}if (msg.payload === 0){msg1.payload = null;msg2.payload = time+" Sonoff s1 Garage Light Off";
Yeah, I was about to say that.... !
(No I wasn't ;-)
Thanks Mark
Ok thanks that works great I used the second example with one pushbullet node (the reason I split the function to use 2 pushbullet nodes originally was my first attempt to get at the Title so on the lock screen it would say Garage Light On or Garage Light Off) ((nothing to do with what the payload said)) if you get my drift.