123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332 |
- from enum import Enum
- from pydantic import BaseModel, Field
- from app.controllers.equipment.switch import SwitchSet
- from app.models.domain.feedback import FeedbackValue
- from app.schemas.equipment import ASHP, FeedWaterPump
- from app.schemas.equipment import VRFMode
- from app.schemas.season import Season
- class ThermalMode(str, Enum):
- cooling = "cooling"
- heating = "heating"
- hold = "hold"
- class Speed(str, Enum):
- off = "off"
- low = "low"
- medium = "medium"
- high = "high"
- hold = "hold"
- class ACATVIInstructionsRequest(BaseModel):
- device_id: str
- return_air_temperature: float | None
- running_status: bool | None
- work_mode: VRFMode
- current_speed: str | None
- current_temperature_set: float | None
- space_temperature_target: float | None
- space_realtime_temperature: float | None
- feedback: FeedbackValue
- on_time: str | None
- off_time: str | None
- class ACATVIInstructionsResponse(BaseModel):
- switch_set: str | None
- speed_set: str | None
- temperature_set: float | None
- class ACATVIModeRequest(BaseModel):
- season: Season
- space_temperature_list: list[float]
- class ACATVIModeResponse(BaseModel):
- mode: str
- class ACATFCInstructionsRequestBase(BaseModel):
- device_id: str
- season: str
- space_temperature_target: float | None
- space_realtime_temperature: float | None
- running_status: bool | None
- speed: Speed | None
- feedback: FeedbackValue
- class ACATFC2InstructionsRequest(ACATFCInstructionsRequestBase):
- pass
- class ACATFC4InstructionsRequest(ACATFCInstructionsRequestBase):
- pass
- class ACATFCInstructionsResponseBase(BaseModel):
- speed_set: str
- switch_set: str
- class ACATFC2InstructionsResponse(ACATFCInstructionsResponseBase):
- water_valve_set: str
- class ACATFC4InstructionsResponse(ACATFCInstructionsResponseBase):
- chill_water_valve_set: str
- hot_water_valve_set: str
- class ACATFCInstructionsResponse(BaseModel):
- switch_set: int = Field(None, alias="onOff")
- speed_set: int = Field(None, alias="speed")
- temperature_set: float = Field(None, alias="temperature")
- mode_set: int = Field(None, alias="mode")
- water_valve_switch_set: int = Field(None, alias="water")
- class ACATFCEarlyStartPredictionRequest(BaseModel):
- season: Season
- space_id: str | None
- device_id: str
- space_realtime_temperature: float | None
- outdoor_realtime_temperature: float | None
- class ACATFCEarlyStartPredictionResponse(BaseModel):
- minutes: float
- class ACATVIEarlyStartPredictionRequest(ACATFCEarlyStartPredictionRequest):
- pass
- class ACATVIEarlyStartPredictionResponse(ACATFCEarlyStartPredictionResponse):
- pass
- class Space(BaseModel):
- realtime_temperature: float | None
- class ACATVASpace(Space):
- temperature_target: float | None
- vav_default_weight: float | None
- vav_temporary_weight: float | None
- vav_temporary_update_time: str | None
- class ACATAHSpace(Space):
- temperature_target: float | None
- ahu_default_weight: float | None
- ahu_temporary_weight: float | None
- ahu_temporary_update_time: str | None
- class ACATFUSpace(Space):
- realtime_co2: float | None
- hcho: float | None
- class ACATVAInstructionsRequestBase(BaseModel):
- device_id: str
- spaces: list[ACATVASpace]
- class ACATVAInstructionsRequest(ACATVAInstructionsRequestBase):
- season: str
- supply_air_temperature: float | None
- acatah_supply_air_temperature: float | None
- supply_air_flow: float | None
- supply_air_flow_lower_limit: float | None
- supply_air_flow_upper_limit: float | None
- class ACATVAInstructionsRequestV2(ACATVAInstructionsRequestBase):
- season: str
- return_air_temperature: float | None
- class ACATVAInstructionsResponse(BaseModel):
- supply_air_flow_set: float = Field(None, alias="SupplyAirFlowSet")
- virtual_temperature_target_set: float = Field(None, alias="TargetTemperatureSet")
- virtual_realtime_temperature: float = Field(None, alias="VirtualRealtimeTemperature")
- class ACATVAInstructionsResponseV2(BaseModel):
- temperature_target_set: float
- virtual_target_temperature: float
- virtual_realtime_temperature: float
- class ACATAHFreqSetRequest(BaseModel):
- device_id: str
- system_supply_static_press: float | None
- system_supply_static_press_set: float | None
- current_freq_set: float | None
- supply_air_temperature_set_list: list[float]
- spaces_hot_rate: float | None
- class ACATAHFreqSetResponse(BaseModel):
- freq_set: float
- class ACATAHInstructionsRequest(BaseModel):
- device_id: str
- season: Season
- spaces: ACATAHSpace | None
- running_status: bool | None
- return_air_temperature: float | None
- return_air_temperature_set: float | None
- supply_air_temperature: float | None
- supply_air_temperature_set: float | None
- freq: float | None
- freq_set: float | None
- fan_freq_upper_limit_set: float | None
- fan_freq_lower_limit_set: float | None
- class ACATAHInstructionsResponse(BaseModel):
- switch_set: str
- return_air_temp_set: float | None
- supply_air_temp_set: float | None
- freq_set: float | None
- class SwitchSetRequestBase(BaseModel):
- device_id: str
- running_status: bool | None
- in_cloud_status: bool | None
- on_time: str | None
- off_time: str | None
- is_workday: bool | None
- class SwitchSetResponseBase(BaseModel):
- switch_set: SwitchSet
- class ACVTSFSwitchSetRequest(SwitchSetRequestBase):
- pass
- class ACVTSFSwitchSetResponse(SwitchSetResponseBase):
- pass
- class ACATFUSwitchSetRequest(SwitchSetRequestBase):
- break_start_time: str | None
- break_end_time: str | None
- class ACATFUCO2SwitchSetRequest(ACATFUSwitchSetRequest):
- co2_list: list[float]
- class ACATFUSwitchSetResponse(SwitchSetResponseBase):
- pass
- class ACATAHSwitchSetRequest(SwitchSetRequestBase):
- break_start_time: str | None
- break_end_time: str | None
- class ACATAHSwitchSetResponse(SwitchSetResponseBase):
- pass
- class VAV(BaseModel):
- id: str
- virtual_realtime_temperature: float | None
- virtual_temperature_target: float | None
- supply_air_flow_lower_limit: float | None
- supply_air_flow_upper_limit: float | None
- supply_air_flow_set: float | None
- supply_air_temperature: float | None
- valve_opening: float | None
- class ACATAHRequestBase(BaseModel):
- device_id: str
- season: str
- vav_list: list[VAV]
- class ACATAHThermalModeSetRequest(ACATAHRequestBase):
- pass
- class ACATAHThermalModeSetResponse(BaseModel):
- thermal_mode_set: ThermalMode
- class ACATAHSupplyAirTempSetRequest(ACATAHRequestBase):
- supply_air_temperature: float | None
- supply_air_temperature_set: float | None
- return_air_temperature: float | None
- chill_water_valve_opening_set_list: list[float]
- hot_water_valve_opening_set_list: list[float]
- equip_switch_set_list: list[float]
- is_clear_day: bool | None
- class ACATAHSupplyAirTempSetResponse(BaseModel):
- supply_air_temperature_set: float
- class ACATFUSupplyAirTempSetRequest(BaseModel):
- device_id: str
- season: Season
- supply_air_temperature_set: float | None
- hot_ratio: float | None
- cold_ratio: float | None
- running_status_list: list[float]
- class ACATFUSupplyAirTempSetResponse(BaseModel):
- supply_air_temperature_set: float
- class ACATFUFreqSetRequest(BaseModel):
- device_id: str
- freq: float | None
- fresh_air_temperature: float | None
- spaces: list[ACATFUSpace]
- season: Season
- running_status_list: list[float]
- class ACATFUFreqSetResponse(BaseModel):
- freq_set: float
- class ASHPRequest(BaseModel):
- season: Season
- outdoor_temp: list[float] # 30min
- device_list: list[ASHP]
- class ASHPResponse(BaseModel):
- device_list: list[ASHP]
- interval: float
- is_warning: bool
- class FeedWaterPumpRequest(BaseModel):
- season: Season
- outdoor_temp: list[float]
- ashp_list: list[ASHP]
- pump_list: list[FeedWaterPump]
- class FeedWaterPumpResponse(BaseModel):
- device_list: list[FeedWaterPump]
|