Custom Html Block Refresh

Hi,

I want to use the Custom HTML Dashboard Block to show live data coming from a simulated MQTT device. However, the block does not refresh on new data. I am using the default block html code to test it out and it does not refresh. It just shows the load time value.


image

As you can see in the screenshots, I am using the default code in the block. When I use the Indicator block to show the same data, the value does update. As far as I understand, the ‘change’ event should trigger on all changes, so shouldn’t the block output also update when new data arrives? Please let me know what I am missing.

My aim was to use Google Charts to display the values in a gauge. However, I found that the gauge does not update (using the code given in your examples). Then I saw that the default code also does not update.

Hi @Anaz_Zubair,

It sounds as though you’re hoping to use the Live Stream functionality from the Indicator Block within the HTML Block. The Live Stream functionality is not supported in this block, but you do get the change event as you mentioned. The HTML Block will re-query on any change to the dashboard, which does not include the state value. This change event is true for any of the following:

  • new query results are available (queries are re-run every dashboard refresh, this is likely defaulting to one minute)
  • the block size changes
  • the user changes the theme
  • a context variable changes

The block will not update for live or new incoming data like the live stream, but will update if there is new data available in the query when the dashboard is refreshed.

Please let me know if I can answer any further questions.

Thanks!
Julia