Skip to main content

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

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()

The example needs to run in an async context, please see issue #6 for an example if you want to run it standalone.

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).

Home Assistant Integration

This library is used in my Home Assistant Custom Component ha-stromnetzgraz, available via HACS. It allows you to have your Smart Meter readings inside Home Assistant! See the ha-stromnetzgraz repository for more details.

Metadata

Release files for stromnetzgraz 0.1.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stromnetzgraz 0.1.8
File Size Uploaded
stromnetzgraz-0.1.8.tar.gz 13.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for stromnetzgraz 0.1.8
File Interpreter ABI Platform
stromnetzgraz-0.1.8-py3-none-any.whl Python 3 none any Details

Total release size: 24.8 kB

Release files / stromnetzgraz-0.1.8.tar.gz

Download URL stromnetzgraz-0.1.8.tar.gz
Size 13.3 kB
Tags Source
SHA-256 checksum
How to use checksums
351a7234c9b06657bd505028a8f2022c3147d5a4dcf58ea17e0eba842a0a231e
BLAKE2b-256 checksum
How to use checksums
a159dec690cb064d629d52ea932335f91f91416244164aa01bc68f2119d8054b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.1

Release files / stromnetzgraz-0.1.8-py3-none-any.whl

Download URL stromnetzgraz-0.1.8-py3-none-any.whl
Size 11.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
155de9cc3488c44e893db2332c79a40167c8b1ee33f272fd77f62424d4707c43
BLAKE2b-256 checksum
How to use checksums
11377910d51037f08ec49c19c47bb8b26daa4a7193afb0678691ad71b51d9076
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.1

Release history Release notifications | RSS feed

This release

0.1.8 This release

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page