UPS (Serial)

From: Megatec

Class: herosdevices.hardware.megatec.SerialUPS

Driver Quality Index: stable

Representation of Megatec based uninterruptible power supplies.

Several UPS vendors use the Megatec based controller card. Among them are:
  • AdPoS

  • Green Cell

Important

The devices are quite picky concerning the serial to USB chip. It is known to work with a Prolific PL2303 chip. Others might work but it is not guaranteed.

Important

Some devices seem to have an incorrectly grounded serial interface, generating massive noise on the output line. Check for noise on the output power sockets before installing permanently!

A documentation of the full protocol can be found here.

Bold arguments are mandatory. For more information on the listed arguments refer to the class documentation: herosdevices.hardware.megatec.SerialUPS If parameters appear in this list but not in the class definition, please recursively check the linked base classes for the definition of the parameter.

Argument

Type

Default Value

Description

address

<class ‘str’>

Serial port address of the target device.

timeout

<class ‘float’>

1.0

Timeout for serial communication.

observables

dict | None

None

Dictionary of attributes which should be exposed at datasource _observable_data() events. Of the form {“attribute_name”: {“name”: “display_name”, “unit”: “unit”}}.

The following JSON strings can be used to start a HERO device representation of SerialUPS using BOSS.

{
    "_id": "my_SerialUPS",
    "classname": "herosdevices.hardware.megatec.SerialUPS",
    "arguments": {
        "address": "/dev/ttyUSB0",
        "timeout": 1.0,
        "observables": null
    }
}

generated from signature

Inheritance diagram of herosdevices.hardware.megatec.SerialUPS