Assorted utility functions for working with data downloaded from Selectronics' SP-LINK programme which communicates with their controllers.
Latest release 20220606: Initial PyPI release.
I use this to gather and plot data from my solar inverter.
Function main(argv=None)
SP-Link command line mode.
Class SPLinkCommand(cs.timeseries.TimeSeriesBaseCommand, cs.cmdutils.BaseCommand)
Command line to work with SP-Link data downloads.
Command line usage:
Usage: splink [-d spdpath] [-n] subcommand...
-d spdpath Specify the directory containing the SP-LInk downloads
and time series. Default from $SPLINK_DATADIR,
or '.'
-n No action; recite planned actions.
Subcommands:
fetch [-F rsync-source] [-nx] [-- [rsync-options...]]
Rsync everything from rsync-source into the downloads area.
-F Fetch rsync source, default from $SPLINK_FETCH_SOURCE.
-n Passed to rsync. Just more convenient than putting it at the end.
-x Delete source files.
help [-l] [subcommand-names...]
Print the full help for the named subcommands,
or for all subcommands if no names are specified.
-l Long help even if no subcommand-names provided.
import [-d dataset,...] [-n] [sp-link-download...]
Import CSV data from the downloads area into the time series data.
-d datasets Comma separated list of datasets to import.
Default datasets: DailySummaryData DetailedData EventData
-f Force. Import datasets even if already marked as
imported.
-n No action. Recite planned imports.
sp-link-download Specify specific individual downloads to import.
The default is any download not tagged as already
imported.
info
Report infomation about the time series stored at tspath.
plot [--show] [-f] [-o imagepath] days {mode|[dataset:]{glob|field}}...
Class SPLinkCSVDir(cs.fs.HasFSPath)
A class for working with SP-Link data downloads,
referring to a particular PerformanceData* download directory.
Class SPLinkData(cs.fs.HasFSPath, cs.resources.MultiOpenMixin, cs.context.ContextManagerMixin)
A directory containing SP-LInk data.
This contains:
downloads: a directory containing copies of various SP-Link downloads i.e. this contains directories namedPerformanceData_*.events.db: accrued event data from theEventDataCSV filesDailySummaryData: anSPLinkDataDircontaining accrued data from theDailySummaryDataCSV filesDetailedData: anSPLinkDataDircontaining accrued data from theDetailedDataCSV files
Class SPLinkDataDir(cs.timeseries.TimeSeriesDataDir, cs.timeseries.TimeSeriesMapping, builtins.dict, cs.resources.MultiOpenMixin, cs.context.ContextManagerMixin, cs.fs.HasFSPath, cs.configutils.HasConfigIni, cs.timeseries.HasEpochMixin, cs.timeseries.TimeStepsMixin)
A TimeSeriesDataDir to hold log data from an SP-Link CSV data download.
This holds the data from a particular CSV log such as 'DetailedData'.
The SPLinkData class manages a couple of these and a downloads
subdirectory and an events SQLTags.
Method SPLinkDataDir.__init__(self, dirpath, dataset: str, step: int, policy=None, **kw):
Initialise the SPLinkDataDir.
Parameters:
dirpath: the pathname of the directory holding the downloaded CSV filesdataset: which CSV file populates this time series, eg'DetailedData'step: optional time series step size, defaultSPLinkDataDir.DEFAULT_LOG_FREQUENCY, which comes fromSPLinkCSVDir.DEFAULT_LOG_FREQUENCYpolicy: optional TimespanPolicyinstance; if omitted anTimespanPolicyYearlyinstance will be made Other keyword arguments are passed to theTimeSeriesDataDir` initialiser.
Class SPLinkDataFileInfo(builtins.tuple)
SPLinkDataFileInfo(fspath, sitename, dataset, unixtime, dotext)
Method SPLinkDataFileInfo.__new__(_cls, fspath, sitename, dataset, unixtime, dotext):
Create new instance of SPLinkDataFileInfo(fspath, sitename, dataset, unixtime, dotext)
Function ts2001_unixtime(tzname=None)
Convert an SP-Link seconds-since-2001-01-01-local-time offset into a UNIX time.
Release Log
Release 20220606: Initial PyPI release.
Release files for cs.splink 20220606
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cs.splink-20220606.tar.gz | 12.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cs.splink-20220606-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.4 kB
Release files / cs.splink-20220606.tar.gz
| Download URL | cs.splink-20220606.tar.gz |
|---|---|
| Size | 12.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
177b80cf7790f3449ebfd4446576e9236cb471acc7beeab481180885557432d3
|
|
BLAKE2b-256 checksum How to use checksums |
cd3b3c6dc62d745e4d241f240f5278b066ed569223c980db384c1f9b7e9d329e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.1 readme-renderer/30.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.8.2 keyring/23.3.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.9.13
|
Release files / cs.splink-20220606-py3-none-any.whl
| Download URL | cs.splink-20220606-py3-none-any.whl |
|---|---|
| Size | 11.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e638f9a6e33eda7185e613a0200b8e41d041f0087020c349e982051aef152a27
|
|
BLAKE2b-256 checksum How to use checksums |
d62b502801ca41fe3afdea87f29ae057ef185c1b96265e294784cecf930d6f04
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.1 readme-renderer/30.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.8.2 keyring/23.3.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.9.13
|