Skip to main content

Get your electricity meter reading and usage data from compatible MyMeter sites.

Project description

MyMeter API

This API can be used to interact with the private API used by the MyMeter application used by some power companies to expose usage data to customers.

NOTE: This API is undocumented and could change or break at any time.

Usage

All functionality is encapsulated within the MyMeterApi class. It requires four parameters: baseUrl, rememberMeCookie, sidCookie, and cookieRequestVerificationToken.

  • baseUrl is simply the URL of your power company's MyMeter instance (i.e. "https://mymeter.example.com")
  • rememberMeCookie, sidCookie, and cookieRequestVerificationToken are the values of your MM_RememberMe, MM_SID, and __RequestVerificationToken cookies respectively

Once you have an instance of MyMeterApi, just call downloadUsage with your meter number, the date range you want, and the interval you want to be returned. The API client will automatically perform the CSRF process, and then download and parse a usage CSV, returning an array of MyMeterUsageValue objects.

Running the example

cp .env.example .env

# Fill out .env with your configuration

uv sync --dev

uv run ./example.py

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

my_meter_api-0.2.0.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

my_meter_api-0.2.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: my_meter_api-0.2.0.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for my_meter_api-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b61085f1aa4bd1d41126cf21202f1f7c978a3852fb8e23bfb8d847b5a96d5825
MD5 8a2ccede9596fafa4577e8e7ea52b1ff
BLAKE2b-256 4f5dbbe24aac421d4fc3cedf739262b625327206d98b71f517a17cb48c88ba65

See more details on using hashes here.

Provenance

The following attestation bundles were made for my_meter_api-0.2.0.tar.gz:

Publisher: python-publish.yml on jthoward64/my-meter-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: my_meter_api-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for my_meter_api-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 68710784f2f570d38837b829bbc6c5ea7e65910b7e57420996588e819812a04b
MD5 59b4127b7c39acbbd7f7413433b8773b
BLAKE2b-256 a301577aecab161e6eaf162bb27fdf404eef5c5363b0c0f59986e05a4cef68ce

See more details on using hashes here.

Provenance

The following attestation bundles were made for my_meter_api-0.2.0-py3-none-any.whl:

Publisher: python-publish.yml on jthoward64/my-meter-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page