Comments (10)
Sorry, only just spotted this thread, not sure why GitHub didn't notify me earlier.
The UI.js part of the uibuilder client library already supports the notification
part of the equation & you can push a notification but only via a Socket.IO connection at present (websocket or long-polling interface). uib.notify, ui.notification.
I've several times looked at possibly implementing the Push API for UIBUILDER but was put off by the complexity and having not had anyone ask for it. Still, I'd been looking at this from a PWA perspective as well which I think adds a lot of complexity, don't think I'm quite ready for that though I have created a bare-bones service worker script previously for testing with the uibuilder client library.
However, this has prompted me to look at push notifications again. It seems like it could indeed be useful for mobile users. PWA is certainly on the backlog for uibuilder.
Not sure I would implement as a separate node though since UIBUILDER doesn't really need them. Would probably implement as a command message, maybe an option to the existing uibuilder.notify
which can already be triggered from a simple msg to uibuilder.
from node-red-dashboard.
@bartbutenaers Definitely still valid and working on it. I'll let you know what I've come up with.
from node-red-dashboard.
This isn't something I've had to cover before, so isn't my area of expertise unfortunately, although worth stressing, Vue stuff doesn't have to be Vue-specific, you can still write raw JavaScript content and it'll be fine.
@TotallyInformation may have covered similar in UI Builder?
from node-red-dashboard.
https://web.dev/articles/push-notifications-overview
This gives a great overview, and does reinforce that we need a supporting "push service" to get the full pipeline working.
from node-red-dashboard.
Currently my node-red-dashboard-2-ui-web-push is nearly finished. Just need to find time to fix the last bits and pieces. But most of it already works fine.
However today @cgjgh has created a pull request which is somehow related to this. So not sure at the moment how to continue with my node. If I understand correctly then - in case of pwa - you still need to write your own custom service worker js file, but it is registered using PWA (while I register it with my custom code). And I think the remaining part is rather similar (vapid key pair on the server, and so on).
If pwa is the way to go, then I won't publish my web-push node on npm. Then I simply keep it for private use, so I can migrate my own old dashboard finally to D2. But unfortunately I am not in the free time luxery to rewrite my node for the third time to integrated it with pwa....
from node-red-dashboard.
Just need to find time to fix the last bits and pieces.
FYI: I did a series of fixes in the last hour, and now my web-push ui node has no "known" issues anymore at the moment. It seems to work fine for my own home automation, both on Windows and Android. So I can finally start migrating my own dashboard...
from node-red-dashboard.
I think your approach with your custom service worker is pretty similar to the PWA service worker actually, the latter just being a basic one allowing web app to be installed as PWA. Here's some documentation which allows you to inject your custom service worker into Vite-PWA. https://vite-pwa-org.netlify.app/guide/inject-manifest.html
from node-red-dashboard.
I’ll look into integrating your sw from node-red-dashboard-2-ui-web-push into Vite-PWA using the above method.
As for the web push notifications, I think these are just automatically upgraded to “native” push notifications when received by a PWA.
Overall, I think code for the two approaches is quite similar and can be integrated.
from node-red-dashboard.
I’ll look into integrating your sw from node-red-dashboard-2-ui-web-push into Vite-PWA using the above method.
@cgjgh,
That would be most kind of you! Don't hesitate to let me know if something is not clear to you!
BTW each instance of my web-push ui node has its own service worker. It is the same js file but download from separate url's. I added the node id in the url, to achieve this (i.e. each unique url gets its own service worker).
That way, you can e.g. add 3 ui web-push nodes to your flow. So you get 3 subscribe buttons in your flow:
- All notifications
- Alarm notifications
- Doorbell notifications
Each member of the familly can subscribe (via the dashboard on their mobile phones) to a selection of notifications of their interest. Could have perhaps implemented it somehow using a single service worker, but doing it this way was achievable in my limited free time...
from node-red-dashboard.
I’ll look into integrating your sw from node-red-dashboard-2-ui-web-push into Vite-PWA using the above method.
Evening @cgjgh,
I see that you managed to complete your PWA pull request. Nice work!!
Now that PWA is supported in the dashboard, I hope that your above proposal is still valid...
Would be nice if you could find some time to review my repo, and have a look whether you can find a way to do it in a pwa way. Because I have not really an idea what I need to change. Or if you could give me some tips how (and why if possible) you would change some pieces, then I try to refactor it myself. But some PWA noob level feedback might help ;-)
Thanks!!
Bart
from node-red-dashboard.
Related Issues (20)
- Informational question: gestures support HOT 7
- 'Widget load' event triggered only when there is data for the node in the Node-red datastore
- Add new Teleport for app-bar-title HOT 2
- ui-template: template is not rendered until content is sent HOT 5
- DB2 \ Layout \ Pages keeps resetting to expanded view. HOT 3
- Include VSparkline for use in ui-template HOT 4
- ui-table: add inital Row setting to Items per page dropdown
- ui-table: possibility to hide array values that are displayed HOT 3
- Add a way to move a group to other page using "UI Control" node .
- Dashboard does not reconnect if network is down for a significant time. HOT 1
- Ditch the Connection Re-established popup! HOT 7
- After multiple/quick dashboard reload top-bar and side-bar disappear HOT 5
- Form - Add option to allow Drop Down as an element HOT 1
- Form - Allow the Form elements to be sized similar group sizing.
- The presence of a v-switch in a ui-template affects the positioning of core ui-switch node
- PWA feature - problem with Google Oauth authentication (and probably other similar systems) HOT 32
- Radio button group: programatic setting does not work anymore HOT 17
- Add "development" NODE_ENV option for build HOT 4
- Add a way to pass parameters to a page HOT 3
- No Longer possible to change the "favicon" HOT 19
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-red-dashboard.