OpenMarine
Passive notifications from node red OP2 - Printable Version

+- OpenMarine (https://forum.openmarine.net)
+-- Forum: OpenPlotter (https://forum.openmarine.net/forumdisplay.php?fid=1)
+--- Forum: Node Red (https://forum.openmarine.net/forumdisplay.php?fid=15)
+--- Thread: Passive notifications from node red OP2 (/showthread.php?tid=3082)



Passive notifications from node red OP2 - plefneski@rogers.com - 2020-11-11

I originally posted this on the node red forum because I thought it was a node red issue but now after some additional testing I realize it is more likely related to Signal K/Openplotter. I have been trying to create passive notifications from node-red for quite some time now but I am not able to find a way to make it work. I am running OP2 on a raspberry pi 4.


I was using the ui dashboard notification node but this essentially acts as a pop up in the browser. I am usually running OpenCPN in the foreground with a node-red dashboard running on the browser in the background. I didn't really want to just pop the browser on a notification because it may not be important enough for me to switch over and look at the dashboard. I want to use a passive notification so that it will pop on the screen over OpenCPN.
I installed the node-red-node-notify node and I installed the prerequisites of
libnotify-bin and growl but was not able to get this working. After days of banging my head against a wall I finally gave up on this and tried a different approach. I installed and ran lxqt notification daemon. I have also used the libnotify Notification-Daemon and the Xfce4 notification daemon. I am able to create pop up notifications using all of these daemons by using the notify-send command in the terminal but I cannot create the notifications from node-red by using the exec node. I tried putting the command in a script and again I am able to run it from the terminal but not from node-red. I have changed permissions to all for both the notify-send command and the script. Still no success. I don't get an error from the exec node it just does not create the notification.



I finally thought of another approach. I have a version of node red outside of signal k. I ran a test in that environment and both the node-red-node-notify node and the notifiy-send approach worked. I’m not sure why it doesn’t work in node red inside the signal k server authentication. Any ideas or suggestions on how to get this to work?