Search code examples
iotnode-redarduino-esp8266

Can I use Node-Red to display one dashboard group per sensor?


I'm playing around With Node-Red (I'm still in the newbie stages)

I have around 20 ESP8266 modules taking temperature and humidity in various locations in and around my home.

The way I am doing it right now, is to put a webserver on each of my ESPs and have node-red poll them every 5 Seconds. This is ugly in all respects, as repeating this 20 times hurts the eyes. I've set up two of them already, and it looks bad: Setting up TWO sensors for Dashboard is already hard

My question is:

Is there a way I can give node-red a list of the Devices (well, their IP addresses) and have node-red create my desired Dashboard for all of them? Looks like I would need a "for-each" module, as well as something to automatically create a group in the Dashboard for grouping the various gauges/Charts to each sensor.

Not a lot of code to share so far, but I did create a gist for you to see, if you're interested in the webserver part for ESP8266:

Gist of how to Connect ESP8266 With Node-Red using Arduino/C

In advance, thanks for your tips and suggestions


Solution

  • No, at the moment you need to define each widget on the dashboard explicitly.

    The closest you could do is use the template node and pass in an array of values that can be rendered in a loop, but that will not work for the Chart node or Text nodes.