Derrick
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Water Tower API [TOC] ## Get water tower list **GET** /web/water-tower/facilities [ref.](https://docs.google.com/document/d/1uXYgFEY80dIeCCGTFWyn5DPNa7dB3Fo9IsWBDmwk4K8/edit#heading=h.ef85yb8zdn9w) ### URL Param - items help the user to search what data he wants in different columns. Backend will return all types of columns to the frontend. The searchable fields are as follows - location - health: good | critical - state: active | standby - part_number - firmware_version - group_name - facility - product_sku - identity E.g.: location=xxx&health=good&state=active&part_number=xxx&firmware_version=xxx - current_page Which page the user wants to reference. E.g.: current_page=1 - sort What column the user wants to sort it (asc or desc). E.g.: sort=location:asc or sort=location:desc - entries Which page the user wants to reference. E.g.: entries=10 ### Response ```json { "entries": 1, "current_page": 1, "total_page": 1, "total_entries": 1, "list": [ { "facility_name": "Tower1", "ipv4": "xxxx", // for future field "product_sku": "LCS-SCLT", "group_name": "Taiwan No 1", "firmware_version": "1.2.22", "vendor": "Supermicro", "model": "Cooling Tower System", "manufacturer": "Supermicro", "serial_number": "SN-30912419842", "part_number": "PN-LCSA1", "list": [ { // table info "id": "1", "location": "Tower1.1", "locationId": "1", "part_number": "LCS-U09238-ABT", "firmware_version": "0.4.30", "health": "Good", // Good | Critical "state": "Active", // Active | Standby "group_name": "Group 1", "facility_name": "B23 3in1", "product_sku": "250A-C3-TC", "vendor": "Supermicro", "model": "Cooling Tower Cell", "manufacturer": "Supermicro", "serial_number": "SN-3091241984234" } ] }, { // ...similar one } ] } ``` ## Get Water Tower Tree View Data Get the water tower tree view data. ### URL `/web/water-tower/tree` ### Method GET ### Login Required. Yes with token ### Parameter None ### Response | Code | Description | ------ | ------ | 200 | OK | 400 | Bad Request | 401 | Unauthorized | 404 | Not found **Sample** ```json { "name": "SuperGroup", "groups": [ { "group_name": "Default", "leaf": false, // reserved property for tree structure "uuid": "464758da-6025-11ef-9d94-0242c8a80002", "facilities": [ { "facility_name": "B23 3in1", "ipv4": "10.147.160.111", "product_sku": "250A-C3", "vendor": "Supermicro", "model": "cooling tower", "leaf": false, // reserved property for tree structure "manufacturer": "Supermicro", "serial_number": "SN-30912419842", "part_number": "PN-LCSA1", "firmware_version": "0.2.4", "health": "Good", "towers": [ { "serial_number": "HM19487", "part_number": "LCS-U09238-ABT", "firmware_version": "1200", "locationId": "1", "leaf": true, // reserved property for tree structure "location": "B23 3in1.1", "health": "Good", "state": "Inactive", "product_sku": "250A-C3-TC", "vendor": "Supermicro", "model": "Cooling Tower Cell", "manufacturer": "Supermicro", }, { "serial_number": "HM19488", "part_number": "LCS-U09239-ABT", "firmware_version": null, "locationId": "2", "leaf": true, // reserved property for tree structure "location": "B23 3in1.2", "health": "Good", "state": "Inactive", "product_sku": "250A-C3-TC", "vendor": "Supermicro", "model": "Cooling Tower Cell", "manufacturer": "Supermicro", }, { "serial_number": "HM19489", "part_number": "LCS-U09240-ABT", "firmware_version": "1200", "locationId": "3", "leaf": true, // reserved property for tree structure "location": "B23 3in1.3", "health": "Good", "state": "Inactive", "product_sku": "250A-C3-TC", "vendor": "Supermicro", "model": "Cooling Tower Cell", "manufacturer": "Supermicro", } ] }, { "facility_name": "Tower2", "ipv4": "10.147.173.57", "product_sku": "LCS-SCLT", "vendor": "Supermicro", "model": "cooling tower", "leaf": false, // reserved property for tree structure "manufacturer": "Supermicro", "serial_number": "SN-30912419843", "part_number": "PN-LCSA2", "firmware_version": "0.2.4", "health": "Good", "towers": [ { "serial_number": "HM18BS", "part_number": "LCS-U09241-ABT", "firmware_version": "1200", "locationId": "1", "leaf": true, // reserved property for tree structure "location": "Tower2.1", "health": "Good", "state": "Inactive", "product_sku": "250A-C3-TC", "vendor": "Supermicro", "model": "Cooling Tower Cell", "manufacturer": "Supermicro", } ] } // ... ] } // ... ] } ``` ## Search Water Tower Tree View Data **GET** /web/water-tower/tree/search ### URL Param - group_name Search by group name. E.g.: group_name=Default - facility_name Search by facility name. E.g.: facility_name=f1 - facility_ipv4 Search by facility ipv4. E.g.: facility_ipv4=123.123.123.123 - tower_location Search by tower location. Use facility name and tower location id as key to search. E.g.: tower_location=f1.1 **Sample** GET /web/water-tower/tree/search?facility_ipv4=10.147.160.111 ```json { "name": "SuperGroup", "groups": [ { "group_name": "Default", "leaf": false, // reserved property for tree structure "uuid": "464758da-6025-11ef-9d94-0242c8a80002", "facilities": [ { "facility_name": "B23 3in1", "ipv4": "10.147.160.111", "product_sku": "250A-C3", "vendor": "Supermicro", "model": "cooling tower", "leaf": false, // reserved property for tree structure "manufacturer": "Supermicro", "serial_number": "SN-30912419842", "part_number": "PN-LCSA1", "firmware_version": "0.2.4", "health": "Good", "towers": [ { "serial_number": "HM19487", "part_number": "LCS-U09238-ABT", "firmware_version": "1200", "locationId": "1", "leaf": true, // reserved property for tree structure "location": "B23 3in1.1", "health": "Good", "state": "Inactive", "product_sku": "250A-C3-TC", "vendor": "Supermicro", "model": "Cooling Tower Cell", "manufacturer": "Supermicro" }, { "serial_number": "HM19488", "part_number": "LCS-U09239-ABT", "firmware_version": null, "locationId": "2", "leaf": true, // reserved property for tree structure "location": "B23 3in1.2", "health": "Good", "state": "Inactive", "product_sku": "250A-C3-TC", "vendor": "Supermicro", "model": "Cooling Tower Cell", "manufacturer": "Supermicro" }, { "serial_number": "HM19489", "part_number": "LCS-U09240-ABT", "firmware_version": "1200", "locationId": "3", "leaf": true, // reserved property for tree structure "location": "B23 3in1.3", "health": "Good", "state": "Inactive", "product_sku": "250A-C3-TC", "vendor": "Supermicro", "model": "Cooling Tower Cell", "manufacturer": "Supermicro" } ] } // ... ] } // ... ] } ``` ## Check Water Tower Facility Name Exist **GET** /web/water-tower/facilities/check-name-exist ### URL Param - identity Facility name. E.g.: identity=Facility1 ### Response ```json { "result": true, "ipv4": "10.147.173.58", } ``` ## Add Water Tower Facility **POST** /web/water-tower/facilities * Need to record the action in the activity log. ### Request body Pass facility level structure to backend. ```json { "list": [ { "group_name": "Group Name", "facility_name": "Facility1", "ipv4": "10.147.173.58", "username": "Admin", "password": "Tower@1" }, { "group_name": "Group Name", "facility_name": "Facility2", "ipv4": "10.147.173.61", "username": "Admin", "password": "Tower@1" } ] } ``` ### Response Return tower level add operation response. ```json { "list": [ { "facility_name": "Facility1", "result": "Success", "reason": "" }, { "facility_name": "Facility2", "result": "Failed", "reason": "some reason" } ] } ``` ## Update Water Tower Facility **PATCH** /web/water-tower/facilities/{facility_ip} * Need to record the action in the activity log. ### Request body Pass facility level structure to backend. ```json { "facility_name": "New Facility Name", "group_name": "New Group Name", } ``` ### Response Return facility level add operation response. ```json { "facility_name": "New Facility Name", "result": "Success", "reason": "" } ``` Facility exist but cannot update ```json { "facility_name": "New Facility Name", // or display old facility name? "result": "Failed", "reason": "some reason" } ``` Facility does't exist ```json { "facility_name": "New Facility Name", "result": "Failed", "reason": "Facility do not exist" } ``` ## Delete Water Tower Facility **DELETE** /web/water-tower/facilities * Need to record the action in the activity log. ### Request body Pass facility level uuid to backend. ```json { "list": [ { "facility_name": "Facility1", "ipv4": "10.147.173.58" }, { "facility_name": "Facility2", "ipv4": "10.147.173.61" } ] } ``` ### Response Return tower level delete operation response. If facility not exist, return facility name as location. ```json { "list": [ { "facility_name": "Facility1", "result": "Success", "reason": "" }, // water tower exist but can not delete { "facility_name": "Facility2", "result": "Failed", "reason": "some reason" }, // facility not exist { "facility_name": "Facility2", "result": "Failed", "reason": "Facility not exist" } ] } ``` # Facility Level ## Get the Carousel data **GET** /web/water-tower/facilities/{facility_ip}/carousel ### Response ```json { current_status: [ { title: "Temperature", contents: [ { title: "Inlet Air", value: "35", unit: "°C" }, { title: "Outlet Air", value: "35", unit: "°C" }, { title: "Inlet Facility Water", value: "25", unit: "°C" }, { title: "Outlet Facility Water", value: "25", unit: "°C" }, ] }, { title: "Spraying", contents: [ { title: "Pump Power", value: "1.4", unit: "kW" }, { title: "Pump Outlet Pressure", value: "100", unit: "KPA" }, { title: "Make Up Water", value: "2.4", unit: "m3" }, { title: "Water Temperature", value: "30.1", unit: "°C" }, ] }, ] } ``` ## Get Water Tower Facility Physical Assets Info **GET** /web/water-tower/facilities/{facility_ip}/physical-assets ### Response ```json { "facility_name": "Tower1", "ipv4": "192.168.25.37", "group_name": "VMWare", "product_sku": "LCS-SCLT", "part_number": "S356783X9513724", "serial_number": "SN12345A6789", "manufacturer": "Supermicro", "firmware_version": "1200", "health": "Good", "tower_count": "3", "pump_count": "2", } ``` ## Get Water Tower Facility Sensor Reading(Updated) **GET** /web/water-tower/facilities/{facility_ip}/sensor-reading ### Response ```json { result: "Success", timestamp: "2024-03-27T08:08:11Z", // UTC time status_list: [ { label: "Control Module", value: "Good" | null, // Good or Error }, { label: "Facility Pump 1 Status", value: "Good" | null, // Auto or Manual or Stop }, { label: "Facility Pump 2 Status", value: "Good" | null, // Auto or Manual or Stop }, { label: "Facility Pump 3 Status", value: "Good" | null, // Auto or Manual or Stop }, ], table_list: [ { label: "Pump", list: [ { "Sensor Name": "Facility Pump 1 VFD Power(kW)", value: "4.5" | null }, { "Sensor Name": "Facility Pump 1 VFD Speed(%)", value: "70" | null }, { "Sensor Name": "Facility Pump 2 VFD Power(kW)", value: "4.5" | null }, { "Sensor Name": "Facility Pump 2 VFD Speed(%)", value: "70" | null }, { "Sensor Name": "Facility Pump 3 VFD Power(kW)", value: "4.5" | null }, { "Sensor Name": "Facility Pump 3 VFD Speed(%)", value: "70" | null }, ] }, { label: "Facility", list: [ { "Sensor Name": "Inlet Facility Water Temperature(°C)", value: "42.1" | null }, { "Sensor Name": "Outlet Facility Water Temperature(°C)", value: "32.1" | null }, { "Sensor Name": "Inlet Facility Water Pressure(kPa)", value: "500" | null }, { "Sensor Name": "Outlet Facility Water Pressure(kPa)", value: "400" | null }, { "Sensor Name": "Facility Water Flow Rate(GPM)", value: "400" | null }, ] } ] } ``` ## Get Water Tower Facility Analytics Pumps ### VFD Speed **GET** /web/water-tower/facilities/{facility_ip}/analytics/pump/vfd-speed #### URL Param - data range Time range for data. E.g.: start=2024-04-04T04:00:00Z&end=2024-04-05T04:00:00Z #### Response ```json { "label": "Facility Pumps VFD Speed", "time_stamp": [ "2024-04-04T04:00:00Z", "2024-04-04T04:01:00Z", "2024-04-04T04:02:00Z", "2024-04-04T04:03:00Z", "2024-04-04T04:04:00Z", ], "unit": "%", "facility_pump_1": [ "60", "61", "75", "63", "89" ], "facility_pump_2": [ "60", "61", "75", "63", "89" ], "facility_pump_3": [ "60", "61", "75", "63", "89" ] } ``` ### VFD Power(Updated) **GET** /web/water-tower/facilities/{facility_ip}/analytics/pump/vfd-power #### URL Param - data range Time range for data. E.g.: start=2024-04-04T04:00:00Z&end=2024-04-05T04:00:00Z #### Response ```json { "label": "Facility Pumps VFD Power", "time_stamp": [ "2024-04-04T04:00:00Z", "2024-04-04T04:01:00Z", "2024-04-04T04:02:00Z", "2024-04-04T04:03:00Z", "2024-04-04T04:04:00Z" ], "unit": "kW", "facility_pump_1": [ "2.4", "1.7", "1.7", "1.0", "2.1" ], "facility_pump_2": [ "2.4", "1.7", "1.7", "1.0", "2.1" ], "facility_pump_3": [ "2.4", "1.7", "1.7", "1.0", "2.1" ] } ``` ## Get Water Tower Facility Analytics Facility ### Water Temperature **GET** /web/water-tower/facilities/{facility_ip}/analytics/facility/water-temperature #### URL Param - data range Time range for data. E.g.: start=2024-04-04T04:00:00Z&end=2024-04-05T04:00:00Z #### Response ```json { "label": "Facility Water Temperature", "time_stamp": [ "2024-04-04T04:00:00Z", "2024-04-04T04:01:00Z", "2024-04-04T04:02:00Z", "2024-04-04T04:03:00Z", "2024-04-04T04:04:00Z", ], "unit": "℃", "inlet_facility_water_temperature": [ "20", "21", "35", "23", "49" ], "outlet_facility_water_temperature": [ "13", "17", "31", "18", "40" ] } ``` ### Water Pressure **GET** /web/water-tower/facilities/{facility_ip}/analytics/facility/water-pressure #### URL Param - data range Time range for data. E.g.: start=2024-04-04T04:00:00Z&end=2024-04-05T04:00:00Z #### Response ```json { "label": "Facility Water Pressure", "time_stamp": [ "2024-04-04T04:00:00Z", "2024-04-04T04:01:00Z", "2024-04-04T04:02:00Z", "2024-04-04T04:03:00Z", "2024-04-04T04:04:00Z" ], "unit": "kPa", "inlet_facility_water_pressure": [ "400", "530", "550", "590", "520" ], "outlet_facility_water_pressure": [ "300", "430", "450", "490", "420" ], } ``` ### Water Flow Rate **GET** /web/water-tower/facilities/{facility_ip}/analytics/facility/water-flow-rate #### URL Param - data range Time range for data. E.g.: start=2024-04-04T04:00:00Z&end=2024-04-05T04:00:00Z #### Response ```json { "label": "Facility Water Flow Rate", "time_stamp": [ "2024-04-04T04:00:00Z", "2024-04-04T04:01:00Z", "2024-04-04T04:02:00Z", "2024-04-04T04:03:00Z", "2024-04-04T04:04:00Z" ], "unit": "LPM", "facility_water_flow_rate": [ "400", "530", "550", "590", "520" ] } ``` ## Get Water Tower Facility Analytics Operation ### Facility Pumps Status(New) **GET** /web/water-tower/facilities/{facility_ip}/analytics/operation/facility-pumps-status #### URL Param - start Start of Timestamp, UTC. E.g.: start=2024-04-04T04:00:00Z - end End of Timestamp, UTC. E.g.: end=2024-04-05T04:00:00Z #### Response | Code | Description | ------ | ------ | 200 | OK | 400 | Bad Request | 401 | Unauthorized | 404 | Not found **Sample** ```json { "facility_pump_1": [ [ "2022-05-30T06:02:00Z", "Good", // Good, Error "2022-05-30T10:02:00Z" ], [ "2022-05-30T10:02:00Z", "Good", // Good, Error "2022-05-30T20:02:00Z" ], [ "2022-05-30T20:02:00Z", "Good", // Good, Error "2022-05-31T08:02:00Z" ] ], "facility_pump_2": [ [ "2022-05-30T06:02:00Z", "Good", // Good, Error "2022-05-30T10:02:00Z" ], [ "2022-05-30T10:02:00Z", "Good", // Good, Error "2022-05-30T20:02:00Z" ], [ "2022-05-30T20:02:00Z", "Good", // Good, Error "2022-05-31T08:02:00Z" ] ], "facility_pump_3": [ [ "2022-05-30T06:02:00Z", "Good", // Good, Error "2022-05-30T10:02:00Z" ], [ "2022-05-30T10:02:00Z", "Good", // Good, Error "2022-05-30T20:02:00Z" ], [ "2022-05-30T20:02:00Z", "Good", // Good, Error "2022-05-31T08:02:00Z" ] ] } ``` ### Control Module(New) **GET** /web/water-tower/facilities/{facility_ip}/analytics/operation/control-module #### URL Param - start Start of Timestamp, UTC. E.g.: start=2024-04-04T04:00:00Z - end End of Timestamp, UTC. E.g.: end=2024-04-05T04:00:00Z #### Response | Code | Description | ------ | ------ | 200 | OK | 400 | Bad Request | 401 | Unauthorized | 404 | Not found **Sample** ```json { "control_module": [ [ "2022-05-30T06:02:00Z", "Good", // Good, Error "2022-05-30T10:02:00Z" ], [ "2022-05-30T10:02:00Z", "Error", // Good, Error "2022-05-30T20:02:00Z" ], [ "2022-05-30T20:02:00Z", "Good", // Good, Error "2022-05-31T08:02:00Z" ] // ... ] } ``` # Tower Level ## Get the Carousel data **GET** /web/water-tower/facilities/{facility_ip}/{location_id}/carousel ### Response ```json { current_status: [ { title: "Temperature", contents: [ { title: "Inlet Air", value: "35", unit: "°C" }, { title: "Outlet Air", value: "35", unit: "°C" }, { title: "Inlet Facility Water", value: "25", unit: "°C" }, { title: "Outlet Facility Water", value: "25", unit: "°C" }, ] }, { title: "Spraying", contents: [ { title: "Pump Power", value: "1.4", unit: "kW" }, { title: "Pump Outlet Pressure", value: "100", unit: "KPA" }, { title: "Make Up Water", value: "2.4", unit: "m3" }, { title: "Water Temperature", value: "30.1", unit: "°C" }, ] }, ] } ``` ## Get Water Tower Physical Assets Info **GET** /web/water-tower/facilities/{facility_ip}/{location_id}/physical-assets ### Response ```json { "location": "f1.1", "group_name": "VMWare", "tower_sku": "LCS-SCLT", "part_number": "G29389230479328", "serial_number": "HM18BS019487", "manufacturer": "Supermicro", "firmware_version": "1200", "health": "Good", "status": "On" // On | Off // new info } ``` ## Get Water Tower Sensor Reading 修改 response 回應 - Remove Outlet Air Temperature, Outlet Air Relative Humidity in Air Side Card. - Remove Spraying Water Flow Rate, Spraying Water Temperature in Spraying Card - Change unit to “Gallons” for Make up Water ### URL **GET** /web/water-tower/facilities/{facility_ip}/{location_id}/sensor-reading ### Response ```json { result: 'Success', timestamp: '2024-03-27T08:08:11Z', // UTC time status_list: [ { label: 'Operation Mode', value: 'Manual' | null, // TBD }, { label: 'Fan VFD Status', value: 'Good' | null, // Good or Error }, { label: 'Bassin Level Sensor', value: 'Overflow' | null, // Low/Good/Overflow }, { label: 'Spraying Pump Status', value: 'On' | null, // Low/Good/Overflow } ], table_list: [ { label: 'Air Side', list: [ { 'Sensor Name': 'Fan VFD Speed(%)', value: '50' | null }, { 'Sensor Name': 'Fan Power(kW)', value: '35' | null }, { 'Sensor Name': 'Inlet Air Temperature(℃)', value: '35' | null }, { 'Sensor Name': 'Inlet Air Relative Humidity(%)', value: '38' | null } ] }, { label: 'Spraying', list: [ { 'Sensor Name': 'Spraying Pump Power(kW)', value: '1.4' | null }, { 'Sensor Name': 'Pump Outlet Pressure(kPa)', value: '38' | null }, { 'Sensor Name': 'Make Up Water(usGallons)', // 2024-04-01 value: '2.4' | null }, ] }, { label: 'Calculated Data', list: [ { 'Sensor Name': 'Dew Point(℃)', value: '50' | null }, { 'Sensor Name': 'Heat Load(kW)', value: '49' | null }, { 'Sensor Name': 'Total Power(kW)', value: '3245' | null }, { 'Sensor Name': 'PUE', value: '3261' | null }, { 'Sensor Name': 'WUE(G/MWh)', // 2024-04-01 value: '48' | null }, ] } ] } ``` ## Air Side ### Fan VFD Speed **GET** /web/water-tower/facilities/{facility_ip}/{location_id}/analytics/air-side/fan-vfd-speed #### URL Param - start Start of Timestamp, UTC. E.g.: start=2024-04-04T04:00:00Z - end End of Timestamp, UTC. E.g.: end=2024-04-05T04:00:00Z #### Response ```json { "label": "Fan VFD Speed", "time_stamp": [ "2024-04-04T04:00:00Z", "2024-04-04T04:01:00Z", "2024-04-04T04:02:00Z", "2024-04-04T04:03:00Z", "2024-04-04T04:04:00Z" ], "unit": "%", "fan_vfd_speed": [ "1", "1.5", "2", "1.5", "2" ] } ``` ### Fan Power **GET** /web/water-tower/facilities/{facility_ip}/{location_id}/analytics/air-side/fan-power #### URL Param - start Start of Timestamp, UTC. E.g.: start=2024-04-04T04:00:00Z - end End of Timestamp, UTC. E.g.: end=2024-04-05T04:00:00Z #### Response ```json { "label": "Fan Power", "time_stamp": [ "2024-04-04T04:00:00Z", "2024-04-04T04:01:00Z", "2024-04-04T04:02:00Z", "2024-04-04T04:03:00Z", "2024-04-04T04:04:00Z" ], "unit": "kW", "fan_power": [ "1", "1.5", "2", "1.5", "2" ] } ``` ### Inlet Air Temperature **GET** /web/water-tower/facilities/{facility_ip}/{location_id}/analytics/air-side/inlet-air-temperature #### URL Param - start Start of Timestamp, UTC. E.g.: start=2024-04-04T04:00:00Z - end End of Timestamp, UTC. E.g.: end=2024-04-05T04:00:00Z #### Response ```json { "label": "Inlet Air Temperature", "time_stamp": [ "2024-04-04T04:00:00Z", "2024-04-04T04:01:00Z", "2024-04-04T04:02:00Z", "2024-04-04T04:03:00Z", "2024-04-04T04:04:00Z" ], "unit": "℃", "inlet_air_temperature": [ "1", "1.5", "2", "1.5", "2" ] } ``` ### Inlet Air Relative Humidity **GET** /web/water-tower/facilities/{facility_ip}/{location_id}/analytics/air-side/inlet-air-relative-humidity #### URL Param - start Start of Timestamp, UTC. E.g.: start=2024-04-04T04:00:00Z - end End of Timestamp, UTC. E.g.: end=2024-04-05T04:00:00Z #### Response ```json { "label": "Inlet Air Relative Humidity", "time_stamp": [ "2024-04-04T04:00:00Z", "2024-04-04T04:01:00Z", "2024-04-04T04:02:00Z", "2024-04-04T04:03:00Z", "2024-04-04T04:04:00Z" ], "unit": "%", "inlet_air_relative_humidity": [ "1", "1.5", "2", "1.5", "2" ] } ``` ## Spraying ### Bassin Level Sensor **GET** /web/water-tower/facilities/{facility_ip}/{location_id}/analytics/spraying/bassin-level-sensor #### URL Param - start Start of Timestamp, UTC. E.g.: start=2024-04-04T04:00:00Z - end End of Timestamp, UTC. E.g.: end=2024-04-05T04:00:00Z #### Response ```json { "bassin_level_sensor": [ [ "2022-05-30T06:02:00Z", "Good", // Good, Error "2022-05-30T10:02:00Z" ], [ "2022-05-30T10:02:00Z", "Error", // Good, Error "2022-05-30T20:02:00Z" ], [ "2022-05-30T20:02:00Z", "Good", // Good, Error "2022-05-31T08:02:00Z" ] // ... ] } ``` ### Spraying Pump Power **GET** /web/water-tower/facilities/{facility_ip}/{location_id}/analytics/spraying/spraying-pump-power #### URL Param - start Start of Timestamp, UTC. E.g.: start=2024-04-04T04:00:00Z - end End of Timestamp, UTC. E.g.: end=2024-04-05T04:00:00Z #### Response ```json { "label": "Spraying Pump Power", "time_stamp": [ "2024-04-04T04:00:00Z", "2024-04-04T04:01:00Z", "2024-04-04T04:02:00Z", "2024-04-04T04:03:00Z", "2024-04-04T04:04:00Z" ], "unit": "kw", "spraying_pump_power": [ "1", "1.5", "2", "1.5", "2" ] } ``` ### Pump Outlet Pressure **GET** /web/water-tower/facilities/{facility_ip}/{location_id}/analytics/spraying/pump-outlet-pressure #### URL Param - start Start of Timestamp, UTC. E.g.: start=2024-04-04T04:00:00Z - end End of Timestamp, UTC. E.g.: end=2024-04-05T04:00:00Z #### Response ```json { "label": "Pump Outlet Pressure", "time_stamp": [ "2024-04-04T04:00:00Z", "2024-04-04T04:01:00Z", "2024-04-04T04:02:00Z", "2024-04-04T04:03:00Z", "2024-04-04T04:04:00Z" ], "unit": "kPa", "pump_outlet_pressure": [ "10", "15", "20", "15", "20" ] } ``` ### Make Up Water **GET** /web/water-tower/facilities/{facility_ip}/{location_id}/analytics/spraying/make-up-water #### URL Param - start Start of Timestamp, UTC. E.g.: start=2024-04-04T04:00:00Z - end End of Timestamp, UTC. E.g.: end=2024-04-05T04:00:00Z #### Response ```json { "label": "Make Up Water", "time_stamp": [ "2024-04-04T04:00:00Z", "2024-04-04T04:01:00Z", "2024-04-04T04:02:00Z", "2024-04-04T04:03:00Z", "2024-04-04T04:04:00Z" ], "unit": "usGallons", "make_up_water": [ "1", "1.5", "2", "1.5", "2" ], "total_make_up_water_usage": "50" } ``` ## Operation ### Operation Mode **GET** /web/water-tower/facilities/{facility_ip}/{location_id}/analytics/operation/operation-mode #### URL Param - start Start of Timestamp, UTC. E.g.: start=2024-04-04T04:00:00Z - end End of Timestamp, UTC. E.g.: end=2024-04-05T04:00:00Z #### Response | Code | Description | ------ | ------ | 200 | OK | 400 | Bad Request | 401 | Unauthorized | 404 | Not found **Sample** ```json { "operation_mode": [ [ "2022-05-30T06:02:00Z", "Stop", // Stop, Manual, Auto "2022-05-30T10:02:00Z" ], [ "2022-05-30T10:02:00Z", "Manual", // Stop, Manual, Auto "2022-05-30T20:02:00Z" ], [ "2022-05-30T20:02:00Z", "Auto", // Stop, Manual, Auto "2022-05-31T08:02:00Z" ] // ... ] } ``` ### Fan VFD Status **GET** /web/water-tower/facilities/{facility_ip}/{location_id}/analytics/operation/fan-vfd-status #### URL Param - start Start of Timestamp, UTC. E.g.: start=2024-04-04T04:00:00Z - end End of Timestamp, UTC. E.g.: end=2024-04-05T04:00:00Z #### Response | Code | Description | ------ | ------ | 200 | OK | 400 | Bad Request | 401 | Unauthorized | 404 | Not found **Sample** ```json { "fan_vfd_status": [ [ "2022-05-30T06:02:00Z", "Good", // Good, Error "2022-05-30T10:02:00Z" ], [ "2022-05-30T10:02:00Z", "Error", // Good, Error "2022-05-30T20:02:00Z" ], [ "2022-05-30T20:02:00Z", "Good", // Good, Error "2022-05-31T08:02:00Z" ] // ... ] } ``` ### Spraying Pump Status **GET** /web/water-tower/facilities/{facility_ip}/{location_id}/analytics/operation/spraying-pump-status #### URL Param - start Start of Timestamp, UTC. E.g.: start=2024-04-04T04:00:00Z - end End of Timestamp, UTC. E.g.: end=2024-04-05T04:00:00Z #### Response | Code | Description | ------ | ------ | 200 | OK | 400 | Bad Request | 401 | Unauthorized | 404 | Not found **Sample** ```json { "spraying_pump_status": [ [ "2022-05-30T06:02:00Z", "Error", // Good, Error "2022-05-30T10:02:00Z" ], [ "2022-05-30T10:02:00Z", "Good", // Good, Error "2022-05-30T20:02:00Z" ], [ "2022-05-30T20:02:00Z", "Error", // Good, Error "2022-05-31T08:02:00Z" ] // ... ] } ``` ## Calculated Data ### Dew Point ~~GET /web/water-tower/facilities/{facility_ip}/{location_id}/analytics/calculated-data/dew-point~~ **GET** /web/water-tower/facilities/{facility_ip}/{location_id}/analytics/calculated-data/wet-bulb-temperature #### URL Param - start Start of Timestamp, UTC. E.g.: start=2024-04-04T04:00:00Z - end End of Timestamp, UTC. E.g.: end=2024-04-05T04:00:00Z #### Response ```json { "label": "Dew Point", "time_stamp": [ "2024-04-04T04:00:00Z", "2024-04-04T04:01:00Z", "2024-04-04T04:02:00Z", "2024-04-04T04:03:00Z", "2024-04-04T04:04:00Z" ], "unit": "℃", "dew_point": [ "1", "1.5", "2", "1.5", "2" ] } ``` ### Heat Load **GET** /web/water-tower/facilities/{facility_ip}/{location_id}/analytics/calculated-data/heat-load #### URL Param - start Start of Timestamp, UTC. E.g.: start=2024-04-04T04:00:00Z - end End of Timestamp, UTC. E.g.: end=2024-04-05T04:00:00Z #### Response ```json { "label": "Heat Load", "time_stamp": [ "2024-04-04T04:00:00Z", "2024-04-04T04:01:00Z", "2024-04-04T04:02:00Z", "2024-04-04T04:03:00Z", "2024-04-04T04:04:00Z" ], "unit": "kW", "heat_load": [ "1", "1.5", "2", "1.5", "2" ] } ``` ### Total Power **GET** /web/water-tower/facilities/{facility_ip}/{location_id}/analytics/calculated-data/total-power #### URL Param - start Start of Timestamp, UTC. E.g.: start=2024-04-04T04:00:00Z - end End of Timestamp, UTC. E.g.: end=2024-04-05T04:00:00Z #### Response ```json { "label": "Total Power", "time_stamp": [ "2024-04-04T04:00:00Z", "2024-04-04T04:01:00Z", "2024-04-04T04:02:00Z", "2024-04-04T04:03:00Z", "2024-04-04T04:04:00Z" ], "unit": "kW", "total_power": [ "1", "1.5", "2", "1.5", "2" ] } ``` ### PUE **GET** /web/water-tower/facilities/{facility_ip}/{location_id}/analytics/calculated-data/pue #### URL Param - start Start of Timestamp, UTC. E.g.: start=2024-04-04T04:00:00Z - end End of Timestamp, UTC. E.g.: end=2024-04-05T04:00:00Z #### Response ```json { "label": "PUE", "time_stamp": [ "2024-04-04T04:00:00Z", "2024-04-04T04:01:00Z", "2024-04-04T04:02:00Z", "2024-04-04T04:03:00Z", "2024-04-04T04:04:00Z" ], "unit": "", "pue": [ "1", "1.5", "2", "1.5", "2" ] } ``` ### WUE **GET** /web/water-tower/facilities/{facility_ip}/{location_id}/analytics/calculated-data/wue #### URL Param - start Start of Timestamp, UTC. E.g.: start=2024-04-04T04:00:00Z - end End of Timestamp, UTC. E.g.: end=2024-04-05T04:00:00Z #### Response ```json { "label": "WUE", "time_stamp": [ "2024-04-04T04:00:00Z", "2024-04-04T04:01:00Z", "2024-04-04T04:02:00Z", "2024-04-04T04:03:00Z", "2024-04-04T04:04:00Z" ], "unit": "G/MWh", "wue": [ "1", "1.5", "2", "1.5", "2" ] } ``` # Group ## Get Group List **GET** /web/water-tower/groups ### URL Param - items help the user to search what data he wants in different columns. Backend will return all types of columns to the frontend. E.g.: group_name=all&description=all&facility_number=all - current_page Which page the user wants to reference. E.g.: current_page=1 - sort What column the user wants to sort it (asc or desc). E.g.: sort=group_name:asc or sort=group_name:desc - entries Which page the user wants to reference. E.g.: entries=10 ### Response ```json { "entries": 10, "current_page": 1, "total_page": 1, "total_entries": 1, "list": [ { "uuid": "00000000-0000-0000-0000-7CC25551CC-GROUP-1", // identify the group "group_name": "Group 1", "description": "Some description", "facility_number": 6 } ] } ``` ## Get All Groups **GET** /web/water-tower/groups/all When user add new water tower, user need to select which group is water tower belong. ### Response Return all groups name and uuid. ```json { "list": [ { "group_name": "Group 1", "uuid": "00000000-0000-0000-0000-7CC25551CC-GROUP-1" }, { "group_name": "Group 2", "uuid": "00000000-0000-0000-0000-7CC25551CC-GROUP-2" }, ], } ``` ## Add Group **POST** /web/water-tower/groups ### Request body ```json { "list": [ { "group_name": "Group 1", "description": "Some description", }, { "group_name": "Group 2", "description": "Some description 2", } ] } ``` ### Response ```json { "list": [ { "group_name": "Group 1", "result": "Success", "reason": "" }, { "group_name": "Group 2", "result": "Failed", "reason": "some reason" }, ] } ``` ## Check Group Name Exist **GET** /web/water-tower/groups/check-name-exist When user add new group, need to check if backend already have same group name. ### URL Param - identity Group name. E.g.: identity=Group%201 ### Response Return result and named group uuid, need uuid for update group to check it is same group or not. ```json { "result": "true", "uuid": "00000000-0000-0000-0000-7CC25551CC-GROUP-1" } ``` ```json { "result": "false", "uuid": null } ``` ## Get Facilities of Groups **GET** /web/water-tower/groups/get-facilities When user delete groups, need to list all facilities for user to check. ### URL Param - identity Group uuid. E.g.: identity=00000000-0000-0000-0000-7CC25551CC-GROUP-1,00000000-0000-0000-0000-7CC25551CC-GROUP-2 ### Response ```json { "list": [ { "facility_name": "Tower1", "group_name": "Group 1", }, { "facility_name": "Tower2", "group_name": "Group 1", }, { "facility_name": "Tower3", "group_name": "Group 1", }, { "facility_name": "Tower4", "group_name": "Group 2", } ] } ``` ## Update Group **PUT** /web/water-tower/groups/{uuid} Update an existing group. ### Request body ```json { "group_name": "New Group Name", "description": "New description" } ``` ### Response Success ```json { "group_name": "New Group Name", "result": "Success", "reason": "" } ``` Group exist but cannot update ```json { "group_name": "New Group Name", "result": "Failed", "reason": "Some reason" } ``` Group doesn't exist ```json { "group_name": "New Group Name", "result": "Failed", "reason": "Group doesn't exist" } ``` ## Delete Groups **DELETE** /web/water-tower/groups Delete groups and water towers. ### Request body Pass group uuid to backend. ```json { "list": [ { "group_name": "Group 1", "uuid": "00000000-0000-0000-0000-7CC25551CC-GROUP-1" }, { "group_name": "Group 2", "uuid": "00000000-0000-0000-0000-7CC25551CC-GROUP-2" }, ], } ``` ### Response ```json { "list": [ { "group_name": "Group 1", "result": "Success", "reason": "" }, { "group_name": "Group 2", "result": "Failed", "reason": "some reason" }, ] } ``` # Notification New notification activities. Add new activities: - Add Facility - Update Facility - Delete Facilities - Add Cooling Tower Group - Update Cooling Tower Group - Delete Cooling Tower Groups ![image](https://hackmd.io/_uploads/rJ4k69qpA.png) ![image](https://hackmd.io/_uploads/ByxoWaq5pC.png) ![image](https://hackmd.io/_uploads/SyOzTqcTC.png) ![image](https://hackmd.io/_uploads/B1Km655aR.png) ![image](https://hackmd.io/_uploads/SJR7T9c6A.png) ![image](https://hackmd.io/_uploads/rymVTq5pR.png) # Cooling Tower Phase 2.1 ## Log Event Cooling Tower **GET** /web/log/cooling-tower-event/list get list of cooling tower events ### URL Param - entries : how many entries are on each page. E.g.: entries=10 - items : help the user to search what data he wants in different columns. Backend will return all types of columns to the frontend. E.g.: trap_id=all&severity=all&message=all&facility_name=all&facility_ip=all& timestamp=all&start=&end= - If the front-end does not support it to the backend. Backend will search all of the items ! - Total have 8 types of categories - current_page : Which page the user wants to reference. E.g.: current_page=2 get list of 2’s page - if current_page <= 0 , current_page = 1. - if current_page >= total_page, current_page = total_page. - min of total_page = 1 even no data. - sort : What column the user wants to sort it (asc or desc). E.g.: sort=entity_id:asc or sort=entity_id:desc mark_id : Only for notification redirection. E.g : mark_id=124 ```json { current_page: 1, entries: 10, total_entries: 5635, total_pages: 564, list: [ { entity_id: 23, trap_id: '1', severity: 'alert' , // 'alert' | 'warning' message: 'some alert message', facility_name: 'test', facility_ip: '10.0.168.203', timestamp: "2024-03-27T08:08:11Z", // UTC time group_uuid: 'bce2e76c-8555-11ef-9b24-4ec585073c20', }, { entity_id: 24, trap_id: '2', severity: 'warning', // 'alert' | 'warning' message: 'another message', facility_name: 'test1', facility_ip: '10.43.242.34', timestamp: "2024-03-27T08:08:11Z", // UTC time group_uuid: 'a3364b66-8551-11ef-9b22-4ec585073c20', }, ], } ``` ## Get Facility Settings **GET** /web/water-tower/facilities/{facility_ip}/settings ### Response ```json { "outletFacilityWaterTemperatureSetPoint": { "displayName": "Outlet Facility Water Temperature Set Point", "unit": "°C", "setPoint": 35 }, "outletFacilityWaterPressureSetPoint": { "displayName": "Outlet Facility Water Pressure Set Point", "unit": "kPa", "setPoint": 102 } } ``` ## Patch Facility Settings **PATCH** /web/water-tower/facilities/{facility_ip}/settings ### Request Body ```json { "outletFacilityWaterTemperatureSetPoint"?: 35, "outletFacilityWaterPressureSetPoint"?: 200, } ``` ### Response ```json { "list":[ { "settings": 'Outlet Facility Water Temperature Set Point', "facilityName": 'Facility 1', "result": 'Success' | 'Failed', "reason"?: 'some reason', }, { "settings": 'Outlet Facility Water Pressure Set Point', "facilityName": 'Facility 1', "result": 'Success' | 'Failed', "reason"?: 'some reason', }, ] } ``` ## Get Facility Settings Current Value use [sensor reading](https://hackmd.io/ropyPFVfQh2ahG5hT3v0Cw#Get-Water-Tower-Facility-Sensor-ReadingUpdated) api

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully