SmartThings

SmartThings 是一个可连接三星设备和第三方设备的家庭自动化平台。

前提条件

  • 你需要一个 Samsung 账户及其登录凭据。
  • 若要连接设备,需要在手机上安装 SmartThings 应用。
配置

此集成可通过 UI 配置。前往 设置 > 设备与服务 添加。

支持的功能

SmartThings 将设备表示为一组能力。SmartThings 集成会将这些能力映射为 Home Assistant 中的实体。一个设备可能会对应一个或多个实体。

二值传感器

在 Home Assistant 中,以下每个 SmartThings capability 都会创建一个 binary sensor 实体:

SmartThings capability
accelerationSensor
contactSensor
custom.dryerWrinklePrevent
custom.ovenCavityStatus
custom.waterFilter
filterStatus
gasDetector
motionSensor
presenceSensor
remoteControlStatus
samsungce.doorState
samsungce.kidsLock
samsungce.steamClosetKeepFreshMode
soundSensor
switch(仅适用于洗衣机、烘干机、洗碗机、灶台、微波炉和衣物护理机等家电类别)
tamperAlert
waterSensor

按钮

SmartThings Button 平台提供以下按钮:

SmartThings capability按钮
ovenOperatingState停止
custom.waterFilter重置净水滤芯
samsungce.hoodFilter重置油烟机滤网

气候

SmartThings Climate 平台可用于控制具备空调、恒温器或热泵相关能力的设备。

空调

若要将 SmartThings 空调表示为 climate 实体,它必须具备以下所有必需 capability。若缺少任意 capability,这些功能会在 Home Assistant 中以单独的传感器形式表示,而不是 climate 实体。

SmartThings capabilityRelated climate features in Home Assistant
airConditionerMode (required)hvac mode
airConditionerFanMode (required)fan mode
switch (required)turn on, turn off
temperatureMeasurement (required)temperature
thermostatCoolingSetpoint (required)target temp
custom.airConditionerOptionalModepreset mode
demandResponseLoadControldrlc_status_duration (state attribute), drlc_status_level (state attribute), drlc_status_override (state attribute), drlc_status_start (state attribute)
fanOscillationModeswing mode

恒温器

若要将 SmartThings 恒温器表示为 climate 实体,它必须具备所有必需 capability。若缺少任意 capability,这些功能会在 Home Assistant 中以单独的传感器形式表示,而不是 climate 实体。

SmartThings capabilityRelated climate features in Home Assistant
thermostatMode (required)hvac mode
thermostatHeatingSetpoint (required)target temp, target temp low
temperatureMeasurement (required)temperature
thermostatCoolingSetpointtarget temp, target temp high
thermostatOperatingStatehvac action
thermostatFanModefan mode
relativeHumidityMeasurementhumidity (state attribute)

热泵分区

若要将 SmartThings 热泵分区表示为 climate 实体,它必须在 INDOORINDOOR1INDOOR2 组件上具备所有必需 capability。

SmartThings capabilityRelated climate features in Home Assistant
airConditionerMode (required)hvac mode
switch (required)turn on, turn off
temperatureMeasurement (required)temperature
thermostatCoolingSetpoint (required)target temp
custom.thermostatSetpointControl (required)min temp, max temp

封盖

SmartThings Cover 平台可用于控制具备开合相关能力的设备。若要将设备表示为 cover 实体,它必须具备 doorControlwindowShade capability;否则,这些功能会在 Home Assistant 中以单独的传感器形式表示。

SmartThings capabilityRelated cover features in Home Assistant
doorControlopen and close
windowShadeopen and close
switchLevelposition
windowShadeLevelposition
batterybattery_level (state attribute)

事件

SmartThings Event 平台会为每个按钮创建实体,用于显示按钮按压事件,并允许你基于这些事件创建自动化。

风扇

SmartThings Fan 平台可用于控制具备风扇相关能力的设备。若要将 SmartThings 设备表示为 fan 实体,除了 switch capability 之外,还必须具备以下一个或多个 capability。若设备同时具备 fanSpeedairConditionerFanMode 以及 thermostatCoolingSetpoint,则会改为表示为 climate 实体。

SmartThings capabilityRelated fan features in Home Assistant
fanSpeedspeed (percentage)
airConditionerFanModepreset mode
samsungce.hoodFanSpeed (creates a separate hood fan entity for range hoods with smart fan speed support)speed (percentage), preset mode

灯光

SmartThings Light 平台可用于控制具备灯光相关能力的设备。若要将 SmartThings 设备表示为 light 实体,除了 switch capability 之外,还必须具备以下一个或多个 capability。

SmartThings capabilityRelated light features in Home Assistant
switchLevelbrightness and transition
colorControlcolor
colorTemperaturecolor_temp

门锁

SmartThings Lock 平台可用于控制具备 lock capability 的设备,可显示当前锁状态并支持上锁与解锁命令。

媒体播放器

SmartThings Media player 平台可用于控制具备媒体播放器相关能力的设备。若要将 SmartThings 设备表示为 media player 实体,它必须具备所有必需 capability。

SmartThings capabilityRelated media player features in Home Assistant
audioMute (required)volume_mute
audioVolume (required)volume_up, volume_down, volume_set
audioTrackDatamedia_title and media_artist
mediaPlaybackmedia_play, media_pause, media_stop, media_next_track, media_previous_track
mediaInputSourceselect_source
mediaPlaybackRepeatrepeat_set
mediaPlaybackShuffleshuffle_set
switchturn_on, turn_off

数值

SmartThings Number 平台可用于控制以下 capability 的数值型设置:

SmartThings capabilityNumber entity
custom.washerRinseCyclesWasher rinse cycles
samsungce.hoodFanSpeed (on hood component)Hood fan speed
thermostatCoolingSetpoint (on cooler, freezer, or onedoor components)Refrigerator temperature

场景

SmartThings Scene 平台可用于激活你在 SmartThings 中定义的场景。每个 SmartThings 场景都会创建一个 scene 实体。

选择

SmartThings Select 平台可用于配置设备选项。某些 capability 需要先在设备上启用远程控制,才能进行更改。

Select 实体支持以下 SmartThings capability:

SmartThings capability
custom.washerSoilLevel
custom.washerSpinLevel
custom.washerWaterTemperature
dishwasherOperatingState
dryerOperatingState
samsungce.autoDispenseDetergent
samsungce.dishwasherWashingOptions
samsungce.dustFilterAlarm
samsungce.flexibleAutoDispenseDetergent
samsungce.lamp
washerOperatingState

传感器

SmartThings Sensor 平台可用于查看具备传感器相关能力的设备。设备支持的每个属性(如下)都会创建一个 Sensor 实体。

SmartThings capabilityRelated entities in Home Assistant
activityLightingModeActivity lighting mode
airConditionerModeAir conditioner mode
airQualitySensorAir quality
alarmAlarm
atmosphericPressureMeasurementAtmospheric pressure
audioVolumeVolume
batteryBattery
bodyMassIndexMeasurementBody mass index
bodyWeightMeasurementBody weight
carbonDioxideMeasurementCarbon dioxide
carbonMonoxideDetectorCarbon monoxide detector
carbonMonoxideMeasurementCarbon monoxide
custom.cooktopOperatingStateCooktop operating state
custom.waterFilterWater filter usage
dishwasherOperatingStateMachine state
Job state
Completion time
dryerModeDryer mode
dryerOperatingStateMachine state
Job state
Completion time
dustHealthConcernPM10 health concern
dustSensorPM10
PM2.5
energyMeterEnergy
equivalentCarbonDioxideMeasurementEquivalent carbon dioxide
fineDustHealthConcernPM2.5 health concern
fineDustSensorPM2.5
formaldehydeMeasurementFormaldehyde
gasMeterGas meter
Gas meter calorific
Gas meter time
Gas
illuminanceMeasurementIlluminance
infraredLevelInfrared level
mediaInputSourceMedia input source
mediaPlaybackRepeatMedia playback repeat
mediaPlaybackShuffleMedia playback shuffle
mediaPlaybackMedia playback status
odorSensorOdor sensor
ovenModeOven mode
ovenOperatingStateMachine state
Job state
Completion time
ovenSetpointSet point
powerConsumptionReportEnergy difference
Power energy
Energy saved
Power
Energy
powerMeterPower
powerSourcePower source
relativeBrightnessBrightness intensity
refrigerationSetpointSet point
relativeHumidityMeasurementHumidity
robotCleanerCleaningModeCleaning mode
robotCleanerMovementMovement
robotCleanerTurboModeTurbo mode
samsungce.cooktopHeatingPowerManual level
Heating mode
samsungce.ehsDiverterValveDiverter valve position
samsungce.hoodFilterHood filter usage
samsungce.waterConsumptionReportWater consumption
signalStrengthLink quality
Signal strength
smokeDetectorSmoke detector
temperatureMeasurementTemperature
thermostatCoolingSetpointCooling set point
thermostatFanModeFan mode
thermostatHeatingSetpointHeating set point
thermostatModeMode
thermostatOperatingStateOperating state
thermostatSetpointSet point
threeAxisX coordinate
Y coordinate
Z coordinate
tvChannelTV channel
TV channel name
tvocMeasurementVolatile organic compounds
ultravioletIndexUV index
veryFineDustHealthConcernPM1.0 health concern
veryFineDustSensorPM1.0
voltageMeasurementVoltage
washerModeWasher mode
washerOperatingStateMachine state
Job state
Completion time

开关

SmartThings Switch 平台可用于控制具备 switch capability、且尚未由更具体平台表示的设备。同时也会为以下 capability 创建 switch 实体:

SmartThings capability
custom.dryerWrinklePrevent
samsungce.airConditionerBeep
samsungce.airConditionerLighting
samsungce.dishwasherWashingOptions
samsungce.powerCool
samsungce.powerFreeze
samsungce.sabbathMode
samsungce.steamClosetAutoCycleLink
samsungce.steamClosetKeepFreshMode
samsungce.steamClosetSanitizeMode
samsungce.washerBubbleSoak

更新

SmartThings Update 平台可用于更新具备 firmwareUpdate capability 的设备固件。

吸尘器

SmartThings Vacuum 平台可用于控制具备 samsungce.robotCleanerOperatingState capability 的设备,可显示吸尘器状态并控制设备。

阀门

SmartThings Valve 平台可用于控制具备 valve capability 的设备,可显示阀门状态并执行打开/关闭操作。

热水器

SmartThings Water heater 平台可用于控制提供热水的热泵。若要将设备表示为 water heater 实体,它必须具备以下所有 capability:

SmartThings capabilityRelated water heater features in Home Assistant
switch (required)turn on, turn off
airConditionerMode (required)operation mode
temperatureMeasurement (required)temperature
custom.thermostatSetpointControl (required)min temp, max temp
thermostatCoolingSetpoint (required)target temp
samsungce.ehsThermostat (required)
custom.outingMode (required)away mode

故障排查

启用调试日志

启用调试日志后,集成会在日志中显示接收到的所有事件。日志会捕获该设备 5 秒内的事件,并返回一个包含设备状态和事件的 JSON 文件。 调试日志有助于诊断状态更新问题,例如可先在界面中选择按钮,再手动操作设备进行验证。

设备功能缺失

SmartThings 集成并不支持所有 SmartThings capability。仅支持本文档中列出的 capability。若你的设备某项功能未在 Home Assistant 中提供,可能有以下原因:

  1. 想查看当前已实现的 capability,请参阅支持的功能部分。
    • 你需要的 capability 可能尚未被此集成支持。
  2. 想确认设备所需 capability 是否已在 API 中提供,请查看 SmartThings Developer Portal
    • 某些设备功能仅在 SmartThings 应用中可用,不会通过 API 暴露。
  3. 如果该 capability 已在 SmartThings API 中提供,但此集成尚未支持,你可以通过创建 GitHub Discussion 来请求支持。
    • 功能请求请不要创建 GitHub Issue,因为 Issue 主要用于缺陷报告。

查看设备诊断信息

SmartThings 集成提供两个层级的诊断信息。若要下载诊断,请按照下载诊断步骤操作。

  • 设备诊断:包含单个设备的全部 capability 及其当前状态。排查特定设备问题时非常有用,因为它会准确展示该设备向 SmartThings API 暴露了哪些 capability、属性和属性值。
  • 配置条目诊断:包含你的 SmartThings 位置中所有 capability 和设备的信息,但不包含当前状态值。适合用来整体了解所有已连接设备可用的 capability。

删除集成

从 Home Assistant 中删除集成实例

  1. 前往 设置 > 设备与服务,选择该集成卡片。
  2. 在设备列表中,选择你要删除的集成实例。
  3. 在对应条目旁点击三点 菜单,然后选择 删除
  4. 打开 SmartThings 应用,并从 SmartThings 中删除 Home Assistant 应用。