Skip to content

Instantly share code, notes, and snippets.

@DJMarlow
Last active August 4, 2021 17:20
Show Gist options
  • Save DJMarlow/24cef4e4840ec124156baa3a68032e37 to your computer and use it in GitHub Desktop.
Save DJMarlow/24cef4e4840ec124156baa3a68032e37 to your computer and use it in GitHub Desktop.
Flite REST API Documentation

FLITE REST API DOCUMENTATION

Get Controller Info

Returns a json object containing data about the Flite controller.

  • URL

    /getControllerInfo

  • Method:

    GET

  • Success Response:

    • Code: 200
      Content: {"id": "5WfDzd0feF", "version": "1.3.1"}
  • Error Response:

    • Code: 404 NOT FOUND
  • Sample Call:

    curl 192.168.1.123/getControllerInfo

    curl 5WfDzd0feF.local/getControllerInfo

Get Selected Sensors

Returns a json object containing the sensors that are currently active in this Flite controller.

  • URL

    /getSensorsSelected

  • Method:

    GET

  • Success Response:

    • Code: 200
      Content: {"black": true, "blue": false, "red": false, "green": false}
  • Error Response:

    • Code: 404 NOT FOUND
  • Sample Call:

    curl 192.168.1.123/getSensorsSelected

    curl 5WfDzd0feF.local/getSensorsSelected

Get Sensors Update Interval

Returns a json object containing the interval and units at which the controller reads the sensors.

  • URL

    /getSensorsUpdateInterval

  • Method:

    GET

  • Success Response:

    • Code: 200
      Content: {"interval": "300", "units": "seconds"}
  • Error Response:

    • Code: 404 NOT FOUND
  • Sample Call:

    curl 192.168.1.123/getSensorsUpdateInterval

    curl 5WfDzd0feF.local/getSensorsUpdateInterval

Get Sensor Values (BLACK Flite Sensor)

Returns a json object representing the current values and units for a connected Black Flite Sensor.

  • URL

    /getValuesBlack

  • Method:

    GET

  • Success Response:

    • Code: 200
      Content: {"level": "4.4", "levelUnits": "Gallons", "temperature": "75.1", "temperatureUnits": "DegF", "pressure": "0.1", "pressureUnits": "PSI"}
  • Error Response:

    • Code: 404 NOT FOUND
  • Sample Call:

    curl 192.168.1.123/getValuesBlack

    curl 5WfDzd0feF.local/getValuesBlack

Get Zero Calibration Offset (BLACK Flite Sensor)

Returns a json object representing the stored zero pressure offset and units for a connected Black Flite Sensor.

  • URL

    /getZeroPressureBlack

  • Method:

    GET

  • Success Response:

    • Code: 200
      Content: {"pressure": "14.6", "pressureUnits": "PSI"}
  • Error Response:

    • Code: 404 NOT FOUND
  • Sample Call:

    curl 192.168.1.123/getZeroPressureBlack

    curl 5WfDzd0feF.local/getZeroPressureBlack

Get Temperature Offset (BLACK Flite Sensor)

Returns a json object representing the stored temperature offset and units for a connected Black Flite Sensor.

  • URL

    /getTempOffsetBlack

  • Method:

    GET

  • Success Response:

    • Code: 200
      Content: {"temperature": "7.5", "temperatureUnits": "DegF"}
  • Error Response:

    • Code: 404 NOT FOUND
  • Sample Call:

    curl 192.168.1.123/getTempOffsetBlack

    curl 5WfDzd0feF.local/getTempOffsetBlack

Get Level Calibration Coefficients (BLACK Flite Sensor)

Returns a json object representing the stored high and low calibration coefficients for a connected Black Flite Sensor. Level high and level low represent the volume (in units provided) when the corrseponding calibration was performed. Distance high and distance low represent the distance away from the sensor when the corrseponding calibration was performed.

  • URL

    /getLevelCalBlack

  • Method:

    GET

  • Success Response:

    • Code: 200
      Content: {"levelLow": "0.0", "levelHigh": "4.3", "levelUnits": "Gallons", "distanceLow": "600.0", "distanceHigh": "165.0", "distanceUnits": "mm"}
  • Error Response:

    • Code: 404 NOT FOUND
  • Sample Call:

    curl 192.168.1.123/getLevelCalBlack

    curl 5WfDzd0feF.local/getLevelCalBlack

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment