Skip to main content

Python client library for Stromnetz Graz API

Project description

Python client library for Stromnetz Graz API

PyPI package version number License

This is a simple client library for the (unofficial) Stromnetz Graz Smart Meter Web API.

Please note that you must be able to login and view data on the portal before this library will work. Please refer to Stromnetz Graz how to set up access to the smart meter statistics. Best results are achieved in the IME mode (15 minute reading intervals), however the library can also fall back to IMS (daily reading interval). The most recent data available will be the one for the previous day (see also their FAQ).

Example usage:

from sngraz import StromNetzGraz

sn = StromNetzGraz(mail, password)
await sn.authenticate()
await sn.update_info()

for installation in sn.get_installations():
    print("Installation ID", installation._installation_id)
    print("Installation is installed at", installation._address)
    for meter in installation.get_meters():
        print("Meter ID", meter.id)
        print("Meter Name", meter._short_name)
        await meter.fetch_consumption_data()

        # meter._data now contains the meter readings of the last 30 days
        print(meter._data)

await sn.close_connection()

An installation is usually an house or apartment with an individual address and may contain multiple meters (for example a second meter for a hot water boiler). A meter is the actual single meter.

Stromnetz Graz assigns individual numerical IDs to both installations and meters. The usually used meter number (33 characters usually starting with AT00) is available as attributes (meter._name & meter._short_name).

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

stromnetzgraz-0.1.4.tar.gz (12.8 kB view hashes)

Uploaded Source

Built Distribution

stromnetzgraz-0.1.4-py3-none-any.whl (11.3 kB view hashes)

Uploaded Python 3

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