Skip to main content

A Python library for the Itron / Actaris IFLAG and Corus protocol

Project description

iflag

A Python library for the Itron / Actaris IFLAG and Corus protocol

Installing

Install via pip, python 3.6+ only

pip install iflag

About

iflag is a library focused on reading and writing data to devices using the IFLAG or Corus protocol. Mainly Itron / Actaris gas volume converters. Communication is done over TCP/IP

Features

The library is now only focused on using Single Address Mode (SAM) of the Corus protocol to access data. SEVC-D parameters of I-FLAG is not supported.

  • Read parameters
  • Write parameters
  • Read databases (logs), event log not yet implemented

Usage

  • Good to know: There are several different float formats due to memory constraints in the protocol and device. All floats are handled as decimal.Decimal in Python to not have float rounding errors.

Read parameters:

from iflag import CorusClient

client = CorusClient.with_tcp_transport(address=('localhost', 4000))
client.read_parameters(['datetime', 'index_unconverted', 'index_converted'])

Write parameters

from iflag import CorusClient, TcpTransport
from datetime import datetime
transport = TcpTransport(address=('localhost', 4000))
client = CorusClient(transport=transport)
client.write_parameters({'datetime': datetime.now()})

Read database

from iflag import CorusClient
from datetime import datetime, timedelta
client = CorusClient.with_tcp_transport(address=('localhost', 4000))
client.read_database(database='interval', start=datetime.now(), stop=(datetime.now() - timedelta(hours=4)))

Parameters

Not all parameters available in a device have been mapped out yet. But the most important ones have been.

Parameter Name Parameter Description
firmware_version Main firmware version
pulse_weight Input pulse weight
compressibility_formula Compressibility Formula: 0=AGANX19 Standard, 1=S-GERG88, 2=PT, 3=AGANx19 Modified, 4=Not Used, 5=T, 6=16 Coeff. 7=AGA8
pressure_base Base pressure, in selected pressure unit
temperature_base Base temperature, in Kelvin
pressure_low Low pressure threshold (Pmin)
pressure_high High pressure threshold (Pmax)
temperature_low Low temperature threshold (Tmin)
temperature_high High temperature threshold (Tmax)
datetime Current time and date
battery_days Battery Autonomy Counter, in days
index_unconverted Unconverted Index
index_converted Converted Index

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[Unreleased]

Added

Changed

Deprecated

Removed

Fixed

Security

[0.1.1] - 2020-01-08

Fixed

  • Fixed error in setup.py that listed the wrong dependency. (attr instead of attrs)

[0.1.0] - 2020-01-08 [YANKED]

Added

  • Initial implementation of reading and writing data to Corus device.

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

iflag-0.1.1.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

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

iflag-0.1.1-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file iflag-0.1.1.tar.gz.

File metadata

  • Download URL: iflag-0.1.1.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/44.0.0 requests-toolbelt/0.8.0 tqdm/4.23.3 CPython/3.6.4

File hashes

Hashes for iflag-0.1.1.tar.gz
Algorithm Hash digest
SHA256 11b3e4a3095f43867f090719b5e27830c15506b77c2d2d534a6096656a19c153
MD5 bfbe15179762b60d8414f55774a1b3ff
BLAKE2b-256 fd68d05b7c4aa9479dba6f08edaa986bdd5e3779973ba08b4f711698defe9993

See more details on using hashes here.

File details

Details for the file iflag-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: iflag-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 15.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/44.0.0 requests-toolbelt/0.8.0 tqdm/4.23.3 CPython/3.6.4

File hashes

Hashes for iflag-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7ad9c2ba0762829aba730441658408e0b0f695c3ec714a537a0741a563ca0775
MD5 3272802e15a1bf98f0afc0fb9e9f208c
BLAKE2b-256 894b549fd50aa9fc895756599483e0e7b22d6dc79d6876c2c48f269f66ff0a53

See more details on using hashes here.

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