Skip to content

ohitz/smartmeter-readout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

NAME

smartmeter-readout - Read data from an IEC 62056-21 smart meter

SYNOPSIS

smartmeter-readout [OPTIONS] DEVICE

DESCRIPTION

smartmeter-readout communicates with the smart meter connected to the serial port DEVICE and reads out a full data telegram.

OPTIONS

-h|--help

Show the help message.

-d|--debug

Print debugging output.

-r|--register REGISTER[/LABEL[/FACTOR/FORMAT]]

By default, all registers read from the smart meter are shown. When this option is used, only the specified registers are shown.

When LABEL is specified, an optional label is printed along with the value.

FACTOR specifies an optional multiplication factor.

FORMAT specifies a sprintf-style format (default: %f)

The option may be specified multiple times.

-c|--continuous

Enable continuous reading mode. Reads telegrams until the program is stopped using CTRL-C.

-w|--wait SECS

Time to wait between two readouts (when running in continuous reading mode).

-n|--no-lock

Don't check for lock files (potentially dangerous). This will speed up the program by two seconds.

--callback PROGRAM

After each telegram is read, the specified PROGRAM is called and the output is piped into that program. If the program's exit status is different from 0, smartmeter-readout quits with the same status (especially relevant when running in continuous mode).

--retries RETRIES

How many times to retry getting a telegram. If no telegram could be read, the program quits with status 1. Defaults to 5 retries.

smartmeter-readout was reported to work with the following meters:

  • Iskraemeco MT174

  • Landis+Gyr E230

Registers returned on an Iskraemeco MT174 smart meter:

  • 0.0.0: Device address

  • 0.2.0: Firmware version

  • 1.8.0: Positive active energy total (kWh)

  • 1.8.1, 1.8.2: Positive active energy in tariff 1 and 2 (kWh)

  • 2.8.0: Negative active energy total (kWh)

  • 2.8.1, 2.8.2: Negative active energy in tariff 1 and 2 (kWh)

  • 31.7.0, 51.7.0, 71.7.0: Instantaneous current in phase L1, L2 and L3 (A)

  • 32.7.0, 52.7.0, 72.7.0: Instantaneous voltage in phase L1, L2 and L3 (V)

  • 33.7.0, 53.7.0, 73.7.0: Power factor in phase L1, L2 and L3 (cos phi)

  • 36.7.0, 56.7.0, 76.7.0: Instantaneous power in phase L1, L2 and L3 (kW)

  • C.1.0: Meter serial number.

  • C.1.1: Meter type.

  • C.1.6: Firmware checksum.

  • C.7.0: Power outages counter.

  • C.7.1, C.7.2, C.7.3: Power outages counter on phase L1, L2 and L3.

  • F.F.0: Fatal error meter status.

COPYRIGHT AND LICENSE

Copyright (C) 2017-2018 Oliver Hitz

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

About

IEC 62056 smart meter readout in perl

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages