API Reference¶
- class selprotopy.client.base.SELClient(connApi, logger: Logger | None = None, verbose: bool = False, debug: bool = False, **kwargs)¶
SELClient Class for Polling an SEL Relay/Intelligent Electronic Device.
The basic polling class intended to interact with an SEL relay which has already been connected to by way of a Telnet or Serial connection using one of the following Python libraries:
- Parameters:¶
- connApi : [telnetlib.Telnet, serial.Serial]¶
Telnet or Serial API which will be used to communicate with the SEL relay.
- autoconfig_now : bool, optional
Control to activate automatic configuration with the connected relay at time of class initialization, this should normally be set to True to allow auto-config. Defaults to True
- validConnChecks : int, optional
Integer control to indicate maximum number of connection attempts should be issued to relay in the process of verifying established connection(s). Defaults to 5
- interdelay : float, optional
Floating control which describes the amount of time in seconds between iterative connection verification attempts. Defaults to 0.025 (seconds)
- logger : logging.logger¶
Logging object to record communications messages.
- verbose : bool, optional¶
Control to dictate whether verbose printing operations should be used (often for debugging and learning purposes). Defaults to False
Methods
Identify Current Access Level.
access_level_1
([level_1_pass])Go to Access Level 1.
access_level_2
([level_2_pass])Go To Access Level 2.
autoconfig
([attempts, verbose])Auto-Configure SELClient Instance.
poll_fast_meter
([minAccLevel, verbose])Poll Fast Meter Data from SEL Relay/IED.
quit
()Quit Method.
send_breaker_bit_fast_op
(control_point[, ...])Send a Fast Operate Breaker Bit Control.
send_remote_bit_fast_op
(control_point[, command])Send a Fast Operate Remote Bit Control.
autoconfig_fastmeter
autoconfig_fastmeter_demand
autoconfig_fastmeter_peakdemand
autoconfig_fastoperate
autoconfig_relay_definition
- access_level()¶
Identify Current Access Level.
Simple method to identify what the current access level is for the connected relay. Provides an integer and string.
- Returns:¶
int (Integer representing the access level) – as a value in the range of [0, 1, 2, 3]
desc (String describing the access level,) – will return empty string for level-0.
- access_level_1(level_1_pass: str = b'OTTER', **kwargs)¶
Go to Access Level 1.
Used to elevate connection privileges with the connected relay to ACC with the appropriate password specified. If called when current access level is greater than ACC, this method will deescalate the permission level to ACC.
See also
quit
Relinquish all permission with relay
access_level_2
Elevate permission to 2AC
- access_level_2(level_2_pass: str = b'TAIL', **kwargs)¶
Go To Access Level 2.
Used to elevate connection privileges with the connected relay to 2AC with the appropriate password specified. If called when current access level is greater than 2AC, this method will deescalate the permission level to 2AC.
See also
quit
Relinquish all permission with relay
access_level_1
Elevate permission to ACC
- autoconfig(attempts: int = 0, verbose: bool = False, **kwargs)¶
Auto-Configure SELClient Instance.
Method to operate the standard auto-configuration process with a connected relay to identify the system parameters of the relay. This includes:
FID
BFID
CID
DEVID
PARTNO
CONFIG
Relay Definition Block
This method also automatically interprets the following fast meter blocks by way of separate method calls.
Fast Meter Configuration Block
Fast Meter Demand Configuration Block
Fast Meter Peak Demand Configuration Block
Fast Operate Configuration Block
See also
autoconfig_fastmeter
Auto Configuration for Fast Meter
autoconfig_fastmeter_demand
Auto Configuration for Fast Meter Demand
autoconfig_fastmeter_peakdemand
Auto Configuration for Fast Meter Peak Demand
autoconfig_fastoperate
Auto Configuration for Fast Operate
autoconfig_relay_definition
Auto Configuration for Relay Definition Block
- Parameters:¶
- attempts : int, optional¶
Number of auto-configuration attempts, setting to 0 will allow for repeated auto-configuration until all stages succeed. Defaults to 0
- verbose : bool, optional¶
Control to dictate whether verbose printing operations should be used (often for debugging and learning purposes). Defaults to False
- poll_fast_meter(minAccLevel: bool = 0, verbose: bool = False, **kwargs)¶
Poll Fast Meter Data from SEL Relay/IED.
Method to poll the connected relay with the configured protocol settings (use autoconfig method to configure protocol settings).
See also
autoconfig
Relay Auto Configuration
- quit()¶
Quit Method.
Simple method to send the QUIT command to an actively connected relay.
See also
access_level_1
Elevate permission to ACC
access_level_2
Elevate permission to 2AC
- send_breaker_bit_fast_op(control_point: str, command: BreakerBitControlType = BreakerBitControlType.TRIP)¶
Send a Fast Operate Breaker Bit Control.
Send a breaker bit using the Fast Operate protocol by describing the control point and the control type.
See also
send_remote_bit_fast_op
Send Remote Bit Control
- send_remote_bit_fast_op(control_point: str, command: RemoteBitControlType = RemoteBitControlType.PULSE)¶
Send a Fast Operate Remote Bit Control.
Send a remote bit using the Fast Operate protocol by describing the control point and the control type.
See also
send_breaker_bit_fast_op
Send Breaker Bit Control
- Parameters:¶