Skip to main content

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

Project description


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


Install via pip, python 3.6+ only

pip install iflag


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


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


  • 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)

Read database

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


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


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.








[0.2.0] - 2020-01-14


  • Removed internal session handling as it was in the way of optimizing running several actions directly after each other. Instead now you need to call client.startup() in the beginning and client.shutdown() when you are done.

[0.1.2] - 2020-01-14


  • Separated value identification in parsing config for the different databases so that it is possible to know if for example an average value is the monthly or hourly average.

[0.1.1] - 2020-01-08


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

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


  • 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.

Files for iflag, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size iflag-0.2.0-py3-none-any.whl (15.4 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size iflag-0.2.0.tar.gz (15.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page