Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSV export extension #91

Merged
merged 3 commits into from Jan 27, 2022
Merged

Conversation

pierstitus
Copy link

Add a CSV export extension in the examples/extensions dir. Closes #76

One CSV file per day is saved.

extvar configuration:
"outpath": path where to save CSV files, default: "/home/pi/grottlog"
"csvheader": comma separated string with fields to store, defaults to all available fields

To be able to convert the data to standard units the detected data layout is added to the conf variable as conf.layout.

@pierstitus pierstitus changed the title CSV export plugin CSV export extension Jan 11, 2022
@johanmeijer
Copy link
Owner

Nice! I am going to test it!. This is why I created the extension feature. I am glad somebody is doing something useful with it ;)

Also nice that you make changes to the original grott coding to improve the use of extensions.

@johanmeijer
Copy link
Owner

I will commit this to the master and also applies it to the 2.7 (2.7.1) branches. I will update the wiki (add it on the extension page or create separate page for it) and describe it in the readme.

Thanks!!

@johanmeijer johanmeijer merged commit 581f4c5 into johanmeijer:master Jan 27, 2022
@pierstitus
Copy link
Author

Nice, thanks!
On the wiki there's a small typo, a double quote before outpath on the line:

extvar = {""outpath": "<path to your CSV files>", "csvheader": "<your csv header>"}

I'm using the following as a quite complete log without too much zeros or double data. But with different inverters that will differ too.

"csvheader":"time,pvpowerin,pv1voltage,pv1current,pv1watt,pv2voltage,pv2current,pv2watt,pvpowerout,pvgridvoltage,pvenergytoday,pvenergytotal,totworktime,pvtemperature,pvipmtemperature,epv1today,epv1total,epv2today,epv2total"

johanmeijer added a commit that referenced this pull request Feb 6, 2022
2.7.1
- Add coding from Pull req #91 (csv export exentsion)
  Add a CSV export extension in the examples/extensions dir. Closes #76

  One CSV file per day is saved.

  extvar configuration:
  "outpath": path where to save CSV files, default: "/home/pi/grottlog"
  "csvheader": comma separated string with fields to store, defaults to all available fields
- Add parameter to enable message retain in MQTT (#84)
  - .ini [MQTT section] retain = True
  - environmental gmqttretain = "True" (docker: -e gmqttretain = "True") 
- Add parameter to enable sent inverter temperature as temperature value to pvoutput (not advised PVOutemp should be outside temperature) Issue #60
  - .ini [PVOutput section] pvtemp = True
  - environmental gpvtemp = "True" (docker: -e gpvtemp = "True")
- Add parameter to disable sending energytoday to pvoutput (disable V1 input). This should show better avarages. Issue: #51  
  - .ini [PVOutput section] pvdisv1 = True
  - environmental gpvdisv1 = "True" (docker: -e gpvdisv1 = "True")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Save / Download data locally to csv possible?
2 participants