Power supplies

GET /ATX/hardware/eflows/(string: index)

Returns the state of the Eflow Power Supply at the respective index

Example request:

GET /ATX/hardware/eflows/eflow0 HTTP/1.0
Host: 192.168.168.168
Accept: application/json, text/javascript

Example response:

HTTP/1.0 200 OK
Content-Type: application/json

{
  "eflow0": {
    "id": "Power Supply ID",
    "type": "",
    "psPresence": 1,
    "ps": 1,
    "pulse": -15,
    "status": "on",
    "ac": 0,
    "batt": 0,
    "vCal": 13863,
    "iCal": 4266,
    "v": 8000,
    "i": 13000,
    "vHigh": 28000,
    "iHigh": 5000,
    "iLow": 0,
    "service": 0,
    "reminder": 0,
    "battPresence": 1,
    "installation": 0
  }
}
Response JSON Object:
 
  • id (string) – The name of the resource (IE a relay or Eflow Power Supply can be named and are tagged with this name should an alert occur from this resource).
  • type (string) – The eflow type used to scale the voltage and current. IE: eFlow3NB
  • psPresense (string) – A boolean indicator to inform the system if the Eflow Power Supply is installed or not installed (1-installed, 0-not installed)
  • ps (string) – A boolean indicator to indicate if the Eflow Power Supply is on or off (1-on, 0-off)
  • pulse (number) – number of seconds to pulse the Eflow Power Supply, should a pulse command be executed. (<0 pulse off, >0 pulse on)
  • status (string) – Human readable string indicating the status of the Eflow Power Supply. (IE: “on”/”off”)
  • ac (number) – Boolean indicator for AC status. (0 - AC fail, 1 - AC OK)
  • batt (number) – Boolean indicator for Battery status. (0 - Battery fail, 1 - Battery OK)
  • vCal (number) – TODO - calibration
  • iCal (number) – TODO - calibration
  • v (number) – Voltage level in (mV)
  • i (number) – Current level in (mA)
  • vHigh (number) – Over voltage threshold settings (mV)
  • iHigh (number) – Over Current threshold setting (mA)
  • iLow (number) – Under Current threshold setting (mA)
  • service (number) – Unix date code when battery service is expected
  • reminder (number) – Should battery serice reach expirey, an alert will be generated every [reminder] intervals (days)
  • battPresence (number) – Boolean indicator representing the presence of a battery per this Eflow Power Supply. (0 - no battery installed, 1 - battery installed)
  • installation (number) – Unix date code when the battery was installed, set by the administrator
POST /ATX/hardware/eflows/(string: index)/status

Change the state of the Eflow Power Supply output

Example request:

POST /ATX/hardware/eflows/eflow0/status HTTP/1.0
Host: 192.168.168.168
Accept: application/json, text/javascript
Content-Type: application/json

{
   "status":0
}
Request JSON Object:
 
  • status (string) – If the supplied property is a number, the Eflow Power Supply will either turn on (status=1), or turn off (status=0)
  • status – If the supplied property is a string, the Eflow Power Supply will either Pulse (status=’p’) or toggle (status=’t’), Where a “pulse” command will either pulse on for x seconds, or pulse off for x seconds, and where seconds is determined by the “pulse” property of the same eflow object.

Example response:

HTTP/1.0 200 OK
Content-Type: application/json

{
   "error":200
}