{
    "schemes": [],
    "swagger": "2.0",
    "info": {
        "description": "Comfort manager API written in golang.",
        "title": "Comfort manager API",
        "termsOfService": "http://swagger.io/terms/",
        "contact": {
            "name": "SmartPro",
            "url": "api.smartpro.lt",
            "email": "api@smartpro.lt"
        },
        "license": {
            "name": "Apache 2.0",
            "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
        },
        "version": "0.1"
    },
    "host": "talinas.nordspace.lt:8080/api",
    "basePath": "/",
    "paths": {
        "/alarms": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Get all units alarm states",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Alarm"
                ],
                "summary": "Get all alarm states",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/controller.AlarmsResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    }
                }
            }
        },
        "/outputs": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Get all units outputs list",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Outputs"
                ],
                "summary": "Get all units outputs list",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/controller.OutputsResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    }
                }
            }
        },
        "/responses": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Get responses list for all units",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Responses"
                ],
                "summary": "Get all units responses list",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/controller.ResponesResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    }
                }
            }
        },
        "/sensor-values": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Get all values for all units sensors",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Sensors"
                ],
                "summary": "Get all sensor values",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/controller.SensorValuesResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    }
                }
            }
        },
        "/units": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Get units with selectors and names",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Units"
                ],
                "summary": "Get units",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/controller.UnitsResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    }
                }
            }
        },
        "/units/{unit}/alarm": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Get alarm state for certain unit",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Alarm"
                ],
                "summary": "Get alarm state",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Unit selector (unique box identifier)",
                        "name": "unit",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/controller.AlarmResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Set alarm for unit by sending desired alarm state",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Alarm"
                ],
                "summary": "Set alarm",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Unit selector (unique box identifier)",
                        "name": "unit",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Body params for setting alarm",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/dto.AlarmRequest"
                        }
                    }
                ],
                "responses": {
                    "202": {
                        "description": "Accepted",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    }
                }
            }
        },
        "/units/{unit}/commands": {
            "post": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Send custom command for unit with topic and payload (not really used)",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Commands"
                ],
                "summary": "Send custom command",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Unit selector (unique box identifier)",
                        "name": "unit",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Body params for custom command",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/controller.CommandRequest"
                        }
                    }
                ],
                "responses": {
                    "202": {
                        "description": "Accepted",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    }
                }
            }
        },
        "/units/{unit}/electricity-meter-values": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Get electricity meter values for certain unit",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Meters"
                ],
                "summary": "Get electricity meter values",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Unit selector (unique box identifier)",
                        "name": "unit",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/dto.ElectricityMeterData"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    }
                }
            }
        },
        "/units/{unit}/electricity-meter-values-cached": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Get electricity meter values for certain unit (cached - read every hour)",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Meters"
                ],
                "summary": "Get electricity meter values (cached - read every hour)",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Unit selector (unique box identifier)",
                        "name": "unit",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/dto.ElectricityMeterData"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    }
                }
            }
        },
        "/units/{unit}/outputs": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Get outputs list for certain unit",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Outputs"
                ],
                "summary": "Get outputs list",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Unit selector",
                        "name": "unit",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/controller.OutputsResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "This endpoint should be used to send request for activating output by number (isActive state is required)",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Outputs"
                ],
                "summary": "Send output activation request",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Unit selector",
                        "name": "unit",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "query params",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/dto.OutputRequest"
                        }
                    }
                ],
                "responses": {
                    "202": {
                        "description": "Accepted",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    }
                }
            }
        },
        "/units/{unit}/responses": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Get responses list with numbers and states for certain unit",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Responses"
                ],
                "summary": "Get responses list",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Unit selector (unique box identifier)",
                        "name": "unit",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/controller.ResponesResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "This endpoint should be used to send request for activating response - response activates predefined number of outputs",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Responses"
                ],
                "summary": "Send response activation request",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Unit selector",
                        "name": "unit",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "query params",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/dto.ResponseRequest"
                        }
                    }
                ],
                "responses": {
                    "202": {
                        "description": "Accepted",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    }
                }
            }
        },
        "/units/{unit}/sensor-values": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Get sensor values for unit",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Sensors"
                ],
                "summary": "Get sensor values",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Unit selector (unique box identifier)",
                        "name": "unit",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/controller.SensorValuesResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    }
                }
            }
        },
        "/units/{unit}/user-codes": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Get user codes for unit",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "User codes"
                ],
                "summary": "Get user codes",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Unit selector (unique box identifier)",
                        "name": "unit",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/controller.UserAccessCodesResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Change user code for specified user and unit",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "User codes"
                ],
                "summary": "Change user code",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Unit selector (unique box identifier)",
                        "name": "unit",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Body for user code change request",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/controller.UserCodeChangeRequest"
                        }
                    }
                ],
                "responses": {
                    "202": {
                        "description": "Accepted",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    }
                }
            }
        },
        "/units/{unit}/user-codes-multi": {
            "post": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Change user code for specified user and unit",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "User codes"
                ],
                "summary": "Change multiple user codes at once",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Unit selector (unique box identifier)",
                        "name": "unit",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Body for user code change request",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/controller.UserCodeChangeMultiRequest"
                        }
                    }
                ],
                "responses": {
                    "202": {
                        "description": "Accepted",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    }
                }
            }
        },
        "/units/{unit}/water-meter-values": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Get water meter values for certain unit",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Meters"
                ],
                "summary": "Get water meter values",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Unit selector (unique box identifier)",
                        "name": "unit",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/dto.WaterMeterData"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    }
                }
            }
        },
        "/units/{unit}/water-meter-values-cached": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Get water meter values for certain unit (cached - read every hour)",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Meters"
                ],
                "summary": "Get water meter values (cached - read every hour)",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Unit selector (unique box identifier)",
                        "name": "unit",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/dto.WaterMeterData"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    }
                }
            }
        },
        "/units/{unit}/zones": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Get zones list for certain unit\nZones indicate whether some things are on or off. E.g. if light is on, if doors are open",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Zones"
                ],
                "summary": "Get zones list",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Unit selector (unique box identifier)",
                        "name": "unit",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/controller.ZonesResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    }
                }
            }
        },
        "/zones": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "description": "Get all units zones\nZones indicate whether some things are on or off. E.g. if light is on, if doors are open",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Zones"
                ],
                "summary": "Get all units zones",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/controller.ZonesResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/dto.SimpleResponse"
                        }
                    }
                }
            }
        }
    },
    "definitions": {
        "controller.AlarmResponse": {
            "type": "object",
            "properties": {
                "alarmState": {
                    "description": "Alarm state for unit",
                    "type": "string",
                    "enum": [
                        "disarmed",
                        "armed_vacation",
                        "armed_home",
                        "armed_night",
                        "armed_vacation",
                        "triggered"
                    ]
                },
                "isConnected": {
                    "description": "Whether there is connection to comfort",
                    "type": "boolean"
                },
                "timer": {
                    "description": "Timer for alarm - usually starts counting from 30",
                    "type": "integer"
                }
            }
        },
        "controller.AlarmsResponse": {
            "type": "object",
            "properties": {
                "alarms": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/dto.AlarmState"
                    }
                }
            }
        },
        "controller.CommandRequest": {
            "type": "object",
            "properties": {
                "payload": {
                    "description": "Payload - state for setting command, usually 1 or 0",
                    "type": "string",
                    "example": "1"
                },
                "topic": {
                    "description": "Topic - path for sending custom command",
                    "type": "string",
                    "example": "output1/set"
                }
            }
        },
        "controller.OutputsResponse": {
            "type": "object",
            "properties": {
                "outputs": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/dto.Output"
                    }
                }
            }
        },
        "controller.ResponesResponse": {
            "type": "object",
            "properties": {
                "responses": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/dto.Response"
                    }
                }
            }
        },
        "controller.SensorValuesResponse": {
            "type": "object",
            "properties": {
                "sensorValues": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/dto.SensorValue"
                    }
                }
            }
        },
        "controller.UnitsResponse": {
            "type": "object",
            "properties": {
                "units": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/dto.Unit"
                    }
                }
            }
        },
        "controller.UserAccessCodesResponse": {
            "type": "object",
            "properties": {
                "userCodes": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/dto.UserAccessCode"
                    }
                }
            }
        },
        "controller.UserCodeChangeMultiRequest": {
            "type": "object",
            "properties": {
                "codes": {
                    "description": "Codes array",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/dto.UserAccessCodeRequest"
                    }
                }
            }
        },
        "controller.UserCodeChangeRequest": {
            "type": "object",
            "properties": {
                "accessCode": {
                    "description": "Pin/Access code value",
                    "type": "string"
                },
                "number": {
                    "description": "User number for access code",
                    "type": "integer"
                }
            }
        },
        "controller.ZonesResponse": {
            "type": "object",
            "properties": {
                "zones": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/dto.Zone"
                    }
                }
            }
        },
        "dto.AlarmRequest": {
            "type": "object",
            "properties": {
                "alarmType": {
                    "description": "Type of alarm for setting alarm - oneof enum values",
                    "type": "string",
                    "enum": [
                        "DISARM",
                        "ARM_AWAY",
                        "ARM_HOME",
                        "ARM_NIGHT",
                        "ARM_VACATION"
                    ]
                }
            }
        },
        "dto.AlarmState": {
            "type": "object",
            "properties": {
                "alarmState": {
                    "description": "Alarm state for unit",
                    "type": "string",
                    "enum": [
                        "disarmed",
                        "armed_vacation",
                        "armed_home",
                        "armed_night",
                        "armed_vacation",
                        "triggered",
                        "arming",
                        "unknown"
                    ]
                },
                "isConnected": {
                    "description": "Whether there is connection to comfort",
                    "type": "boolean"
                },
                "timer": {
                    "description": "Timer for alarm - usually starts counting from 30",
                    "type": "integer"
                },
                "unitSelector": {
                    "description": "Unit selector (unique identifier)",
                    "type": "string"
                }
            }
        },
        "dto.ElectricityMeterData": {
            "type": "object",
            "properties": {
                "activeEnergy": {
                    "type": "number"
                },
                "activeEnergyUnit": {
                    "type": "string"
                },
                "activePower": {
                    "type": "number"
                },
                "activePowerUnit": {
                    "type": "string"
                },
                "apparentPower": {
                    "type": "number"
                },
                "apparentPowerUnit": {
                    "type": "string"
                },
                "powerFactor": {
                    "type": "number"
                },
                "reactivePower": {
                    "type": "number"
                },
                "reactivePowerUnit": {
                    "type": "string"
                },
                "readDatetime": {
                    "description": "Date and time of values read ( when value was read from meter)",
                    "type": "string"
                },
                "voltage": {
                    "type": "number"
                },
                "voltageUnit": {
                    "type": "string"
                }
            }
        },
        "dto.Output": {
            "type": "object",
            "properties": {
                "isActive": {
                    "description": "Whether output is currently active (ON state)",
                    "type": "boolean"
                },
                "name": {
                    "description": "Ouput name",
                    "type": "string"
                },
                "number": {
                    "description": "Ouput number",
                    "type": "integer"
                },
                "pathSet": {
                    "description": "Output path for setting state (used for custom communication with MQTT)",
                    "type": "string"
                },
                "pathStatus": {
                    "description": "Output status path (used for custom communication with MQTT)",
                    "type": "string"
                },
                "unitSelector": {
                    "description": "Unit selector (unique identifier)",
                    "type": "string"
                }
            }
        },
        "dto.OutputRequest": {
            "type": "object",
            "properties": {
                "isActive": {
                    "description": "Output state (whether should be ON or OFF)",
                    "type": "boolean"
                },
                "number": {
                    "description": "Output number",
                    "type": "integer"
                }
            }
        },
        "dto.Response": {
            "type": "object",
            "properties": {
                "description": {
                    "type": "string"
                },
                "fixed": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "number": {
                    "type": "integer"
                },
                "pathSet": {
                    "type": "string"
                },
                "unitSelector": {
                    "type": "string"
                }
            }
        },
        "dto.ResponseRequest": {
            "type": "object",
            "properties": {
                "number": {
                    "description": "Response number for sending request",
                    "type": "integer",
                    "example": 1
                }
            }
        },
        "dto.SensorValue": {
            "type": "object",
            "properties": {
                "name": {
                    "description": "Name of sensor",
                    "type": "string"
                },
                "number": {
                    "description": "Sensor number",
                    "type": "integer"
                },
                "unitSelector": {
                    "description": "Unit selector (unique identifier)",
                    "type": "string"
                },
                "value": {
                    "description": "Sensor value as float64",
                    "type": "number"
                }
            }
        },
        "dto.SimpleResponse": {
            "type": "object",
            "properties": {
                "message": {
                    "type": "string"
                }
            }
        },
        "dto.Unit": {
            "type": "object",
            "properties": {
                "cameraSelector": {
                    "description": "Unit camera selector (for use within app)",
                    "type": "string"
                },
                "description": {
                    "description": "Unit description (public name)",
                    "type": "string"
                },
                "selector": {
                    "description": "Unit selector (unique identifier)",
                    "type": "string"
                },
                "selector2": {
                    "description": "Unit selector 2 (unique identifier2)",
                    "type": "string"
                }
            }
        },
        "dto.UserAccessCode": {
            "type": "object",
            "properties": {
                "accessCode": {
                    "description": "Pin/Access code value",
                    "type": "string"
                },
                "number": {
                    "description": "User number for access code",
                    "type": "integer"
                },
                "unitSelector": {
                    "description": "Unit selector (unique identifier)",
                    "type": "string"
                }
            }
        },
        "dto.UserAccessCodeRequest": {
            "type": "object",
            "properties": {
                "accessCode": {
                    "description": "Pin/Access code value",
                    "type": "string"
                },
                "number": {
                    "description": "User number for access code",
                    "type": "integer"
                }
            }
        },
        "dto.WaterMeterData": {
            "type": "object",
            "properties": {
                "readDatetime": {
                    "description": "Date and time of values read ( when value was read from meter)",
                    "type": "string"
                },
                "volume": {
                    "description": "Volume in cubic meters, e.g. 123.456 (m^3) which is 123456 litres",
                    "type": "number"
                },
                "volumeFlow": {
                    "description": "Volume flow in cubic meters, shows current flow of water",
                    "type": "number"
                },
                "volumeFlowUnit": {
                    "description": "Volume flow units - probably m^3",
                    "type": "string"
                },
                "volumeUnit": {
                    "description": "Volume units - probably m^3",
                    "type": "string"
                }
            }
        },
        "dto.Zone": {
            "type": "object",
            "properties": {
                "isActive": {
                    "description": "PathStatus string `json:\"pathStatus\"`\nPathSet    string `json:\"pathSet\"`\nWhether zone is currently active (ON state)",
                    "type": "boolean"
                },
                "name": {
                    "description": "Zone name",
                    "type": "string",
                    "example": "Zone 1"
                },
                "number": {
                    "description": "Zone number",
                    "type": "integer",
                    "example": 1
                },
                "unitSelector": {
                    "description": "Unit selector (unique identifier)",
                    "type": "string",
                    "example": "ta01"
                }
            }
        }
    },
    "securityDefinitions": {
        "Bearer": {
            "description": "\"Type 'Bearer TOKEN' to correctly set the API Key\"",
            "type": "apiKey",
            "name": "Authorization",
            "in": "header"
        }
    }
}