IAMMETER local HTTP client
Asynchronous local HTTP access for the IAMMETER Home Assistant Core upgrade, with the original synchronous APIs retained for existing users.
Installation
Requires Python 3.11 or newer.
pip install iammeter==0.3.0
Asynchronous usage
import asyncio
import aiohttp
from iammeter import AsyncClient
async def main():
async with aiohttp.ClientSession() as session:
client = AsyncClient(session, "meter.local", port=80)
measurement = await client.async_get_data()
print(measurement)
asyncio.run(main())
Home Assistant supplies its own shared ClientSession. The library never
creates or closes that session and has no dependency on Home Assistant.
The original iammeter.client.Client and IamMeter synchronous APIs remain
available for existing callers, including their constructor signatures, attributes,
requests exceptions and legacy measurement format/model grouping. The deprecated
iammeter.power_meter import path is retained as well. New Home Assistant Core
uses only AsyncClient; retaining compatibility does not make Core polling synchronous.
The distribution includes requests and voluptuous for those legacy APIs.
Synchronous usage
Existing applications can continue using the synchronous client:
from iammeter import Client
client = Client("meter.local", port=80)
measurement = client.get_data()
print(measurement)
Connection and measurements
The address accepts a hostname or a complete HTTP/HTTPS URL. /monitorjson
is appended once when needed. A full URL controls its own scheme and port.
Credentials embedded in URLs and URL fragments are rejected. Supply optional
username= and password= arguments for custom credentials.
Requests use an explicit timeout (8 seconds by default). Access is anonymous unless credentials were supplied. A 401 response triggers one attempt with the legacy admin credentials, and successful legacy authentication is remembered for the lifetime of the client. Custom credentials are never replaced by that fallback. Cancellation propagates to the caller.
Catch IammeterConnectionError for connection/HTTP failures,
IammeterAuthError for rejected authentication, and IammeterDataError for
invalid JSON or malformed measurements.
Supported models: WEM3080, WEM3162, WEM3080T, WEM3046T, WEM3050T, WEM3063T,
and WEM2067. Current method prefixes identify the specific model; legacy
three-phase responses without a recognized method retain the WEM3080T fallback.
WEM3162 accepts lowercase data and preserves available identity metadata.
Readings retain the meter's engineering units and sign: V, A, W, kWh, Hz,
unitless power factor (for example 0.95), var, and kvarh. No energy integration
or absolute-value conversion is performed by this library.
WEM2067 exposes A/B only; its optional third row is NET, never channel C.
Other three-phase models use A/B/C and an optional fourth NET row. Optional
EA.Reactive rows expose reactive power, inductive energy and capacitive energy.
Absent fields remain absent; they are never fabricated as zero. Measurements
must be finite numbers or an explicit null for an unknown reading. Parsing and authentication behavior are informed by
the independently maintained lewei50/ha_iammeter HTTP integration.
Validation distinguishes seven-model synthetic coverage from physical-device acceptance. Physical WEM3162 and WEM3063T were not part of the current local lab.
Metadata
Release files for iammeter 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| iammeter-0.3.0.tar.gz | 14.6 kB | With provenance | Details for iammeter-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| iammeter-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for iammeter-0.3.0-py3-none-any.whl |
Total release size: 25.7 kB
Release files / iammeter-0.3.0.tar.gz
| Download URL | iammeter-0.3.0.tar.gz |
|---|---|
| Size | 14.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0fa0889341b973c13b1668b3feb6f56e55e1e11ca2dcb77a845fbed785352f22
|
|
BLAKE2b-256 checksum How to use checksums |
b342e7ca94e1c63d6ac78a74ab4b60c26717d515961bf5c0be95f4203e4bea07
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.
Transparency logRelease files / iammeter-0.3.0-py3-none-any.whl
| Download URL | iammeter-0.3.0-py3-none-any.whl |
|---|---|
| Size | 11.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5bdb1f44a72c93ecbabc5eb506dc8985b9d7f1bd499a4efb2365ef42cef6b270
|
|
BLAKE2b-256 checksum How to use checksums |
9229e944412b478eaf4e663136203edcfff194afca58bfcd60f8aece858e3e73
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.
Transparency logSecurity for iammeter 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for iammeter-0.3.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.