New file |
| | |
| | | package com.hdl.linkpm.sdk.device.spk; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Created by jlchen on 12/16/21. |
| | | * LINK协议的SPK |
| | | */ |
| | | public class SPK { |
| | | |
| | | /** |
| | | * 1.security |
| | | */ |
| | | //猫眼、萤石 |
| | | public final static String SecurityEz = "security.peephole.ez"; |
| | | //门锁 |
| | | public final static String SecurityDoor = "security.door"; |
| | | /** |
| | | * 2.panel |
| | | */ |
| | | //面板、插座、面板 |
| | | public final static String PanelSocket = "panel.socket"; |
| | | //场景面板 |
| | | |
| | | /** |
| | | * 3.灯光 |
| | | */ |
| | | // (开关灯) |
| | | public final static String LightSwitch = "light.switch"; |
| | | // (调光灯) |
| | | public final static String LightDimming = "light.dimming"; |
| | | // (RGB灯) |
| | | public final static String LightRGB = "light.rgb"; |
| | | // (CCT灯) |
| | | public final static String LightCCT = "light.cct"; |
| | | // (RGBW灯) |
| | | public final static String LightRGBW = "light.rgbw"; |
| | | |
| | | // 灯光spk列表 |
| | | public static List<String> LightSpkList() { |
| | | List<String> spkList = new ArrayList<>(); |
| | | spkList.add(LightSwitch); |
| | | spkList.add(LightDimming); |
| | | spkList.add(LightRGB); |
| | | spkList.add(LightCCT); |
| | | spkList.add(LightRGBW); |
| | | return spkList; |
| | | } |
| | | |
| | | /** |
| | | * 4.sensor 传感器 |
| | | */ |
| | | //环境传感器 |
| | | // 二氧化碳传感器 |
| | | public final static String SensorCO2 = "sensor.co2"; |
| | | // PM2.5传感器 |
| | | public final static String SensorPm25 = "sensor.pm25"; |
| | | // tvoc传感器 |
| | | public final static String SensorTVOC = "sensor.tvoc"; |
| | | // 温度传感器 |
| | | public final static String SensorTemperature = "sensor.temperature"; |
| | | // 湿度传感器 |
| | | public final static String SensorHumidity = "sensor.humidity"; |
| | | // 环境传感器 |
| | | // 环境检测传感器 |
| | | // 特殊类spk |
| | | // 该spk功能是环境传感器功能的集成 |
| | | public final static String SensorEnvironment = "sensor.environment"; |
| | | // 青萍环境传感器 |
| | | public final static String SensorEnvironment2 = "sensor.environment2"; |
| | | // 青萍环境传感器 |
| | | public final static String SensorEnvironment3 = "sensor.environment3"; |
| | | //环境传感器 海林 |
| | | public final static String SensorEnvironmentHailin = "sensor.environment.hailin"; |
| | | // 甲醛 |
| | | public final static String SensorHcho = "sensor.hcho"; |
| | | //region 安防传感器 |
| | | // 亮度传感器 |
| | | public final static String SensorLight = "sensor.light"; |
| | | // (红外移动传感器) |
| | | public final static String SensorPir = "sensor.pir"; |
| | | // (门窗传感器) |
| | | public final static String SensorDoorWindow = "sensor.doorwindow"; |
| | | // 烟雾传感器 |
| | | public final static String SensorSmoke = "sensor.smoke"; |
| | | // 水浸传感器 |
| | | public final static String SensorWater = "sensor.water"; |
| | | // 燃气传感器 |
| | | public final static String SensorGas = "sensor.gas"; |
| | | // 红外珊栏传感器 |
| | | public final static String SensorShanLan = "sensor.shanlan"; |
| | | // 红外对射传感器 |
| | | public final static String SensorDuiShe = "sensor.duishe"; |
| | | // 超声波传感器 |
| | | public final static String SensorUtrasonic = "sensor.ultrasonic"; |
| | | // (干接点) |
| | | public final static String SensorDryContact = "sensor.dryContact"; |
| | | public final static String SensorDryContact2 = "dryContact.standard"; |
| | | // 毫米波传感器 |
| | | public final static String SenesorMegahealth = "sensor.megahealth"; |
| | | public final static String SenesorMegahealth2 = "sensor.megahealth.zg"; |
| | | |
| | | // 安防传感器spk列表 |
| | | public static List<String> ArmSensorSpkList() { |
| | | List<String> spkList = new ArrayList<>(); |
| | | spkList.add(SensorPir); |
| | | spkList.add(SensorDoorWindow); |
| | | spkList.add(SensorSmoke); |
| | | spkList.add(SensorWater); |
| | | spkList.add(SensorGas); |
| | | spkList.add(SensorDryContact); |
| | | spkList.add(SensorDryContact2); |
| | | spkList.add(SenesorMegahealth); |
| | | spkList.add(SenesorMegahealth2); |
| | | return spkList; |
| | | } |
| | | |
| | | // 环境传感器设备spk列表 |
| | | public static List<String> EnvironDeviceSpkList() { |
| | | List<String> spkList = new ArrayList<>(); |
| | | spkList.add(SensorTemperature); |
| | | spkList.add(SensorPm25); |
| | | spkList.add(SensorCO2); |
| | | spkList.add(SensorTVOC); |
| | | spkList.add(SensorHumidity); |
| | | spkList.add(SensorEnvironment); |
| | | spkList.add(SensorEnvironment2); |
| | | spkList.add(SensorEnvironment3); |
| | | spkList.add(SensorHcho); |
| | | return spkList; |
| | | } |
| | | |
| | | // 环境传感器spk列表 |
| | | public static List<String> EnvironSpkList() { |
| | | List<String> spkList = new ArrayList<>(); |
| | | spkList.add(SensorTemperature); |
| | | spkList.add(SensorPm25); |
| | | spkList.add(SensorCO2); |
| | | spkList.add(SensorTVOC); |
| | | spkList.add(SensorHumidity); |
| | | spkList.add(SensorHcho); |
| | | return spkList; |
| | | } |
| | | |
| | | // 环境传感器设备列表 |
| | | public static List<String> EvironmentSensorList() { |
| | | List<String> spkList = new ArrayList<>(); |
| | | spkList.add(SensorEnvironment); |
| | | spkList.add(SensorEnvironment2); |
| | | spkList.add(SensorEnvironment3); |
| | | return spkList; |
| | | } |
| | | |
| | | /** |
| | | * 5.窗帘 |
| | | */ |
| | | // (开关窗帘) |
| | | public final static String CurtainSwitch = "curtain.switch"; |
| | | // (开合帘) |
| | | public final static String CurtainTrietex = "curtain.trietex"; |
| | | // (百叶帘) |
| | | public final static String CurtainShades = "curtain.shades"; |
| | | // (卷帘) |
| | | public final static String CurtainRoller = "curtain.roller"; |
| | | |
| | | /** |
| | | * 窗帘spk列表 |
| | | * |
| | | * @return |
| | | */ |
| | | public static List<String> CurtainSpkList() { |
| | | List<String> spkList = new ArrayList<>(); |
| | | spkList.add(CurtainRoller); |
| | | spkList.add(CurtainSwitch); |
| | | spkList.add(CurtainShades); |
| | | spkList.add(CurtainTrietex); |
| | | return spkList; |
| | | } |
| | | |
| | | /** |
| | | * 6.HAVA |
| | | */ |
| | | // 空调 |
| | | public final static String HvacAC = "hvac.ac"; |
| | | |
| | | // 空调spk列表 |
| | | public static List<String> AcSpkList() { |
| | | List<String> spkList = new ArrayList<>(); |
| | | spkList.add(HvacAC); |
| | | return spkList; |
| | | } |
| | | |
| | | // 地暖 |
| | | public final static String HvacFloorHeat = "hvac.floorHeat"; |
| | | |
| | | // 地热spk列表 |
| | | public static List<String> FhSpkList() { |
| | | List<String> spkList = new ArrayList<>(); |
| | | spkList.add(HvacFloorHeat); |
| | | return spkList; |
| | | } |
| | | |
| | | // 新风 |
| | | public final static String HvacAirFresh = "hvac.airFresh"; |
| | | // 新风 ——金茂定制 |
| | | public final static String HvacAirFreshJinmao = "hvac.airFresh.jinmao"; |
| | | |
| | | // 新风spk列表 |
| | | public static List<String> AirFreshSpkList() { |
| | | List<String> spkList = new ArrayList<>(); |
| | | spkList.add(HvacAirFresh); |
| | | spkList.add(HvacAirFreshJinmao); |
| | | return spkList; |
| | | } |
| | | |
| | | /** |
| | | * 能源 |
| | | */ |
| | | // 能源模块 |
| | | public final static String EnergyStandard = "energy.standard"; |
| | | // 能源-电能 |
| | | public final static String ElectricEnergy = "energy.electric"; |
| | | |
| | | // 能源spk列表 |
| | | public static List<String> EnergySpkList() { |
| | | List<String> spkList = new ArrayList<>(); |
| | | spkList.add(ElectricEnergy); |
| | | return spkList; |
| | | } |
| | | |
| | | |
| | | //region 音乐 |
| | | // 音乐 |
| | | public final static String AvMusic = "av.music"; |
| | | |
| | | // 音乐spk列表 |
| | | public static List<String> MusicSpkList() { |
| | | List<String> spkList = new ArrayList<>(); |
| | | spkList.add(AvMusic); |
| | | return spkList; |
| | | } |
| | | |
| | | //region 家电 |
| | | // 红外、电视 |
| | | public final static String TvIr = "ir.tv"; |
| | | // 红外、小米电视 |
| | | public final static String TvXmIr = "ir.tvxm"; |
| | | // 家电、风扇 |
| | | public final static String HvacFan = "hvac.fan"; |
| | | // 凉霸 |
| | | public final static String ClothesHanger = "electrical.racks"; |
| | | // 红外遥控器 |
| | | public final static String IrLearn = "ir.learn"; |
| | | // 红外投影仪 |
| | | public final static String PjtIr = "ir.pjt"; |
| | | // 红外机顶盒 |
| | | public final static String StbIr = "ir.stb"; |
| | | // 红外影碟机 |
| | | public final static String DvDIr = "ir.dvd"; |
| | | // 红外空气净化器 |
| | | public final static String PurifierIr = "ir.air_purifier"; |
| | | // 红外热水器 |
| | | public final static String HeaterIr = " ir.water_heater"; |
| | | // 红外风扇 |
| | | public final static String FanIr = "ir.fan"; |
| | | // 智能空开 |
| | | // public final static String AirSwitch = "electrical.breaker"; |
| | | public final static String AirSwitch = "electrical.airSwitch"; |
| | | |
| | | //region 涂鸦 |
| | | // 家电、涂鸦空气净化器 |
| | | public final static String ElectricTuyaAirCleaner2 = "hvac.air.tuya_epi345"; |
| | | // 家电、涂鸦电风扇 |
| | | public final static String ElectricTuyaFan2 = "hvac.fan.tuya_ef101"; |
| | | // 家电、涂鸦扫地机器人 |
| | | public final static String ElectricTuyaWeepRobot2 = "electrical.sweep.tuya"; |
| | | // 家电、涂鸦水阀 |
| | | public final static String ElectricTuyaWaterValve2 = "electrical.watervalve.tuya_aw713"; |
| | | |
| | | |
| | | // 家电spk列表 |
| | | public static List<String> ElectricalSpkList() { |
| | | List<String> spkList = new ArrayList<>(); |
| | | spkList.add(PanelSocket); |
| | | spkList.add(TvIr); |
| | | spkList.add(TvXmIr); |
| | | spkList.add(HvacFan); |
| | | spkList.add(FanIr); |
| | | spkList.add(ClothesHanger); |
| | | spkList.add(IrLearn); |
| | | spkList.add(PjtIr); |
| | | spkList.add(StbIr); |
| | | spkList.add(ElectricTuyaAirCleaner2); |
| | | spkList.add(ElectricTuyaFan2); |
| | | spkList.add(ElectricTuyaWeepRobot2); |
| | | spkList.add(ElectricTuyaWaterValve2); |
| | | spkList.add(AirSwitch); |
| | | return spkList; |
| | | } |
| | | |
| | | //region 设备类 |
| | | // 红外宝 |
| | | public final static String IrModule = "ir.module"; |
| | | |
| | | // 设备类spk列表 |
| | | public static List<String> DeviceSpkList() { |
| | | List<String> spkList = new ArrayList<>(); |
| | | spkList.add(IrModule); |
| | | return spkList; |
| | | } |
| | | |
| | | //region 第三方spk列表 |
| | | // 获取所有第三方品牌功能的spk |
| | | public static List<String> GetAll3tySPK() { |
| | | List<String> spkList = new ArrayList<>(); |
| | | spkList.add(ElectricTuyaAirCleaner2); |
| | | spkList.add(ElectricTuyaFan2); |
| | | spkList.add(ElectricTuyaWaterValve2); |
| | | spkList.add(ElectricTuyaWeepRobot2); |
| | | spkList.add(SenesorMegahealth); |
| | | spkList.add(SenesorMegahealth2); |
| | | return spkList; |
| | | } |
| | | |
| | | // 获取第三方设备spk |
| | | public static List<String> Get3tySpk(int brandType) { |
| | | List<String> list = new ArrayList<>(); |
| | | if (BrandType.Tuya == brandType) { |
| | | list.add(ElectricTuyaAirCleaner2); |
| | | list.add(ElectricTuyaFan2); |
| | | list.add(ElectricTuyaWaterValve2); |
| | | list.add(ElectricTuyaWeepRobot2); |
| | | } else if (BrandType.All3tyBrand == brandType) { |
| | | list.add(SenesorMegahealth);//兆观 |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | // 没有状态显示的功能spk列表 |
| | | public static List<String> NotStatusSpkList() { |
| | | List<String> list = new ArrayList<>(); |
| | | list.add(FanIr); |
| | | list.add(TvIr); |
| | | list.add(TvXmIr); |
| | | list.add(StbIr); |
| | | list.add(PjtIr); |
| | | list.add(IrLearn); |
| | | return list; |
| | | } |
| | | |
| | | |
| | | } |