Skip to main content

Python API for the Zevercloud API

Project description

Zevercloud API

Python API for the Zevercloud API

Note: This piece of software is not approved or endorsed by ZeverCloud. Nor do I endorse their products.

Installation

You can install zevercloud-api using your favorite package manager. For example:

pip install zevercloud-api

Credentials

Three keys are needed to connect to the Zevercloud API:

  • api_key
  • app_key
  • app_secret

Your api_key can be found on the Zevercloud site, under Configuration > Plant Configuration > 5. Api Key. The app_key and app_secret can be found under Account Management > Security Settings, but are only visible once approved by Zeversolar Support. Send an email to service.eu@zeversolar.net, for example, and ask them to make the app_key and app_secret visible to you. They typically do so within a day.

Usage

To see the last known status of your site, as well as some yield statistics:

from zevercloud import ZeverCloud

zc = ZeverCloud(API_KEY, APP_KEY, APP_SECRET)

print(zc.overview)
>>  {
        "last_updated": datetime(2022, 2, 3, 13, 57, 26),
        "online": False,
        "power": 0,
        "site_id": 12345,
        "yield": {
            "today": 5.9,
            "month": 218.42,
            "total": 5800,
            "year": 1770,
        },
    }

Historical power and yield

Historical yield and power figures can also be obtained:

zc.get_output(date=date(2022, 8, 1))
>>  [
       ...
        {"power": 1183, "timestamp": datetime(2022, 8, 1, 12, 0)},
        {"power": 1240, "timestamp": datetime(2022, 8, 1, 12, 20)},
        {"power": 1815, "timestamp": datetime(2022, 8, 1, 12, 40)},
        ...
    ]
zc.get_daily_output(month=date(2022, 8, 1))
>>  [
        {"date": date(2022, 3, 1), "yield": 4.1},
        {"date": date(2022, 8, 2), "yield": 5.2},
        {"date": date(2022, 8, 3), "yield": 0.2},
        ...
    ]
zc.get_monthly_output(year=2022)
>>  [
       {"date": date(2022, 1, 1), "yield": 40.1},
       {"date": date(2022, 2, 1), "yield": 52.1},
       {"date": date(2022, 3, 1), "yield": 113},
       {"date": date(2022, 4, 1), "yield": 8.11},
        ...
    ]
zc.get_yearly_output()
>>  [
       {"year": 2012, "yield": 4069},
       {"year": 2013, "yield": 308},
        ...
    ]

Power is always presented in W (Watt), and yield in kWh (kiloWatt-hour). Due to the internals of the Zevercloud API, all numbers may be rounded up to two significant digits.

Events

Events (errors) can be listed:

zc.get_events(start_date=date(2022, 1, 1), end_date=date(2022, 8, 1))
>>  [
        ZeverSolarEvent(
            event_time=datetime(2022, 1, 1, 12, 34, 56), 
            inverter_id="ZS12345678", 
            event_code=3, 
            event_type=101,
        )
    ]

The ZeverSolarEvent has a human-readable event_description.

Note: the internal Zevercloud API can only return events for 7 days at a time. Using the get_events-method on a large date range will result in many API-calls being made, and may hence possibly take a rather long time.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zevercloud-api-0.1.0.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

zevercloud_api-0.1.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file zevercloud-api-0.1.0.tar.gz.

File metadata

  • Download URL: zevercloud-api-0.1.0.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for zevercloud-api-0.1.0.tar.gz
Algorithm Hash digest
SHA256 12d86b56c9fdaf61dd6190cd7f4800bf3380eb3be3120d8427485ce3714c56ba
MD5 1ac85fcf70909aece9912c4154c02f20
BLAKE2b-256 ceaa408d33e3a40e6ed420b87432e9053ff5fbf2a4788695cb00cb03c512711d

See more details on using hashes here.

File details

Details for the file zevercloud_api-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for zevercloud_api-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6660eb5cc64616250a9b41f48f5cc88f589c15c3f13110ec4ef9affa93ce234a
MD5 cf891b1ca95830c4c663464840e08aaf
BLAKE2b-256 fe4b5647cb6821f7feb24c79b2119043e9856ff1d0c08da6c1886dfff83df0ed

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page