# Uibuilder: to subscribe or not to subscribe?

**URL:** <https://discourse.nodered.org/t/uibuilder-to-subscribe-or-not-to-subscribe/43136>\
**Category:** Dashboard\
**Created:** [24 March 2021 17:28 UTC](https://discourse.nodered.org/t/uibuilder-to-subscribe-or-not-to-subscribe/43136 "2021-03-24T17:28:06Z")\
**Posts on this page:** 4\
**Page:** 6

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [2 June 2021 20:34 UTC](https://discourse.nodered.org/t/uibuilder-to-subscribe-or-not-to-subscribe/43136/101 "2021-06-02T20:34:32Z")

</div>

> [@tve](#):
>
> At this point I'm not sure whether pulling data from MQTT ends up being really nice or a can of worms. In the troubleshooting use-cases of a dashboard it's nice to be able to get raw data from the sensors before it gets processed. But on the other hand, it's raw and can be misleading or incomplete. Seems worth exploring...

Well, you don't "pull" of course 😉 which makes things easier.

For myself, I like to have the best of everything and I'll tend to give myself more data than I know I'll need.

So with my sensors for example, I'll take the raw data and push that out and then use other flows to monitor the raw data and transform it to more useful formats. Typically I'll have sensor data in at least 3 places in MQTT. The raw input (as close to it as MQTT allows anyway) by original device id, a consolidated and standardised intermediate format that is ordered still by device but using a more friendly device ID and having a common data schema rather than the device/vendor chosen schema. And a final simplified format that is ordered by room and sensor reading, e.g. `environment/Living_Room/temperature`.

For the data variables in Node-RED, I won't bother storing anything except the intermediate standardised schema.

> [@tve](#):
>
> In the whole "how do you feed data to the dashboard" question the biggest issue in my mind is still historical data.

I avoid the problem by dumping everything to InfluxDB and having all historic data in Grafana dashboards! 🤣

As I'm the only person who looks at them, it doesn't matter. But InfluxDB adds so much in terms of analysing timeline data and Grafana makes it so easy to consume and display that data.

Other UI's are built mainly around what is happening now/next/last and around controlling. Grafana not so useful for that.

---

<div class="post-metadata">

**Author:** ![tve](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tve/32/59475_2.png) [@tve](https://discourse.nodered.org/u/tve)\
**Post date:** [2 June 2021 20:45 UTC](https://discourse.nodered.org/t/uibuilder-to-subscribe-or-not-to-subscribe/43136/102 "2021-06-02T20:45:35Z")

</div>

Grafana has its pros and cons. It really sucks as showing anything that is not very simply time-delimited, i.e. from that moment to this other moment. Say you have some processes, like a baking of something, or a workout, or some other process and you now want to overlay the last 5 process instances in a chart to be able to compare "what was different today?"... no fun in Grafana...

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [2 July 2021 20:46 UTC](https://discourse.nodered.org/t/uibuilder-to-subscribe-or-not-to-subscribe/43136/103 "2021-07-02T20:46:10Z")

</div>

Closed on 2 July 2021 20:46 UTC

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

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [18 July 2021 16:08 UTC](https://discourse.nodered.org/t/uibuilder-to-subscribe-or-not-to-subscribe/43136/104 "2021-07-18T16:08:27Z")

</div>

> [@TotallyInformation](#):
>
> Would it really be worth the added complexity of adding this to uibuilderfe? Probably not. You could already wire incoming MQTT msg's to uibuilder's msg input probably (I've not tested that but uibuilder includes a setter function and all it would need would be a minor change to allow you to update the library's msg variable - I think I blocked it but it is only 1 line of code). Then by manually setting the msg object, you could link incoming MQTT messages to the uibuilder msg so that the same onChange function handles both types of input.

This will be implemented in the next release - the code is already in the main branch.

> [@TotallyInformation](#):
>
> However, I intend to implement a feature that will let you use templates direct from GitHub - so anyone could create an MQTT-flavoured template to make it easy for people to get started.

This is now live in uibuilder v4.0.0 which was published today.

[Previous page](https://discourse.nodered.org/t/uibuilder-to-subscribe-or-not-to-subscribe/43136.md?page=5)
