Emoncms dashboard crashes after x hours

Hello All!
I have an EmonPI running 10.0.1 and emonpiRelease: emonSD-30Oct18.
I am also controlling my OpenEVSE charger with the EmonPI through MQTT and it works great!
My problem (and I have two, which I will start another thread on the second one), is in my dashboard (local), i have create a board for only the charger with LEDs for charger on, divertmode enabled, charge current gauge, import/export gauge, and two graphs.
The first graph is a realtime graph for the charger current, and the second is for rawdata for EV energy.
The realtime graph is updating but the rawdata does not update. I have to manually re-select the dashboard to get the latest value, but it doesn’t continue to update. No errors either.
The real time does update.
They are both using the ev_current feed. I wanted long term and instantaneous graphing.
Is this a bug or am I doing something wrong?
Thank You.

Hi Bill, not all of the graphs update without refreshing the page, the “realtime” graph was at the time it was introduced, so called because it updated and showed the data in real time. It’s been a long time since I used anything but multi-graphs, so I don’t know for sure off-hand if the rawdata should or not, but if you have no errors and it isn’t updating, I would suspect not.

What are the graph characteristics you are looking for?

I find multigraphs cater for most needs and they do have the ability to update. They update every few seconds (user defined) rather than the single speed rapid “realtime” graphs.

image

Floating time is so that when the graph is first drawn, the furthest right edge is “now” rather than the period set whilst configuring the multigraph. The auto-refresh can be 0 (off) 1 will closely mimic the realtime graph I guess, but 10s is more than fast enough for emonPi/emonTx feeds. I use 30s as that is plenty fast enough, it lowers the load on the server and more importantly, it makes interacting with the graph a tad easier.

1 Like

Hi Paul and thanks for the response!
I am looking at multigraph and it does appear to be alot more configurable and flexible than just the preset graphs.
I cannot find the time period setting though, and when I create a graph, I get a weeks worth of plot and I really just want, about 6 hours for the current day.
I want to plot the ev charge current, power and energy (mostly just experimenting now), and only need about ~12 hours or less for a plot (solar PV time).
I will play around ALOT more with the visualizations though, and incorporate them into my dashboards.
This really opens up alot of flexibility.
Is there a guide on how to use these dashboard features somewhere?

Thanks again!

I don’t know if you can do partial days offhand, but the trick here is to set the graph to what you want to see before you save it, the default is a week, if you (for example) click the “Day” button and then save, when you open a dash it will display a day not a week.

Whether that would work if you zoom to 6rs or not I do not know, but it’s worth a try (once you confirm one of the presets work ok). Sometimes I’ve noticed that the save button doesn’t recognise changes have been made (eg display period) so when that happens I just fudge the graph name (eg change mygraph to mygraph1) and then save (to save the unrecognised changes) and then change the name back and save again, a bit of a PITA but it does save, most of my multigraphs are 1 day.

Not to my knowledge, I just learnt by experimenting (and making mistakes, lots of them!)

1 Like

Thank You Paul for the info!
I will, like you said, play around and see what happens. Also remember about saving my graphs… test it to make sure my changes have “stuck”.
Too bad there isn’t a guide about how the different features work in a dashboard… sure would be helpful, but experimentation would be the next best thing.

Thanks again for your help and I’ll let you know what I find.

There is loads of good info (buried) here on the forums, if you get a handle on using the search facilities, on both this and the archived forum, you’ll find most things have been covered at some point. The trouble with documenting is it’s out of date before you finish it if someone picks up development again, so without planning and keeping a breast of changes, the documentation can actually end up being misleading when its out of date or incomplete.

If you’re still not sure about something after a bit of a search, just ask.

1 Like

Hi Paul.
Well thanks to you, I created several multigraphs, customized them the way I wanted, and replaced them in my dashboards, and WOW what a DIFFERENCE!
They are SO much more customizable and offer more options.
Too bad MORE isn’t said about these types of graphs as I would imagine that more of them would be used!
Thank you so very much about mentioning this!

Hi Paul…
An update…
I re-created my dash graphs as multigraphs and after a few hours of running (probably about 3-4 hours), the updates still stop.
I do have ONE of my graphs as a realtime graph that doesn’t stop near as much, but they all do eventually.
I also have several gauges and dials on my dash and they do not stop updating!
Very odd.
This is running on an Android tablet and I have tried both Chrome (usually crashes with a “snap” error message) and Firefox (minimumizes and becomes inactive).
no other errors though! VERY strange!
I wish I could log the faults somehow.
I have run the same on two tablets simultaneously… one running Firefox and the other Chrome. Same results. I don’t know if that was a wise idea since I don’t know if two sessions on different machines might confuse things, so I went back to only one machine… still no go.
Am i the only one with this problem? Where else should I look?
Getting frustrating, but there HAS to be a reason!

BTW… when viewing the Emoncms log under Admin, are the time stamps for the entries the local time or UTC?

UTC

When you say the graphs stop, do you mean the data trace stops? Or the page/graph freezes? Do the graphs still refresh? For example if a graph “stopped” 10mins ago is there a 10min gap at the end or does the trace with the last datapoint 10mins ago reach all the way to the right?

Are there any faults reported in the browser console? (F12 on chrome).

Tell us more about the feeds that drive the graphs that stop. Are they phpfina? What interval? How often are the inputs updated?

Hi Paul!
The graph freezes and do not refresh unless I reload the page.
There are no gaps as the data is still being logged but the graph stops updating.
the trace with the last datapoint 10mins ago reachs all the way to the right. IE, when the graphs freeze at say 12 noon, and it is 1400 (2 p.m.), the right side of the graph is still displaying 12 noon.
My dials and gauges are still updating though,so the data is being received and processed.
I am using chrome on an android tablet, so no F12.
All my feeds are phpfina at 10 second intervals.
I did look at the emoncms log, and although I don’t know when my dash crashed today, there is this log in the log and I don’t know if this is related (copied and pasted the last lines):
2019-06-02 06:18:10.234|ERROR|index.php|Not Authenticated|feed/data
2019-06-02 06:18:10.405|ERROR|index.php|Not Authenticated|feed/data
2019-06-02 06:18:10.609|ERROR|index.php|Not Authenticated|feed/data
2019-06-02 06:18:17.768|ERROR|index.php|Not Authenticated|user/logout

I don’t know what time the app crashed though…

Thanks for your help! Really appreciate it!

It sounds like your user session is timing out. Try adding your read apikey to the dashboard url so you can view without being logged in.

I will give that a try!
Well we’ll give that a try… it is now 1239 when I started Chorme with the apikey on my tablet.
What determines the session timeout? Chrome or Emoncms or the Pi?

I am trying this for the web address:
http://192.168.1.103/emoncms/dashboard/view?id=1%20&apikey=1323878bcb618cec5f56b0daxxxxxxxx

I added xxxxxxxx to the end to obscure my API and is not the real characters.
I used the api string from my account/read api. Is this the correct key to use? I am guessing it is because I don’t have to log in when I open the page in chrome.

I am testing again because chrome crashed again this morning, but I am not sure the link I used had the api key in it, so test again.

Well I am stumped now.
My tablet (Android) crashed again (at least Chrome did), this morning.
So I dug out an old Windows 7 32 bit laptop, updated everything including Java, and loaded up the same local EMonpicms (via it’s IP address), just for fun.
Strange thing…
The tablet crashed again this afternoon while the laptop kept running, then tonight Firefox crashed while the tablet was still running.
Geez!!!
It’s almost like something is timing out. Does the emonpi have a account connection time limit? that dumps a connection after a few hours?
I don’t see any errors in the emoncms log when this happens and the log level is set to WARN and I see both WARNs and ERRORs.
This has happened on both Firefox and Chrome (on my Android tablet), and Firefox on the Windows laptop.

I just don’t have a clue what might be causing this…

I might add that when the crash happens, I can reload the page and it keeps running just fine. I don’t have to log in again.

Yes. However, if you are accessing the dashboard using an APIKey that should in effect keep you logged in. If you are connected locally, make the dashboard public (and the feeds) and you should not need the APIKey to view it.

Below is a public dashboard (the globe as opposed to a padlock).

You must set the feeds public as well

image

So what exactly do you mean by ‘crash’? This implies the whole browser stops responding and has to be restarted, but your subsequent comment seems to imply otherwise.

One of the best ways to develop documentation is for someone new, to list what they needed to know, what they found out and the solutions. It is more difficult for folk who know, to know what folk who don’t know, need to know.

Feel free to contribute :smile:

I think actually it is a bug as discussed here

Hey THANK you!!! I will give making the dashboard and feeds public to see if that works!

Well I guess crash isn’t the correct word… when the browser on the tablet “crashes”, I get an error displaying “OH SNAP” with some suggestions to fix the problem like clearing the cache (which I tried) and a button to reload the page.

On the laptop, Firefox displays a white page with options to report the crash to Mozilla and a button to reload the page.
Both “reloads” work fine and my dashboards return.

“someone new…” (like ME!). I know I haven’t contributed YET, but believe me, I WILL because this community is full of helpful people that treat new guys/gals with respect AND are helpful too!

Ok, so yes crash is not incorrect term in this case.

Yes, I realize that the term “crash” is often overused and incorrectly used to mean other things.
Just like “locked up” instead of " not responding".
Thanks again for the info on making the dashboard public and the feeds.
I just did that and reloaded both the tablet and the laptop with my dashboard, so we’ll see if success has been made!

I’ll let ya know!