Skip to main content

An unofficial python implementation of the NetzNÖ Smartmeter Portal API

Project description

NetzNÖ Smartmeter Portal API

This project is an unofficial implementation of the NetzNÖ Smartmeter Portal API (https://smartmeter.netz-noe.at/). It cleans up any null values from the API response and maps it to usable Python objects.

Supports: Python 3.9+

Installation

pip3 install netznoe-smartmeter-portal-api

Usage example

from pendulum import Date

from netznoe_smartmeter_portal_api import NetzNoeSmartmeterPortalApi

meter_id = 'AT0020000000000000000000020xxxxxx'
api = NetzNoeSmartmeterPortalApi(username='username', password='password')
api.do_login()

# ---
# API Methods:

# returns monthly aggregated data
yearly_values = api.get_year(meter_id, 2023)
# SmartmeterResultYearly(
#   values={
#     datetime.date(2023, 1, 1): 100.001,
#     ...
#   },
#   peak_demands={
#     datetime.datetime(2023, 2, 18, 17, 15, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Vienna')): 2.101, 
#     ...
#   },
#   self_coverage={},
#   self_coverage_renewable_energy={},
#   grid_usage_leftover={},
#   joint_tenancy_proportion={}
#   blind_consumption={},
#   blind_power_feed={},
# )

# returns daily aggregated data for the requested month
monthly_values = api.get_month(meter_id, 2023, 3)
# SmartmeterResult(
#   metered={
#     datetime.date(2023, 3, 1): 1.810, 
#     ...
#   },
#   metered_peak_demands={
#     datetime.datetime(2023, 3, 1, 22, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Vienna')): 0.012,
#     ...
#   },
#   peak_demand_data_qualities={
#     datetime.datetime(2023, 3, 1, 22, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Vienna')): SmartmeterDataQuality.L1,
#   },
#   estimated={},
#   estimated_qualities={},
#   estimated_peak_demands={},
#   self_coverage={}, 
#   self_coverage_renewable_energy={}, 
#   grid_usage_leftover={},
#   joint_tenancy_proportion={}, 
#   quality_ec={},
#   blind_consumption={},
#   blind_power_feed={}
# )

# returns daily aggregated data for the requested time range
weekly_values = api.get_week(meter_id, start_date=Date(2023, 1, 2), end_date=Date(2023, 1, 8))

# returns 15min values of the requested day
daily_values = api.get_day(meter_id, day=Date(2023, 4, 1))

# logout of the api
api.do_logout()

Mapping between API fields and model fields

For easier usage and more meaningful naming of the fields provided by the NetzNÖ Smartmeter Portal API they have been renamed in the implemented Python models.

For description, unit and field mapping see comments in file src/netznoe_smartmeter_portal_api/models.py.

Legal

Disclaimer: This is not affiliated, endorsed or certified by Netz NÖ. This is an independent and unofficial API. Provided as is. Use at your own risk.

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

netznoe_smartmeter_portal_api-1.1.0.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for netznoe_smartmeter_portal_api-1.1.0.tar.gz
Algorithm Hash digest
SHA256 b7bd669b885ee3224613586f6c2ffef01d727a1d52fa8374f1cc0e0764864096
MD5 892d6f9288295a5ba96826952e2001e8
BLAKE2b-256 1e3aeaa6fa50dbdc4ebd42bb71503f01c0c1eda183ca0419428b5d606d4ab944

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for netznoe_smartmeter_portal_api-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0b8255b33bb236e628a362b90bb757d4805311809e5b9162f61ec602f657caef
MD5 80fb8930103128031cb9d4a08cd1dda0
BLAKE2b-256 98efdfba973a34ab21e3471ff71cc5ccf637229b6a93c97eda85bf997f02d3c6

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