{"openapi":"3.0.0","info":{"description":"This document provides the API documentation, which is available for users to configure the process control software, provide measured values to the system, and access setpoints calculated by the controller.\n  \n\n**Definitions**<br>\n**ABAC Objects**\n- **Group:** The user can assign up to four groups to each ABAC controller. Each group is defined as 1 to 12 controllable units (CU) that are part of the same system. The default name for the groups shall be A, B, C, D, but the user should be able to type in a unique name for each group if desired (for example “North Plant” and “South Plant”, etc.).\n    \n- **Control Unit:** : Each CU is defined as one or more aeration zones that are controlled with an air modulating valve, airflow meter and DO probe. The default name for the CU’s shall be a unique number from 1 to 12, but the user should be able to type in a unique name for each CU if desired (for example “Train 1” and “Train 2”, etc.).<br>\n\n**Process Control Main Configurations:-** Represents the process control hierarchy, using varying virtual objects (Group, CU), and includes the necessary plant-specific process configuration.<br>\n\n**Active-Layout:-** Represents the active hierarchy of system in terms of ABAC objects, displays IDs (generated by system) corresponding to user provided names, so that IDs can be used for additional calling of APIs (e.g. CU related APIA).<br>\n\n**Resetting Software:-** it will stop the current process and restart the whole system with latest configurations.<br>\n \n  **Inputs:-**\n  Received from PLC/SCADA, include xGW Heartbeat-Echo signal, Measured Parameters (NH4, airflow, temperature) and the sensor alarm status, and Configuration Parameters (Ammonia Control Enable/Disable, NH4 setpoint, PID parameters, Min/Max DO setpoint, Fixed DO setpoint) which can be updated without controller reset/reboot while system is running.<br>\n \n  **Outputs:-**\n Provided to PLC/SCADA, include xGW Heartbeat signal, CU Heartbeat signal, calculated DO Setpoint, and sensors (NH4, airflow, temperature) alarms.<br>\n \n  **Alarms:-** Measured NH4 Alarm - If the NH4 measurement data for a particular CU is not received, or if a fault signal is received from the NH4 sensor, then ABAC for that CU shall be disabled and a warning shall be sent to the SCADA that the DO setpoint for that CU must be determined by others. \n\n  **Internal Calculations:-** Used for debugging.<br>\n \n <b>Table of parameter limits and units:</b> Main JSON configuration file consists of nested BLU-X Lite objects. Following tables shows descriptions of required objects.\n  \n  <b>Table 1 : Root config object </b>\n  \n\n   <table>\n    <tr>\n      <td><b>JSON KEY</td>\n      <td><b>Description </td>\n      <td><b>Type</td>\n      <td><b>Limits</td>\n      <td><b>units </td>\n      <td><b>Example </td>\n    </tr>\n    <tr>\n      <td>name </td>\n      <td>Name of site </td>\n      <td>string</td>\n      <td>1-256 </td>\n      <td>N/A </td>\n      <td>Sample,IN </td>\n    </tr>\n    <tr>\n      <td>uid </td>\n      <td>uid of site </td>\n      <td>string</td>\n      <td>1-256 </td>\n      <td>N/A </td>\n      <td>14-8231A </td>\n    </tr>\n    <tr>\n      <td>plant-elevation </td>\n      <td>Elevation of the plant above sea level.</td>\n      <td>numeric</td>\n      <td> N/A</td>\n      <td>ft or m refer to Table 10 </td>\n      <td>30.0 </td>\n    </tr>\n    <tr>\n      <td>blower-motor-efficiency </td>\n      <td> Efficiency of the blower motor </td>\n      <td>numeric</td>\n      <td>0.1 to 1</td>\n      <td> 1 corresponds to 100% </td>\n      <td>0.7</td>\n    </tr>\n    <tr>\n      <td>power-cost </td>\n      <td>Power cost in $ per kWh </td>\n      <td>numeric</td>\n      <td>N/A</td>\n      <td>$/kW-hr(depending on currency) </td>\n      <td>0.0075</td>\n    </tr>\n    <tr>\n      <td> group </td>\n      <td>collection of CUs <br>refer to Table 2 </td>\n      <td>object</td>\n      <td> 1- 4 </td>\n      <td> N/A </td>\n      <td>1-2 </td>\n    </tr>\n    <tr>\n      <td> internal-sw-config </td>\n      <td>Selection of units <br> refer to Table 10</td>\n      <td>object</td>\n      <td> N/A </td>\n      <td> N/A </td>\n      <td>N/A </td>\n    </tr>\n   </table>\n   \n<b>Table 2 : Groups config object   </b>\n\n <table>\n    <tr>\n      <td><b>JSON KEY</td>\n      <td><b>Description </td>\n      <td><b>Type</td>\n      <td><b>Limits</td>\n      <td><b>units </td>\n      <td><b>Example </td>\n    </tr>\n    <tr>\n      <td>name </td>\n      <td>Name of Group </td>\n      <td>string</td>\n      <td>1-256 </td>\n      <td>N/A </td>\n      <td>group-a </td>\n    </tr>\n    <tr>\n      <td>average-basin-depth </td>\n      <td>average depth of basin </td>\n      <td>numeric</td>\n      <td>5-40ft or 1.5-12.2m </td>\n      <td>N/A </td>\n      <td>10 </td>\n    </tr>\n    <tr>\n      <td>cu </td>\n      <td>Name of control unit<br>refer to Table 3 </td>\n      <td>Object</td>\n      <td>1-12 </td>\n      <td>N/A </td>\n      <td> N/A</td>\n    </tr>\n  </table> \n  \n<b> Table 3 : CU config object  </b>  \n  \n <table>\n    <tr>\n      <td><b>JSON KEY</td>\n      <td><b>Description </td>\n      <td><b>Type</td>\n      <td><b>Limits</td>\n      <td><b>units </td>\n      <td><b>Example </td>\n    </tr>\n    <tr>\n      <td>name </td>\n      <td>Name of CU </td>\n      <td>string</td>\n      <td>1-256 </td>\n      <td>N/A </td>\n      <td>cu-a-1</td>\n    </tr>\n    <tr>\n      <td> min-nh4-setpoint </td>\n      <td> minimum nh4 setpoint </td>\n      <td> numeric</td>\n      <td>0 </td>\n      <td> mg/L </td>\n      <td> 0 </td>\n    </tr>\n    <tr>\n      <td> max-nh4-setpoint </td>\n      <td> maximum nh4 setpoint </td>\n      <td> numeric</td>\n      <td> 0.0-10.0 </td>\n      <td> mg/L </td>\n      <td> 10 </td>\n    </tr>\n    <tr>\n      <td> nh4-setpoint </td>\n      <td> Ammonia set point </td>\n      <td>numeric</td>\n      <td>0.0 -10.0</td>\n      <td> mg/L</td>\n      <td> 2 </td>\n    </tr>\n     <tr>\n      <td> nh4-deadband </td>\n      <td> deadband of Ammonia </td>\n      <td>numeric</td>\n      <td>0.0-10.0 </td>\n      <td> mg/L</td>\n      <td> 1 </td>\n    </tr>\n    <tr>\n      <td> allowable-nh4-variance </td>\n      <td> Allowable NH4 variance as a percentage of the setpoint value </td>\n      <td>numeric</td>\n      <td>0-100% or 0-1? </td>\n      <td> % or N/A?</td>\n      <td> 25? Or 0.25 </td>\n    </tr>\n    <tr>\n      <td> min-do-setpoint </td>\n      <td> minimum DO setpoint </td>\n      <td> numeric</td>\n      <td>0 </td>\n      <td> mg/L </td>\n      <td> 0 </td>\n    </tr>\n    <tr>\n      <td> max-do-setpoint </td>\n      <td> maximum DO setpoint </td>\n      <td> numeric</td>\n      <td> 0.0-10.0 </td>\n      <td> mg/L </td>\n      <td> 10 </td>\n    </tr>\n    <tr>\n      <td> fixed-do-setpoint </td>\n      <td> fixed DO setpoint </td>\n      <td>numeric</td>\n      <td>0.0-10.0 </td>\n      <td> mg/L  </td>\n      <td> 5 </td>\n    </tr>\n    <tr>\n      <td> pid-configuration </td>\n      <td> Rockwell-PIDE algorithms <br>   refer to Table 4 </td>\n      <td>Object</td>\n      <td>N/A </td>\n      <td> N/A</td>\n      <td>N/A </td>\n    </tr>\n  </table> \n  \n<b>Table 4 : Pid configuration    </b>  \n\n <table>\n    <tr>\n      <td><b>JSON KEY</td>\n      <td><b>Description </td>\n      <td><b>Type</td>\n      <td><b>Limits</td>\n      <td><b>units </td>\n      <td><b>Example </td>\n    </tr>\n    <tr>\n      <td>type </td>\n      <td>Type of Pid implemetation </td>\n      <td>string</td>\n      <td>Rockwell-PIDE </td>\n      <td>N/A </td>\n      <td>Rockwell-PIDE </td>\n    </tr>\n    <tr>\n      <td>equation-type </td>\n      <td>Variant of Algorithm/Equation </td>\n      <td>string</td>\n      <td>  independent </td>\n      <td>N/A </td>\n      <td>independent </td>\n    </tr>\n    <tr>\n      <td> engineering-unit-scaling </td>\n      <td>PV and CV scaling configuration of PID <br>  refer to Table 5  </td>\n      <td>Object</td>\n      <td>N/A</td>\n      <td>N/A </td>\n      <td>N/A </td>\n    </tr>\n    <tr>\n      <td>gain-parameter</td>\n      <td>PID Gain Parameters<br>refer to Table 6 </td>\n      <td>Object</td>\n      <td>N/A </td>\n      <td>N/A </td>\n      <td>N/A</td>\n    </tr>\n  </table> \n  \n\n<b> Table 5 : engineering-unit-scaling object   </b> \n\n <table>\n    <tr>\n      <td><b>JSON KEY</td>\n      <td><b>Description </td>\n      <td><b>Type</td>\n      <td><b>Limits</td>\n      <td><b>units </td>\n      <td><b>Example </td>\n    </tr>\n    <tr>\n      <td>pv-min-0-span </td>\n      <td>minimum at 0% of span </td>\n      <td>numeric</td>\n      <td>0</td>\n      <td>mg/L </td>\n      <td>1</td>\n    </tr>\n    <tr>\n      <td>pv-max-100-span</td>\n      <td>maximum at 100% of span</td>\n      <td>numeric</td>\n      <td>10.0</td>\n      <td>mg/L</td>\n      <td>10.0</td>\n    </tr>\n    <tr>\n      <td>cv-min-0-output</td>\n      <td>minimum at 0% of output </td>\n      <td>string</td>\n      <td>min-do-setpoint </td>\n      <td>mg/L</td>\n      <td>min-do-setpoint</td>\n    </tr>\n    <tr>\n      <td>cv-max-100-output</td>\n      <td>maximum at 100% of output </td>\n      <td>string</td>\n      <td>max-do-setpoint <br>auto</td>\n      <td>mg/L </td>\n      <td>auto </td>\n    </tr>\n  </table>\n  \n  \n<b> Table 6 : PID gain-parameter object   </b> \n  \n  <table>\n    <tr>\n      <td><b>JSON KEY</td>\n      <td><b>Description </td>\n      <td><b>Type</td>\n      <td><b>Limits</td>\n      <td><b>units </td>\n      <td><b>Example </td>\n    </tr>\n    <tr>\n      <td>kp </td>\n      <td>Proportional Gain</td>\n      <td>numeric</td>\n      <td>N/A </td>\n      <td>N/A </td>\n      <td>0.3492 </td>\n    </tr>\n    <tr>\n      <td>ki </td>\n      <td>Integral gain</td>\n      <td>numeric</td>\n      <td>N/A </td>\n      <td>1/min </td>\n      <td>0.02543</td>\n    </tr>\n     <tr>\n      <td>kd </td>\n      <td>Derivative gain</td>\n      <td>numeric</td>\n      <td>N/A </td>\n      <td>min </td>\n      <td>0.0492 </td>\n    </tr>\n  </table> \n  \n<b>Table 7 :Input measured parameter information.   </b>  \n \n <table>\n    <tr>\n      <td><b>JSON KEY</td>\n      <td><b>Description </td>\n      <td><b>Type</td>\n      <td><b>Limits</td>\n      <td><b>units </td>\n      <td><b>Example </td>\n    </tr>\n    <tr>\n      <td> measured-Nh4 </td>\n      <td> Ammonia sensor measured value <br> refer to Table 9  </td>\n      <td>object</td>\n      <td>N/A </td>\n      <td>mg/L </td>\n      <td>4.5</td>\n    </tr>\n    <tr>\n      <td> measured-airflow </td>\n      <td>Ammonia sensor measured value <br> refer to Table 9  </td>\n      <td>object</td>\n      <td>N/A </td>\n      <td>SCFM </td>\n      <td>1000</td>\n    </tr>\n    <tr>\n      <td> measured-do </td>\n      <td>Ammonia sensor measured value <br> refer to Table 9  </td>\n      <td>object</td>\n      <td>N/A </td>\n      <td>mg/L </td>\n      <td>0.5</td>\n    </tr>\n    <tr>\n      <td> measured-temperature </td>\n      <td>Ammonia sensor measured value <br> refer to Table 9  </td>\n      <td>object</td>\n      <td>N/A </td>\n      <td>°C or °F <br> refer to Table 10 </td>\n      <td>45</td>\n    </tr>\n  </table>\n  \n  <b>Table 8 :Alarm information.   </b>  \n \n <table>\n    <tr>\n      <td><b>JSON KEY</td>\n      <td><b>Description </td>\n      <td><b>Type</td>\n      <td><b>Limits</td>\n      <td><b>units </td>\n      <td><b>Example </td>\n    </tr>\n    <tr>\n      <td> NH4 Alarm  </td>\n      <td>– If the NH4 measurement for a particular CU is not received, or <br> if a fault signal is received from the NH4 sensor,<br> then ABAC for that CU shall be disabled and a warning <br>shall be sent to the SCADA that the DO setpoint for<br> that CU must be determined by others.</td>\n      <td>object</td>\n      <td>N/A </td>\n      <td>N/A </td>\n      <td>Vale:0 <br> signal:ok </td>\n     \n  </table>\n  \n\n <b>Table 9: Tag Extended Version   </b>  \n \n <table>\n    <tr>\n      <td><b>JSON KEY</td>\n      <td><b>Description </td>\n      <td><b>Requirement </td>\n      <td><b>Type</td>\n      <td><b>Limits</td>\n      <td><b>units </td>\n      <td><b>Example </td>\n    </tr>\n    <tr>\n      <td>value </td>\n      <td> numeric value of parameter</td>\n      <td>MANDATORY</td>\n      <td>numeric</td>\n      <td>N/A</td>\n      <td>N/A</td>\n      <td>55.5</td>\n    </tr>\n    <tr>\n      <td>status</td>\n      <td> Status is optional when received without sensor<br> parameter system assumes sensor status is ok </td>\n      <td>OPTIONAL</td>\n      <td>string</td>\n      <td>signal:ok</td>\n      <td>N/A</td>\n      <td>55.5</td>\n    </tr>\n    <tr>\n      <td>timestamp</td>\n      <td> Epoch time format, timestamp is optional when received<br> without timestamp system log based on received timestamp </td>\n      <td>OPTIONAL</td>\n      <td>numeric</td>\n      <td>N/A</td>\n      <td>sec</td>\n      <td>1609146691</td>\n    </tr>\n  </table>   \n\n<b>Table 10 : internal-sw-config object   </b>  \n\n <table>\n    <tr>\n      <td><b>JSON KEY</td>\n      <td><b>Description </td>\n      <td><b>Type</td>\n      <td><b>Limits</td>\n      <td><b>units </td>\n      <td><b>Example </td>\n    </tr>\n    <tr>\n      <td> Alarm-no-data-rcv-threshold-sec </td>\n      <td> Receive data timeout for alarm </td>\n      <td> numeric</td>\n      <td> N/A </td>\n      <td> sec</td>\n      <td> 30 </td>\n    </tr>\n    <tr>\n      <td>temperature-unit </td>\n      <td>specify unit for temperature </td>\n      <td>string </td>\n      <td>°F or °C</td>\n      <td>N/A</td>\n      <td>°C</td>\n    </tr>\n     <tr>\n      <td>length-unit </td>\n      <td>specify unit for dimensions/elevations </td>\n      <td>string </td>\n      <td>ft or m </td>\n      <td> N/A </td>\n      <td> m </td>\n    </tr>\n  </table>\n","title":"ABAC API Document (v0.0.5)","contact":{},"version":"1.0.0"},"servers":[{"description":"SwaggerHub API Auto Mocking","url":"https://virtserver.swaggerhub.com/dnreddy/ABAC_API_DOCU/1.0.0"},{"url":"/api/bluxlite/abac"}],"paths":{"/config":{"post":{"tags":["ABAC Configuration"],"summary":"Post the main configuration specifications for the algorithm at the site.","operationId":"Set:MainConfig","requestBody":{"description":"JSON object containing configuration information.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MainConfig"}}},"required":true},"responses":{"200":{"$ref":"#/components/responses/SuccessPost"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/AuthError"},"500":{"$ref":"#/components/responses/ServerError"}},"deprecated":false},"get":{"tags":["ABAC Configuration"],"summary":"Get the main configuration specifications for the algorithm at the site.","operationId":"Get:Main-Config","responses":{"200":{"description":"Returns main configuration specifications.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MainConfig"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/AuthError"},"500":{"$ref":"#/components/responses/ServerError"}},"deprecated":false}},"/active-layout":{"get":{"tags":["ABAC Management"],"summary":"Get the active layout of system.","operationId":"Get:ABAC-ActiveLayout","responses":{"200":{"description":"Active layout configuration specifications.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActiveLayout"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/AuthError"},"500":{"$ref":"#/components/responses/ServerError"}},"deprecated":false}},"/management/reset":{"post":{"tags":["ABAC Management"],"summary":"Reset request for stopping current process and restart the system.","responses":{"200":{"$ref":"#/components/responses/SuccessPost"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/AuthError"},"500":{"$ref":"#/components/responses/ServerError"}},"deprecated":false}},"/system-alarm":{"get":{"tags":["ABAC Management"],"summary":"Get system alarms.","responses":{"200":{"description":"Returns main configuration specifications.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemAlarm"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/AuthError"},"500":{"$ref":"#/components/responses/ServerError"}},"deprecated":false}},"/version":{"get":{"tags":["ABAC Management"],"summary":"API for the getting of sw version.","responses":{"200":{"description":"Returns main configuration specifications.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Version"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/AuthError"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/energy-savings":{"get":{"tags":["ABAC Management"],"summary":"API for the getting of sw energy-savings data.","responses":{"200":{"description":"Returns main configuration specifications.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/energy_savings"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/AuthError"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/cu/{CU-ID}/input":{"post":{"tags":["Control Units (CU)"],"summary":"Set input measured parameters for CU.","operationId":"Set:Input:InputMeasuredParameters","parameters":[{"$ref":"#/components/parameters/CU_ID"}],"requestBody":{"description":"JSON object containing input measured parameter information.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InputMeasuredParameters"}}},"required":true},"responses":{"200":{"$ref":"#/components/responses/SuccessPost"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/AuthError"},"500":{"$ref":"#/components/responses/ServerError"}},"deprecated":false},"get":{"tags":["Control Units (CU)"],"summary":"Get input measured parameters for CU.","operationId":"Get:Input:InputMeasuredParameters","parameters":[{"$ref":"#/components/parameters/CU_ID"}],"responses":{"200":{"description":"","content":{"object":{"schema":{"$ref":"#/components/schemas/InputMeasuredParameters"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/AuthError"},"500":{"$ref":"#/components/responses/ServerError"}},"deprecated":false}},"/cu/{CU-ID}/output":{"get":{"tags":["Control Units (CU)"],"summary":"Get output parameters for CU.","operationId":"Get:Output:Parameters","parameters":[{"$ref":"#/components/parameters/CU_ID"}],"responses":{"200":{"description":"Successful request.","content":{"object":{"schema":{"$ref":"#/components/schemas/OutputParameters"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/AuthError"},"500":{"$ref":"#/components/responses/ServerError"}},"deprecated":false}},"/cu/{CU-ID}/internal-calculation":{"get":{"tags":["Control Units (CU)"],"summary":"Get system internal calculations and it can used for debuging.","operationId":"Get:Internal-Calculations(forTesting)","parameters":[{"$ref":"#/components/parameters/CU_ID"}],"responses":{"200":{"description":"Successful request.","content":{"object":{"schema":{"$ref":"#/components/schemas/InternalCalculations"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/AuthError"},"500":{"$ref":"#/components/responses/ServerError"}},"deprecated":false}},"/cu/{CU-ID}/config-dynamic":{"post":{"tags":["Control Units (CU)"],"summary":"Set dynamic configuration parameters for CU.","operationId":"Set:Input:ConfigParameters","parameters":[{"$ref":"#/components/parameters/CU_ID"}],"requestBody":{"description":"JSON object containing dynamic configuration parameter information.","content":{"object":{"schema":{"$ref":"#/components/schemas/InputConfigParams"}}}},"responses":{"200":{"$ref":"#/components/responses/SuccessPost"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/AuthError"},"500":{"$ref":"#/components/responses/ServerError"}},"deprecated":false},"get":{"tags":["Control Units (CU)"],"summary":"Get input configuration parameters for CU.","operationId":"Get:Input:ConfigParameters","parameters":[{"$ref":"#/components/parameters/CU_ID"}],"responses":{"200":{"description":"Successful request.","content":{"object":{"schema":{"$ref":"#/components/schemas/InputConfigParams"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/AuthError"},"500":{"$ref":"#/components/responses/ServerError"}},"deprecated":false}},"/cu/{CU-ID}/alarm":{"get":{"tags":["Control Units (CU)"],"summary":"Get output alarms for CU.","operationId":"Get:Output:Alarms","parameters":[{"$ref":"#/components/parameters/CU_ID"}],"responses":{"200":{"description":"","content":{"object":{"schema":{"$ref":"#/components/schemas/OutputAlarmTags"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/AuthError"},"500":{"$ref":"#/components/responses/ServerError"}},"deprecated":false}},"/cu/{CU-ID}/alert":{"get":{"tags":["Control Units (CU)"],"summary":"Get output Alert for CU.","operationId":"Get:Output:alert","parameters":[{"$ref":"#/components/parameters/CU_ID"}],"responses":{"200":{"description":"","content":{"object":{"schema":{"$ref":"#/components/schemas/OutputAlarmTags"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/AuthError"},"500":{"$ref":"#/components/responses/ServerError"}},"deprecated":false}},"/cu/{CU-ID}/alert//historical-data":{"get":{"tags":["Control Units (CU)"],"summary":"Get output alert historical data for CU.","operationId":"Get:Output:historical-data","parameters":[{"$ref":"#/components/parameters/CU_ID"}],"responses":{"200":{"description":"","content":{"object":{"schema":{"$ref":"#/components/schemas/OutputAlarmTags"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/AuthError"},"500":{"$ref":"#/components/responses/ServerError"}},"deprecated":false}},"/cu/{CU-ID}/control":{"get":{"tags":["Control Units (CU)"],"summary":"Get output NH4 control flag status for CU.","operationId":"Get:Output:NH4control","parameters":[{"$ref":"#/components/parameters/CU_ID"}],"responses":{"200":{"description":"","content":{"object":{"schema":{"$ref":"#/components/schemas/OutputAlarmTags"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/AuthError"},"500":{"$ref":"#/components/responses/ServerError"}},"deprecated":false}}},"components":{"schemas":{"MainConfig":{"title":"Main Configuration","required":["name","uid","date","designer","plant-elevation","blower-motor-efficiency","power-cost","groups"],"type":"object","maxProperties":9,"additionalProperties":{"$ref":"#/components/schemas/InternalSWConfig"},"properties":{"name":{"type":"string","description":"Name of site or project.","minLength":1,"maxLength":256,"pattern":"^[^;<>~`=()\\\"]*$","example":"Muncie Plant, IN"},"uid":{"type":"string","description":"Unique identifier Number of Plant.","minLength":1,"maxLength":256,"pattern":"Alphanumeric and ^[^;<>~`=()\\\"]*$","example":"14-8231A"},"date":{"type":"string","description":"Date of configuration creation of Plant.","minLength":1,"maxLength":256,"pattern":"Alphanumeric and ^[^;<>~`=()\\\"]*$","example":"01/01/2023"},"designer":{"type":"string","description":"Name of the designer","minLength":1,"maxLength":256,"pattern":"Alphanumeric and ^[^;<>~`=()\\\"]*$","example":"dnj"},"plant-elevation":{"type":"number","description":"Elevation of the plant above sea level. Value is interpreted depending on setting of length-unit."},"blower-motor-efficiency":{"type":"number","description":"Efficiency of the blower motor, a value between 0.0 and 1.0.","minimum":0.0,"maximum":1.0},"power-cost":{"type":"number","description":"Cost of a kW-hr, in US $/kW-hr."},"groups":{"$ref":"#/components/schemas/Group"}},"example":{"name":"Muncie,IN","uid":"14-8231A","date":"01/01/2023","designer":"dnj","plant-elevation":100.0,"blower-motor-efficiency":1.0,"power-cost":30.0,"groups":[{"name":"group-a","average-basin-depth":10.0,"cu":[{"name":"cu-a-1","min-nh4-setpoint":0,"max-nh4-setpoint":10,"nh4-setpoint":2.0,"nh4-deadband":0.1000014,"nh4-control":1,"allowable-nh4-variance":0.6,"min-do-setpoint":0,"max-do-setpoint":10,"fixed-do-setpoint":5,"pid-configuration":{"type":"rockswell-pide","equation-type":"independent","engineering-unit-scaling":{"pv-max-100-span":10,"pv-min-0-span":0,"cv-max-100-output":"auto","cv-min-0-output":"auto"},"gain-parameter":{"kp":0.3492,"ki":0.02543,"kd":0}}}]}],"internal-sw-config":{"alarm-no-data-rcv-threshold-sec":30,"temperature-unit":"°C","length-unit":"ft","airflow-unit":"scfm"}}},"InternalSWConfig":{"title":"Internal Software Configuration","type":"object","required":["alarm-no-data-rcv-threshold-sec","temperature-unit","length-unit"],"properties":{"alarm-no-data-rcv-threshold-sec":{"type":"number","minimum":0},"temperature-unit":{"type":"string","enum":["°C","°F"]},"length-unit":{"type":"string","enum":["m","ft"]}}},"ActiveLayout":{"title":"Active Layout","type":"object","example":{"active-layout-id":"27","groups":[{"id":"group-a","name":"group-a","cu":[{"id":"cu-a-1","name":"cu-a-1"}]}]}},"SystemAlarm":{"title":"System Alarm","type":"object","example":{"tags":{"modbus-end-to-end-communication":{"value":1.0,"timestamp":1606904177,"status":"Alarm-Triggered"}}}},"Version":{"title":"Vesrion","type":"object","example":{"controller-type":"xcpc-abac","version":"0.0.1.b.7"}},"energy_savings":{"title":"energySavings","type":"object","example":{"tags":{"approximate-annual-energy-savings":10.0}}},"Group":{"title":"Group","description":"Object with group details and maximum groups can be 4","required":["name","average-basin-depth","cu"],"type":"object","minItems":1,"maxItems":4,"properties":{"name":{"type":"string"},"average-basin-depth":{"type":"number"},"cu":{"$ref":"#/components/schemas/CU"}},"example":{"name":"group-a","average-basin-depth":10,"cu":[{"name":"cu-a-1","nh4-setpoint":2,"nh4-deadband":1,"nh4-control":1,"allowable-nh4-variance":25,"min-do-setpoint":0,"max-do-setpoint":10,"fixed-do-setpoint":5,"pid-configuration":{"type":"rockswell-pide","equation-type":"independent","engineering-unit-scaling":{"pv-max-100-span":10,"pv-min-0-span":0,"cv-max-100-output":"auto","cv-min-0-output":"auto"},"gain-parameter":{"kp":0.3492,"ki":0.02543,"kd":0}}}]}},"CU":{"title":"Control Unit","description":"Object with group details and maximum groups can be 12","required":["name","nh4-setpoint","nh4-deadband","nh4-control","allowable-nh4-variance","min-do-setpoint","max-do-setpoint","fixed-do-setpoint","pid-configuration"],"type":"object","minItems":1,"maxItems":12,"properties":{"name":{"type":"string"},"nh4-setpoint":{"type":"number"},"nh4-deadband":{"type":"number"},"nh4-control":{"type":"number"},"allowable-nh4-variance":{"type":"number"},"min-do-setpoint":{"type":"number"},"max-do-setpoint":{"type":"number"},"fixed-do-setpoint":{"type":"number"},"pid-configuration":{"$ref":"#/components/schemas/PIDConfiguration"}},"example":{"name":"cu-a-1","nh4-setpoint":6.0,"nh4-deadband":0.1,"nh4-control":1.0,"allowable-nh4-variance":25.0,"min-do-setpoint":0.0,"max-do-setpoint":3.0,"fixed-do-setpoint":2.0,"pid-configuration":{"type":"rockswell-pide","equation-type":"independent","engineering-unit-scaling":{"pv-max-100-span":10.0,"pv-min-0-span":0.0,"cv-max-100-output":"auto","cv-min-0-output":"auto"},"gain-parameter":{"kp":0.3492,"ki":0.02543,"kd":0.012}}}},"PIDConfiguration":{"title":"PID Configuration","required":["type","equation-type","engineering-unit-scaling","gain-parameter"],"type":"object","properties":{"type":{"type":"string"},"equation-type":{"type":"string"},"engineering-unit-scaling":{"$ref":"#/components/schemas/EngineeringUnitScaling"},"gain-parameter":{"$ref":"#/components/schemas/GainParameter"}},"example":{"type":"rockswell-pide","equation-type":"independent","engineering-unit-scaling":{"pv-max-100-span":10,"pv-min-0-span":0,"cv-max-100-output":"auto","cv-min-0-output":"auto"},"gain-parameter":{"kp":0.3492,"ki":0.02543,"kd":0}}},"EngineeringUnitScaling":{"title":"Engineering Unit Scaling","required":["pv-max-100-span","pv-min-0-span","cv-max-100-output","cv-min-0-output"],"type":"object","properties":{"pv-max-100-span":{"oneOf":[{"type":"number"},{"type":"string"}]},"pv-min-0-span":{"oneOf":[{"type":"number"},{"type":"string"}]},"cv-max-100-output":{"oneOf":[{"type":"number"},{"type":"string"}]},"cv-min-0-output":{"oneOf":[{"type":"number"},{"type":"string"}]}},"example":{"pv-max-100-span":10,"pv-min-0-span":0,"cv-max-100-output":"auto","cv-min-0-output":"auto"}},"GainParameter":{"title":"Gain Parameter","required":["kp","ki","kd"],"type":"object","properties":{"kp":{"type":"number"},"ki":{"type":"number"},"kd":{"type":"number"}},"example":{"kp":0.3492,"ki":0.02543,"kd":0}},"InputMeasuredParameters":{"title":"Measured Parameters","required":["tags - measured-nh4 - measured-temperature - measured-airflow - measured-do"],"type":"object","properties":{"tags":{"$ref":"#/components/schemas/MeasuredValueTags"}},"example":{"tags":{"measured-nh4":{"value":2,"status":"signal:ok"},"measured-temperature":{"value":3,"status":"signal:ok"},"measured-airflow":{"value":52,"status":"signal:ok"},"measured-do":{"value":25,"status":"signal:ok"}}}},"MeasuredValueTags":{"title":"Measured Value Tags","required":["measured-nh4","measured-temperature","measured-airflow","measured-do"],"type":"object","properties":{"measured-nh4":{"$ref":"#/components/schemas/MeasuredNH4"},"measured-temperature":{"$ref":"#/components/schemas/MeasuredTemperature"},"measured-airflow":{"$ref":"#/components/schemas/MeasuredAirflow"},"measured-do":{"$ref":"#/components/schemas/MeasuredDO"}},"example":{"measured-nh4":{"value":30,"status":"signal:ok"},"measured-temperature":{"value":3,"status":"signal:ok"},"measured-airflow":{"value":52,"status":"signal:ok"},"measured-do":{"value":10,"status":"signal:ok"}}},"MeasuredNH4":{"title":"Measured NH4","required":["value","status"],"type":"object","properties":{"value":{"type":"number"},"status":{"type":"string"}},"example":{"value":30,"status":"signal:ok"}},"MeasuredTemperature":{"title":"Measured Temperature","required":["value","status"],"type":"object","properties":{"value":{"type":"number"},"status":{"type":"string"}},"example":{"value":3,"status":"signal:ok"}},"MeasuredAirflow":{"title":"Measured Airflow","required":["value","status"],"type":"object","properties":{"value":{"type":"number"},"status":{"type":"string"}},"example":{"value":52,"status":"signal:ok"}},"MeasuredDO":{"title":"Measured DO","required":["value","status"],"type":"object","properties":{"value":{"type":"number"},"status":{"type":"string"}},"example":{"value":10,"status":"signal:ok"}},"InputConfigParams":{"title":"Input Configuration Parameters","required":["name","nh4-setpoint","nh4-control","nh4-deadband","allowable-nh4-variance","kp","kd","ki","do-sp-low-limit","do-sp-high-limit","fixed-do-setpoint","pv-min-0-span","pv-max-100-span","cv-min-0-output","cv-max-100-output"],"type":"object","properties":{"name":{"type":"string"},"nh4-setpoint":{"type":"number"},"nh4-control":{"type":"number"},"nh4-deadband":{"type":"number"},"allowable-nh4-variance":{"type":"number"},"kp":{"type":"number"},"kd":{"type":"number"},"ki":{"type":"number"},"do-sp-low-limit":{"type":"number"},"do-sp-high-limit":{"type":"number"},"fixed-do-setpoint":{"type":"number"},"pv-min-0-span":{"type":"number"},"pv-max-100-span":{"type":"number"},"cv-min-0-output":{"type":"number"},"cv-max-100-output":{"type":"number"}},"example":{"tags":{"nh4-setpoint":1,"nh4-control":1.0,"nh4-deadband":0.1,"allowable-nh4-variance":0.1,"pid-kp":0.2529999911785126,"pid-ki":0.25,"pid-kd":0.012500000186256452,"min-do-setpoint":0,"max-do-setpoint":3,"fixed-do-setpoint":2,"pv-min-0-span":0.0,"pv-max-100-span":10.0,"cv-min-0-output":30,"cv-max-100-output":45}}},"InternalCalculations":{"title":"Internal Calculations","example":{"field-correction-factor-at-actual-do(FCFA)":0.6,"field-correction-factor-at-fixed-do(FCFF)":0.68,"fixed-do-cu-airflow (FDA)":28.17,"raw-pid-output":139.68,"fixed-do-totalized-cu-airflow (FDCUA)":25.0,"mixing-limited-totalized-cu-airflow(MLTCUA)":28.17,"monthly-average-airflow-reduction-for-abac(MAARA)":3.17}},"OutputParameters":{"title":"Output Parameters","required":["do-setpoint"],"type":"object","properties":{"do-setpoint":{"type":"object"}},"example":{"tags":{"do-setpoint":0}}},"OutputAlarmTags":{"title":"Output Alarms","required":["alarm-nh4"],"type":"object","example":{"tags":{"alarm-nh4":{"value":1,"timestamp":1606909211,"status":"Alarm-Triggered: Ammonia-Control is Disabled"}}}},"Schema":{"type":"object","properties":{"id":{"type":"integer","format":"int64"}}}},"parameters":{"CU_ID":{"name":"CU-ID","in":"path","required":true,"description":"CU identifier.","schema":{"type":"string","minLength":1,"maxLength":256,"pattern":"^[^;<>~`=()\\\"]*$","example":"cu-a-1"}}},"responses":{"SuccessPost":{"description":"Successfully executed request."},"SuccessGet":{"description":"Successful request."},"BadRequest":{"description":"Bad request.","headers":{}},"AuthError":{"description":"Authentication error.","headers":{}},"ServerError":{"description":"Internal server error.","headers":{}}}},"tags":[{"name":"ABAC Configuration"},{"name":"ABAC Management"},{"name":"Control Units (CU)"}]}