Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
This repository was archived by the owner on Jun 6, 2024. It is now read-only.
/sunnyportal-pyPublic archive

Python module to access PV systems in Sunny Portal

License

NotificationsYou must be signed in to change notification settings

erijo/sunnyportal-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python module to access PV systems inSunny Portal.

sunnyportal2pvoutput

The scriptsunnyportal2pvoutput can be used to senddata toPVOutput. It uses a config file to store thecredentials for Sunny Portal and theAPI Key and System Id for PVOutput.

How to run

  1. Clone or download the repository.
  2. Enter the directory and run:PYTHONPATH=. ./bin/sunnyportal2pvoutput --dry-run sunnyportal.config
  3. Enter the requested information and verify that the script is able to connect to Sunny Portal.
  4. The information is saved in sunnyportal.config and can be edited/deleted if you misstype anything.
  5. Once it works, replace --dry-run with e.g. --output to upload the last seven days output data to pvoutput or --status to upload data for the current day.
  6. Add --quiet to silence the output.
$ PYTHONPATH=. ./bin/sunnyportal2pvoutput sunnyportal.config --helpusage: sunnyportal2pvoutput [-h] [-s] [-o] [-c] [-p DAYS_PAST] [-q] [-n] configConnect Sunny Portal to PVoutput.orgpositional arguments:  config                Configuration file to useoptional arguments:  -h, --help            show thishelp message andexit  -s, --status          Report status(es)  -o, --output          Report output(s)  -c, --consumption     Report consumption  -p DAYS_PAST, --days-past DAYS_PAST                        number of DAYSin the past to go back -- default: 0 (today only)  -q, --quiet           Silence output  -n, --dry-run         Don't send any data

sunnyportal2file

The scriptsunnyportal2file can be used to save data fromSunny Portal to file/database.It uses the same config file as insunnyportal2pvoutput to store the credentialsfor Sunny Portal. It will extract the fields (min, mean and max production) whichare available in unit watt asnumpy.uint32 along with corresponding timestampsand aggregate them into apandas DataFrame from which it will save to file withthe format specified. One file will be created for each plant your Sunny Portalaccount has access to.

How to run

  1. Clone or download the repository.
  2. Enter the directory and run:PYTHONPATH=. ./bin/sunnyportal2file sunnyportal.config --format csv (change --format if you prefer a different format)
  3. Enter the requested information and verify that a file was created with the format you specified with the expected content
  4. Once it works, you can specify a different start date with --start-date, and end date with --end-date (both defaults to yesterday)
  5. If a data file already exists, it will only download new data and append to previously created data file (can override --start-date)
  6. Use --include-filter if you only want to download data for a specific plant
  7. Add --quiet to silence the output.
$ PYTHONPATH=. ./bin/sunnyportal2file -husage: sunnyportal2file [-h] -f {json,csv,pickle,feather,parquet,excel,sqlite} [-s START_DATE] [-e END_DATE] [-i INCLUDE_FILTER] [-q] configSave information from Sunny Portal to filepositional arguments:  config                Configuration file to useoptional arguments:  -h, --help            show thishelp message andexit  -f {json,csv,pickle,feather,parquet,excel,sqlite}, --format {json,csv,pickle,feather,parquet,excel,sqlite}                        Formatfor which the data is to be saved  -s START_DATE, --start-date START_DATE                        The start date of data to be savedin the format YYYY-MM-DD (default yesterday)  -e END_DATE, --end-date END_DATE                        The end date of data to be savedin the format YYYY-MM-DD (default yesterday)  -i INCLUDE_FILTER, --include-filter INCLUDE_FILTER                        A string used to filter which plants to include (default includes all plants)  -q, --quiet           Silence output

About

Python module to access PV systems in Sunny Portal

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp