OE - Pi  1.1
 All Classes Namespaces Functions
smartups.SmartUPS Class Reference

SmartUPS: this class provides functions for SmartUPS for read and write operations. More...

Inheritance diagram for smartups.SmartUPS:
OpenElectrons_i2c.OpenElectrons_i2c

Public Member Functions

def __init__
 Initialize the class with the i2c address of the SmartUPS. More...
 
def readBattVoltage
 Reads the SmartUPS battery voltage values. More...
 
def readBattCurrent
 Reads the SmartUPS battery current values. More...
 
def readBattTemperature
 Reads the SmartUPS battery temperature values. More...
 
def readBattCapacity
 Reads the SmartUPS battery capacity values. More...
 
def readBattEastimatedTime
 Reads the SmartUPS battery estimated time values. More...
 
def readBattHealth
 Reads the SmartUPS battery health values. More...
 
def readBattState
 Reads the SmartUPS battery state. More...
 
def readButtonClick
 Reads the SmartUPS button click status values. More...
 
def readOutputVoltage
 Reads the SmartUPS output voltage values. More...
 
def readOutputCurrent
 Reads the SmartUPS output current values. More...
 
def readMaxCapacity
 Reads the SmartUPS battery maximum capacity values. More...
 
def readSeconds
 Reads the SmartUPS time in seconds. More...
 
def readCharged
 Reads the SmartUPS charged values. More...
 
- Public Member Functions inherited from OpenElectrons_i2c.OpenElectrons_i2c
def __init__
 Initialize the class with the i2c address of your device. More...
 
def errMsg
 Prints an error message if a read error is detected. More...
 
def writeByte
 Write a byte to your i2c device at a given location. More...
 
def readByte
 Read an unsigned byte from your i2c device at a given location. More...
 
def simpleWriteByte
 Write a byte to your i2c device at a given location. More...
 
def simpleReadByte
 Read an unsigned byte from your i2c device at a given location. More...
 
def readByteSigned
 Read a signed byte from your i2c device at a given location. More...
 
def readArray
 Read a byte array from your i2c device starting at a given location. More...
 
def writeArray
 Write a byte array from your i2c device starting at a given location. More...
 
def readString
 Read a string from your i2c device starting at a given location. More...
 
def readIntegerBE
 Read an unsigned 16 bit integer from your i2c device from a given location. More...
 
def readInteger
 Read an unsigned 16 bit integer from your i2c device from a given location. More...
 
def readIntegerSignedBE
 Read a signed 16 bit integer from your i2c device from a given location. More...
 
def readIntegerSigned
 Read a signed 16 bit integer from your i2c device from a given location. More...
 
def readLongBE
 Read an unsigned 32bit integer from your i2c device from a given location. More...
 
def readLong
 Read an unsigned 32bit integer from your i2c device from a given location. More...
 
def readLongSignedBE
 Read a signed 32bit integer from your i2c device from a given location. More...
 
def readLongSigned
 Read a signed 32bit integer from your i2c device from a given location. More...
 
def GetFirmwareVersion
 Read the firmware version of the i2c device. More...
 
def GetVendorName
 Read the vendor name of the i2c device. More...
 
def GetDeviceId
 Read the i2c device id. More...
 

Static Public Attributes

tuple I2C_ADDRESS = (0x24)
 
int SmartUPS_WHO_AM_I = 0x10
 
int SmartUPS_VERSION = 0x00
 
int SmartUPS_VENDOR = 0x08
 
int SmartUPS_COMMAND = 0x41
 
int SmartUPS_RESTART_OPTION = 0x42
 
int SmartUPS_BUTTON_CLICK = 0x43
 
int SmartUPS_RESTART_TIME = 0x44
 
int SmartUPS_STATE = 0x46
 
int SmartUPS_BAT_CURRENT = 0x48
 
int SmartUPS_BAT_VOLTAGE = 0x4a
 
int SmartUPS_BAT_CAPACITY = 0x4c
 
int SmartUPS_TIME = 0x4e
 
int SmartUPS_BAT_TEMPERATURE = 0x50
 
int SmartUPS_BAT_HEALTH = 0x51
 
int SmartUPS_OUT_VOLTAGE = 0x52
 
int SmartUPS_OUT_CURRENT = 0x54
 
int SmartUPS_MAX_CAPACITY = 0x56
 
int SmartUPS_SECONDS = 0x58
 

Additional Inherited Members

- Static Public Member Functions inherited from OpenElectrons_i2c.OpenElectrons_i2c
def pi_rev
 
def which_bus
 
- Public Attributes inherited from OpenElectrons_i2c.OpenElectrons_i2c
 address
 
 bus
 

Detailed Description

SmartUPS: this class provides functions for SmartUPS for read and write operations.

Constructor & Destructor Documentation

def smartups.SmartUPS.__init__ (   self,
  address = I2C_ADDRESS 
)

Initialize the class with the i2c address of the SmartUPS.

Parameters
selfThe object pointer.
i2c_addressAddress of your SmartUPS.

Member Function Documentation

def smartups.SmartUPS.readBattCapacity (   self)

Reads the SmartUPS battery capacity values.

Parameters
selfThe object pointer.
def smartups.SmartUPS.readBattCurrent (   self)

Reads the SmartUPS battery current values.

Parameters
selfThe object pointer.
def smartups.SmartUPS.readBattEastimatedTime (   self)

Reads the SmartUPS battery estimated time values.

Parameters
selfThe object pointer.
def smartups.SmartUPS.readBattHealth (   self)

Reads the SmartUPS battery health values.

Parameters
selfThe object pointer.
def smartups.SmartUPS.readBattState (   self)

Reads the SmartUPS battery state.

Parameters
selfThe object pointer.
def smartups.SmartUPS.readBattTemperature (   self)

Reads the SmartUPS battery temperature values.

Parameters
selfThe object pointer.
def smartups.SmartUPS.readBattVoltage (   self)

Reads the SmartUPS battery voltage values.

Parameters
selfThe object pointer.
def smartups.SmartUPS.readButtonClick (   self)

Reads the SmartUPS button click status values.

Parameters
selfThe object pointer.
def smartups.SmartUPS.readCharged (   self)

Reads the SmartUPS charged values.

Parameters
selfThe object pointer.
def smartups.SmartUPS.readMaxCapacity (   self)

Reads the SmartUPS battery maximum capacity values.

Parameters
selfThe object pointer.
def smartups.SmartUPS.readOutputCurrent (   self)

Reads the SmartUPS output current values.

Parameters
selfThe object pointer.
def smartups.SmartUPS.readOutputVoltage (   self)

Reads the SmartUPS output voltage values.

Parameters
selfThe object pointer.
def smartups.SmartUPS.readSeconds (   self)

Reads the SmartUPS time in seconds.

Parameters
selfThe object pointer.

The documentation for this class was generated from the following file: