Skip to main content

zeversolarlocal

Project description

Code style: black PyPI codecov

zeversolarlocal

Access solar energy data from your local Zeversolar inverter.

Principle

This library accesses the home.cgi endpoint which returns a bytes object, which is parsed returning current power generation and the daily generated energy. The inverter is powered by the solar energy generated by the connected solar panels. This means that some generated errors can mean different things depending on circumstances.

If the inverter cannot be reached a ZeverTimeout is raised. Which could mean:

  1. The ip-address of the inverter is wrong.
  2. The inverter is switched off (no solar power). But can be considered expected behavior.

If returning data cannot be parsed properly a ZeverError is raised. Which could mean:

  1. The returned data is wrong and is indeed an error.
  2. Sometimes some other data is returned (which meaning is currently unknown), which cannot be parsed, but everything else is fine.

installation

pip install zeversolarlocal

usage

import asyncio
import zeversolarlocal

loop = asyncio.get_event_loop()

def get():

    address = "192.168.1.12"  # ip address of your zeversolar inverter.
    url = zeversolarlocal.default_url(address)
    
    solar_data = loop.run_until_complete(zeversolarlocal.solardata(url))

    print(solar_data)

CLI

from the commandline use:

python -m zeversolarlocal 192.168.1.12

Changelog

1.0.0

  • First release

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

zeversolarlocal-1.1.0.tar.gz (21.5 kB view details)

Uploaded Source

Built Distribution

zeversolarlocal-1.1.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file zeversolarlocal-1.1.0.tar.gz.

File metadata

  • Download URL: zeversolarlocal-1.1.0.tar.gz
  • Upload date:
  • Size: 21.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.26.0

File hashes

Hashes for zeversolarlocal-1.1.0.tar.gz
Algorithm Hash digest
SHA256 131672e64e5113b93e0f49469ae224196ad643e9b6e0ada8a9b50483804056e6
MD5 1a0fa23056968558e70524913c7d34df
BLAKE2b-256 aa483d4aa0a8c686bed2e0e0ca9ab8c980daa66311d5dc8487484bb9fcda94f6

See more details on using hashes here.

File details

Details for the file zeversolarlocal-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for zeversolarlocal-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d0538e57b797b5dbda4a832aebf386d3d27abc4ff4ce30460ead0ee935e27843
MD5 e870d0f0ee66659f59abd5441bac3083
BLAKE2b-256 20c6dbc0bb1fc1aea2ee7a43ef496525e002639841dba847904c6c9045102677

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