Home › Forums › Mooshimeter Support › how to graph your logs
Tagged: logging graphing graph
- This topic has 0 replies, 3 voices, and was last updated 6 years, 5 months ago by
Anonymous.
- AuthorPosts
Andreas
GuestHi folks,
I’ve just put my scripts for generating graphs from mooshimeter logs to a website, so everyone can use it. I’ve added conversions for temperature and time format. Maybe it’s helpful.
Don’t use this for your high security data.
Anonymous
GuestMy post above was a little bit ambiguous. The tool at the website generates the graphs online, just upload the log. It’s not a collection of my scripts.
The idea was to have an easy uncomplicated way from log data to a graph.
-asc
Anonymous
InactiveHi, thanks for this great service!
Just a suggestion: it would be nice to have a selectable (or adaptive) scaling of the x-axis. For example, I uploaded a CSV with abt. 60000 Lines, and I got a graphic width of only 1200 pixel, so effectively less than each ~50th sample must have been taken (or some averaging must have been performed). Anyway, with this kind of “downscaling” it’s impossible to “zoom” into the interesting details.
Anonymous
GuestHi Manfred,
thank you for the feedback. I’m not sure if it’s possible to create a graph with such big width, but I understand the issue. Instead of a fixed 1200×750 resolution I can add a popup menu with some selectable presets. This is easy to implement, we have to test what is feasible.
It may also an option (for the future) to drop the image creation and use a js viewer for the data, where we can zoom in/out and scroll.
Anonymous
GuestOK, the maximum was 19200×750 (256:10), a resolution of 38400×750 create a broken png image. Viewing with firefox was comfortable and much better than expected.
Example with 19200×750 png image.
Anonymous
InactiveWow, what an incredible fast reaction! Thank you very much, this was a great enhancement, I think. I’ve tested it with the same data again, and now I can see enough details.
Anonymous
GuestThe x label setting was wrong for higher resolutions (only 10 for the whole graph). It’s now calculated by using the log count and the selected image resolution.
admin
KeymasterHi Andreas,
This is beautiful! Thank you. Do you mind if I write about it in the blog? Also, is the source code on github, or is this closed source?
Best
~JamesAnonymous
GuestHi James,
sure, you can write about it in your blog. It’s not closed, I’ll distribute a tarball or put it to github when I have finished the remaining open points (and cleanup the code). But don’t expect to much, it’s just two scripts, but helpful (because you can create a graph with some clicks).This weekend, I’ve monitored the charging of a agm battery by a small solar charging controller.
Anonymous
InactiveThat’s nice! I’m also looking forward to take a look inside the souce code, just for curiosity. Do you use gnuplot?
Anonymous
GuestHi Manfred,
I’m using GD::Graph for image generation.
http://search.cpan.org/~ruz/GDGraph/Graph.pm
There are other (maybe better) options, but I’m using GD::Graph in two other projects.
Anonymous
GuestPlease note, the log parser expects a mooshimeter log file, including the header before the csv part stats. I’ve checked the error log and found some parsing problems caused by log files which are not “compliant” because they are modified.
Since I’ve published the link ~150 graphs were generated, most of them (~100) by myself, for testing and some real measurements.
I’ve the following points at my todo list.
* code cleanup
* notation conversion (scientific or decimal)
* selectable color schemes
* virtual third channel for calculations
* put the whole thing to githubThe virtual third channel will open much opportunities. At the moment I’m not sure, how to implement. The easy way is to setup a pull-down menu with predefined operations (electrical Power, etc.). But maybe it’s a better idea to use a text-field where the user can insert a formula (e.g. RPN, which is good to parse). This will cover things like special sensors, shunts, etc. .
It’s also possible to do some final calculation, e.g. determine the real capacity of a battery (when discharging was monitored by the mooshimeter).
admin
KeymasterThank you Andreas,
I will happily try to help with some of your to-do list if the code is on github, so maybe that can be closer to the top of the list :)?
Anonymous
GuestHi James,
the list is not sorted by priority.
Before releasing the code, I must be sure, that there are no potential and obvious vulnerabilities (because it’s running at one of my servers). This is one reason for the code cleanup. I need also to strip private comments and unneeded functions inherited from my other projects. Any kind of documentation is missing.
When I started with it, I was on vacation, want a quick solution, without having in mind to publish it later.
Anonymous
InactiveDon’t be confused. Today I was able to register to this forum/site (was not working before). Account/User Name is “MrPeak” (and not “Andreas”).
-Andreas
- AuthorPosts