Log spot values to .csv file?
Log spot values to .csv file?
Is there a way to datalog all spot values to a .csv file for review?
Formerly 92 E30 BMW Cabrio with Tesla power
- johu
- Site Admin
- Posts: 5786
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 157 times
- Been thanked: 1021 times
- Contact:
Re: Log spot values to .csv file?
So far there is not. If I get around to it I could hack up a simple python script that connects either directly via serial port or via the esp8266 module and polls selected spot values to be logged.
Also short logs could be stored in the esp8266 flash memory. I think there's about 800k left.
Any better ideas?
Also short logs could be stored in the esp8266 flash memory. I think there's about 800k left.
Any better ideas?
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Re: Log spot values to .csv file?
I stream the values I want to log through CAN with 10ms canperiod, then export the values to a file through the PC software of the CAN device I'm using. I have not compared the speeds of UART vs. CAN, but I guess CAN would outperform.
If CAN is not available and logging through the web interface is a must, the easiest solution I can think of without using the flash memory of ESP8266 or an external Python script is that the plotted values on the web interface can also be written into an HTML textarea in the CSV format with some simple Javascript snippet. Then the data can easily be copy/pasted into a .csv file manually.
If CAN is not available and logging through the web interface is a must, the easiest solution I can think of without using the flash memory of ESP8266 or an external Python script is that the plotted values on the web interface can also be written into an HTML textarea in the CSV format with some simple Javascript snippet. Then the data can easily be copy/pasted into a .csv file manually.
- johu
- Site Admin
- Posts: 5786
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 157 times
- Been thanked: 1021 times
- Contact:
Re: Log spot values to .csv file?
Yes textarea is a very plug & play idea. I guess python scripts will generate too much support burden.
CAN will outperform uart when many values are streamed. But it is limited by the 10ms interval. So if you want to log 1 or 2 values in "real time" uart is better suited.
CAN will outperform uart when many values are streamed. But it is limited by the 10ms interval. So if you want to log 1 or 2 values in "real time" uart is better suited.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Re: Log spot values to .csv file?
10ms (100Hz) is a good resolution for many tasks in my opinion, one can even see the currents in a good sinusoidal shape up to 20-30Hz
Re: Log spot values to .csv file?
The copy and paste doesn’t seem like much of a burden if it simplifies the code part of it. I eventually would like to log over CAN but haven’t purchased any hardware to do so yet.
Formerly 92 E30 BMW Cabrio with Tesla power
- johu
- Site Admin
- Posts: 5786
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 157 times
- Been thanked: 1021 times
- Contact:
Re: Log spot values to .csv file?
I added the logging function.
https://github.com/jsphuebner/esp8266-web-interface
You need to upload the files index.html, index.js, log.html, log.js via the update form.
To use the feature simply check the spot values you want to log and hit the "Show Data Logger" button.
You can choose how many samples are taken every turn. The text area is then filled with CSV data. Data is averaged and you can choose to also include min/max values
https://github.com/jsphuebner/esp8266-web-interface
You need to upload the files index.html, index.js, log.html, log.js via the update form.
To use the feature simply check the spot values you want to log and hit the "Show Data Logger" button.
You can choose how many samples are taken every turn. The text area is then filled with CSV data. Data is averaged and you can choose to also include min/max values
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Re: Log spot values to .csv file?
Awesome! Anxious to try it out this weekend.
Formerly 92 E30 BMW Cabrio with Tesla power
Re: Log spot values to .csv file?
In the interim, if anyone else gets to it before I do, this is my go-to software for reviewing datalogs from my recent ICE powered endeavors. I do love me a good scatter plot
https://www.efianalytics.com/MegaLogViewerHD/
https://www.efianalytics.com/MegaLogViewerHD/
Formerly 92 E30 BMW Cabrio with Tesla power