Implementation of iM871-A driver¶
Generic driver class for WM-Bus USB-dongle IM871A¶
- Platform
Python 3.5.10 on Linux
- Synopsis
This module implements a class for communication with IM871A module.
- Authors
Steffen Breinbjerg, Thomas Serup
- Date
21 October 2020
Version history¶
Ver 1.0: Set up driver.
Ver 1.1: Implemented seperate ‘open pipe’ handler. Added pipe path as 2.nd argument.
Ver 1.2: Implemented CRC-16 check.
Ver 1.3: Logging exceptions to syslog instead of printing to console.
Ver 1.4: No longer takes USB port as argument. Function for handling port is located in ‘utils/Search_for_dongle’.
Link Modes¶
IM871A is able to run in different modes. Default mode is S2.
Mode |
Argument |
Description |
|---|---|---|
S1 |
s1 |
Stationary, one way communication |
S1-m |
s1m |
S1 with shorter header |
S2 |
s2 |
Stationary, bidirectional communication |
T1 |
t1 |
Frequent transmit, one way communication |
T2 |
t2 |
Frequent transmit, bidirectional communication |
C1, Telegram Format A |
c1a |
Compact, one way communication. No fixed length |
C1, Telegram Format B |
c1b |
Compact, one way communication. Fixed length |
C2, Telegram Format A |
c2a |
Compact, bidirectional communication. No fixed length |
C2, Telegram Format B |
c2b |
Compact, bidirectional communication. Fixed length |
-
class
driver.DriverClass.IM871A(program_path, logOnDestruct=True)[source]¶ Implementation of a driver class for IM871A USB-dongle. Takes 1 argument1: - The path to where to put the pipe, e.g. the program directory.
-
open() → bool[source]¶ Opens the port if port has been closed. It opens with the path given when instantiating the class. Also open the pipe.
-
read_data() → bool[source]¶ Read single dataframe from meters sending with the specified link mode. Send data into ‘named pipe’ (USBx_pipe). Removes the WM-Bus frame before sending data to pipe.
-