V4Meter Class¶
-
class
ekmmeters.
V4Meter
(meter_address='000000000000')¶ Commands and buffers for V4 Omnnimeter.
-
attachPort
(serial_port)¶ Required override to attach the port to the meter.
Parameters: serial_port (SerialPort) – Declared serial port. Does not need to be initialized.
-
request
(send_terminator=False)¶ Combined A and B read for V4 meter.
Parameters: send_terminator (bool) – Send termination string at end of read. Returns: True on completion. Return type: bool
-
requestA
()¶ Issue an A read on V4 meter.
Returns: True if CRC match at end of call. Return type: bool
-
getReadBuffer
()¶ Return the read buffer containing A and B reads.
Appropriate for JSON conversion or other processing in an agent.
Returns: A SerialBlock
containing both A and B reads.Return type: SerialBlock
-
getField
(fld_name)¶ Return
Field
content, scaled and formatted.Parameters: fld_name (str) – A :class:~ekmmeters.Field value which is on your meter. Returns: String value (scaled if numeric) for the field. Return type: str
-
lcdString
(item_str)¶ Translate a string to corresponding LCD field integer
Parameters: item_str (str) – String identical to LcdItems
entry.Returns: LcdItems
integer or 0 if not found.Return type: int
-
setLCDCmd
(display_list, password='00000000')¶ Single call wrapper for LCD set.”
Wraps
setLcd()
and associated init and add methods.Parameters: - display_list (list) – List composed of
LCDItems
- password (str) – Optional password.
Returns: Passthrough from
setLcd()
Return type: bool
- display_list (list) – List composed of
-
setRelay
(seconds, relay, status, password='00000000')¶ Serial call to set relay.
Parameters: - seconds (int) – Seconds to hold, ero is hold forever. See
RelayInterval
. - relay (int) – Selected relay, see
Relay
. - status (int) – Status to set, see
RelayState
- password (str) – Optional password
Returns: True on completion and ACK.
Return type: bool
- seconds (int) – Seconds to hold, ero is hold forever. See
-
setPulseInputRatio
(line_in, new_cnst, password='00000000')¶ Serial call to set pulse input ratio on a line.
Parameters: - line_in (int) – Member of
Pulse
- new_cnst (int) – New pulse input ratio
- password (str) – Optional password
Returns:
- line_in (int) – Member of
-
setZeroResettableKWH
(password='00000000')¶ Serial call to zero resettable kWh registers.
Parameters: password (str) – Optional password. Returns: True on completion and ACK. Return type: bool
-
setPulseOutputRatio
(new_pout, password='00000000')¶ Serial call to set pulse output ratio.
Parameters: - new_pout (int) – Legal output, member of
PulseOutput
. - password (str) – Optional password
Returns: True on completion and ACK
Return type: bool
- new_pout (int) – Legal output, member of
-