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.2.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

esb_smart_meter_importer-0.2.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: esb_smart_meter_importer-0.2.0.tar.gz
  • Upload date:
  • Size: 4.7 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.2.0.tar.gz
Algorithm Hash digest
SHA256 053092e2be56ee9cd3686d0d5fea0194d7715b62aea020f5bb67f605f7d127cc
MD5 14556cd142fb92e0dcda9b84d9814572
BLAKE2b-256 6fdc8f19279cabbd8b89e8a2b210fc22931288308ecf10aef9eb06c910070a07

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for esb_smart_meter_importer-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f3d2bbdd4d94e6a6ff7595311ee9acfc1b84e1f52b7875161b816c49bb4b5884
MD5 a9430fae87e0b33487141ddd796fd3ba
BLAKE2b-256 a85985402410382bfe6dae666482985e641808e0eaf547f36d82940e8ae8b4fc

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