Web-push for local use?


I am trying to get a system so if something happens, I get a notification.

So web-push node looks possible. But I am not sure if there is a better node to do that.

I don't know if there is another way, so I guess I am asking.

Thanks in advance.



Where is the Something happening? On the node red system?

Where do you want the notification?





All local.

Things happen on a NR machine.

I want to be notified on another NR machine (web page?).



sounds like the dashboard to me...



I do this by sending the data to be shown to an mqtt server (on either machine) and in the second machine subscribe to the topic and show it on the dashboard.

1 Like


I do that with one of the following, depending on why I want to be notified.

Email, Tweet, SMS and audio alerts on Sonos

1 Like



Thanks, but I don't see how Email or SMS would work for local notifications.

Sonos...... Never heard of it. But shall look into it.

I get what you are saying, but if that "page" (or the browser) isn't at the front how do you see the notification?



I think you need to decide what sort of notification you want.

Is it a notification to get your attention? If so, you need to think about what sorts of things get your attention - what if you're not in the same room, for example. This is where email/SMS notifications could be used - they come to your mobile phone that you have on you, wherever you are (assuming you carry your phone around with you). There are other mobile based apps, such as Telegram, that used for this sort of thing.

If you don't want a mobile phone based approach, then do you want a notification you can hear from another room? Maybe play a sound from speakers attached to the pi, or flash a light.

Or is it a notification that you see the next time you happen to look at a particular screen or web page? In that case, adding something to a dashboard page would be sufficient.

It really all depends on what role the notification needs to take.

1 Like


Then what do you mean by "local" ?

When I get a mail or a text my laptop displays an alert the phone in my pocket vibrates. Both feel rather local to me :slight_smile:



Appreciated. I guess the confusion lies in how I am asking.

Sending SMS's is overkill.

It was more a "web notification" I was wanting. Something like the notifications you receive when a web page is updated. (On the web-push page there is an animation which seems to show what I want)

Outputting sounds, lights, etc. No big deal. That is hardware I/O and writing a pin high or low depending on the packet sent to the node.

This "Web push" thing seems to fit the need.
I have installed it but on the library page there are 3 nodes show. Two purple and one grey.
I can't find the grey one, and still can't work out how to apply/use it.

You can find an sample flow in demo-flow.json . It contains a simple API to manage the subscriptions and store them in a Flow variable. You can use PWAtter demo project as a client-side PWA.

I don't get it. Sorry. Where is this "sample flow"?


Local: All within my network. No Google, Amazon, XYZ, or other external thing.



I have since found another node called GROWLY.....

node to send popup notifications. This is a quick hack for node-red-node-notify to use growly instead of growl.

Nice. May do what I want, but looking down the page - after installing:
It has:

Showing my ignorance, I have installed it but can't find the growly-config listed anywhere.

I also went though the motions of:

Install notify-send through the libnotify-bin package:

$ sudo apt-get install libnotify-bin

It is already installed (maybe from before) but I can't get anything "working"....

Further digging I found:
example flow

But I am not able to work out how to make it all ..... local.
Reading the stuff, I can configure it to be local, but as said: I can't find the growl-config "node". Though on the web page there is no input/output so I don't know where/how it would show on the left of the screen.

Ok, I have since found the growly-config thingy. (Config list on the right side of the screen)
But..... There is nothing to really set. I just entered localhost.

Ok. So, I inject stuff into the growly node, but nothing happens.



That node ( node-red-contrib-growly) hasn't been updated in three years....you might want to look at another solution.



Well, I was looking at Web-push, but that doesn't seem to be getting anywhere either.



I don’t fully understand the context? Do you have developped a web application that runs locally in which you now want to display a kind of notification based on a node-red event?

I guess you can always create a node-red dashboard application showing these notifications and embed it in your web application.



I am running NR. Mostly on Raspies.

I am wanting something so if an event happens on another machine I get a pop up informing me of something happening.

So web-push seemed the right thing for the task, but I don't know how to set up the node.



OK, you want to get a pop-up in a local web application (with local web application - I mean that the application can be accessed from a browser when connected to your LAN).

Can you share some details about this web application or must this web application also be created ?
If the web application still must be created then why not do this using the node-RED dashboard nodes ?

If you really want to use web-push: have you checked out

and if so where are you stuck ?



I have them installed, but don't know how to get them "working".

From what I can see, they talk to outside servers (?) to do the messaging.

I want to have one of the RPI's as the HOST (?) SERVER (?) and when something happens, it is sent a message and then a message is sent out to .... where/who ever (at a machine level) and they then show the popup message.

MQTT basically does that but just doesn't have the popup option. But I know that is comparing apples and oranges.
But just to try and explain what I am wanting to do.



Why not just send an email or use telegram? Then you will get a notification wherever you are.



Well, doesn't telegram need an external (real world, beyond my network) connection?

There is already dashboard indications of anything wrong. But you need to be on THAT screen to see the message/report/(what ever you want to call it).

Sending e-mails is way overkill. It is with the idea that if something "important" or "urgent" happens, a popup will appear on a screen and notify someone to take action.


Oh, and on e-mails:
I have been down that part a long time ago for other reasons and it caused nothing but heart ache.
The whole thing got canned. Just toooooo problematic.



Both telegram and email require an internet connection (unless you have an internal email system) so if you haven't got that then you can't use them. As for overkill I don't know what that means, I use email for similar things and it was almost trivial to set up, just pointed the node at my isp's server with name and pwd and it just works.
The problem with the push nodes is that they assume you know how web push works and already have the auth keys and so on. So I think if you want to use that (which does appear to match your use case I agree) then I think you would first need to learn more about web push.