# Keeping the dashboard alive

**URL:** https://discourse.nodered.org/t/keeping-the-dashboard-alive/5248
**Category:** Dashboard
**Created:** [27 November 2018 23:15 UTC](https://discourse.nodered.org/t/keeping-the-dashboard-alive/5248 "2018-11-27T23:15:53Z")
**Posts on this page:** 9
**Page:** 2

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [2 December 2018 15:29 UTC](https://discourse.nodered.org/t/keeping-the-dashboard-alive/5248/22 "2018-12-02T15:29:23Z")

</div>

There should be no need to implement a ping type capability as the underlying [socket.io](http://socket.io) library already has one built in.

---

<div class="post-metadata">

### Author: ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)
#### Post date: [2 December 2018 17:56 UTC](https://discourse.nodered.org/t/keeping-the-dashboard-alive/5248/23 "2018-12-02T17:56:37Z")

</div>

> [@dceejay](#):
>
> There should be no need

Yes, you are correct but I wanted "my own ping" so I can monitor it myself (my code example is a very simplified example from a much more advanced page)

Do you happen to know how I can get my hands on the websocket connection readyState when using the ui\_template node? Like I do in the normal template node

Also, how to force a re-connection from code inside the ui\_template node?

Then by just monitoring the readyState, it would be easy to force a re-connection when/if needed

Kind regards, Walter

---

<div class="post-metadata">

### Author: ![RogierQ](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rogierq/32/3211_2.png) [@RogierQ](https://discourse.nodered.org/u/RogierQ)
#### Post date: [2 December 2018 22:10 UTC](https://discourse.nodered.org/t/keeping-the-dashboard-alive/5248/24 "2018-12-02T22:10:13Z")

</div>

I agree. Same here

---

<div class="post-metadata">

### Author: ![Marooned](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marooned/32/2858_2.png) [@Marooned](https://discourse.nodered.org/u/Marooned)
#### Post date: [3 December 2018 15:04 UTC](https://discourse.nodered.org/t/keeping-the-dashboard-alive/5248/25 "2018-12-03T15:04:12Z")

</div>

Here is how my Dashboard drops connection with 2 graph widgets. Without them it's quite stable so I blame this widget for being quite expensive. With one graph it was more or less usable, with 2 I had to move them to a separate tab as it's pain to use.

While this tablet is quite old, I notice similar issue with newer phone (Samsung S5) - it loads quicker but also disconnects.

---

<div class="post-metadata">

### Author: ![hugobox](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hugobox/32/2948_2.png) [@hugobox](https://discourse.nodered.org/u/hugobox)
#### Post date: [15 December 2018 16:06 UTC](https://discourse.nodered.org/t/keeping-the-dashboard-alive/5248/26 "2018-12-15T16:06:43Z")

</div>

For android tablets always plugged in there's a secret feature to keep the screen always on (but dimmed) : [https://www.google.com/amp/s/www.greenbot.com/article/2463970/how-to-keep-your-android-phones-screen-on-longer.amp.html](https://www.google.com/amp/s/www.greenbot.com/article/2463970/how-to-keep-your-android-phones-screen-on-longer.amp.html)

---

<div class="post-metadata">

### Author: ![Marooned](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marooned/32/2858_2.png) [@Marooned](https://discourse.nodered.org/u/Marooned)
#### Post date: [16 December 2018 01:10 UTC](https://discourse.nodered.org/t/keeping-the-dashboard-alive/5248/27 "2018-12-16T01:10:05Z")

</div>

But as you can see on my video above, having screen always on does not help at all.

---

<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: [16 December 2018 11:53 UTC](https://discourse.nodered.org/t/keeping-the-dashboard-alive/5248/28 "2018-12-16T11:53:56Z")

</div>

> [@Marooned](#):
>
> But as you can see on my video above, having screen always on does not help at all

On your tablet, the connection seems to retry every 5 seconds. That, I believe is very different to the issues faced by most of the others in this thread.

For everyone in this thread. What is really needed is a separate example not using Dashboard to see where the problem actually lies - whether it is in Dashboard, the device/browser or elsewhere. You also need to do the same testing from a PC set to stay awake.

There are _so_ many variables involved with this that it is currently pretty impossible to know what is causing this issue in any particular instance & I suspect there are several causes.

I think that, something not yet mentioned, you may be able to tweak the settings on [socket.io](http://socket.io) so that it doesn't time out so fast as well. I noticed as I built uibuilder that [socket.io](http://socket.io) is very sensitive to network & timing issues & if it has any problems at all it falls back to polling methods rather than websockets. You can see this happening if you can get access to the developer tools.

---

<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: [16 December 2018 12:04 UTC](https://discourse.nodered.org/t/keeping-the-dashboard-alive/5248/29 "2018-12-16T12:04:35Z")

</div>

> [@TotallyInformation](#):
>
> if you can get access to the developer tools

You might find [weinre](http://people.apache.org/~pmuellr/weinre/) helpful if you are trying to debug web apps on mobile devices. It provides the ability to remotely debug a web page.

Alternatively, newer versions of Andriod have [remote debugging](https://developers.google.com/web/tools/chrome-devtools/remote-debugging/) available.

On iOS, I think that "native" remote debugging is only possible from a Mac, see [Safari Web Inspector Guide](https://developer.apple.com/library/archive/documentation/AppleApplications/Conceptual/Safari_Developer_Guide/GettingStarted/GettingStarted.html)

---

<div class="post-metadata">

### Author: ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)
#### Post date: [17 December 2018 11:02 UTC](https://discourse.nodered.org/t/keeping-the-dashboard-alive/5248/30 "2018-12-17T11:02:20Z")

</div>

> [@krambriw](#):
>
> Do you happen to know how I can get my hands on the websocket connection readyState when using the ui\_template node? Like I do in the normal template node
> 
> Also, how to force a re-connection from code inside the ui\_template node?
> 
> Then by just monitoring the readyState, it would be easy to force a re-connection when/if needed

I tried my best to ask this question earlier but so far no reply. Maybe my questions got "hidden" in the normal text

Anyway I am very interested to learn how I could do this, so if anyone knows, please advice

[Previous page](https://discourse.nodered.org/t/keeping-the-dashboard-alive/5248.md?page=1)
