My all be it simple flows subscribing to sensor data published in sets of 6x elements per topic/payoad delivery. are all working as expected so i am now turning my focus to the dashboard.
while im getting the hang of it my graphs (4x) each have 6 x inputs and tying these into my logic flows is a messy result. spoiling the neat easy to follow flows pre dashboard.
So i was wondering if after i have split my original payload into discrete data payloads for query and logging it would be a good idea to republish the data under a dashboard topic so i can create discrete dashboard flows that are triggered by the publication of the data they represent?
It seems like a bit too big of a sledgehammer however? and i feel i must be missing something rather crucial.
If you are using MQTT then you can send all the data that needs to go on the dashboard to appropriate topics in MQTT. Then have the dashboard nodes on separate tabs that subscribe to the topics and display it. Any output from the dashboard is then published to MQTT topics for interpretation in other flows. If you have, for example, switches that have the same input and output topic then make sure you clear the Message Pass Through checkbox or you will get an MQTT loop.
A further advantage of this is that if you use retained topics for state information such as switch positions then the switches will automatically be set to the previous positions on startup.
Yet another advantage is that if you want to run the dashboard on more than one node-red server you can just export/import the dashboard flows onto another server and you will be able to access the data from the first system via the second. If the MQTT server was localhost on the first one then you would have to change that to point to the actual IP address on the second but other than that it should just work.
I have multiple Pis running bits of the system with their own dashboards then I also have a central server that shows data from the complete system and this technique makes that simple to accomplish.
Cheers Colin, just the reassurance i was looking for, It seemed a natural solution, and so far node-red has proven pretty intuitive, I can now declutter my once sleek flows and created some dedicated dasboard tabs thanks again..