Custom library for electricity meters Neva MT 3xx
Project description
Library for electricity meters Neva MT 3xx
Working via serial port or RFC2217 server configured in telnet mode with remctl option, using protocol IEC 61107 (currently IEC 62056-21) and OBIS codes.
Installation
python -m pip install pyneva
Usage examples
From CLI
$ python -m pyneva -p COM4 --func total_energy active_power --obis 60.01.00*FF
Connected to: NEVAMT324.1106
OBIS:
60.01.00*FF 60089784
Functions:
total_energy TotalEnergy(total=16393.23, T1=12827.84, T2=3565.39, T3=0.0, T4=0.0)
active_power ActivePower(sum=2017.8, phaseA=1681.9, phaseB=201.4, phaseC=134.4)
From code
from pyneva import Meter
# /dev/ttyX for linux local port
# comX or COMX for Windows local port
with Meter("192.168.88.109:1884") as session:
print(session.device_name)
# NEVAMT324.1106
print(session.serial_number)
# 11111111
print(session.total_energy)
# TotalEnergy(total=16348.84, T1=12790.08, T2=3558.76, T3=0.0, T4=0.0)
print(session.voltage)
# Voltage(phaseA=233.81, phaseB=233.02, phaseC=232.15)
print(session.active_power)
# ActivePower(sum=1968.8, phaseA=5.0, phaseB=1833.4, phaseC=130.3)
print(session.seasonal_schedules)
# (SeasonSchedule(month=1, day=1, weekday_skd_num=1, sat_skd_num=1, sun_skd_num=1),)
# Returns tuple with seasonal schedules.
# Each schedule specifies from which date the tariff starts,
# and the numbers of tariff schedules on weekdays, Saturdays, Sundays separately.
print(session.special_days_schedules)
# ()
# Returns empty tuple if you have no special days tariff schedules (max 32 days).
print(session.tariff_schedules)
# (
# TariffSchedule(parts=(
# TariffSchedulePart(hour=7, minute=0, T_num=1),
# TariffSchedulePart(hour=23, minute=0, T_num=2)
# )),
# )
# Returns tuple with tariff schedules.
# Each tariff schedule contains parts of the schedule.
# Each schedule part describes from what time of day the tariff starts
# and tariff number (T1, T2, T3, T4).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyneva-0.7.1.tar.gz
(7.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyneva-0.7.1.tar.gz.
File metadata
- Download URL: pyneva-0.7.1.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12b917733739750a19371c6362edd5ce0355011a1c82e01c73e1f7f69e88bf0b
|
|
| MD5 |
48d4d3dbd8979810d0dbe23991198796
|
|
| BLAKE2b-256 |
e3006288df08b6c7c6bb5371146082aad95dd928af50f57e5266168ead4d667e
|
File details
Details for the file pyneva-0.7.1-py3-none-any.whl.
File metadata
- Download URL: pyneva-0.7.1-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f01ef4450f567d0c6170f0b65bc44135d86c98f2bd3bae6fadaedde95593efb7
|
|
| MD5 |
439ac4514dcbbbb95b6047c2078fbfe6
|
|
| BLAKE2b-256 |
916a78ac13a12ab30ce3148ac6bf8feb1ab65e16e526d9a5ce1b60419e06ddf6
|