HTTP response autorefresh?

Hey guys,

I'm about to create a small webpage for my 3D printer in node-red.
Right now it is looking like this:

It is just a test right now and I'm struggling with the part where the temps/progress would be automatical updated without having to reload the page over and over again. Is that doable inside node-red?

Right now my flow looks like this:

I guess that has something to do with html code or?

You could use node-red-dashboard to easily achieve this.

As @Steve-Mcl mentioned, use the node-red-dashboard nodes, you may have to install them, use "Manage palette".

Alternatively, keeping what you already have, you could use websockets. This allows you to update single elements of your webpage without reloading the whole. Is a matter of taste, dashboard makes life simpler, html/javascript coding in the template node is also working fine if you are familiar and feel comfortable with that

@Steve-Mcl & @krambriw

Thank you for your response.
the dashboard isn't an option because it is used for smarthome stuff that I use localy.

I use a reverse proxy to get only access to the homepage that node-red provides via the http nodes.

So I would stay with this solution. @krambriw do you have a simple example on how to achieve this?

Then I would suggest uibuilder - it has huge potential and has 2 way messaging capabilities with pretty much zero effort.

The most basic websocket example - https://flows.nodered.org/flow/8666510f94ad422e4765

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