How to update web page data

I want to create a Node Red project with basically the following features:

  • Users can log in via web page. The users have different roles.
  • Some roles enter data which is stored on a database or other item on the Raspberry Pi
  • Some roles only show data from a database or other source on the Raspberry Pi
  • Whenever one user enters data, the shown data for the other users have to be updated when applicable

I have a rough idea on how I can create a login page. But I don't know an easy way to update data on a web page triggered by the "server" (when data content changes). Any ideas for me, perhaps with examples?

Thank you

Here is a good example using websockets to communicate between Node-RED and your web page.

uibuilder is great for this use-case. It handles the comms for you but still lets you (if you want to) manage your web page code in a standard way (it also has zero- and low-code options too).

With uibuilder, handling messages to/from Node-RED in your front-end code is as easy as doing it in Node-RED itself.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.