Simtricity Emlite Python APIs and CLI
This repository contains:
- API to connect to and send EMOP messages to Emlite meters
- a CLI (emop) for sending messages to the meters
Configure
Configuration steps:
- create file ~/.simt/emlite.prod.env from Lastpass secret 'emop-cli-env-file (prod)'
- create file ~/.simt/emlite.qa.env from Lastpass secret 'emop-cli-env-file (qa)'
- ln -s ~/.simt/emlite.<qa|prod|custom>.env ~/.simt/emlite.env
NOTE:
- FLY_DNS_SERVER needs the DNS that wireguard uses (on Linux look under
resolvectl statusfor the interface and DNS)
see also https://www.notion.so/Emop-and-mediators-CLI-setup-834d32be5c794add8716399ab186abe8
Use
emop
emop env_show
emop env_set prod
emop --help
emop prepay_balance EML2137555666
emop csq EML2137555666
emop profile_log_1 --timestamp 2024-07-19T00:00 EML2137555666
Python API
You can also use the library directly in your Python scripts. The library offers two main client classes:
EmliteMediatorAPI: The core client for standard meter operations (reads, basic writes).EmlitePrepayAPI: Extends the core API with prepay-specific functionality (balance, tokens, tariffs).
Initialization and Logging
The EmliteMediatorAPI constructor allows you to configure the connection and log verbosity.
import logging
from simt_emlite.mediator.api_core import EmliteMediatorAPI
# Initialize the client
# The logging_level parameter controls the verbosity of the internal logger.
# It uses the standard python logging module levels (DEBUG, INFO, WARNING, ERROR).
client = EmliteMediatorAPI(
mediator_address="localhost:50051",
logging_level=logging.WARNING # Set to logging.DEBUG for verbose output
)
# Example Usage
serial = "EML2137555666"
try:
voltage = client.instantaneous_voltage(serial)
print(f"Meter {serial} voltage: {voltage}V")
except Exception as e:
print(f"Error: {e}")
Metadata
Release files for simt-emlite 1.2.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 126.6 MB
Release files / simt_emlite-1.2.12-cp314-cp314t-win_amd64.whl
| Download URL | simt_emlite-1.2.12-cp314-cp314t-win_amd64.whl |
|---|---|
| Size | 2.9 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading Windows x86-64 |
|
SHA-256 checksum How to use checksums |
5be5c67ea4ee6a824c908fce98868615f03056ab95e0e21d9456818d33acc4da
|
|
BLAKE2b-256 checksum How to use checksums |
439004ba110f87549c7878371400372876026735e26f3370f9a40af8f653b044
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / simt_emlite-1.2.12-cp314-cp314t-win32.whl
| Download URL | simt_emlite-1.2.12-cp314-cp314t-win32.whl |
|---|---|
| Size | 2.6 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading Windows x86-32 |
|
SHA-256 checksum How to use checksums |
f564d5bc29e762eee0d658621f05fd41f3f8e59a9fcfb6318b0121e5da7ddf7a
|
|
BLAKE2b-256 checksum How to use checksums |
e83b938743eb9f4c0c6e6d48af6ef2cc65740d0f44df1b9dd71c01cc32c8c289
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / simt_emlite-1.2.12-cp314-cp314t-musllinux_1_2_x86_64.whl
| Download URL | simt_emlite-1.2.12-cp314-cp314t-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 18.4 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
01201d844213e4cdc876faf48da9a9428c00861bd3c13ff78536ceb9549575d1
|
|
BLAKE2b-256 checksum How to use checksums |
8bb7ace9a531b34920b62ede0c2e3e2d22a6b3e89d262343014842583e91e074
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / simt_emlite-1.2.12-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | simt_emlite-1.2.12-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 18.9 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
7bdb7f4fe05b4ea699c87129502b3615218f8df6b969f2e8a71abc647c8b634c
|
|
BLAKE2b-256 checksum How to use checksums |
4ec9b86709062c40aaf7c08d20961e8d56116fd2cbd4660fd43d479911d7ea44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / simt_emlite-1.2.12-cp314-cp314t-macosx_11_0_arm64.whl
| Download URL | simt_emlite-1.2.12-cp314-cp314t-macosx_11_0_arm64.whl |
|---|---|
| Size | 2.7 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
eefec8b3b8ca11dc3791c0377e76591683259a86919480cd30172ddb42f55a42
|
|
BLAKE2b-256 checksum How to use checksums |
23e95bb8447e980db038f04bdcabfe1f64333d6ad275116bba49a1e916703875
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / simt_emlite-1.2.12-cp314-cp314-win_amd64.whl
| Download URL | simt_emlite-1.2.12-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 2.4 MB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
4f34e9a537e043a36972cd4fa10162c186ebff8f916c0466b13d3313c73bf7c6
|
|
BLAKE2b-256 checksum How to use checksums |
7ad9eb47896d52674f8852299bf5c7e728124af070b1a89e0df29f1269766bc7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / simt_emlite-1.2.12-cp314-cp314-win32.whl
| Download URL | simt_emlite-1.2.12-cp314-cp314-win32.whl |
|---|---|
| Size | 2.2 MB |
| Tags | CPython 3.14 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
ff185b6f9c246e7e45d1acf3c2b3d8c0abcd3f4bb20aefb94b9136d0e9dfb380
|
|
BLAKE2b-256 checksum How to use checksums |
4cb4dcc001b6333f83a6ecd431857362f4b36435043efa554d645ab9516db77f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / simt_emlite-1.2.12-cp314-cp314-musllinux_1_2_x86_64.whl
| Download URL | simt_emlite-1.2.12-cp314-cp314-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 16.6 MB |
| Tags | CPython 3.14 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
3a6d6dd230a62ddb55ef08ef29638773881faf54db5a97d0590aea86fbfb7889
|
|
BLAKE2b-256 checksum How to use checksums |
73586711a31900fdc94b927187308ab6e27162891e1abd4b07153da93243e408
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / simt_emlite-1.2.12-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | simt_emlite-1.2.12-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 16.9 MB |
| Tags | CPython 3.14 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
57f8ed5403786039c6a5b9d2057d1ef7ffc9cc1fd0f40f0b20b1b547befddf89
|
|
BLAKE2b-256 checksum How to use checksums |
4b66337e5a161e2436ef4b662bf450edf58be7862a793ebefc163291f669e182
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / simt_emlite-1.2.12-cp314-cp314-macosx_11_0_arm64.whl
| Download URL | simt_emlite-1.2.12-cp314-cp314-macosx_11_0_arm64.whl |
|---|---|
| Size | 2.4 MB |
| Tags | CPython 3.14 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
c2b46bcc9e45e2972e73742c8b0061495767c9254e6fab067a33f8d9947aa04b
|
|
BLAKE2b-256 checksum How to use checksums |
c517f4acc39047b3a43e1f632f07423afc0ff4a1f98ef5cc948b44a7a89275c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / simt_emlite-1.2.12-cp313-cp313-win_amd64.whl
| Download URL | simt_emlite-1.2.12-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 2.4 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
cdd866e71e730573c94b7ed6054091b149a4b12b205777b5d798811cce9914fa
|
|
BLAKE2b-256 checksum How to use checksums |
2692259667f575252ab4cbb067312f08c33f600dbb5cec2c634aa5255078b678
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / simt_emlite-1.2.12-cp313-cp313-win32.whl
| Download URL | simt_emlite-1.2.12-cp313-cp313-win32.whl |
|---|---|
| Size | 2.1 MB |
| Tags | CPython 3.13 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
3820e04ce7569ea88905f181282cc237c001a5b6bbb1e3c6c4db593fabb4b8a6
|
|
BLAKE2b-256 checksum How to use checksums |
cc46f42d5130ecdc1d47edcd32182004622a0e755a91fe108fddc0f626a2042e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / simt_emlite-1.2.12-cp313-cp313-musllinux_1_2_x86_64.whl
| Download URL | simt_emlite-1.2.12-cp313-cp313-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 16.7 MB |
| Tags | CPython 3.13 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
4fee094788339d3111e774024d8ea370c16169bbd3794ebe56059f65c542d339
|
|
BLAKE2b-256 checksum How to use checksums |
3d156d68f2c9d7c0674928fc54c4ddc5532343edb6a53584d4d3605630d9e4ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / simt_emlite-1.2.12-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | simt_emlite-1.2.12-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 17.1 MB |
| Tags | CPython 3.13 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
9f8930af5db8ccadb0b9f2b33d6176d5978cf2f32363c441942446d5866e9997
|
|
BLAKE2b-256 checksum How to use checksums |
72850a347f5e1a86919ed19b267eed14a7fcd595de1a97a44b438ec1b2682505
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / simt_emlite-1.2.12-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | simt_emlite-1.2.12-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 2.4 MB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
449b3b263239ade42e408a0d0cc8c2788bcffbf9c912b8a4618b6ee95bce8fdf
|
|
BLAKE2b-256 checksum How to use checksums |
d2037bec3d44fb4a9523b5d5a6447c974a02b0608cae7967bf31a39f29e96f6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|