Skip to main content

A small utility to extract power comsumption data from Ireland's national electrical grid provider.

Project description

ESB Smart Meter Importer

A small utility to extract power comsumption data from Ireland's national electrical grid provider.

PyPI - Version PyPI - Python Version


Table of Contents

Installation

pip install esb-smart-meter-importer

Usage

from esb_smart_meter_importer import smart_meter_usage

username = "Your Email Address"
password = "Your Password"

# Your Electricity Meter Number
mprn_number = "100XXXXXXXXXXX"

# If you don't know this, you can use any date *since* the meter was
# installed. Any dates before, and an exception will be thrown.
start_date = "2023-06-01"

# Imports is how much energy you bought from the grid (in kWh)
# Exports is how much energy you sold to the grid (in kWh), but
# presumedly only populated if you have Solar PV panels, etc.
imports, exports = smart_meter_usage(username, password, mprn_number, start_date)

print(imports)

Both imports and exports are dictionaries of datetime -> float, representing your usage in kWh at a 30 minute granularity.

{
    datetime(2023, 11, 10, 17, 0, tzinfo=datetime.timezone.utc): 0.142,
    datetime(2023, 11, 10, 17, 30, tzinfo=datetime.timezone.utc): 0.1285
}

ESB collect the data, so this library cannot offer more than a 30 minute granularity. If you want near live data, you can investigate alternate methods of collection, via Shelly EM clamps.

License

esb-smart-meter-importer is distributed under the terms of the MIT license.

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

esb_smart_meter_importer-0.1.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

esb_smart_meter_importer-0.1.0-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file esb_smart_meter_importer-0.1.0.tar.gz.

File metadata

  • Download URL: esb_smart_meter_importer-0.1.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.0 CPython/3.11.5 Windows/10

File hashes

Hashes for esb_smart_meter_importer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 74f501debec653f14af7adea64ea77d0d8dd5e8e290da939ada936e78c182c85
MD5 f04d413a4e01bf2cd17898b2c7f71596
BLAKE2b-256 4764530a9ab7a6d2b770289bca1331e2072a5aa43f09367a1b396becca83860f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for esb_smart_meter_importer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1bcba6e834c60112087380d03b72af5bc9a11bf4a39b8d1c8bea34dbd6cd1ccb
MD5 e013b95286b76a366365fab9f5baa8c7
BLAKE2b-256 135a8b7e88cf4e68783363fd290e77a30eee898916d950ec09b0aa580c336116

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