Documentation
¶
Index ¶
- Constants
- func OptionBaseApiURL(baseApiURL string) func(*Client)
- func OptionDebug(debugFlag bool) func(*Client)
- type AirConditionerFanMode
- type AirConditionerMode
- type AirConditionerPowerState
- type AirPurifierDevice
- func (device *AirPurifierDevice) ExecCommand(jsonString string) (*CommonResponse, error)
- func (device *AirPurifierDevice) GetAnyStatusBody() (any, error)
- func (device *AirPurifierDevice) GetCommandParameterJSONSchema() (string, error)
- func (device *AirPurifierDevice) GetStatus() (*AirPurifierDeviceStatusResponse, error)
- func (device *AirPurifierDevice) SetChildLock(flag bool) (*CommonResponse, error)
- func (device *AirPurifierDevice) SetMode(mode AirPurifierMode, fanLevel int) (*CommonResponse, error)
- func (device *AirPurifierDevice) TurnOff() (*CommonResponse, error)
- func (device *AirPurifierDevice) TurnOn() (*CommonResponse, error)
- type AirPurifierDeviceCommandParameter
- type AirPurifierDeviceCommandSetChildLockIfExposer
- type AirPurifierDeviceCommandSetModeIfExposer
- type AirPurifierDeviceCommandSetNormalModeIfExposer
- type AirPurifierDeviceStatusBody
- type AirPurifierDeviceStatusResponse
- type AirPurifierMode
- type AirPurifierModeParameter
- type BatteryCirculatorFanDevice
- func (device *BatteryCirculatorFanDevice) ExecCommand(jsonString string) (*CommonResponse, error)
- func (device *BatteryCirculatorFanDevice) GetAnyStatusBody() (any, error)
- func (device *BatteryCirculatorFanDevice) GetCommandParameterJSONSchema() (string, error)
- func (device *BatteryCirculatorFanDevice) GetStatus() (*BatteryCirculatorFanDeviceStatusResponse, error)
- func (device *BatteryCirculatorFanDevice) SetNightLightMode(mode CirculatorNightLightMode) (*CommonResponse, error)
- func (device *BatteryCirculatorFanDevice) SetWindMode(mode CirculatorWindMode) (*CommonResponse, error)
- func (device *BatteryCirculatorFanDevice) SetWindSpeed(speed int) (*CommonResponse, error)
- func (device *BatteryCirculatorFanDevice) TurnOff() (*CommonResponse, error)
- func (device *BatteryCirculatorFanDevice) TurnOn() (*CommonResponse, error)
- type BatteryCirculatorFanDeviceStatusBody
- type BatteryCirculatorFanDeviceStatusResponse
- type BlindTiltDevice
- func (device *BlindTiltDevice) CloseDown() (*CommonResponse, error)
- func (device *BlindTiltDevice) CloseUp() (*CommonResponse, error)
- func (device *BlindTiltDevice) ExecCommand(jsonString string) (*CommonResponse, error)
- func (device *BlindTiltDevice) FullyOpen() (*CommonResponse, error)
- func (device *BlindTiltDevice) GetAnyStatusBody() (any, error)
- func (device *BlindTiltDevice) GetCommandParameterJSONSchema() (string, error)
- func (device *BlindTiltDevice) GetStatus() (*BlindTiltDeviceStatusResponse, error)
- func (device *BlindTiltDevice) SetPosition(direction string, position int) (*CommonResponse, error)
- type BlindTiltDeviceCommandParameter
- type BlindTiltDeviceCommandSetPositionIfExposer
- type BlindTiltDeviceStatusBody
- type BlindTiltDeviceStatusResponse
- type BotDevice
- func (device *BotDevice) ExecCommand(jsonString string) (*CommonResponse, error)
- func (device *BotDevice) GetAnyStatusBody() (any, error)
- func (device *BotDevice) GetCommandParameterJSONSchema() (string, error)
- func (device *BotDevice) GetStatus() (*BotDeviceStatusResponse, error)
- func (device *BotDevice) Press() (*CommonResponse, error)
- func (device *BotDevice) TurnOff() (*CommonResponse, error)
- func (device *BotDevice) TurnOn() (*CommonResponse, error)
- type BotDeviceCommandParameter
- type BotDeviceStatusBody
- type BotDeviceStatusResponse
- type CeilingLightDevice
- func (device *CeilingLightDevice) ExecCommand(jsonString string) (*CommonResponse, error)
- func (device *CeilingLightDevice) GetAnyStatusBody() (any, error)
- func (device *CeilingLightDevice) GetCommandParameterJSONSchema() (string, error)
- func (device *CeilingLightDevice) GetStatus() (*CeilingLightDeviceStatusResponse, error)
- func (device *CeilingLightDevice) SetBrightness(brightness int) (*CommonResponse, error)
- func (device *CeilingLightDevice) SetColorTemperature(colorTemperature int) (*CommonResponse, error)
- func (device *CeilingLightDevice) Toggle() (*CommonResponse, error)
- func (device *CeilingLightDevice) TurnOff() (*CommonResponse, error)
- func (device *CeilingLightDevice) TurnOn() (*CommonResponse, error)
- type CeilingLightDeviceCommandParameter
- type CeilingLightDeviceCommandSetBrightnessIfExposer
- type CeilingLightDeviceCommandSetColorTemperatureIfExposer
- type CeilingLightDeviceStatusBody
- type CeilingLightDeviceStatusResponse
- type CirculatorFanDevice
- func (device *CirculatorFanDevice) ExecCommand(jsonString string) (*CommonResponse, error)
- func (device *CirculatorFanDevice) GetAnyStatusBody() (any, error)
- func (device *CirculatorFanDevice) GetCommandParameterJSONSchema() (string, error)
- func (device *CirculatorFanDevice) GetStatus() (*CirculatorFanDeviceStatusResponse, error)
- func (device *CirculatorFanDevice) SetNightLightMode(mode CirculatorNightLightMode) (*CommonResponse, error)
- func (device *CirculatorFanDevice) SetWindMode(mode CirculatorWindMode) (*CommonResponse, error)
- func (device *CirculatorFanDevice) SetWindSpeed(speed int) (*CommonResponse, error)
- func (device *CirculatorFanDevice) TurnOff() (*CommonResponse, error)
- func (device *CirculatorFanDevice) TurnOn() (*CommonResponse, error)
- type CirculatorFanDeviceCommandParameter
- type CirculatorFanDeviceCommandSetNightLightModeIfExposer
- type CirculatorFanDeviceCommandSetWindModeIfExposer
- type CirculatorFanDeviceCommandSetWindSpeedIfExposer
- type CirculatorFanDeviceStatusBody
- type CirculatorFanDeviceStatusResponse
- type CirculatorNightLightMode
- type CirculatorWindMode
- type Client
- func (client *Client) GetDevices() (*GetDevicesResponse, error)
- func (client *Client) GetRequest(path string, parser ResponseParser) error
- func (client *Client) PostRequest(path string, request ControlRequest) (*CommonResponse, error)
- func (client *Client) SendCommand(deviceId string, request ControlRequest) (*CommonResponse, error)
- type ColorLightDevice
- func (device *ColorLightDevice) ExecCommand(jsonString string) (*CommonResponse, error)
- func (device *ColorLightDevice) GetAnyStatusBody() (any, error)
- func (device *ColorLightDevice) GetCommandParameterJSONSchema() (string, error)
- func (device *ColorLightDevice) GetStatus() (*ColorLightDeviceStatusResponse, error)
- func (device *ColorLightDevice) SetBrightness(brightness int) (*CommonResponse, error)
- func (device *ColorLightDevice) SetColor(color color.RGBA) (*CommonResponse, error)
- func (device *ColorLightDevice) SetColorTemperature(colorTemperature int) (*CommonResponse, error)
- func (device *ColorLightDevice) Toggle() (*CommonResponse, error)
- func (device *ColorLightDevice) TurnOff() (*CommonResponse, error)
- func (device *ColorLightDevice) TurnOn() (*CommonResponse, error)
- type ColorLightDeviceCommandParameter
- type ColorLightDeviceCommandSetBrightnessIfExposer
- type ColorLightDeviceCommandSetColorIfExposer
- type ColorLightDeviceCommandSetColorTemperatureIfExposer
- type ColorLightDeviceStatusBody
- type ColorLightDeviceStatusResponse
- type CommonDevice
- type CommonDeviceListItem
- type CommonResponse
- type ContactSensorDevice
- type ContactSensorDeviceStatusBody
- type ContactSensorDeviceStatusResponse
- type ControlRequest
- type CurtainDevice
- func (device *CurtainDevice) ExecCommand(jsonString string) (*CommonResponse, error)
- func (device *CurtainDevice) GetAnyStatusBody() (any, error)
- func (device *CurtainDevice) GetCommandParameterJSONSchema() (string, error)
- func (device *CurtainDevice) GetStatus() (*CurtainDeviceStatusResponse, error)
- func (device *CurtainDevice) Pause() (*CommonResponse, error)
- func (device *CurtainDevice) SetPosition(mode CurtainPositionMode, position int) (*CommonResponse, error)
- func (device *CurtainDevice) TurnOff() (*CommonResponse, error)
- func (device *CurtainDevice) TurnOn() (*CommonResponse, error)
- type CurtainDeviceCommandParameter
- type CurtainDeviceStatusBody
- type CurtainDeviceStatusResponse
- type CurtainPositionMode
- type DeviceIDGettable
- type EvaporativeHumidifierDevice
- func (device *EvaporativeHumidifierDevice) ExecCommand(jsonString string) (*CommonResponse, error)
- func (device *EvaporativeHumidifierDevice) GetAnyStatusBody() (any, error)
- func (device *EvaporativeHumidifierDevice) GetCommandParameterJSONSchema() (string, error)
- func (device *EvaporativeHumidifierDevice) GetStatus() (*EvaporativeHumidifierDeviceStatusResponse, error)
- func (device *EvaporativeHumidifierDevice) SetChildLock(flag bool) (*CommonResponse, error)
- func (device *EvaporativeHumidifierDevice) SetMode(mode EvaporativeHumidifierMode, targetHumidity int) (*CommonResponse, error)
- func (device *EvaporativeHumidifierDevice) TurnOff() (*CommonResponse, error)
- func (device *EvaporativeHumidifierDevice) TurnOn() (*CommonResponse, error)
- type EvaporativeHumidifierDeviceCommandParameter
- type EvaporativeHumidifierDeviceCommandSetChildLockIfExposer
- type EvaporativeHumidifierDeviceCommandSetModeIfExposer
- type EvaporativeHumidifierDeviceFilterElement
- type EvaporativeHumidifierDeviceStatusBody
- type EvaporativeHumidifierDeviceStatusResponse
- type EvaporativeHumidifierMode
- type EvaporativeHumidifierModeParam
- type ExecutableCommandDevice
- type FloorCleaningAction
- type FloorCleaningActionCombo
- type FloorCleaningComboParam
- type FloorCleaningParam
- type GarageDoorOpenerDevice
- func (device *GarageDoorOpenerDevice) ExecCommand(jsonString string) (*CommonResponse, error)
- func (device *GarageDoorOpenerDevice) GetAnyStatusBody() (any, error)
- func (device *GarageDoorOpenerDevice) GetCommandParameterJSONSchema() (string, error)
- func (device *GarageDoorOpenerDevice) GetStatus() (*GarageDoorOpenerDeviceStatusResponse, error)
- func (device *GarageDoorOpenerDevice) TurnOff() (*CommonResponse, error)
- func (device *GarageDoorOpenerDevice) TurnOn() (*CommonResponse, error)
- type GarageDoorOpenerDeviceCommandParameter
- type GarageDoorOpenerDeviceStatusBody
- type GarageDoorOpenerDeviceStatusResponse
- type GetDevicesResponse
- type GetDevicesResponseBody
- type Hub2Device
- type Hub2DeviceStatusBody
- type Hub2DeviceStatusResponse
- type Hub3Device
- type Hub3DeviceStatusBody
- type Hub3DeviceStatusResponse
- type HubDevice
- type HumidifierDevice
- func (device *HumidifierDevice) ExecCommand(jsonString string) (*CommonResponse, error)
- func (device *HumidifierDevice) GetAnyStatusBody() (any, error)
- func (device *HumidifierDevice) GetCommandParameterJSONSchema() (string, error)
- func (device *HumidifierDevice) GetStatus() (*HumidifierDeviceStatusResponse, error)
- func (device *HumidifierDevice) SetMode(mode HumidifierMode) (*CommonResponse, error)
- func (device *HumidifierDevice) SetTargetHumidity(targetHumidity int) (*CommonResponse, error)
- func (device *HumidifierDevice) TurnOff() (*CommonResponse, error)
- func (device *HumidifierDevice) TurnOn() (*CommonResponse, error)
- type HumidifierDeviceCommandParameter
- type HumidifierDeviceCommandSetModeIfExposer
- type HumidifierDeviceCommandSetTargetHumidityIfExposer
- type HumidifierDeviceStatusBody
- type HumidifierDeviceStatusResponse
- type HumidifierMode
- type IndoorCamDevice
- type InfraredRemoteAirConditionerDevice
- func (device *InfraredRemoteAirConditionerDevice) ExecCommand(jsonString string) (*CommonResponse, error)
- func (device *InfraredRemoteAirConditionerDevice) GetCommandParameterJSONSchema() (string, error)
- func (device *InfraredRemoteAirConditionerDevice) SetAll(temperatureCelsius int, mode AirConditionerMode, fan AirConditionerFanMode, ...) (*CommonResponse, error)
- type InfraredRemoteAirConditionerDeviceCommandParameter
- type InfraredRemoteAirConditionerDeviceCommandSetAllIfExposer
- type InfraredRemoteAirPurifierDevice
- type InfraredRemoteCameraDevice
- type InfraredRemoteDevice
- type InfraredRemoteDvdPlayerDevice
- func (device *InfraredRemoteDvdPlayerDevice) ExecCommand(jsonString string) (*CommonResponse, error)
- func (device *InfraredRemoteDvdPlayerDevice) FastForward() (*CommonResponse, error)
- func (device *InfraredRemoteDvdPlayerDevice) GetCommandParameterJSONSchema() (string, error)
- func (device *InfraredRemoteDvdPlayerDevice) Next() (*CommonResponse, error)
- func (device *InfraredRemoteDvdPlayerDevice) Pause() (*CommonResponse, error)
- func (device *InfraredRemoteDvdPlayerDevice) Play() (*CommonResponse, error)
- func (device *InfraredRemoteDvdPlayerDevice) Previous() (*CommonResponse, error)
- func (device *InfraredRemoteDvdPlayerDevice) Rewind() (*CommonResponse, error)
- func (device *InfraredRemoteDvdPlayerDevice) SetMute() (*CommonResponse, error)
- func (device *InfraredRemoteDvdPlayerDevice) Stop() (*CommonResponse, error)
- type InfraredRemoteDvdPlayerDeviceCommandParameter
- type InfraredRemoteFanDevice
- func (device *InfraredRemoteFanDevice) ExecCommand(jsonString string) (*CommonResponse, error)
- func (device *InfraredRemoteFanDevice) GetCommandParameterJSONSchema() (string, error)
- func (device *InfraredRemoteFanDevice) HighSpeed() (*CommonResponse, error)
- func (device *InfraredRemoteFanDevice) LowSpeed() (*CommonResponse, error)
- func (device *InfraredRemoteFanDevice) MiddleSpeed() (*CommonResponse, error)
- func (device *InfraredRemoteFanDevice) Swing() (*CommonResponse, error)
- func (device *InfraredRemoteFanDevice) Timer() (*CommonResponse, error)
- type InfraredRemoteFanDeviceCommandParameter
- type InfraredRemoteLightDevice
- func (device *InfraredRemoteLightDevice) BrightnessDown() (*CommonResponse, error)
- func (device *InfraredRemoteLightDevice) BrightnessUp() (*CommonResponse, error)
- func (device *InfraredRemoteLightDevice) ExecCommand(jsonString string) (*CommonResponse, error)
- func (device *InfraredRemoteLightDevice) GetCommandParameterJSONSchema() (string, error)
- type InfraredRemoteLightDeviceCommandParameter
- type InfraredRemoteOthersDevice
- type InfraredRemoteProjectorDevice
- type InfraredRemoteRobotVacuumCleanerDevice
- type InfraredRemoteSetTopBoxDevice
- type InfraredRemoteSpeakerDevice
- func (device *InfraredRemoteSpeakerDevice) ExecCommand(jsonString string) (*CommonResponse, error)
- func (device *InfraredRemoteSpeakerDevice) GetCommandParameterJSONSchema() (string, error)
- func (device *InfraredRemoteSpeakerDevice) VolumeAdd() (*CommonResponse, error)
- func (device *InfraredRemoteSpeakerDevice) VolumeSub() (*CommonResponse, error)
- type InfraredRemoteSpeakerDeviceCommandParameter
- type InfraredRemoteStreamerDevice
- type InfraredRemoteTVDevice
- func (device *InfraredRemoteTVDevice) ChannelAdd() (*CommonResponse, error)
- func (device *InfraredRemoteTVDevice) ChannelSub() (*CommonResponse, error)
- func (device *InfraredRemoteTVDevice) ExecCommand(jsonString string) (*CommonResponse, error)
- func (device *InfraredRemoteTVDevice) GetCommandParameterJSONSchema() (string, error)
- func (device *InfraredRemoteTVDevice) SetChannel(channel int) (*CommonResponse, error)
- func (device *InfraredRemoteTVDevice) VolumeAdd() (*CommonResponse, error)
- func (device *InfraredRemoteTVDevice) VolumeSub() (*CommonResponse, error)
- type InfraredRemoteTVDeviceCommandParameter
- type InfraredRemoteTVDeviceCommandSetChannelIfExposer
- type InfraredRemoteWaterHeaterDevice
- type KeyListItem
- type KeypadDevice
- func (device *KeypadDevice) CreateKey(keypadKey *KeypadKey) (*CommonResponse, error)
- func (device *KeypadDevice) DeleteKey(id string) (*CommonResponse, error)
- func (device *KeypadDevice) ExecCommand(jsonString string) (*CommonResponse, error)
- func (device *KeypadDevice) GetAnyStatusBody() (any, error)
- func (device *KeypadDevice) GetCommandParameterJSONSchema() (string, error)
- func (device *KeypadDevice) GetStatus() (*KeypadStatusResponse, error)
- type KeypadDeviceCommandCreateNormalKeyIfExposer
- type KeypadDeviceCommandCreateTimeLimitKeyIfExposer
- type KeypadDeviceCommandDeleteKeyIfExposer
- type KeypadDeviceCommandParameter
- type KeypadDeviceStatusBody
- type KeypadKey
- type KeypadStatusResponse
- type LockDevice
- func (device *LockDevice) ExecCommand(jsonString string) (*CommonResponse, error)
- func (device *LockDevice) GetAnyStatusBody() (any, error)
- func (device *LockDevice) GetCommandParameterJSONSchema() (string, error)
- func (device *LockDevice) GetStatus() (*LockDeviceStatusResponse, error)
- func (device *LockDevice) Lock() (*CommonResponse, error)
- func (device *LockDevice) Unlock() (*CommonResponse, error)
- type LockDeviceCommandParameter
- type LockDeviceStatusBody
- type LockDeviceStatusResponse
- type LockLiteDevice
- func (device *LockLiteDevice) ExecCommand(jsonString string) (*CommonResponse, error)
- func (device *LockLiteDevice) GetAnyStatusBody() (any, error)
- func (device *LockLiteDevice) GetCommandParameterJSONSchema() (string, error)
- func (device *LockLiteDevice) GetStatus() (*LockLiteDeviceStatusResponse, error)
- func (device *LockLiteDevice) Lock() (*CommonResponse, error)
- func (device *LockLiteDevice) Unlock() (*CommonResponse, error)
- type LockLiteDeviceCommandParameter
- type LockLiteDeviceStatusBody
- type LockLiteDeviceStatusResponse
- type MeterDevice
- type MeterDeviceStatusBody
- type MeterDeviceStatusResponse
- type MeterProCo2Device
- type MeterProCo2DeviceStatusBody
- type MeterProCo2DeviceStatusResponse
- type MotionSensorDevice
- type MotionSensorDeviceStatusBody
- type MotionSensorDeviceStatusResponse
- type Option
- type PanTiltCamDevice
- type PlugDevice
- func (device *PlugDevice) ExecCommand(jsonString string) (*CommonResponse, error)
- func (device *PlugDevice) GetAnyStatusBody() (any, error)
- func (device *PlugDevice) GetCommandParameterJSONSchema() (string, error)
- func (device *PlugDevice) GetStatus() (*PlugDeviceStatusResponse, error)
- func (device *PlugDevice) TurnOff() (*CommonResponse, error)
- func (device *PlugDevice) TurnOn() (*CommonResponse, error)
- type PlugDeviceCommandParameter
- type PlugDeviceStatusBody
- type PlugDeviceStatusResponse
- type PlugMiniDevice
- func (device *PlugMiniDevice) ExecCommand(jsonString string) (*CommonResponse, error)
- func (device *PlugMiniDevice) GetAnyStatusBody() (any, error)
- func (device *PlugMiniDevice) GetCommandParameterJSONSchema() (string, error)
- func (device *PlugMiniDevice) GetStatus() (*PlugMiniDeviceStatusResponse, error)
- func (device *PlugMiniDevice) Toggle() (*CommonResponse, error)
- func (device *PlugMiniDevice) TurnOff() (*CommonResponse, error)
- func (device *PlugMiniDevice) TurnOn() (*CommonResponse, error)
- type PlugMiniDeviceCommandParameter
- type PlugMiniDeviceStatusBody
- type PlugMiniDeviceStatusResponse
- type RelaySwitch1Device
- func (device *RelaySwitch1Device) ExecCommand(jsonString string) (*CommonResponse, error)
- func (device *RelaySwitch1Device) GetAnyStatusBody() (any, error)
- func (device *RelaySwitch1Device) GetCommandParameterJSONSchema() (string, error)
- func (device *RelaySwitch1Device) GetStatus() (*RelaySwitch1DeviceStatusResponse, error)
- func (device *RelaySwitch1Device) SetMode(mode RelaySwitchMode) (*CommonResponse, error)
- func (device *RelaySwitch1Device) Toggle() (*CommonResponse, error)
- func (device *RelaySwitch1Device) TurnOff() (*CommonResponse, error)
- func (device *RelaySwitch1Device) TurnOn() (*CommonResponse, error)
- type RelaySwitch1DeviceCommandParameter
- type RelaySwitch1DeviceCommandSetModeIfExposer
- type RelaySwitch1DeviceStatusBody
- type RelaySwitch1DeviceStatusResponse
- type RelaySwitch1PMDevice
- func (device *RelaySwitch1PMDevice) ExecCommand(jsonString string) (*CommonResponse, error)
- func (device *RelaySwitch1PMDevice) GetAnyStatusBody() (any, error)
- func (device *RelaySwitch1PMDevice) GetCommandParameterJSONSchema() (string, error)
- func (device *RelaySwitch1PMDevice) GetStatus() (*RelaySwitch1PMDeviceStatusResponse, error)
- func (device *RelaySwitch1PMDevice) SetMode(mode RelaySwitchMode) (*CommonResponse, error)
- func (device *RelaySwitch1PMDevice) Toggle() (*CommonResponse, error)
- func (device *RelaySwitch1PMDevice) TurnOff() (*CommonResponse, error)
- func (device *RelaySwitch1PMDevice) TurnOn() (*CommonResponse, error)
- type RelaySwitch1PMDeviceStatusBody
- type RelaySwitch1PMDeviceStatusResponse
- type RelaySwitch2PMDevice
- func (device *RelaySwitch2PMDevice) ExecCommand(jsonString string) (*CommonResponse, error)
- func (device *RelaySwitch2PMDevice) GetAnyStatusBody() (any, error)
- func (device *RelaySwitch2PMDevice) GetCommandParameterJSONSchema() (string, error)
- func (device *RelaySwitch2PMDevice) GetStatus() (*RelaySwitch2PMDeviceStatusResponse, error)
- func (device *RelaySwitch2PMDevice) SetMode(switchNum int, mode RelaySwitchMode) (*CommonResponse, error)
- func (device *RelaySwitch2PMDevice) Toggle(switchNum int) (*CommonResponse, error)
- func (device *RelaySwitch2PMDevice) TurnOff(switchNum int) (*CommonResponse, error)
- func (device *RelaySwitch2PMDevice) TurnOn(switchNum int) (*CommonResponse, error)
- type RelaySwitch2PMDeviceCommandParameter
- type RelaySwitch2PMDeviceCommandSetModeIfExposer
- type RelaySwitch2PMDeviceStatusBody
- type RelaySwitch2PMDeviceStatusResponse
- type RelaySwitchMode
- type RemoteDevice
- type ResponseParser
- type RobotVacuumCleanerComboDevice
- func (device *RobotVacuumCleanerComboDevice) ChangeParam(floorCleaningParam *FloorCleaningParam) (*CommonResponse, error)
- func (device *RobotVacuumCleanerComboDevice) Dock() (*CommonResponse, error)
- func (device *RobotVacuumCleanerComboDevice) ExecCommand(jsonString string) (*CommonResponse, error)
- func (device *RobotVacuumCleanerComboDevice) GetAnyStatusBody() (any, error)
- func (device *RobotVacuumCleanerComboDevice) GetCommandParameterJSONSchema() (string, error)
- func (device *RobotVacuumCleanerComboDevice) GetStatus() (*RobotVacuumCleanerComboDeviceStatusResponse, error)
- func (device *RobotVacuumCleanerComboDevice) Pause() (*CommonResponse, error)
- func (device *RobotVacuumCleanerComboDevice) SetVolume(volume int) (*CommonResponse, error)
- func (device *RobotVacuumCleanerComboDevice) StartClean(startFloorCleaningParam *StartFloorCleaningComboParam) (*CommonResponse, error)
- type RobotVacuumCleanerComboDeviceCommandChangeParamIfExposer
- type RobotVacuumCleanerComboDeviceCommandParameter
- type RobotVacuumCleanerComboDeviceCommandSetVolumeIfExposer
- type RobotVacuumCleanerComboDeviceCommandStartCleanIfExposer
- type RobotVacuumCleanerComboDeviceStatusBody
- type RobotVacuumCleanerComboDeviceStatusResponse
- type RobotVacuumCleanerDevice
- func (device *RobotVacuumCleanerDevice) Dock() (*CommonResponse, error)
- func (device *RobotVacuumCleanerDevice) ExecCommand(jsonString string) (*CommonResponse, error)
- func (device *RobotVacuumCleanerDevice) GetAnyStatusBody() (any, error)
- func (device *RobotVacuumCleanerDevice) GetCommandParameterJSONSchema() (string, error)
- func (device *RobotVacuumCleanerDevice) GetStatus() (*RobotVacuumCleanerDeviceStatusResponse, error)
- func (device *RobotVacuumCleanerDevice) SetPowerLevel(powerLevel RobotVacuumCleanerPowerLevel) (*CommonResponse, error)
- func (device *RobotVacuumCleanerDevice) Start() (*CommonResponse, error)
- func (device *RobotVacuumCleanerDevice) Stop() (*CommonResponse, error)
- type RobotVacuumCleanerDeviceCommandParameter
- type RobotVacuumCleanerDeviceCommandSetPowerLevelIfExposer
- type RobotVacuumCleanerDeviceStatusBody
- type RobotVacuumCleanerDeviceStatusResponse
- type RobotVacuumCleanerPowerLevel
- type RobotVacuumCleanerSDevice
- func (device *RobotVacuumCleanerSDevice) AddWaterForHumi() (*CommonResponse, error)
- func (device *RobotVacuumCleanerSDevice) ChangeParam(floorCleaningParam *FloorCleaningParam) (*CommonResponse, error)
- func (device *RobotVacuumCleanerSDevice) Dock() (*CommonResponse, error)
- func (device *RobotVacuumCleanerSDevice) ExecCommand(jsonString string) (*CommonResponse, error)
- func (device *RobotVacuumCleanerSDevice) GetAnyStatusBody() (any, error)
- func (device *RobotVacuumCleanerSDevice) GetCommandParameterJSONSchema() (string, error)
- func (device *RobotVacuumCleanerSDevice) GetStatus() (*RobotVacuumCleanerSDeviceStatusResponse, error)
- func (device *RobotVacuumCleanerSDevice) Pause() (*CommonResponse, error)
- func (device *RobotVacuumCleanerSDevice) SelfClean(mode SelfCleaningMode) (*CommonResponse, error)
- func (device *RobotVacuumCleanerSDevice) SetVolume(volume int) (*CommonResponse, error)
- func (device *RobotVacuumCleanerSDevice) StartClean(startFloorCleaningParam *StartFloorCleaningParam) (*CommonResponse, error)
- type RobotVacuumCleanerSDeviceCommandChangeParamIfExposer
- type RobotVacuumCleanerSDeviceCommandParameter
- type RobotVacuumCleanerSDeviceCommandSelfCleanIfExposer
- type RobotVacuumCleanerSDeviceCommandSetVolumeIfExposer
- type RobotVacuumCleanerSDeviceCommandStartCleanIfExposer
- type RobotVacuumCleanerSDeviceStatusBody
- type RobotVacuumCleanerSDeviceStatusResponse
- type RollerShadeDevice
- func (device *RollerShadeDevice) ExecCommand(jsonString string) (*CommonResponse, error)
- func (device *RollerShadeDevice) GetAnyStatusBody() (any, error)
- func (device *RollerShadeDevice) GetCommandParameterJSONSchema() (string, error)
- func (device *RollerShadeDevice) GetStatus() (*RollerShadeDeviceStatusResponse, error)
- func (device *RollerShadeDevice) SetPosition(position int) (*CommonResponse, error)
- type RollerShadeDeviceCommandParameter
- type RollerShadeDeviceStatusBody
- type RollerShadeDeviceStatusResponse
- type SelfCleaningMode
- type StartFloorCleaningComboParam
- type StartFloorCleaningParam
- type StatusGettable
- type StripLightDevice
- func (device *StripLightDevice) ExecCommand(jsonString string) (*CommonResponse, error)
- func (device *StripLightDevice) GetAnyStatusBody() (any, error)
- func (device *StripLightDevice) GetCommandParameterJSONSchema() (string, error)
- func (device *StripLightDevice) GetStatus() (*StripLightDeviceStatusResponse, error)
- func (device *StripLightDevice) SetBrightness(brightness int) (*CommonResponse, error)
- func (device *StripLightDevice) SetColor(color color.RGBA) (*CommonResponse, error)
- func (device *StripLightDevice) Toggle() (*CommonResponse, error)
- func (device *StripLightDevice) TurnOff() (*CommonResponse, error)
- func (device *StripLightDevice) TurnOn() (*CommonResponse, error)
- type StripLightDeviceCommandParameter
- type StripLightDeviceCommandSetBrightnessIfExposer
- type StripLightDeviceCommandSetColorIfExposer
- type StripLightDeviceStatusBody
- type StripLightDeviceStatusResponse
- type SwitchableDevice
- type VideoDoorbellDevice
- func (device *VideoDoorbellDevice) DisableMotionDetection() (*CommonResponse, error)
- func (device *VideoDoorbellDevice) EnableMotionDetection() (*CommonResponse, error)
- func (device *VideoDoorbellDevice) ExecCommand(jsonString string) (*CommonResponse, error)
- func (device *VideoDoorbellDevice) GetAnyStatusBody() (any, error)
- func (device *VideoDoorbellDevice) GetCommandParameterJSONSchema() (string, error)
- func (device *VideoDoorbellDevice) GetStatus() (*VideoDoorbellDeviceStatusResponse, error)
- type VideoDoorbellDeviceCommandParameter
- type VideoDoorbellDeviceStatusBody
- type VideoDoorbellDeviceStatusResponse
- type WaterLeakDetectorDevice
- type WaterLeakDetectorDeviceStatusBody
- type WaterLeakDetectorDeviceStatusResponse
Constants ¶
const ( RobotVacuumCleanerPowerLevelQuiet = RobotVacuumCleanerPowerLevel(0) RobotVacuumCleanerPowerLevelStandard = RobotVacuumCleanerPowerLevel(1) RobotVacuumCleanerPowerLevelStrong = RobotVacuumCleanerPowerLevel(2) RobotVacuumCleanerPowerLevelMax = RobotVacuumCleanerPowerLevel(3) )
const ( WashMopSelfCleaningMode = SelfCleaningMode(1) DrySelfCleaningMode = SelfCleaningMode(2) TerminateSelfCleaningMode = SelfCleaningMode(3) )
const ( HumidifierModeAuto = HumidifierMode(0) HumidifierModeLow = HumidifierMode(101) HumidifierModeMedium = HumidifierMode(102) HumidifierModeHigh = HumidifierMode(103) )
const ( EvaporativeHumidifierModeLevel4 = EvaporativeHumidifierMode(1) EvaporativeHumidifierModeLevel3 = EvaporativeHumidifierMode(2) EvaporativeHumidifierModeLevel2 = EvaporativeHumidifierMode(3) EvaporativeHumidifierModeLevel1 = EvaporativeHumidifierMode(4) EvaporativeHumidifierModeHumidity = EvaporativeHumidifierMode(5) EvaporativeHumidifierModeSleep = EvaporativeHumidifierMode(6) EvaporativeHumidifierModeAuto = EvaporativeHumidifierMode(7) EvaporativeHumidifierModeDry = EvaporativeHumidifierMode(8) )
const ( AirPurifierModeNormal = AirPurifierMode(1) AirPurifierModeAuto = AirPurifierMode(2) AirPurifierModeSleep = AirPurifierMode(3) AirPurifierModePet = AirPurifierMode(4) )
const ( CirculatorNightLightModeTurnOff = CirculatorNightLightMode("off") CirculatorNightLightModeTurnBright = CirculatorNightLightMode("1") CirculatorNightLightModeTurnDim = CirculatorNightLightMode("2") )
const ( CirculatorWindModeDirect = CirculatorWindMode("direct") CirculatorWindModeNatural = CirculatorWindMode("natural") CirculatorWindModeSleep = CirculatorWindMode("sleep") CirculatorWindModeBaby = CirculatorWindMode("baby") )
const ( RelaySwitchModeToggle = RelaySwitchMode(0) RelaySwitchModeEdge = RelaySwitchMode(1) RelaySwitchModeDetached = RelaySwitchMode(2) RelaySwitchModeMomentary = RelaySwitchMode(3) )
const ( AirConditionerModeAuto = AirConditionerMode(1) AirConditionerModeCool = AirConditionerMode(2) AirConditionerModeDry = AirConditionerMode(3) AirConditionerModeFan = AirConditionerMode(4) AirConditionerModeHeat = AirConditionerMode(5) AirConditionerFanModeAuto = AirConditionerFanMode(1) AirConditionerFanModeLow = AirConditionerFanMode(2) AirConditionerFanModeMedium = AirConditionerFanMode(3) AirConditionerFanModeHigh = AirConditionerFanMode(4) AirConditionerPowerStateOn = AirConditionerPowerState("on") AirConditionerPowerStateOff = AirConditionerPowerState("off") )
const (
DefaultBaseApiURL = "https://api.switch-bot.com/v1.1"
)
Variables ¶
This section is empty.
Functions ¶
func OptionBaseApiURL ¶ added in v0.3.3
func OptionDebug ¶
Types ¶
type AirConditionerFanMode ¶ added in v0.3.0
type AirConditionerFanMode int
type AirConditionerMode ¶ added in v0.3.0
type AirConditionerMode int
type AirConditionerPowerState ¶ added in v0.3.0
type AirConditionerPowerState string
type AirPurifierDevice ¶ added in v0.3.2
type AirPurifierDevice struct {
CommonDeviceListItem
}
func (*AirPurifierDevice) ExecCommand ¶ added in v0.4.0
func (device *AirPurifierDevice) ExecCommand(jsonString string) (*CommonResponse, error)
ExecCommand sends a command to the AirPurifierDevice
func (*AirPurifierDevice) GetAnyStatusBody ¶ added in v0.3.5
func (device *AirPurifierDevice) GetAnyStatusBody() (any, error)
GetAnyStatusBody returns the status of the device as a value of type `any`
func (*AirPurifierDevice) GetCommandParameterJSONSchema ¶ added in v0.4.0
func (device *AirPurifierDevice) GetCommandParameterJSONSchema() (string, error)
GetCommandParameterJSONSchema returns the JSON schema for the AirPurifierDevice command parameter
func (*AirPurifierDevice) GetStatus ¶ added in v0.3.2
func (device *AirPurifierDevice) GetStatus() (*AirPurifierDeviceStatusResponse, error)
func (*AirPurifierDevice) SetChildLock ¶ added in v0.3.2
func (device *AirPurifierDevice) SetChildLock(flag bool) (*CommonResponse, error)
SetChildLock sends a command to set the child lock of the AirPurifierDevice
func (*AirPurifierDevice) SetMode ¶ added in v0.3.2
func (device *AirPurifierDevice) SetMode(mode AirPurifierMode, fanLevel int) (*CommonResponse, error)
SetMode sends a command to set the mode of the AirPurifierDevice
func (*AirPurifierDevice) TurnOff ¶ added in v0.3.2
func (device *AirPurifierDevice) TurnOff() (*CommonResponse, error)
TurnOff sends a command to turn off the AirPurifierDevice
func (*AirPurifierDevice) TurnOn ¶ added in v0.3.2
func (device *AirPurifierDevice) TurnOn() (*CommonResponse, error)
TurnOn sends a command to turn on the AirPurifierDevice
type AirPurifierDeviceCommandParameter ¶ added in v0.4.0
type AirPurifierDeviceCommandParameter struct {
Command string `` /* 205-byte string literal not displayed */
Mode int `json:"mode" title:"Mode" minimum:"1" maximum:"4" description:"1:Normal mode, 2:Auto mode, 3:Sleep mode, 4:Manual mode"`
FanLevel int `json:"fanLevel" title:"FanLevel" minimum:"1" maximum:"3" description:"Fan speed level (1-3) for Normal mode"`
ChildLock bool `json:"childLock" title:"ChildLock" description:"true:lock, false:unlock"`
// contains filtered or unexported fields
}
AirPurifierDeviceCommandParameter is a struct that represents the command parameter for the AirPurifierDevice
func (*AirPurifierDeviceCommandParameter) JSONSchemaAllOf ¶ added in v0.4.0
func (parameter *AirPurifierDeviceCommandParameter) JSONSchemaAllOf() []interface{}
JSONSchemaAllOf returns the JSON schema allOf block for the AirPurifierDevice command parameter
type AirPurifierDeviceCommandSetChildLockIfExposer ¶ added in v0.4.0
type AirPurifierDeviceCommandSetChildLockIfExposer struct{}
AirPurifierDeviceCommandSetChildLockIfExposer represents the SetChildLock command parameters
func (*AirPurifierDeviceCommandSetChildLockIfExposer) JSONSchemaIf ¶ added in v0.4.0
func (parameter *AirPurifierDeviceCommandSetChildLockIfExposer) JSONSchemaIf() interface{}
JSONSchemaIf returns the JSON schema if block for the AirPurifierDevice command parameter for SetChildLock
func (*AirPurifierDeviceCommandSetChildLockIfExposer) JSONSchemaThen ¶ added in v0.4.0
func (parameter *AirPurifierDeviceCommandSetChildLockIfExposer) JSONSchemaThen() interface{}
JSONSchemaThen returns the JSON schema then block for the AirPurifierDevice command parameter for SetChildLock
type AirPurifierDeviceCommandSetModeIfExposer ¶ added in v0.4.0
type AirPurifierDeviceCommandSetModeIfExposer struct{}
AirPurifierDeviceCommandSetModeIfExposer represents the SetMode command parameters
func (*AirPurifierDeviceCommandSetModeIfExposer) JSONSchemaIf ¶ added in v0.4.0
func (parameter *AirPurifierDeviceCommandSetModeIfExposer) JSONSchemaIf() interface{}
JSONSchemaIf returns the JSON schema if block for the AirPurifierDevice command parameter for SetMode
func (*AirPurifierDeviceCommandSetModeIfExposer) JSONSchemaThen ¶ added in v0.4.0
func (parameter *AirPurifierDeviceCommandSetModeIfExposer) JSONSchemaThen() interface{}
JSONSchemaThen returns the JSON schema then block for the AirPurifierDevice command parameter for SetMode
type AirPurifierDeviceCommandSetNormalModeIfExposer ¶ added in v0.4.0
type AirPurifierDeviceCommandSetNormalModeIfExposer struct{}
AirPurifierDeviceCommandSetNormalModeIfExposer represents the SetMode off NormalMode command parameters
func (*AirPurifierDeviceCommandSetNormalModeIfExposer) JSONSchemaIf ¶ added in v0.4.0
func (parameter *AirPurifierDeviceCommandSetNormalModeIfExposer) JSONSchemaIf() interface{}
JSONSchemaIf returns the JSON schema if block for the AirPurifierDevice command parameter for SetMode
func (*AirPurifierDeviceCommandSetNormalModeIfExposer) JSONSchemaThen ¶ added in v0.4.0
func (parameter *AirPurifierDeviceCommandSetNormalModeIfExposer) JSONSchemaThen() interface{}
JSONSchemaThen returns the JSON schema then block for the AirPurifierDevice command parameter for SetMode
type AirPurifierDeviceStatusBody ¶ added in v0.3.2
type AirPurifierDeviceStatusBody struct {
CommonDevice
Power string `json:"power"`
Version string `json:"version"`
Mode int `json:"mode"`
ChildLock bool `json:"childLock"`
}
type AirPurifierDeviceStatusResponse ¶ added in v0.3.2
type AirPurifierDeviceStatusResponse struct {
CommonResponse
Body *AirPurifierDeviceStatusBody `json:"body"`
}
type AirPurifierMode ¶ added in v0.3.2
type AirPurifierMode int
type AirPurifierModeParameter ¶ added in v0.3.2
type AirPurifierModeParameter struct {
Mode AirPurifierMode `json:"mode"`
FanGear int `json:"fanGear,omitempty"`
}
type BatteryCirculatorFanDevice ¶ added in v0.3.2
type BatteryCirculatorFanDevice struct {
CommonDeviceListItem
}
func (*BatteryCirculatorFanDevice) ExecCommand ¶ added in v0.4.0
func (device *BatteryCirculatorFanDevice) ExecCommand(jsonString string) (*CommonResponse, error)
ExecCommand sends a command to the BatteryCirculatorFanDevice
func (*BatteryCirculatorFanDevice) GetAnyStatusBody ¶ added in v0.3.5
func (device *BatteryCirculatorFanDevice) GetAnyStatusBody() (any, error)
GetAnyStatusBody returns the status of the device as a value of type `any`
func (*BatteryCirculatorFanDevice) GetCommandParameterJSONSchema ¶ added in v0.4.0
func (device *BatteryCirculatorFanDevice) GetCommandParameterJSONSchema() (string, error)
GetCommandParameterJSONSchema returns the JSON schema for the BatteryCirculatorFanDevice command parameter
func (*BatteryCirculatorFanDevice) GetStatus ¶ added in v0.3.2
func (device *BatteryCirculatorFanDevice) GetStatus() (*BatteryCirculatorFanDeviceStatusResponse, error)
func (*BatteryCirculatorFanDevice) SetNightLightMode ¶ added in v0.3.2
func (device *BatteryCirculatorFanDevice) SetNightLightMode(mode CirculatorNightLightMode) (*CommonResponse, error)
SetNightLightMode sends a command to set the night light mode of the BatteryCirculatorFanDevice
func (*BatteryCirculatorFanDevice) SetWindMode ¶ added in v0.3.2
func (device *BatteryCirculatorFanDevice) SetWindMode(mode CirculatorWindMode) (*CommonResponse, error)
SetWindMode sends a command to set the wind mode of the BatteryCirculatorFanDevice
func (*BatteryCirculatorFanDevice) SetWindSpeed ¶ added in v0.3.2
func (device *BatteryCirculatorFanDevice) SetWindSpeed(speed int) (*CommonResponse, error)
SetWindSpeed sends a command to set the wind speed of the BatteryCirculatorFanDevice
func (*BatteryCirculatorFanDevice) TurnOff ¶ added in v0.3.2
func (device *BatteryCirculatorFanDevice) TurnOff() (*CommonResponse, error)
TurnOff sends a command to turn off the BatteryCirculatorFanDevice
func (*BatteryCirculatorFanDevice) TurnOn ¶ added in v0.3.2
func (device *BatteryCirculatorFanDevice) TurnOn() (*CommonResponse, error)
TurnOn sends a command to turn on the BatteryCirculatorFanDevice
type BatteryCirculatorFanDeviceStatusBody ¶ added in v0.3.2
type BatteryCirculatorFanDeviceStatusBody struct {
CommonDevice
Mode string `json:"mode"`
Version string `json:"version"`
Battery int `json:"battery"`
Power string `json:"power"`
NightStatus string `json:"nightStatus"`
Oscillation string `json:"oscillation"`
VerticalOscillation string `json:"verticalOscillation"`
ChargingStatus string `json:"chargingStatus"`
FanSpeed int `json:"fanSpeed"`
}
type BatteryCirculatorFanDeviceStatusResponse ¶ added in v0.3.2
type BatteryCirculatorFanDeviceStatusResponse struct {
CommonResponse
Body *BatteryCirculatorFanDeviceStatusBody `json:"body"`
}
type BlindTiltDevice ¶ added in v0.3.2
type BlindTiltDevice struct {
CommonDeviceListItem
Version int `json:"version"`
BlindTiltDevicesIds []string `json:"blindTiltDevicesIds"`
Calibrate bool `json:"calibrate"`
Group bool `json:"group"`
Master bool `json:"master"`
Direction string `json:"direction"`
SlidePosition int `json:"slidePosition"`
}
func (*BlindTiltDevice) CloseDown ¶ added in v0.3.2
func (device *BlindTiltDevice) CloseDown() (*CommonResponse, error)
CloseDown sends a command to close down the BlindTiltDevice
func (*BlindTiltDevice) CloseUp ¶ added in v0.3.2
func (device *BlindTiltDevice) CloseUp() (*CommonResponse, error)
CloseUp sends a command to close up the BlindTiltDevice
func (*BlindTiltDevice) ExecCommand ¶ added in v0.4.0
func (device *BlindTiltDevice) ExecCommand(jsonString string) (*CommonResponse, error)
ExecCommand sends a command to the BlindTiltDevice
func (*BlindTiltDevice) FullyOpen ¶ added in v0.3.2
func (device *BlindTiltDevice) FullyOpen() (*CommonResponse, error)
FullyOpen sends a command to fully open the BlindTiltDevice
func (*BlindTiltDevice) GetAnyStatusBody ¶ added in v0.3.5
func (device *BlindTiltDevice) GetAnyStatusBody() (any, error)
GetAnyStatusBody returns the status of the device as a value of type `any`
func (*BlindTiltDevice) GetCommandParameterJSONSchema ¶ added in v0.4.0
func (device *BlindTiltDevice) GetCommandParameterJSONSchema() (string, error)
GetCommandParameterJSONSchema returns the JSON schema for the BlindTiltDevice command parameter
func (*BlindTiltDevice) GetStatus ¶ added in v0.3.2
func (device *BlindTiltDevice) GetStatus() (*BlindTiltDeviceStatusResponse, error)
func (*BlindTiltDevice) SetPosition ¶ added in v0.3.2
func (device *BlindTiltDevice) SetPosition(direction string, position int) (*CommonResponse, error)
SetPosition sends a command to set the position of the BlindTiltDevice
type BlindTiltDeviceCommandParameter ¶ added in v0.4.0
type BlindTiltDeviceCommandParameter struct {
Command string `` /* 241-byte string literal not displayed */
Direction string `json:"direction" title:"Direction" enum:"up,down" description:"Direction of the blind (up or down)"`
Position int `json:"position" title:"Position" minimum:"0" maximum:"100" description:"Position value (0-100, must be even number)"`
// contains filtered or unexported fields
}
BlindTiltDeviceCommandParameter is a struct that represents the command parameter for the BlindTiltDevice
func (*BlindTiltDeviceCommandParameter) JSONSchemaAllOf ¶ added in v0.4.0
func (parameter *BlindTiltDeviceCommandParameter) JSONSchemaAllOf() []interface{}
JSONSchemaAllOf returns the JSON schema allOf block for the BlindTiltDevice command parameter
type BlindTiltDeviceCommandSetPositionIfExposer ¶ added in v0.4.0
type BlindTiltDeviceCommandSetPositionIfExposer struct{}
BlindTiltDeviceCommandSetPositionIfExposer represents the SetPosition command parameters
func (*BlindTiltDeviceCommandSetPositionIfExposer) JSONSchemaIf ¶ added in v0.4.0
func (parameter *BlindTiltDeviceCommandSetPositionIfExposer) JSONSchemaIf() interface{}
JSONSchemaIf returns the JSON schema if block for the BlindTiltDevice command parameter for SetPosition
func (*BlindTiltDeviceCommandSetPositionIfExposer) JSONSchemaThen ¶ added in v0.4.0
func (parameter *BlindTiltDeviceCommandSetPositionIfExposer) JSONSchemaThen() interface{}
JSONSchemaThen returns the JSON schema then block for the BlindTiltDevice command parameter for SetPosition
type BlindTiltDeviceStatusBody ¶ added in v0.3.2
type BlindTiltDeviceStatusResponse ¶ added in v0.3.2
type BlindTiltDeviceStatusResponse struct {
CommonResponse
Body *BlindTiltDeviceStatusBody `json:"body"`
}
type BotDevice ¶
type BotDevice struct {
CommonDeviceListItem
}
func (*BotDevice) ExecCommand ¶ added in v0.4.0
func (device *BotDevice) ExecCommand(jsonString string) (*CommonResponse, error)
ExecCommand sends a command to the BotDevice
func (*BotDevice) GetAnyStatusBody ¶ added in v0.3.5
GetAnyStatusBody returns the status of the device as a value of type `any`
func (*BotDevice) GetCommandParameterJSONSchema ¶ added in v0.4.0
GetCommandParameterJSONSchema returns the JSON schema for the BotDevice command parameter
func (*BotDevice) GetStatus ¶ added in v0.2.0
func (device *BotDevice) GetStatus() (*BotDeviceStatusResponse, error)
func (*BotDevice) Press ¶ added in v0.2.0
func (device *BotDevice) Press() (*CommonResponse, error)
Press sends a command to press the BotDevice
func (*BotDevice) TurnOff ¶ added in v0.2.0
func (device *BotDevice) TurnOff() (*CommonResponse, error)
TurnOff sends a command to turn off the BotDevice
func (*BotDevice) TurnOn ¶ added in v0.2.0
func (device *BotDevice) TurnOn() (*CommonResponse, error)
TurnOn sends a command to turn on the BotDevice
type BotDeviceCommandParameter ¶ added in v0.4.0
type BotDeviceCommandParameter struct {
Command string `` /* 158-byte string literal not displayed */
// contains filtered or unexported fields
}
BotDeviceCommandParameter is a struct that represents the command parameter for the BotDevice
type BotDeviceStatusBody ¶ added in v0.2.0
type BotDeviceStatusBody struct {
CommonDevice
Power string `json:"power"`
Battery int `json:"battery"`
Version string `json:"version"`
DeviceMode string `json:"deviceMode"`
}
type BotDeviceStatusResponse ¶ added in v0.2.0
type BotDeviceStatusResponse struct {
CommonResponse
Body *BotDeviceStatusBody `json:"body"`
}
type CeilingLightDevice ¶ added in v0.3.2
type CeilingLightDevice struct {
CommonDeviceListItem
}
func (*CeilingLightDevice) ExecCommand ¶ added in v0.4.0
func (device *CeilingLightDevice) ExecCommand(jsonString string) (*CommonResponse, error)
ExecCommand sends a command to the CeilingLightDevice
func (*CeilingLightDevice) GetAnyStatusBody ¶ added in v0.3.5
func (device *CeilingLightDevice) GetAnyStatusBody() (any, error)
GetAnyStatusBody returns the status of the device as a value of type `any`
func (*CeilingLightDevice) GetCommandParameterJSONSchema ¶ added in v0.4.0
func (device *CeilingLightDevice) GetCommandParameterJSONSchema() (string, error)
GetCommandParameterJSONSchema returns the JSON schema for the CeilingLightDevice command parameter
func (*CeilingLightDevice) GetStatus ¶ added in v0.3.2
func (device *CeilingLightDevice) GetStatus() (*CeilingLightDeviceStatusResponse, error)
func (*CeilingLightDevice) SetBrightness ¶ added in v0.3.2
func (device *CeilingLightDevice) SetBrightness(brightness int) (*CommonResponse, error)
SetBrightness sends a command to set the brightness of the CeilingLightDevice
func (*CeilingLightDevice) SetColorTemperature ¶ added in v0.3.2
func (device *CeilingLightDevice) SetColorTemperature(colorTemperature int) (*CommonResponse, error)
SetColorTemperature sends a command to set the color temperature of the CeilingLightDevice
func (*CeilingLightDevice) Toggle ¶ added in v0.3.2
func (device *CeilingLightDevice) Toggle() (*CommonResponse, error)
Toggle sends a command to toggle the CeilingLightDevice
func (*CeilingLightDevice) TurnOff ¶ added in v0.3.2
func (device *CeilingLightDevice) TurnOff() (*CommonResponse, error)
TurnOff sends a command to turn off the CeilingLightDevice
func (*CeilingLightDevice) TurnOn ¶ added in v0.3.2
func (device *CeilingLightDevice) TurnOn() (*CommonResponse, error)
TurnOn sends a command to turn on the CeilingLightDevice
type CeilingLightDeviceCommandParameter ¶ added in v0.4.0
type CeilingLightDeviceCommandParameter struct {
Command string `` /* 298-byte string literal not displayed */
Brightness int `json:"brightness" title:"Brightness" minimum:"1" maximum:"100" description:"Brightness level (1-100)"`
ColorTemperature int `` /* 132-byte string literal not displayed */
// contains filtered or unexported fields
}
CeilingLightDeviceCommandParameter is a struct that represents the command parameter for the CeilingLightDevice
func (*CeilingLightDeviceCommandParameter) JSONSchemaAllOf ¶ added in v0.4.0
func (parameter *CeilingLightDeviceCommandParameter) JSONSchemaAllOf() []interface{}
JSONSchemaAllOf returns the JSON schema allOf block for the CeilingLightDevice command parameter
type CeilingLightDeviceCommandSetBrightnessIfExposer ¶ added in v0.4.0
type CeilingLightDeviceCommandSetBrightnessIfExposer struct{}
CeilingLightDeviceCommandSetBrightnessIfExposer represents the SetBrightness command parameters
func (*CeilingLightDeviceCommandSetBrightnessIfExposer) JSONSchemaIf ¶ added in v0.4.0
func (parameter *CeilingLightDeviceCommandSetBrightnessIfExposer) JSONSchemaIf() interface{}
JSONSchemaIf returns the JSON schema if block for the CeilingLightDevice command parameter for SetBrightness
func (*CeilingLightDeviceCommandSetBrightnessIfExposer) JSONSchemaThen ¶ added in v0.4.0
func (parameter *CeilingLightDeviceCommandSetBrightnessIfExposer) JSONSchemaThen() interface{}
JSONSchemaThen returns the JSON schema then block for the CeilingLightDevice command parameter for SetBrightness
type CeilingLightDeviceCommandSetColorTemperatureIfExposer ¶ added in v0.4.0
type CeilingLightDeviceCommandSetColorTemperatureIfExposer struct{}
CeilingLightDeviceCommandSetColorTemperatureIfExposer represents the SetColorTemperature command parameters
func (*CeilingLightDeviceCommandSetColorTemperatureIfExposer) JSONSchemaIf ¶ added in v0.4.0
func (parameter *CeilingLightDeviceCommandSetColorTemperatureIfExposer) JSONSchemaIf() interface{}
JSONSchemaIf returns the JSON schema if block for the CeilingLightDevice command parameter for SetColorTemperature
func (*CeilingLightDeviceCommandSetColorTemperatureIfExposer) JSONSchemaThen ¶ added in v0.4.0
func (parameter *CeilingLightDeviceCommandSetColorTemperatureIfExposer) JSONSchemaThen() interface{}
JSONSchemaThen returns the JSON schema then block for the CeilingLightDevice command parameter for SetColorTemperature
type CeilingLightDeviceStatusBody ¶ added in v0.3.2
type CeilingLightDeviceStatusBody struct {
CommonDevice
Power string `json:"power"`
Version string `json:"version"`
Brightness int `json:"brightness"`
ColorTemperature int `json:"colorTemperature"`
}
type CeilingLightDeviceStatusResponse ¶ added in v0.3.2
type CeilingLightDeviceStatusResponse struct {
CommonResponse
Body *CeilingLightDeviceStatusBody `json:"body"`
}
type CirculatorFanDevice ¶ added in v0.3.2
type CirculatorFanDevice struct {
CommonDeviceListItem
}
func (*CirculatorFanDevice) ExecCommand ¶ added in v0.4.0
func (device *CirculatorFanDevice) ExecCommand(jsonString string) (*CommonResponse, error)
ExecCommand sends a command to the CirculatorFanDevice
func (*CirculatorFanDevice) GetAnyStatusBody ¶ added in v0.3.5
func (device *CirculatorFanDevice) GetAnyStatusBody() (any, error)
GetAnyStatusBody returns the status of the device as a value of type `any`
func (*CirculatorFanDevice) GetCommandParameterJSONSchema ¶ added in v0.4.0
func (device *CirculatorFanDevice) GetCommandParameterJSONSchema() (string, error)
GetCommandParameterJSONSchema returns the JSON schema for the CirculatorFanDevice command parameter
func (*CirculatorFanDevice) GetStatus ¶ added in v0.3.2
func (device *CirculatorFanDevice) GetStatus() (*CirculatorFanDeviceStatusResponse, error)
func (*CirculatorFanDevice) SetNightLightMode ¶ added in v0.3.2
func (device *CirculatorFanDevice) SetNightLightMode(mode CirculatorNightLightMode) (*CommonResponse, error)
SetNightLightMode sends a command to set the night light mode of the CirculatorFanDevice
func (*CirculatorFanDevice) SetWindMode ¶ added in v0.3.2
func (device *CirculatorFanDevice) SetWindMode(mode CirculatorWindMode) (*CommonResponse, error)
SetWindMode sends a command to set the wind mode of the CirculatorFanDevice
func (*CirculatorFanDevice) SetWindSpeed ¶ added in v0.3.2
func (device *CirculatorFanDevice) SetWindSpeed(speed int) (*CommonResponse, error)
SetWindSpeed sends a command to set the wind speed of the CirculatorFanDevice
func (*CirculatorFanDevice) TurnOff ¶ added in v0.3.2
func (device *CirculatorFanDevice) TurnOff() (*CommonResponse, error)
TurnOff sends a command to turn off the CirculatorFanDevice
func (*CirculatorFanDevice) TurnOn ¶ added in v0.3.2
func (device *CirculatorFanDevice) TurnOn() (*CommonResponse, error)
TurnOn sends a command to turn on the CirculatorFanDevice
type CirculatorFanDeviceCommandParameter ¶ added in v0.4.0
type CirculatorFanDeviceCommandParameter struct {
Command string `` /* 268-byte string literal not displayed */
NightLight string `json:"nightLight" title:"NightLight" enum:"off,1,2" description:"Night light mode: off:turn off, 1:bright, 2:dim"`
WindMode string `` /* 172-byte string literal not displayed */
WindSpeed int `json:"windSpeed" title:"WindSpeed" minimum:"1" maximum:"100" description:"Wind speed (1-100)"`
// contains filtered or unexported fields
}
CirculatorFanDeviceCommandParameter is a struct that represents the command parameter for the BatteryCirculatorFanDevice and CirculatorFanDevice
func (*CirculatorFanDeviceCommandParameter) JSONSchemaAllOf ¶ added in v0.4.0
func (parameter *CirculatorFanDeviceCommandParameter) JSONSchemaAllOf() []interface{}
JSONSchemaAllOf returns the JSON schema allOf block for the BatteryCirculatorFanDevice and CirculatorFanDevice command parameter
type CirculatorFanDeviceCommandSetNightLightModeIfExposer ¶ added in v0.4.0
type CirculatorFanDeviceCommandSetNightLightModeIfExposer struct{}
CirculatorFanDeviceCommandSetNightLightModeIfExposer represents the SetNightLightMode command parameters
func (*CirculatorFanDeviceCommandSetNightLightModeIfExposer) JSONSchemaIf ¶ added in v0.4.0
func (parameter *CirculatorFanDeviceCommandSetNightLightModeIfExposer) JSONSchemaIf() interface{}
JSONSchemaIf returns the JSON schema if block for the BatteryCirculatorFanDevice and CirculatorFanDevice command parameter for SetNightLightMode
func (*CirculatorFanDeviceCommandSetNightLightModeIfExposer) JSONSchemaThen ¶ added in v0.4.0
func (parameter *CirculatorFanDeviceCommandSetNightLightModeIfExposer) JSONSchemaThen() interface{}
JSONSchemaThen returns the JSON schema then block for the BatteryCirculatorFanDevice and CirculatorFanDevice command parameter for SetNightLightMode
type CirculatorFanDeviceCommandSetWindModeIfExposer ¶ added in v0.4.0
type CirculatorFanDeviceCommandSetWindModeIfExposer struct{}
CirculatorFanDeviceCommandSetWindModeIfExposer represents the SetWindMode command parameters
func (*CirculatorFanDeviceCommandSetWindModeIfExposer) JSONSchemaIf ¶ added in v0.4.0
func (parameter *CirculatorFanDeviceCommandSetWindModeIfExposer) JSONSchemaIf() interface{}
JSONSchemaIf returns the JSON schema if block for the BatteryCirculatorFanDevice and CirculatorFanDevice command parameter for SetWindMode
func (*CirculatorFanDeviceCommandSetWindModeIfExposer) JSONSchemaThen ¶ added in v0.4.0
func (parameter *CirculatorFanDeviceCommandSetWindModeIfExposer) JSONSchemaThen() interface{}
JSONSchemaThen returns the JSON schema then block for the BatteryCirculatorFanDevice and CirculatorFanDevice command parameter for SetWindMode
type CirculatorFanDeviceCommandSetWindSpeedIfExposer ¶ added in v0.4.0
type CirculatorFanDeviceCommandSetWindSpeedIfExposer struct{}
CirculatorFanDeviceCommandSetWindSpeedIfExposer represents the SetWindSpeed command parameters
func (*CirculatorFanDeviceCommandSetWindSpeedIfExposer) JSONSchemaIf ¶ added in v0.4.0
func (parameter *CirculatorFanDeviceCommandSetWindSpeedIfExposer) JSONSchemaIf() interface{}
JSONSchemaIf returns the JSON schema if block for the BatteryCirculatorFanDevice and CirculatorFanDevice command parameter for SetWindSpeed
func (*CirculatorFanDeviceCommandSetWindSpeedIfExposer) JSONSchemaThen ¶ added in v0.4.0
func (parameter *CirculatorFanDeviceCommandSetWindSpeedIfExposer) JSONSchemaThen() interface{}
JSONSchemaThen returns the JSON schema then block for the BatteryCirculatorFanDevice and CirculatorFanDevice command parameter for SetWindSpeed
type CirculatorFanDeviceStatusBody ¶ added in v0.3.2
type CirculatorFanDeviceStatusBody struct {
CommonDevice
Mode string `json:"mode"`
Version string `json:"version"`
Power string `json:"power"`
NightStatus string `json:"nightStatus"`
Oscillation string `json:"oscillation"`
VerticalOscillation string `json:"verticalOscillation"`
FanSpeed int `json:"fanSpeed"`
}
type CirculatorFanDeviceStatusResponse ¶ added in v0.3.2
type CirculatorFanDeviceStatusResponse struct {
CommonResponse
Body *CirculatorFanDeviceStatusBody `json:"body"`
}
type CirculatorNightLightMode ¶ added in v0.3.2
type CirculatorNightLightMode string
type CirculatorWindMode ¶ added in v0.3.2
type CirculatorWindMode string
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetDevices ¶
func (client *Client) GetDevices() (*GetDevicesResponse, error)
func (*Client) GetRequest ¶
func (client *Client) GetRequest(path string, parser ResponseParser) error
func (*Client) PostRequest ¶ added in v0.2.0
func (client *Client) PostRequest(path string, request ControlRequest) (*CommonResponse, error)
func (*Client) SendCommand ¶ added in v0.2.0
func (client *Client) SendCommand(deviceId string, request ControlRequest) (*CommonResponse, error)
type ColorLightDevice ¶ added in v0.5.0
type ColorLightDevice struct {
CommonDeviceListItem
}
func (*ColorLightDevice) ExecCommand ¶ added in v0.5.0
func (device *ColorLightDevice) ExecCommand(jsonString string) (*CommonResponse, error)
ExecCommand sends a command to the ColorLightDevice
func (*ColorLightDevice) GetAnyStatusBody ¶ added in v0.5.0
func (device *ColorLightDevice) GetAnyStatusBody() (any, error)
GetAnyStatusBody returns the status of the device as a value of type `any`
func (*ColorLightDevice) GetCommandParameterJSONSchema ¶ added in v0.5.0
func (device *ColorLightDevice) GetCommandParameterJSONSchema() (string, error)
GetCommandParameterJSONSchema returns the JSON schema for the ColorLightDevice command parameter
func (*ColorLightDevice) GetStatus ¶ added in v0.5.0
func (device *ColorLightDevice) GetStatus() (*ColorLightDeviceStatusResponse, error)
func (*ColorLightDevice) SetBrightness ¶ added in v0.5.0
func (device *ColorLightDevice) SetBrightness(brightness int) (*CommonResponse, error)
SetBrightness sends a command to set the brightness of the ColorLightDevice
func (*ColorLightDevice) SetColor ¶ added in v0.5.0
func (device *ColorLightDevice) SetColor(color color.RGBA) (*CommonResponse, error)
SetColor sends a command to set the color of the ColorLightDevice
func (*ColorLightDevice) SetColorTemperature ¶ added in v0.5.0
func (device *ColorLightDevice) SetColorTemperature(colorTemperature int) (*CommonResponse, error)
SetColorTemperature sends a command to set the color temperature of the ColorLightDevice
func (*ColorLightDevice) Toggle ¶ added in v0.5.0
func (device *ColorLightDevice) Toggle() (*CommonResponse, error)
Toggle sends a command to toggle the ColorLightDevice
func (*ColorLightDevice) TurnOff ¶ added in v0.5.0
func (device *ColorLightDevice) TurnOff() (*CommonResponse, error)
TurnOff sends a command to turn off the ColorLightDevice
func (*ColorLightDevice) TurnOn ¶ added in v0.5.0
func (device *ColorLightDevice) TurnOn() (*CommonResponse, error)
TurnOn sends a command to turn on the ColorLightDevice
type ColorLightDeviceCommandParameter ¶ added in v0.5.0
type ColorLightDeviceCommandParameter struct {
Command string `` /* 303-byte string literal not displayed */
Brightness int `json:"brightness" title:"Brightness" minimum:"1" maximum:"100" description:"Brightness level (1-100)"`
Red int `json:"red" title:"Red" minimum:"0" maximum:"255" description:"Red color value (0-255)"`
Green int `json:"green" title:"Green" minimum:"0" maximum:"255" description:"Green color value (0-255)"`
Blue int `json:"blue" title:"Blue" minimum:"0" maximum:"255" description:"Blue color value (0-255)"`
ColorTemperature int `` /* 132-byte string literal not displayed */
// contains filtered or unexported fields
}
ColorLightDeviceCommandParameter is a struct that represents the command parameter for the ColorLightDevice
func (*ColorLightDeviceCommandParameter) JSONSchemaAllOf ¶ added in v0.5.0
func (parameter *ColorLightDeviceCommandParameter) JSONSchemaAllOf() []interface{}
JSONSchemaAllOf returns the JSON schema allOf block for the ColorLightDevice command parameter
type ColorLightDeviceCommandSetBrightnessIfExposer ¶ added in v0.5.0
type ColorLightDeviceCommandSetBrightnessIfExposer struct{}
ColorLightDeviceCommandSetBrightnessIfExposer represents the SetBrightness command parameters
func (*ColorLightDeviceCommandSetBrightnessIfExposer) JSONSchemaIf ¶ added in v0.5.0
func (parameter *ColorLightDeviceCommandSetBrightnessIfExposer) JSONSchemaIf() interface{}
JSONSchemaIf returns the JSON schema if block for the ColorLightDevice command parameter for SetBrightness
func (*ColorLightDeviceCommandSetBrightnessIfExposer) JSONSchemaThen ¶ added in v0.5.0
func (parameter *ColorLightDeviceCommandSetBrightnessIfExposer) JSONSchemaThen() interface{}
JSONSchemaThen returns the JSON schema then block for the ColorLightDevice command parameter for SetBrightness
type ColorLightDeviceCommandSetColorIfExposer ¶ added in v0.5.0
type ColorLightDeviceCommandSetColorIfExposer struct{}
ColorLightDeviceCommandSetColorIfExposer represents the SetColor command parameters
func (*ColorLightDeviceCommandSetColorIfExposer) JSONSchemaIf ¶ added in v0.5.0
func (parameter *ColorLightDeviceCommandSetColorIfExposer) JSONSchemaIf() interface{}
JSONSchemaIf returns the JSON schema if block for the ColorLightDevice command parameter for SetColor
func (*ColorLightDeviceCommandSetColorIfExposer) JSONSchemaThen ¶ added in v0.5.0
func (parameter *ColorLightDeviceCommandSetColorIfExposer) JSONSchemaThen() interface{}
JSONSchemaThen returns the JSON schema then block for the ColorLightDevice command parameter for SetColor
type ColorLightDeviceCommandSetColorTemperatureIfExposer ¶ added in v0.5.0
type ColorLightDeviceCommandSetColorTemperatureIfExposer struct{}
ColorLightDeviceCommandSetColorTemperatureIfExposer represents the SetColorTemperature command parameters
func (*ColorLightDeviceCommandSetColorTemperatureIfExposer) JSONSchemaIf ¶ added in v0.5.0
func (parameter *ColorLightDeviceCommandSetColorTemperatureIfExposer) JSONSchemaIf() interface{}
JSONSchemaIf returns the JSON schema if block for the ColorLightDevice command parameter for SetColorTemperature
func (*ColorLightDeviceCommandSetColorTemperatureIfExposer) JSONSchemaThen ¶ added in v0.5.0
func (parameter *ColorLightDeviceCommandSetColorTemperatureIfExposer) JSONSchemaThen() interface{}
JSONSchemaThen returns the JSON schema then block for the ColorLightDevice command parameter for SetColorTemperature
type ColorLightDeviceStatusBody ¶ added in v0.5.0
type ColorLightDeviceStatusResponse ¶ added in v0.5.0
type ColorLightDeviceStatusResponse struct {
CommonResponse
Body *ColorLightDeviceStatusBody `json:"body"`
}
type CommonDevice ¶
type CommonDevice struct {
DeviceID string `json:"deviceId"`
DeviceType string `json:"deviceType"`
HubDeviceId string `json:"hubDeviceId"`
}
func (*CommonDevice) GetDeviceID ¶ added in v0.3.6
func (device *CommonDevice) GetDeviceID() string
type CommonDeviceListItem ¶
type CommonDeviceListItem struct {
CommonDevice
Client *Client
DeviceName string `json:"deviceName"`
EnableCloudService bool `json:"enableCloudService"`
}
type CommonResponse ¶
type ContactSensorDevice ¶ added in v0.3.2
type ContactSensorDevice struct {
CommonDeviceListItem
}
func (*ContactSensorDevice) GetAnyStatusBody ¶ added in v0.3.5
func (device *ContactSensorDevice) GetAnyStatusBody() (any, error)
GetAnyStatusBody returns the status of the device as a value of type `any`
func (*ContactSensorDevice) GetStatus ¶ added in v0.3.2
func (device *ContactSensorDevice) GetStatus() (*ContactSensorDeviceStatusResponse, error)
type ContactSensorDeviceStatusBody ¶ added in v0.3.2
type ContactSensorDeviceStatusResponse ¶ added in v0.3.2
type ContactSensorDeviceStatusResponse struct {
CommonResponse
Body *ContactSensorDeviceStatusBody `json:"body"`
}
type ControlRequest ¶ added in v0.2.0
type CurtainDevice ¶ added in v0.2.0
type CurtainDevice struct {
CommonDeviceListItem
CurtainDevicesIds []string `json:"curtainDevicesIds"`
Calibrate bool `json:"calibrate"`
Group bool `json:"group"`
Master bool `json:"master"`
OpenDirection string `json:"openDirection"`
}
func (*CurtainDevice) ExecCommand ¶ added in v0.4.0
func (device *CurtainDevice) ExecCommand(jsonString string) (*CommonResponse, error)
ExecCommand sends a command to the CurtainDevice
func (*CurtainDevice) GetAnyStatusBody ¶ added in v0.3.5
func (device *CurtainDevice) GetAnyStatusBody() (any, error)
GetAnyStatusBody returns the status of the device as a value of type `any`
func (*CurtainDevice) GetCommandParameterJSONSchema ¶ added in v0.4.0
func (device *CurtainDevice) GetCommandParameterJSONSchema() (string, error)
GetCommandParameterJSONSchema returns the JSON schema for the CurtainDevice command parameter
func (*CurtainDevice) GetStatus ¶ added in v0.3.2
func (device *CurtainDevice) GetStatus() (*CurtainDeviceStatusResponse, error)
func (*CurtainDevice) Pause ¶ added in v0.2.0
func (device *CurtainDevice) Pause() (*CommonResponse, error)
Pause sends a command to pause the CurtainDevice
func (*CurtainDevice) SetPosition ¶ added in v0.2.0
func (device *CurtainDevice) SetPosition(mode CurtainPositionMode, position int) (*CommonResponse, error)
SetPosition sends a command to set the position of the CurtainDevice
func (*CurtainDevice) TurnOff ¶ added in v0.2.0
func (device *CurtainDevice) TurnOff() (*CommonResponse, error)
TurnOff sends a command to turn off the CurtainDevice
func (*CurtainDevice) TurnOn ¶ added in v0.2.0
func (device *CurtainDevice) TurnOn() (*CommonResponse, error)
TurnOn sends a command to turn on the CurtainDevice
type CurtainDeviceCommandParameter ¶ added in v0.4.0
type CurtainDeviceCommandParameter struct {
Command string `` /* 234-byte string literal not displayed */
Mode string `json:"mode" title:"Mode" enum:"0,1,ff" description:"0:performance mode, 1:silent mode, ff:default mode"`
Position int `json:"position" title:"Position" minimum:"0" maximum:"100"`
// contains filtered or unexported fields
}
CurtainDeviceCommandParameter is a struct that represents the command parameter for the CurtainDevice
func (*CurtainDeviceCommandParameter) JSONSchemaIf ¶ added in v0.4.0
func (parameter *CurtainDeviceCommandParameter) JSONSchemaIf() interface{}
JSONSchemaIf returns the JSON schema if block for the CurtainDevice command parameter
func (*CurtainDeviceCommandParameter) JSONSchemaThen ¶ added in v0.4.0
func (parameter *CurtainDeviceCommandParameter) JSONSchemaThen() interface{}
JSONSchemaThen returns the JSON schema then block for the CurtainDevice command parameter
type CurtainDeviceStatusBody ¶ added in v0.3.2
type CurtainDeviceStatusResponse ¶ added in v0.3.2
type CurtainDeviceStatusResponse struct {
CommonResponse
Body *CurtainDeviceStatusBody `json:"body"`
}
type CurtainPositionMode ¶ added in v0.3.3
type CurtainPositionMode string
const ( CurtainPositionModePerformance CurtainPositionMode = "0" CurtainPositionModeSilent CurtainPositionMode = "1" CurtainPositionModeDefault CurtainPositionMode = "ff" )
type DeviceIDGettable ¶ added in v0.3.6
type DeviceIDGettable interface {
GetDeviceID() string
}
type EvaporativeHumidifierDevice ¶ added in v0.3.2
type EvaporativeHumidifierDevice struct {
CommonDeviceListItem
}
func (*EvaporativeHumidifierDevice) ExecCommand ¶ added in v0.4.0
func (device *EvaporativeHumidifierDevice) ExecCommand(jsonString string) (*CommonResponse, error)
ExecCommand sends a command to the EvaporativeHumidifierDevice
func (*EvaporativeHumidifierDevice) GetAnyStatusBody ¶ added in v0.3.5
func (device *EvaporativeHumidifierDevice) GetAnyStatusBody() (any, error)
GetAnyStatusBody returns the status of the device as a value of type `any`
func (*EvaporativeHumidifierDevice) GetCommandParameterJSONSchema ¶ added in v0.4.0
func (device *EvaporativeHumidifierDevice) GetCommandParameterJSONSchema() (string, error)
GetCommandParameterJSONSchema returns the JSON schema for the EvaporativeHumidifierDevice command parameter
func (*EvaporativeHumidifierDevice) GetStatus ¶ added in v0.3.2
func (device *EvaporativeHumidifierDevice) GetStatus() (*EvaporativeHumidifierDeviceStatusResponse, error)
func (*EvaporativeHumidifierDevice) SetChildLock ¶ added in v0.3.2
func (device *EvaporativeHumidifierDevice) SetChildLock(flag bool) (*CommonResponse, error)
SetChildLock sends a command to set the child lock of the EvaporativeHumidifierDevice
func (*EvaporativeHumidifierDevice) SetMode ¶ added in v0.3.2
func (device *EvaporativeHumidifierDevice) SetMode(mode EvaporativeHumidifierMode, targetHumidity int) (*CommonResponse, error)
SetMode sends a command to set the mode of the EvaporativeHumidifierDevice
func (*EvaporativeHumidifierDevice) TurnOff ¶ added in v0.3.2
func (device *EvaporativeHumidifierDevice) TurnOff() (*CommonResponse, error)
TurnOff sends a command to turn off the EvaporativeHumidifierDevice
func (*EvaporativeHumidifierDevice) TurnOn ¶ added in v0.3.2
func (device *EvaporativeHumidifierDevice) TurnOn() (*CommonResponse, error)
TurnOn sends a command to turn on the EvaporativeHumidifierDevice
type EvaporativeHumidifierDeviceCommandParameter ¶ added in v0.4.0
type EvaporativeHumidifierDeviceCommandParameter struct {
Command string `` /* 205-byte string literal not displayed */
Mode int `` /* 164-byte string literal not displayed */
TargetHumidity int `json:"targetHumidity" title:"TargetHumidity" minimum:"0" maximum:"100" description:"Target humidity level (0-100%)"`
ChildLock bool `json:"childLock" title:"ChildLock" description:"true:lock, false:unlock"`
// contains filtered or unexported fields
}
EvaporativeHumidifierDeviceCommandParameter is a struct that represents the command parameter for the EvaporativeHumidifierDevice
func (*EvaporativeHumidifierDeviceCommandParameter) JSONSchemaAllOf ¶ added in v0.4.0
func (parameter *EvaporativeHumidifierDeviceCommandParameter) JSONSchemaAllOf() []interface{}
JSONSchemaAllOf returns the JSON schema allOf block for the EvaporativeHumidifierDevice command parameter
type EvaporativeHumidifierDeviceCommandSetChildLockIfExposer ¶ added in v0.4.0
type EvaporativeHumidifierDeviceCommandSetChildLockIfExposer struct{}
EvaporativeHumidifierDeviceCommandSetChildLockIfExposer represents the SetChildLock command parameters
func (*EvaporativeHumidifierDeviceCommandSetChildLockIfExposer) JSONSchemaIf ¶ added in v0.4.0
func (parameter *EvaporativeHumidifierDeviceCommandSetChildLockIfExposer) JSONSchemaIf() interface{}
JSONSchemaIf returns the JSON schema if block for the EvaporativeHumidifierDevice command parameter for SetChildLock
func (*EvaporativeHumidifierDeviceCommandSetChildLockIfExposer) JSONSchemaThen ¶ added in v0.4.0
func (parameter *EvaporativeHumidifierDeviceCommandSetChildLockIfExposer) JSONSchemaThen() interface{}
JSONSchemaThen returns the JSON schema then block for the EvaporativeHumidifierDevice command parameter for SetChildLock
type EvaporativeHumidifierDeviceCommandSetModeIfExposer ¶ added in v0.4.0
type EvaporativeHumidifierDeviceCommandSetModeIfExposer struct{}
EvaporativeHumidifierDeviceCommandSetModeIfExposer represents the SetMode command parameters
func (*EvaporativeHumidifierDeviceCommandSetModeIfExposer) JSONSchemaIf ¶ added in v0.4.0
func (parameter *EvaporativeHumidifierDeviceCommandSetModeIfExposer) JSONSchemaIf() interface{}
JSONSchemaIf returns the JSON schema if block for the EvaporativeHumidifierDevice command parameter for SetMode
func (*EvaporativeHumidifierDeviceCommandSetModeIfExposer) JSONSchemaThen ¶ added in v0.4.0
func (parameter *EvaporativeHumidifierDeviceCommandSetModeIfExposer) JSONSchemaThen() interface{}
JSONSchemaThen returns the JSON schema then block for the EvaporativeHumidifierDevice command parameter for SetMode
type EvaporativeHumidifierDeviceFilterElement ¶ added in v0.3.2
type EvaporativeHumidifierDeviceStatusBody ¶ added in v0.3.2
type EvaporativeHumidifierDeviceStatusBody struct {
CommonDevice
Power string `json:"power"`
Humidity int `json:"humidity"`
Mode int `json:"mode"`
Drying bool `json:"drying"`
ChildLock bool `json:"childLock"`
FilterElement EvaporativeHumidifierDeviceFilterElement `json:"filterElement"`
Version int `json:"version"`
}
type EvaporativeHumidifierDeviceStatusResponse ¶ added in v0.3.2
type EvaporativeHumidifierDeviceStatusResponse struct {
CommonResponse
Body *EvaporativeHumidifierDeviceStatusBody `json:"body"`
}
type EvaporativeHumidifierMode ¶ added in v0.3.2
type EvaporativeHumidifierMode int
type EvaporativeHumidifierModeParam ¶ added in v0.3.4
type EvaporativeHumidifierModeParam struct {
Mode EvaporativeHumidifierMode `json:"mode"`
TargetHumidity int `json:"targetHumidity"`
}
EvaporativeHumidifierModeParam represents the parameters for setting the mode of the EvaporativeHumidifierDevice.
type ExecutableCommandDevice ¶ added in v0.4.0
type ExecutableCommandDevice interface {
GetCommandParameterJSONSchema() (string, error)
ExecCommand(jsonString string) (*CommonResponse, error)
}
type FloorCleaningAction ¶ added in v0.3.2
type FloorCleaningAction string
FloorCleaningAction represents the action to be performed floor cleaning mode.
const ( FloorCleaningActionSweep FloorCleaningAction = "sweep" FloorCleaningActionSweepMop FloorCleaningAction = "sweep_mop" )
type FloorCleaningActionCombo ¶ added in v0.5.0
type FloorCleaningActionCombo string
FloorCleaningActionCombo represents the action to be performed in floor cleaning mode for Combo devices.
const ( FloorCleaningActionSweepCombo FloorCleaningActionCombo = "sweep" FloorCleaningActionMopCombo FloorCleaningActionCombo = "mop" )
type FloorCleaningComboParam ¶ added in v0.5.0
FloorCleaningComboParam represents the parameters for floor cleaning mode for Combo devices.
func NewFloorCleaningComboParam ¶ added in v0.5.0
func NewFloorCleaningComboParam(fanLevel int, times int) (*FloorCleaningComboParam, error)
NewFloorCleaningComboParam creates a new FloorCleaningComboParam instance with validation.
type FloorCleaningParam ¶ added in v0.3.2
type FloorCleaningParam struct {
FanLevel int `json:"fanLevel"`
WaterLevel int `json:"waterLevel"`
Times int `json:"times"`
}
FloorCleaningParam represents the parameters for floor cleaning mode.
func NewFloorCleaningParam ¶ added in v0.3.2
func NewFloorCleaningParam(fanLevel int, waterLevel int, times int) (*FloorCleaningParam, error)
NewFloorCleaningParam creates a new FloorCleaningParam instance with validation.
type GarageDoorOpenerDevice ¶ added in v0.5.0
type GarageDoorOpenerDevice struct {
CommonDeviceListItem
}
GarageDoorOpenerDevice represents a SwitchBot Garage Door Opener device
func (*GarageDoorOpenerDevice) ExecCommand ¶ added in v0.5.0
func (device *GarageDoorOpenerDevice) ExecCommand(jsonString string) (*CommonResponse, error)
ExecCommand sends a command to the GarageDoorOpenerDevice
func (*GarageDoorOpenerDevice) GetAnyStatusBody ¶ added in v0.5.0
func (device *GarageDoorOpenerDevice) GetAnyStatusBody() (any, error)
GetAnyStatusBody returns the status of the device as a value of type `any`
func (*GarageDoorOpenerDevice) GetCommandParameterJSONSchema ¶ added in v0.5.0
func (device *GarageDoorOpenerDevice) GetCommandParameterJSONSchema() (string, error)
GetCommandParameterJSONSchema returns the JSON schema for the GarageDoorOpenerDevice command parameter
func (*GarageDoorOpenerDevice) GetStatus ¶ added in v0.5.0
func (device *GarageDoorOpenerDevice) GetStatus() (*GarageDoorOpenerDeviceStatusResponse, error)
GetStatus retrieves the current status of the GarageDoorOpenerDevice
func (*GarageDoorOpenerDevice) TurnOff ¶ added in v0.5.0
func (device *GarageDoorOpenerDevice) TurnOff() (*CommonResponse, error)
TurnOff sends a command to turn off the GarageDoorOpenerDevice
func (*GarageDoorOpenerDevice) TurnOn ¶ added in v0.5.0
func (device *GarageDoorOpenerDevice) TurnOn() (*CommonResponse, error)
TurnOn sends a command to turn on the GarageDoorOpenerDevice
type GarageDoorOpenerDeviceCommandParameter ¶ added in v0.5.0
type GarageDoorOpenerDeviceCommandParameter struct {
Command string `` /* 141-byte string literal not displayed */
// contains filtered or unexported fields
}
GarageDoorOpenerDeviceCommandParameter is a struct that represents the command parameter for the GarageDoorOpenerDevice
type GarageDoorOpenerDeviceStatusBody ¶ added in v0.5.0
type GarageDoorOpenerDeviceStatusBody struct {
CommonDevice
DoorStatus int `json:"doorStatus"`
Online bool `json:"online"`
Version string `json:"version"`
}
GarageDoorOpenerDeviceStatusBody represents the status of a Garage Door Opener device
type GarageDoorOpenerDeviceStatusResponse ¶ added in v0.5.0
type GarageDoorOpenerDeviceStatusResponse struct {
CommonResponse
Body *GarageDoorOpenerDeviceStatusBody `json:"body"`
}
GarageDoorOpenerDeviceStatusResponse represents the response from getting the status of a Garage Door Opener device
type GetDevicesResponse ¶
type GetDevicesResponse struct {
CommonResponse
Body GetDevicesResponseBody `json:"body"`
}
type GetDevicesResponseBody ¶
type GetDevicesResponseBody struct {
DeviceList []interface{} `json:"deviceList"`
InfraredRemoteList []interface{} `json:"infraredRemoteList"`
}
type Hub2Device ¶ added in v0.2.0
type Hub2Device struct {
CommonDeviceListItem
}
func (*Hub2Device) GetAnyStatusBody ¶ added in v0.3.5
func (device *Hub2Device) GetAnyStatusBody() (any, error)
GetAnyStatusBody returns the status of the device as a value of type `any`
func (*Hub2Device) GetStatus ¶ added in v0.2.0
func (device *Hub2Device) GetStatus() (*Hub2DeviceStatusResponse, error)
type Hub2DeviceStatusBody ¶ added in v0.2.0
type Hub2DeviceStatusBody struct {
CommonDevice
Temperature float64 `json:"temperature"`
LightLevel int `json:"lightLevel"`
Version string `json:"version"`
Humidity int `json:"humidity"`
}
type Hub2DeviceStatusResponse ¶ added in v0.2.0
type Hub2DeviceStatusResponse struct {
CommonResponse
Body *Hub2DeviceStatusBody `json:"body"`
}
type Hub3Device ¶ added in v0.5.0
type Hub3Device struct {
CommonDeviceListItem
}
func (*Hub3Device) GetAnyStatusBody ¶ added in v0.5.0
func (device *Hub3Device) GetAnyStatusBody() (any, error)
GetAnyStatusBody returns the status of the device as a value of type `any`
func (*Hub3Device) GetStatus ¶ added in v0.5.0
func (device *Hub3Device) GetStatus() (*Hub3DeviceStatusResponse, error)
type Hub3DeviceStatusBody ¶ added in v0.5.0
type Hub3DeviceStatusResponse ¶ added in v0.5.0
type Hub3DeviceStatusResponse struct {
CommonResponse
Body *Hub3DeviceStatusBody `json:"body"`
}
type HubDevice ¶
type HubDevice struct {
CommonDeviceListItem
}
type HumidifierDevice ¶ added in v0.3.2
type HumidifierDevice struct {
CommonDeviceListItem
}
func (*HumidifierDevice) ExecCommand ¶ added in v0.4.0
func (device *HumidifierDevice) ExecCommand(jsonString string) (*CommonResponse, error)
ExecCommand sends a command to the HumidifierDevice
func (*HumidifierDevice) GetAnyStatusBody ¶ added in v0.3.5
func (device *HumidifierDevice) GetAnyStatusBody() (any, error)
GetAnyStatusBody returns the status of the device as a value of type `any`
func (*HumidifierDevice) GetCommandParameterJSONSchema ¶ added in v0.4.0
func (device *HumidifierDevice) GetCommandParameterJSONSchema() (string, error)
GetCommandParameterJSONSchema returns the JSON schema for the HumidifierDevice command parameter
func (*HumidifierDevice) GetStatus ¶ added in v0.3.2
func (device *HumidifierDevice) GetStatus() (*HumidifierDeviceStatusResponse, error)
func (*HumidifierDevice) SetMode ¶ added in v0.3.2
func (device *HumidifierDevice) SetMode(mode HumidifierMode) (*CommonResponse, error)
SetMode sends a command to set the mode of the HumidifierDevice
func (*HumidifierDevice) SetTargetHumidity ¶ added in v0.3.2
func (device *HumidifierDevice) SetTargetHumidity(targetHumidity int) (*CommonResponse, error)
SetTargetHumidity sends a command to set the target humidity of the HumidifierDevice
func (*HumidifierDevice) TurnOff ¶ added in v0.3.2
func (device *HumidifierDevice) TurnOff() (*CommonResponse, error)
TurnOff sends a command to turn off the HumidifierDevice
func (*HumidifierDevice) TurnOn ¶ added in v0.3.2
func (device *HumidifierDevice) TurnOn() (*CommonResponse, error)
TurnOn sends a command to turn on the HumidifierDevice
type HumidifierDeviceCommandParameter ¶ added in v0.4.0
type HumidifierDeviceCommandParameter struct {
Command string `` /* 254-byte string literal not displayed */
Mode string `json:"mode" title:"Mode" enum:"Auto,Low,Medium,High" description:"Auto: auto mode, Low:34%, Medium:67%, High:100%"`
TargetHumidity int `json:"targetHumidity" title:"TargetHumidity" minimum:"0" maximum:"100" description:"Target humidity level (0-100%)"`
// contains filtered or unexported fields
}
HumidifierDeviceCommandParameter is a struct that represents the command parameter for the HumidifierDevice
func (*HumidifierDeviceCommandParameter) JSONSchemaAllOf ¶ added in v0.4.0
func (parameter *HumidifierDeviceCommandParameter) JSONSchemaAllOf() []interface{}
JSONSchemaAllOf returns the JSON schema allOf block for the HumidifierDevice command parameter
type HumidifierDeviceCommandSetModeIfExposer ¶ added in v0.4.0
type HumidifierDeviceCommandSetModeIfExposer struct{}
HumidifierDeviceCommandSetModeIfExposer represents the SetMode command parameters
func (*HumidifierDeviceCommandSetModeIfExposer) JSONSchemaIf ¶ added in v0.4.0
func (parameter *HumidifierDeviceCommandSetModeIfExposer) JSONSchemaIf() interface{}
JSONSchemaIf returns the JSON schema if block for the HumidifierDevice command parameter for SetMode
func (*HumidifierDeviceCommandSetModeIfExposer) JSONSchemaThen ¶ added in v0.4.0
func (parameter *HumidifierDeviceCommandSetModeIfExposer) JSONSchemaThen() interface{}
JSONSchemaThen returns the JSON schema then block for the HumidifierDevice command parameter for SetMode
type HumidifierDeviceCommandSetTargetHumidityIfExposer ¶ added in v0.4.0
type HumidifierDeviceCommandSetTargetHumidityIfExposer struct{}
HumidifierDeviceCommandSetTargetHumidityIfExposer represents the SetTargetHumidity command parameters
func (*HumidifierDeviceCommandSetTargetHumidityIfExposer) JSONSchemaIf ¶ added in v0.4.0
func (parameter *HumidifierDeviceCommandSetTargetHumidityIfExposer) JSONSchemaIf() interface{}
JSONSchemaIf returns the JSON schema if block for the HumidifierDevice command parameter for SetTargetHumidity
func (*HumidifierDeviceCommandSetTargetHumidityIfExposer) JSONSchemaThen ¶ added in v0.4.0
func (parameter *HumidifierDeviceCommandSetTargetHumidityIfExposer) JSONSchemaThen() interface{}
JSONSchemaThen returns the JSON schema then block for the HumidifierDevice command parameter for SetTargetHumidity
type HumidifierDeviceStatusBody ¶ added in v0.3.2
type HumidifierDeviceStatusBody struct {
CommonDevice
Power string `json:"power"`
Humidity int `json:"humidity"`
Temperature int `json:"temperature"`
NebulizationEfficiency int `json:"nebulizationEfficiency"`
Auto bool `json:"auto"`
ChildLock bool `json:"childLock"`
Sound bool `json:"sound"`
LackWater bool `json:"lackWater"`
}
type HumidifierDeviceStatusResponse ¶ added in v0.3.2
type HumidifierDeviceStatusResponse struct {
CommonResponse
Body *HumidifierDeviceStatusBody `json:"body"`
}
type HumidifierMode ¶ added in v0.3.2
type HumidifierMode int
type IndoorCamDevice ¶ added in v0.3.2
type IndoorCamDevice struct {
CommonDeviceListItem
}
type InfraredRemoteAirConditionerDevice ¶ added in v0.3.0
type InfraredRemoteAirConditionerDevice struct {
InfraredRemoteDevice
}
InfraredRemoteAirConditionerDevice represents an infrared remote-controlled air conditioner device.
func (*InfraredRemoteAirConditionerDevice) ExecCommand ¶ added in v0.4.0
func (device *InfraredRemoteAirConditionerDevice) ExecCommand(jsonString string) (*CommonResponse, error)
ExecCommand sends a command to the InfraredRemoteAirConditionerDevice
func (*InfraredRemoteAirConditionerDevice) GetCommandParameterJSONSchema ¶ added in v0.4.0
func (device *InfraredRemoteAirConditionerDevice) GetCommandParameterJSONSchema() (string, error)
GetCommandParameterJSONSchema returns the JSON schema for the InfraredRemoteAirConditionerDevice command parameter
func (*InfraredRemoteAirConditionerDevice) SetAll ¶ added in v0.3.0
func (device *InfraredRemoteAirConditionerDevice) SetAll( temperatureCelsius int, mode AirConditionerMode, fan AirConditionerFanMode, powerState AirConditionerPowerState, ) (*CommonResponse, error)
SetAll sends a command to configure all parameters of the InfraredRemoteAirConditionerDevice
type InfraredRemoteAirConditionerDeviceCommandParameter ¶ added in v0.4.0
type InfraredRemoteAirConditionerDeviceCommandParameter struct {
Command string `` /* 218-byte string literal not displayed */
TemperatureCelsius int `` /* 131-byte string literal not displayed */
Mode int `json:"mode" title:"Mode" minimum:"1" maximum:"5" description:"Mode (1:auto, 2:cool, 3:dry, 4:fan, 5:heat)"`
Fan int `json:"fan" title:"Fan" minimum:"1" maximum:"4" description:"Fan mode (1:auto, 2:low, 3:medium, 4:high)"`
PowerState string `json:"powerState" title:"Power State" enum:"on,off" description:"Power state (on/off)"`
// contains filtered or unexported fields
}
InfraredRemoteAirConditionerDeviceCommandParameter is a struct that represents the command parameter for the InfraredRemoteAirConditionerDevice
func (*InfraredRemoteAirConditionerDeviceCommandParameter) JSONSchemaAllOf ¶ added in v0.4.0
func (parameter *InfraredRemoteAirConditionerDeviceCommandParameter) JSONSchemaAllOf() []interface{}
JSONSchemaAllOf returns the JSON schema allOf block for the InfraredRemoteAirConditionerDevice command parameter
type InfraredRemoteAirConditionerDeviceCommandSetAllIfExposer ¶ added in v0.4.0
type InfraredRemoteAirConditionerDeviceCommandSetAllIfExposer struct{}
InfraredRemoteAirConditionerDeviceCommandSetAllIfExposer represents the SetAll command parameters
func (*InfraredRemoteAirConditionerDeviceCommandSetAllIfExposer) JSONSchemaIf ¶ added in v0.4.0
func (parameter *InfraredRemoteAirConditionerDeviceCommandSetAllIfExposer) JSONSchemaIf() interface{}
JSONSchemaIf returns the JSON schema if block for the InfraredRemoteAirConditionerDevice command parameter for SetAll
func (*InfraredRemoteAirConditionerDeviceCommandSetAllIfExposer) JSONSchemaThen ¶ added in v0.4.0
func (parameter *InfraredRemoteAirConditionerDeviceCommandSetAllIfExposer) JSONSchemaThen() interface{}
JSONSchemaThen returns the JSON schema then block for the InfraredRemoteAirConditionerDevice command parameter for SetAll
type InfraredRemoteAirPurifierDevice ¶ added in v0.3.0
type InfraredRemoteAirPurifierDevice struct {
InfraredRemoteDevice
}
InfraredRemoteAirPurifierDevice represents an infrared remote-controlled air purifier device.
type InfraredRemoteCameraDevice ¶ added in v0.3.0
type InfraredRemoteCameraDevice struct {
InfraredRemoteDevice
}
InfraredRemoteCameraDevice represents an infrared remote-controlled camera device.
type InfraredRemoteDevice ¶ added in v0.3.0
type InfraredRemoteDevice struct {
Client *Client
DeviceID string `json:"deviceId"`
DeviceName string `json:"deviceName"`
RemoteType string `json:"remoteType"`
HubDeviceId string `json:"hubDeviceId"`
}
func (*InfraredRemoteDevice) GetDeviceID ¶ added in v0.3.7
func (device *InfraredRemoteDevice) GetDeviceID() string
func (*InfraredRemoteDevice) TurnOff ¶ added in v0.3.0
func (device *InfraredRemoteDevice) TurnOff() (*CommonResponse, error)
TurnOff sends a command to turn off the InfraredRemoteDevice
func (*InfraredRemoteDevice) TurnOn ¶ added in v0.3.0
func (device *InfraredRemoteDevice) TurnOn() (*CommonResponse, error)
TurnOn sends a command to turn on the InfraredRemoteDevice
type InfraredRemoteDvdPlayerDevice ¶ added in v0.3.0
type InfraredRemoteDvdPlayerDevice struct {
InfraredRemoteDevice
}
InfraredRemoteDvdPlayerDevice represents an infrared remote-controlled DVD player device.
func (*InfraredRemoteDvdPlayerDevice) ExecCommand ¶ added in v0.4.0
func (device *InfraredRemoteDvdPlayerDevice) ExecCommand(jsonString string) (*CommonResponse, error)
ExecCommand sends a command to the InfraredRemoteDvdPlayerDevice
func (*InfraredRemoteDvdPlayerDevice) FastForward ¶ added in v0.3.0
func (device *InfraredRemoteDvdPlayerDevice) FastForward() (*CommonResponse, error)
FastForward sends a command to fast-forward the InfraredRemoteDvdPlayerDevice / InfraredRemoteSpeakerDevice
func (*InfraredRemoteDvdPlayerDevice) GetCommandParameterJSONSchema ¶ added in v0.4.0
func (device *InfraredRemoteDvdPlayerDevice) GetCommandParameterJSONSchema() (string, error)
GetCommandParameterJSONSchema returns the JSON schema for the InfraredRemoteDvdPlayerDevice command parameter
func (*InfraredRemoteDvdPlayerDevice) Next ¶ added in v0.3.0
func (device *InfraredRemoteDvdPlayerDevice) Next() (*CommonResponse, error)
Next sends a command to play the next track on the InfraredRemoteDvdPlayerDevice / InfraredRemoteSpeakerDevice
func (*InfraredRemoteDvdPlayerDevice) Pause ¶ added in v0.3.0
func (device *InfraredRemoteDvdPlayerDevice) Pause() (*CommonResponse, error)
Pause sends a command to pause the InfraredRemoteDvdPlayerDevice / InfraredRemoteSpeakerDevice
func (*InfraredRemoteDvdPlayerDevice) Play ¶ added in v0.3.0
func (device *InfraredRemoteDvdPlayerDevice) Play() (*CommonResponse, error)
Play sends a command to play/resume the InfraredRemoteDvdPlayerDevice / InfraredRemoteSpeakerDevice
func (*InfraredRemoteDvdPlayerDevice) Previous ¶ added in v0.3.0
func (device *InfraredRemoteDvdPlayerDevice) Previous() (*CommonResponse, error)
Previous sends a command to play the previous track on the InfraredRemoteDvdPlayerDevice / InfraredRemoteSpeakerDevice
func (*InfraredRemoteDvdPlayerDevice) Rewind ¶ added in v0.3.0
func (device *InfraredRemoteDvdPlayerDevice) Rewind() (*CommonResponse, error)
Rewind sends a command to rewind the InfraredRemoteDvdPlayerDevice / InfraredRemoteSpeakerDevice
func (*InfraredRemoteDvdPlayerDevice) SetMute ¶ added in v0.3.0
func (device *InfraredRemoteDvdPlayerDevice) SetMute() (*CommonResponse, error)
SetMute sends a command to mute/unmute the InfraredRemoteDvdPlayerDevice / InfraredRemoteSpeakerDevice
func (*InfraredRemoteDvdPlayerDevice) Stop ¶ added in v0.3.0
func (device *InfraredRemoteDvdPlayerDevice) Stop() (*CommonResponse, error)
Stop sends a command to stop the InfraredRemoteDvdPlayerDevice / InfraredRemoteSpeakerDevice
type InfraredRemoteDvdPlayerDeviceCommandParameter ¶ added in v0.4.0
type InfraredRemoteDvdPlayerDeviceCommandParameter struct {
Command string `` /* 342-byte string literal not displayed */
// contains filtered or unexported fields
}
InfraredRemoteDvdPlayerDeviceCommandParameter is a struct that represents the command parameter for the InfraredRemoteDvdPlayerDevice
type InfraredRemoteFanDevice ¶ added in v0.3.0
type InfraredRemoteFanDevice struct {
InfraredRemoteDevice
}
InfraredRemoteFanDevice represents an infrared remote-controlled fan device.
func (*InfraredRemoteFanDevice) ExecCommand ¶ added in v0.4.0
func (device *InfraredRemoteFanDevice) ExecCommand(jsonString string) (*CommonResponse, error)
ExecCommand sends a command to the InfraredRemoteFanDevice
func (*InfraredRemoteFanDevice) GetCommandParameterJSONSchema ¶ added in v0.4.0
func (device *InfraredRemoteFanDevice) GetCommandParameterJSONSchema() (string, error)
GetCommandParameterJSONSchema returns the JSON schema for the InfraredRemoteFanDevice command parameter
func (*InfraredRemoteFanDevice) HighSpeed ¶ added in v0.3.0
func (device *InfraredRemoteFanDevice) HighSpeed() (*CommonResponse, error)
HighSpeed sends a command to set the fan speed to high on the InfraredRemoteFanDevice
func (*InfraredRemoteFanDevice) LowSpeed ¶ added in v0.3.0
func (device *InfraredRemoteFanDevice) LowSpeed() (*CommonResponse, error)
LowSpeed sends a command to set the fan speed to low on the InfraredRemoteFanDevice
func (*InfraredRemoteFanDevice) MiddleSpeed ¶ added in v0.3.0
func (device *InfraredRemoteFanDevice) MiddleSpeed() (*CommonResponse, error)
MiddleSpeed sends a command to set the fan speed to middle on the InfraredRemoteFanDevice
func (*InfraredRemoteFanDevice) Swing ¶ added in v0.3.0
func (device *InfraredRemoteFanDevice) Swing() (*CommonResponse, error)
Swing sends a command to enable/disable the swing feature of the InfraredRemoteFanDevice
func (*InfraredRemoteFanDevice) Timer ¶ added in v0.3.0
func (device *InfraredRemoteFanDevice) Timer() (*CommonResponse, error)
Timer sends a command to set the timer of the InfraredRemoteFanDevice
type InfraredRemoteFanDeviceCommandParameter ¶ added in v0.4.0
type InfraredRemoteFanDeviceCommandParameter struct {
Command string `` /* 328-byte string literal not displayed */
// contains filtered or unexported fields
}
InfraredRemoteFanDeviceCommandParameter is a struct that represents the command parameter for the InfraredRemoteFanDevice
type InfraredRemoteLightDevice ¶ added in v0.3.0
type InfraredRemoteLightDevice struct {
InfraredRemoteDevice
}
InfraredRemoteLightDevice represents an infrared remote-controlled light device.
func (*InfraredRemoteLightDevice) BrightnessDown ¶ added in v0.3.0
func (device *InfraredRemoteLightDevice) BrightnessDown() (*CommonResponse, error)
BrightnessDown sends a command to decrease the brightness of the InfraredRemoteLightDevice
func (*InfraredRemoteLightDevice) BrightnessUp ¶ added in v0.3.0
func (device *InfraredRemoteLightDevice) BrightnessUp() (*CommonResponse, error)
BrightnessUp sends a command to increase the brightness of the InfraredRemoteLightDevice
func (*InfraredRemoteLightDevice) ExecCommand ¶ added in v0.4.0
func (device *InfraredRemoteLightDevice) ExecCommand(jsonString string) (*CommonResponse, error)
ExecCommand sends a command to the InfraredRemoteLightDevice
func (*InfraredRemoteLightDevice) GetCommandParameterJSONSchema ¶ added in v0.4.0
func (device *InfraredRemoteLightDevice) GetCommandParameterJSONSchema() (string, error)
GetCommandParameterJSONSchema returns the JSON schema for the InfraredRemoteLightDevice command parameter
type InfraredRemoteLightDeviceCommandParameter ¶ added in v0.4.0
type InfraredRemoteLightDeviceCommandParameter struct {
Command string `` /* 233-byte string literal not displayed */
// contains filtered or unexported fields
}
InfraredRemoteLightDeviceCommandParameter is a struct that represents the command parameter for the InfraredRemoteLightDevice
type InfraredRemoteOthersDevice ¶ added in v0.3.0
type InfraredRemoteOthersDevice struct {
Client *Client
DeviceID string `json:"deviceId"`
DeviceName string `json:"deviceName"`
RemoteType string `json:"remoteType"`
HubDeviceId string `json:"hubDeviceId"`
}
InfraredRemoteOthersDevice represents an infrared remote-controlled device of other types.
func (*InfraredRemoteOthersDevice) CustomCommand ¶ added in v0.3.0
func (device *InfraredRemoteOthersDevice) CustomCommand(buttonName string) (*CommonResponse, error)
CustomCommand sends a user-defined command to the InfraredRemoteOthersDevice
func (*InfraredRemoteOthersDevice) GetDeviceID ¶ added in v0.3.7
func (device *InfraredRemoteOthersDevice) GetDeviceID() string
type InfraredRemoteProjectorDevice ¶ added in v0.3.0
type InfraredRemoteProjectorDevice struct {
InfraredRemoteDevice
}
InfraredRemoteProjectorDevice represents an infrared remote-controlled projector device.
type InfraredRemoteRobotVacuumCleanerDevice ¶ added in v0.3.0
type InfraredRemoteRobotVacuumCleanerDevice struct {
InfraredRemoteDevice
}
InfraredRemoteRobotVacuumCleanerDevice represents an infrared remote-controlled robot vacuum cleaner device.
type InfraredRemoteSetTopBoxDevice ¶ added in v0.3.0
type InfraredRemoteSetTopBoxDevice struct {
InfraredRemoteTVDevice
}
InfraredRemoteSetTopBoxDevice represents an infrared remote-controlled set-top box device.
type InfraredRemoteSpeakerDevice ¶ added in v0.3.0
type InfraredRemoteSpeakerDevice struct {
InfraredRemoteDvdPlayerDevice
}
InfraredRemoteSpeakerDevice represents an infrared remote-controlled speaker device.
func (*InfraredRemoteSpeakerDevice) ExecCommand ¶ added in v0.4.0
func (device *InfraredRemoteSpeakerDevice) ExecCommand(jsonString string) (*CommonResponse, error)
ExecCommand sends a command to the InfraredRemoteSpeakerDevice
func (*InfraredRemoteSpeakerDevice) GetCommandParameterJSONSchema ¶ added in v0.4.0
func (device *InfraredRemoteSpeakerDevice) GetCommandParameterJSONSchema() (string, error)
GetCommandParameterJSONSchema returns the JSON schema for the InfraredRemoteSpeakerDevice command parameter
func (*InfraredRemoteSpeakerDevice) VolumeAdd ¶ added in v0.3.0
func (device *InfraredRemoteSpeakerDevice) VolumeAdd() (*CommonResponse, error)
VolumeAdd sends a command to increase the volume of the InfraredRemoteSpeakerDevice
func (*InfraredRemoteSpeakerDevice) VolumeSub ¶ added in v0.3.0
func (device *InfraredRemoteSpeakerDevice) VolumeSub() (*CommonResponse, error)
VolumeSub sends a command to decrease the volume of the InfraredRemoteSpeakerDevice
type InfraredRemoteSpeakerDeviceCommandParameter ¶ added in v0.4.0
type InfraredRemoteSpeakerDeviceCommandParameter struct {
Command string `` /* 410-byte string literal not displayed */
// contains filtered or unexported fields
}
InfraredRemoteSpeakerDeviceCommandParameter is a struct that represents the command parameter for the InfraredRemoteSpeakerDevice
type InfraredRemoteStreamerDevice ¶ added in v0.3.0
type InfraredRemoteStreamerDevice struct {
InfraredRemoteTVDevice
}
InfraredRemoteStreamerDevice represents an infrared remote-controlled streamer device.
type InfraredRemoteTVDevice ¶ added in v0.3.0
type InfraredRemoteTVDevice struct {
InfraredRemoteDevice
}
InfraredRemoteTVDevice represents an infrared remote-controlled TV device.
func (*InfraredRemoteTVDevice) ChannelAdd ¶ added in v0.3.0
func (device *InfraredRemoteTVDevice) ChannelAdd() (*CommonResponse, error)
ChannelAdd sends a command to increase the channel of the InfraredRemoteTVDevice / InfraredRemoteStreamerDevice / InfraredRemoteSetTopBoxDevice
func (*InfraredRemoteTVDevice) ChannelSub ¶ added in v0.4.0
func (device *InfraredRemoteTVDevice) ChannelSub() (*CommonResponse, error)
ChannelSub sends a command to decrease the channel of the InfraredRemoteTVDevice / InfraredRemoteStreamerDevice / InfraredRemoteSetTopBoxDevice
func (*InfraredRemoteTVDevice) ExecCommand ¶ added in v0.4.0
func (device *InfraredRemoteTVDevice) ExecCommand(jsonString string) (*CommonResponse, error)
ExecCommand sends a command to the InfraredRemoteTVDevice
func (*InfraredRemoteTVDevice) GetCommandParameterJSONSchema ¶ added in v0.4.0
func (device *InfraredRemoteTVDevice) GetCommandParameterJSONSchema() (string, error)
GetCommandParameterJSONSchema returns the JSON schema for the InfraredRemoteTVDevice command parameter
func (*InfraredRemoteTVDevice) SetChannel ¶ added in v0.3.0
func (device *InfraredRemoteTVDevice) SetChannel(channel int) (*CommonResponse, error)
SetChannel sends a command to set the channel of the InfraredRemoteTVDevice / InfraredRemoteStreamerDevice / InfraredRemoteSetTopBoxDevice
func (*InfraredRemoteTVDevice) VolumeAdd ¶ added in v0.3.0
func (device *InfraredRemoteTVDevice) VolumeAdd() (*CommonResponse, error)
VolumeAdd sends a command to increase the volume of the InfraredRemoteTVDevice / InfraredRemoteStreamerDevice / InfraredRemoteSetTopBoxDevice
func (*InfraredRemoteTVDevice) VolumeSub ¶ added in v0.3.0
func (device *InfraredRemoteTVDevice) VolumeSub() (*CommonResponse, error)
VolumeSub sends a command to decrease the volume of the InfraredRemoteTVDevice / InfraredRemoteStreamerDevice / InfraredRemoteSetTopBoxDevice
type InfraredRemoteTVDeviceCommandParameter ¶ added in v0.4.0
type InfraredRemoteTVDeviceCommandParameter struct {
Command string `` /* 328-byte string literal not displayed */
Channel int `json:"channel" title:"Channel" minimum:"1" description:"Channel number for SetChannel command"`
// contains filtered or unexported fields
}
InfraredRemoteTVDeviceCommandParameter is a struct that represents the command parameter for the InfraredRemoteTVDevice
func (*InfraredRemoteTVDeviceCommandParameter) JSONSchemaAllOf ¶ added in v0.4.0
func (parameter *InfraredRemoteTVDeviceCommandParameter) JSONSchemaAllOf() []interface{}
JSONSchemaAllOf returns the JSON schema allOf block for the InfraredRemoteTVDevice command parameter
type InfraredRemoteTVDeviceCommandSetChannelIfExposer ¶ added in v0.4.0
type InfraredRemoteTVDeviceCommandSetChannelIfExposer struct{}
InfraredRemoteTVDeviceCommandSetChannelIfExposer represents the SetChannel command parameters
func (*InfraredRemoteTVDeviceCommandSetChannelIfExposer) JSONSchemaIf ¶ added in v0.4.0
func (parameter *InfraredRemoteTVDeviceCommandSetChannelIfExposer) JSONSchemaIf() interface{}
JSONSchemaIf returns the JSON schema if block for the InfraredRemoteTVDevice command parameter for SetChannel
func (*InfraredRemoteTVDeviceCommandSetChannelIfExposer) JSONSchemaThen ¶ added in v0.4.0
func (parameter *InfraredRemoteTVDeviceCommandSetChannelIfExposer) JSONSchemaThen() interface{}
JSONSchemaThen returns the JSON schema then block for the InfraredRemoteTVDevice command parameter for SetChannel
type InfraredRemoteWaterHeaterDevice ¶ added in v0.3.0
type InfraredRemoteWaterHeaterDevice struct {
InfraredRemoteDevice
}
InfraredRemoteWaterHeaterDevice represents an infrared remote-controlled water heater device.
type KeyListItem ¶ added in v0.3.2
type KeypadDevice ¶ added in v0.3.2
type KeypadDevice struct {
CommonDeviceListItem
LockDevicesIds []string `json:"lockDevicesIds"`
KeyList []KeyListItem `json:"keyList"`
}
func (*KeypadDevice) CreateKey ¶ added in v0.3.2
func (device *KeypadDevice) CreateKey(keypadKey *KeypadKey) (*CommonResponse, error)
CreateKey sends a command to create a new key for the KeypadDevice. Note: The result of this request is not returned by this method but is asynchronously returned via a webhook.
func (*KeypadDevice) DeleteKey ¶ added in v0.3.2
func (device *KeypadDevice) DeleteKey(id string) (*CommonResponse, error)
DeleteKey sends a command to delete a key from the KeypadDevice. Note: The result of this request is not returned by this method but is asynchronously returned via a webhook.
func (*KeypadDevice) ExecCommand ¶ added in v0.4.0
func (device *KeypadDevice) ExecCommand(jsonString string) (*CommonResponse, error)
ExecCommand sends a command to the KeypadDevice
func (*KeypadDevice) GetAnyStatusBody ¶ added in v0.3.5
func (device *KeypadDevice) GetAnyStatusBody() (any, error)
GetAnyStatusBody returns the status of the device as a value of type `any`
func (*KeypadDevice) GetCommandParameterJSONSchema ¶ added in v0.4.0
func (device *KeypadDevice) GetCommandParameterJSONSchema() (string, error)
GetCommandParameterJSONSchema returns the JSON schema for the KeypadDevice command parameter
func (*KeypadDevice) GetStatus ¶ added in v0.3.2
func (device *KeypadDevice) GetStatus() (*KeypadStatusResponse, error)
type KeypadDeviceCommandCreateNormalKeyIfExposer ¶ added in v0.4.0
type KeypadDeviceCommandCreateNormalKeyIfExposer struct{}
KeypadDeviceCommandCreateNormalKeyIfExposer represents the CreateKey command parameters for types: permanent and urgent.
func (*KeypadDeviceCommandCreateNormalKeyIfExposer) JSONSchemaIf ¶ added in v0.4.0
func (parameter *KeypadDeviceCommandCreateNormalKeyIfExposer) JSONSchemaIf() interface{}
JSONSchemaIf returns the JSON schema if block for the KeypadDeviceCommandCreateNormalKeyIfExposer parameter
func (*KeypadDeviceCommandCreateNormalKeyIfExposer) JSONSchemaThen ¶ added in v0.4.0
func (parameter *KeypadDeviceCommandCreateNormalKeyIfExposer) JSONSchemaThen() interface{}
JSONSchemaThen returns the JSON schema then block for the KeypadDeviceCommandCreateNormalKeyIfExposer parameter
type KeypadDeviceCommandCreateTimeLimitKeyIfExposer ¶ added in v0.4.0
type KeypadDeviceCommandCreateTimeLimitKeyIfExposer struct{}
KeypadDeviceCommandCreateTimeLimitKeyIfExposer represents the CreateKey command parameters for type: timeLimit and disposable
func (*KeypadDeviceCommandCreateTimeLimitKeyIfExposer) JSONSchemaIf ¶ added in v0.4.0
func (parameter *KeypadDeviceCommandCreateTimeLimitKeyIfExposer) JSONSchemaIf() interface{}
JSONSchemaIf returns the JSON schema if block for the KeypadDeviceCommandCreateTimeLimitKeyIfExposer parameter
func (*KeypadDeviceCommandCreateTimeLimitKeyIfExposer) JSONSchemaThen ¶ added in v0.4.0
func (parameter *KeypadDeviceCommandCreateTimeLimitKeyIfExposer) JSONSchemaThen() interface{}
JSONSchemaThen returns the JSON schema then block for the KeypadDeviceCommandCreateTimeLimitKeyIfExposer parameter
type KeypadDeviceCommandDeleteKeyIfExposer ¶ added in v0.4.0
type KeypadDeviceCommandDeleteKeyIfExposer struct{}
KeypadDeviceCommandDeleteKeyIfExposer represents the DeleteKey command parameters
func (*KeypadDeviceCommandDeleteKeyIfExposer) JSONSchemaIf ¶ added in v0.4.0
func (parameter *KeypadDeviceCommandDeleteKeyIfExposer) JSONSchemaIf() interface{}
JSONSchemaIf returns the JSON schema if block for the KeypadDeviceCommandCreateNormalKeyIfExposer parameter
func (*KeypadDeviceCommandDeleteKeyIfExposer) JSONSchemaThen ¶ added in v0.4.0
func (parameter *KeypadDeviceCommandDeleteKeyIfExposer) JSONSchemaThen() interface{}
JSONSchemaThen returns the JSON schema then block for the KeypadDeviceCommandCreateNormalKeyIfExposer parameter
type KeypadDeviceCommandParameter ¶ added in v0.4.0
type KeypadDeviceCommandParameter struct {
Command string `` /* 158-byte string literal not displayed */
Id string `json:"id" title:"ID" description:"the id of the passcode"`
Name string `json:"name" title:"Name" description:"a unique name for the passcode"`
Type string `` /* 235-byte string literal not displayed */
Password string `json:"password" title:"Password" pattern:"^[0-9]{6,12}$" description:"a 6 to 12-digit passcode in plain text"`
StartTime int64 `` /* 229-byte string literal not displayed */
EndTime int64 `` /* 222-byte string literal not displayed */
// contains filtered or unexported fields
}
KeypadDeviceCommandParameter is a struct that represents the command parameter for the KeypadDevice
func (*KeypadDeviceCommandParameter) JSONSchemaAllOf ¶ added in v0.4.0
func (parameter *KeypadDeviceCommandParameter) JSONSchemaAllOf() []interface{}
JSONSchemaAllOf returns the JSON schema allOf block for the KeypadDevice command parameter
type KeypadDeviceStatusBody ¶ added in v0.3.2
type KeypadDeviceStatusBody struct {
CommonDevice
}
type KeypadKey ¶ added in v0.3.2
type KeypadStatusResponse ¶ added in v0.3.2
type KeypadStatusResponse struct {
CommonResponse
Body *KeypadDeviceStatusBody `json:"body"`
}
type LockDevice ¶ added in v0.2.0
type LockDevice struct {
CommonDeviceListItem
Group bool `json:"group"`
Master bool `json:"master"`
GroupName string `json:"groupName"`
LockDevicesIds []string `json:"lockDevicesIds"`
}
func (*LockDevice) ExecCommand ¶ added in v0.4.0
func (device *LockDevice) ExecCommand(jsonString string) (*CommonResponse, error)
ExecCommand sends a command to the LockDevice
func (*LockDevice) GetAnyStatusBody ¶ added in v0.3.5
func (device *LockDevice) GetAnyStatusBody() (any, error)
GetAnyStatusBody returns the status of the device as a value of type `any`
func (*LockDevice) GetCommandParameterJSONSchema ¶ added in v0.4.0
func (device *LockDevice) GetCommandParameterJSONSchema() (string, error)
GetCommandParameterJSONSchema returns the JSON schema for the LockDevice command parameter
func (*LockDevice) GetStatus ¶ added in v0.2.0
func (device *LockDevice) GetStatus() (*LockDeviceStatusResponse, error)
func (*LockDevice) Lock ¶ added in v0.2.0
func (device *LockDevice) Lock() (*CommonResponse, error)
Lock sends a command to lock the LockDevice
func (*LockDevice) Unlock ¶ added in v0.2.0
func (device *LockDevice) Unlock() (*CommonResponse, error)
Unlock sends a command to unlock the LockDevice
type LockDeviceCommandParameter ¶ added in v0.4.0
type LockDeviceCommandParameter struct {
Command string `` /* 146-byte string literal not displayed */
// contains filtered or unexported fields
}
LockDeviceCommandParameter is a struct that represents the command parameter for the LockDevice
type LockDeviceStatusBody ¶ added in v0.2.0
type LockDeviceStatusResponse ¶ added in v0.2.0
type LockDeviceStatusResponse struct {
CommonResponse
Body *LockDeviceStatusBody `json:"body"`
}
type LockLiteDevice ¶ added in v0.5.0
type LockLiteDevice struct {
CommonDeviceListItem
Group bool `json:"group"`
Master bool `json:"master"`
GroupName string `json:"groupName"`
LockDevicesIds []string `json:"lockDevicesIds"`
}
func (*LockLiteDevice) ExecCommand ¶ added in v0.5.0
func (device *LockLiteDevice) ExecCommand(jsonString string) (*CommonResponse, error)
ExecCommand sends a command to the LockLiteDevice
func (*LockLiteDevice) GetAnyStatusBody ¶ added in v0.5.0
func (device *LockLiteDevice) GetAnyStatusBody() (any, error)
GetAnyStatusBody returns the status of the device as a value of type `any`
func (*LockLiteDevice) GetCommandParameterJSONSchema ¶ added in v0.5.0
func (device *LockLiteDevice) GetCommandParameterJSONSchema() (string, error)
GetCommandParameterJSONSchema returns the JSON schema for the LockLiteDevice command parameter
func (*LockLiteDevice) GetStatus ¶ added in v0.5.0
func (device *LockLiteDevice) GetStatus() (*LockLiteDeviceStatusResponse, error)
func (*LockLiteDevice) Lock ¶ added in v0.5.0
func (device *LockLiteDevice) Lock() (*CommonResponse, error)
Lock sends a command to lock the LockLiteDevice
func (*LockLiteDevice) Unlock ¶ added in v0.5.0
func (device *LockLiteDevice) Unlock() (*CommonResponse, error)
Unlock sends a command to unlock the LockLiteDevice
type LockLiteDeviceCommandParameter ¶ added in v0.5.0
type LockLiteDeviceCommandParameter struct {
Command string `` /* 146-byte string literal not displayed */
// contains filtered or unexported fields
}
LockLiteDeviceCommandParameter is a struct that represents the command parameter for the LockLiteDevice
type LockLiteDeviceStatusBody ¶ added in v0.5.0
type LockLiteDeviceStatusBody struct {
CommonDevice
Battery int `json:"battery"`
Version string `json:"version"`
LockState string `json:"lockState"`
Calibrate bool `json:"calibrate"`
}
type LockLiteDeviceStatusResponse ¶ added in v0.5.0
type LockLiteDeviceStatusResponse struct {
CommonResponse
Body *LockLiteDeviceStatusBody `json:"body"`
}
type MeterDevice ¶
type MeterDevice struct {
CommonDeviceListItem
}
func (*MeterDevice) GetAnyStatusBody ¶ added in v0.3.5
func (device *MeterDevice) GetAnyStatusBody() (any, error)
GetAnyStatusBody returns the status of the device as a value of type `any`
func (*MeterDevice) GetStatus ¶ added in v0.2.0
func (device *MeterDevice) GetStatus() (*MeterDeviceStatusResponse, error)
type MeterDeviceStatusBody ¶ added in v0.2.0
type MeterDeviceStatusBody struct {
CommonDevice
Temperature float64 `json:"temperature"`
Version string `json:"version"`
Battery int `json:"battery"`
Humidity int `json:"humidity"`
}
type MeterDeviceStatusResponse ¶ added in v0.2.0
type MeterDeviceStatusResponse struct {
CommonResponse
Body *MeterDeviceStatusBody `json:"body"`
}
type MeterProCo2Device ¶
type MeterProCo2Device struct {
CommonDeviceListItem
}
func (*MeterProCo2Device) GetAnyStatusBody ¶ added in v0.3.5
func (device *MeterProCo2Device) GetAnyStatusBody() (any, error)
GetAnyStatusBody returns the status of the device as a value of type `any`
func (*MeterProCo2Device) GetStatus ¶ added in v0.2.0
func (device *MeterProCo2Device) GetStatus() (*MeterProCo2DeviceStatusResponse, error)
type MeterProCo2DeviceStatusBody ¶ added in v0.2.0
type MeterProCo2DeviceStatusResponse ¶ added in v0.2.0
type MeterProCo2DeviceStatusResponse struct {
CommonResponse
Body *MeterProCo2DeviceStatusBody `json:"body"`
}
type MotionSensorDevice ¶
type MotionSensorDevice struct {
CommonDeviceListItem
}
func (*MotionSensorDevice) GetAnyStatusBody ¶ added in v0.3.5
func (device *MotionSensorDevice) GetAnyStatusBody() (any, error)
GetAnyStatusBody returns the status of the device as a value of type `any`
func (*MotionSensorDevice) GetStatus ¶ added in v0.2.0
func (device *MotionSensorDevice) GetStatus() (*MotionSensorDeviceStatusResponse, error)
type MotionSensorDeviceStatusBody ¶ added in v0.2.0
type MotionSensorDeviceStatusResponse ¶ added in v0.2.0
type MotionSensorDeviceStatusResponse struct {
CommonResponse
Body *MotionSensorDeviceStatusBody `json:"body"`
}
type PanTiltCamDevice ¶ added in v0.3.2
type PanTiltCamDevice struct {
CommonDeviceListItem
}
type PlugDevice ¶ added in v0.3.2
type PlugDevice struct {
CommonDeviceListItem
}
func (*PlugDevice) ExecCommand ¶ added in v0.4.0
func (device *PlugDevice) ExecCommand(jsonString string) (*CommonResponse, error)
ExecCommand sends a command to the PlugDevice
func (*PlugDevice) GetAnyStatusBody ¶ added in v0.3.5
func (device *PlugDevice) GetAnyStatusBody() (any, error)
GetAnyStatusBody returns the status of the device as a value of type `any`
func (*PlugDevice) GetCommandParameterJSONSchema ¶ added in v0.4.0
func (device *PlugDevice) GetCommandParameterJSONSchema() (string, error)
GetCommandParameterJSONSchema returns the JSON schema for the PlugDevice command parameter
func (*PlugDevice) GetStatus ¶ added in v0.3.2
func (device *PlugDevice) GetStatus() (*PlugDeviceStatusResponse, error)
func (*PlugDevice) TurnOff ¶ added in v0.3.2
func (device *PlugDevice) TurnOff() (*CommonResponse, error)
TurnOff sends a command to turn off the PlugDevice
func (*PlugDevice) TurnOn ¶ added in v0.3.2
func (device *PlugDevice) TurnOn() (*CommonResponse, error)
TurnOn sends a command to turn on the PlugDevice
type PlugDeviceCommandParameter ¶ added in v0.4.0
type PlugDeviceCommandParameter struct {
Command string `` /* 133-byte string literal not displayed */
// contains filtered or unexported fields
}
PlugDeviceCommandParameter is a struct that represents the command parameter for the PlugDevice
type PlugDeviceStatusBody ¶ added in v0.3.2
type PlugDeviceStatusBody struct {
CommonDevice
Power string `json:"power"`
Version string `json:"version"`
}
type PlugDeviceStatusResponse ¶ added in v0.3.2
type PlugDeviceStatusResponse struct {
CommonResponse
Body *PlugDeviceStatusBody `json:"body"`
}
type PlugMiniDevice ¶ added in v0.3.2
type PlugMiniDevice struct {
CommonDeviceListItem
}
func (*PlugMiniDevice) ExecCommand ¶ added in v0.4.0
func (device *PlugMiniDevice) ExecCommand(jsonString string) (*CommonResponse, error)
ExecCommand sends a command to the PlugMiniDevice
func (*PlugMiniDevice) GetAnyStatusBody ¶ added in v0.3.5
func (device *PlugMiniDevice) GetAnyStatusBody() (any, error)
GetAnyStatusBody returns the status of the device as a value of type `any`
func (*PlugMiniDevice) GetCommandParameterJSONSchema ¶ added in v0.4.0
func (device *PlugMiniDevice) GetCommandParameterJSONSchema() (string, error)
GetCommandParameterJSONSchema returns the JSON schema for the PlugMiniDevice command parameter
func (*PlugMiniDevice) GetStatus ¶ added in v0.3.2
func (device *PlugMiniDevice) GetStatus() (*PlugMiniDeviceStatusResponse, error)
func (*PlugMiniDevice) Toggle ¶ added in v0.3.2
func (device *PlugMiniDevice) Toggle() (*CommonResponse, error)
Toggle sends a command to toggle the PlugMiniDevice
func (*PlugMiniDevice) TurnOff ¶ added in v0.3.2
func (device *PlugMiniDevice) TurnOff() (*CommonResponse, error)
TurnOff sends a command to turn off the PlugMiniDevice
func (*PlugMiniDevice) TurnOn ¶ added in v0.3.2
func (device *PlugMiniDevice) TurnOn() (*CommonResponse, error)
TurnOn sends a command to turn on the PlugMiniDevice
type PlugMiniDeviceCommandParameter ¶ added in v0.4.0
type PlugMiniDeviceCommandParameter struct {
Command string `` /* 170-byte string literal not displayed */
// contains filtered or unexported fields
}
PlugMiniDeviceCommandParameter is a struct that represents the command parameter for the PlugMiniDevice
type PlugMiniDeviceStatusBody ¶ added in v0.3.2
type PlugMiniDeviceStatusResponse ¶ added in v0.3.2
type PlugMiniDeviceStatusResponse struct {
CommonResponse
Body *PlugMiniDeviceStatusBody `json:"body"`
}
type RelaySwitch1Device ¶ added in v0.3.2
type RelaySwitch1Device struct {
CommonDeviceListItem
}
func (*RelaySwitch1Device) ExecCommand ¶ added in v0.4.0
func (device *RelaySwitch1Device) ExecCommand(jsonString string) (*CommonResponse, error)
ExecCommand sends a command to the RelaySwitch1Device
func (*RelaySwitch1Device) GetAnyStatusBody ¶ added in v0.3.5
func (device *RelaySwitch1Device) GetAnyStatusBody() (any, error)
GetAnyStatusBody returns the status of the device as a value of type `any`
func (*RelaySwitch1Device) GetCommandParameterJSONSchema ¶ added in v0.4.0
func (device *RelaySwitch1Device) GetCommandParameterJSONSchema() (string, error)
GetCommandParameterJSONSchema returns the JSON schema for the RelaySwitch1Device command parameter
func (*RelaySwitch1Device) GetStatus ¶ added in v0.3.2
func (device *RelaySwitch1Device) GetStatus() (*RelaySwitch1DeviceStatusResponse, error)
func (*RelaySwitch1Device) SetMode ¶ added in v0.3.2
func (device *RelaySwitch1Device) SetMode(mode RelaySwitchMode) (*CommonResponse, error)
SetMode sends a command to set the mode of the RelaySwitch1Device
func (*RelaySwitch1Device) Toggle ¶ added in v0.3.2
func (device *RelaySwitch1Device) Toggle() (*CommonResponse, error)
Toggle sends a command to toggle the RelaySwitch1Device
func (*RelaySwitch1Device) TurnOff ¶ added in v0.3.2
func (device *RelaySwitch1Device) TurnOff() (*CommonResponse, error)
TurnOff sends a command to turn off the RelaySwitch1Device
func (*RelaySwitch1Device) TurnOn ¶ added in v0.3.2
func (device *RelaySwitch1Device) TurnOn() (*CommonResponse, error)
TurnOn sends a command to turn on the RelaySwitch1Device
type RelaySwitch1DeviceCommandParameter ¶ added in v0.4.0
type RelaySwitch1DeviceCommandParameter struct {
Command string `` /* 244-byte string literal not displayed */
Mode int `` /* 152-byte string literal not displayed */
// contains filtered or unexported fields
}
RelaySwitch1DeviceCommandParameter is a struct that represents the command parameter for the RelaySwitch1Device
func (*RelaySwitch1DeviceCommandParameter) JSONSchemaAllOf ¶ added in v0.4.0
func (parameter *RelaySwitch1DeviceCommandParameter) JSONSchemaAllOf() []interface{}
JSONSchemaAllOf returns the JSON schema allOf block for the RelaySwitch1Device command parameter
type RelaySwitch1DeviceCommandSetModeIfExposer ¶ added in v0.4.0
type RelaySwitch1DeviceCommandSetModeIfExposer struct{}
RelaySwitch1DeviceCommandSetModeIfExposer represents the SetMode command parameters
func (*RelaySwitch1DeviceCommandSetModeIfExposer) JSONSchemaIf ¶ added in v0.4.0
func (parameter *RelaySwitch1DeviceCommandSetModeIfExposer) JSONSchemaIf() interface{}
JSONSchemaIf returns the JSON schema if block for the RelaySwitch1Device command parameter for SetMode
func (*RelaySwitch1DeviceCommandSetModeIfExposer) JSONSchemaThen ¶ added in v0.4.0
func (parameter *RelaySwitch1DeviceCommandSetModeIfExposer) JSONSchemaThen() interface{}
JSONSchemaThen returns the JSON schema then block for the RelaySwitch1Device command parameter for SetMode
type RelaySwitch1DeviceStatusBody ¶ added in v0.3.2
type RelaySwitch1DeviceStatusBody struct {
CommonDevice
SwitchStatus int `json:"switchStatus"`
Version string `json:"version"`
}
type RelaySwitch1DeviceStatusResponse ¶ added in v0.3.2
type RelaySwitch1DeviceStatusResponse struct {
CommonResponse
Body *RelaySwitch1DeviceStatusBody `json:"body"`
}
type RelaySwitch1PMDevice ¶ added in v0.3.2
type RelaySwitch1PMDevice struct {
CommonDeviceListItem
}
func (*RelaySwitch1PMDevice) ExecCommand ¶ added in v0.4.0
func (device *RelaySwitch1PMDevice) ExecCommand(jsonString string) (*CommonResponse, error)
ExecCommand sends a command to the RelaySwitch1PMDevice
func (*RelaySwitch1PMDevice) GetAnyStatusBody ¶ added in v0.3.5
func (device *RelaySwitch1PMDevice) GetAnyStatusBody() (any, error)
GetAnyStatusBody returns the status of the device as a value of type `any`
func (*RelaySwitch1PMDevice) GetCommandParameterJSONSchema ¶ added in v0.4.0
func (device *RelaySwitch1PMDevice) GetCommandParameterJSONSchema() (string, error)
GetCommandParameterJSONSchema returns the JSON schema for the RelaySwitch1PMDevice command parameter
func (*RelaySwitch1PMDevice) GetStatus ¶ added in v0.3.2
func (device *RelaySwitch1PMDevice) GetStatus() (*RelaySwitch1PMDeviceStatusResponse, error)
func (*RelaySwitch1PMDevice) SetMode ¶ added in v0.3.2
func (device *RelaySwitch1PMDevice) SetMode(mode RelaySwitchMode) (*CommonResponse, error)
SetMode sends a command to set the mode of the RelaySwitch1PMDevice
func (*RelaySwitch1PMDevice) Toggle ¶ added in v0.3.2
func (device *RelaySwitch1PMDevice) Toggle() (*CommonResponse, error)
Toggle sends a command to toggle the RelaySwitch1PMDevice
func (*RelaySwitch1PMDevice) TurnOff ¶ added in v0.3.2
func (device *RelaySwitch1PMDevice) TurnOff() (*CommonResponse, error)
TurnOff sends a command to turn off the RelaySwitch1PMDevice
func (*RelaySwitch1PMDevice) TurnOn ¶ added in v0.3.2
func (device *RelaySwitch1PMDevice) TurnOn() (*CommonResponse, error)
TurnOn sends a command to turn on the RelaySwitch1PMDevice
type RelaySwitch1PMDeviceStatusBody ¶ added in v0.3.2
type RelaySwitch1PMDeviceStatusResponse ¶ added in v0.3.2
type RelaySwitch1PMDeviceStatusResponse struct {
CommonResponse
Body *RelaySwitch1PMDeviceStatusBody `json:"body"`
}
type RelaySwitch2PMDevice ¶ added in v0.5.0
type RelaySwitch2PMDevice struct {
CommonDeviceListItem
}
RelaySwitch2PMDevice represents a SwitchBot Relay Switch 2PM device
func (*RelaySwitch2PMDevice) ExecCommand ¶ added in v0.5.0
func (device *RelaySwitch2PMDevice) ExecCommand(jsonString string) (*CommonResponse, error)
ExecCommand sends a command to the RelaySwitch2PMDevice
func (*RelaySwitch2PMDevice) GetAnyStatusBody ¶ added in v0.5.0
func (device *RelaySwitch2PMDevice) GetAnyStatusBody() (any, error)
GetAnyStatusBody returns the status of the device as a value of type `any`
func (*RelaySwitch2PMDevice) GetCommandParameterJSONSchema ¶ added in v0.5.0
func (device *RelaySwitch2PMDevice) GetCommandParameterJSONSchema() (string, error)
GetCommandParameterJSONSchema returns the JSON schema for the RelaySwitch2PMDevice command parameter
func (*RelaySwitch2PMDevice) GetStatus ¶ added in v0.5.0
func (device *RelaySwitch2PMDevice) GetStatus() (*RelaySwitch2PMDeviceStatusResponse, error)
GetStatus retrieves the current status of the RelaySwitch2PMDevice
func (*RelaySwitch2PMDevice) SetMode ¶ added in v0.5.0
func (device *RelaySwitch2PMDevice) SetMode(switchNum int, mode RelaySwitchMode) (*CommonResponse, error)
SetMode sends a command to set the mode of the RelaySwitch2PMDevice
func (*RelaySwitch2PMDevice) Toggle ¶ added in v0.5.0
func (device *RelaySwitch2PMDevice) Toggle(switchNum int) (*CommonResponse, error)
Toggle sends a command to toggle the specified switch of the RelaySwitch2PMDevice switchNum: 1 for switch 1, 2 for switch 2
func (*RelaySwitch2PMDevice) TurnOff ¶ added in v0.5.0
func (device *RelaySwitch2PMDevice) TurnOff(switchNum int) (*CommonResponse, error)
TurnOff sends a command to turn off the specified switch of the RelaySwitch2PMDevice switchNum: 1 for switch 1, 2 for switch 2
func (*RelaySwitch2PMDevice) TurnOn ¶ added in v0.5.0
func (device *RelaySwitch2PMDevice) TurnOn(switchNum int) (*CommonResponse, error)
TurnOn sends a command to turn on the specified switch of the RelaySwitch2PMDevice switchNum: 1 for switch 1, 2 for switch 2
type RelaySwitch2PMDeviceCommandParameter ¶ added in v0.5.0
type RelaySwitch2PMDeviceCommandParameter struct {
Command string `` /* 244-byte string literal not displayed */
Switch int `json:"switch" title:"Switch" minimum:"1" maximum:"2" description:"Switch number (1 or 2)" required:"true"`
Mode int `` /* 152-byte string literal not displayed */
// contains filtered or unexported fields
}
RelaySwitch2PMDeviceCommandParameter is a struct that represents the command parameter for the RelaySwitch2PMDevice
func (*RelaySwitch2PMDeviceCommandParameter) JSONSchemaAllOf ¶ added in v0.5.0
func (parameter *RelaySwitch2PMDeviceCommandParameter) JSONSchemaAllOf() []interface{}
JSONSchemaAllOf returns the JSON schema allOf block for the RelaySwitch2PMDevice command parameter
type RelaySwitch2PMDeviceCommandSetModeIfExposer ¶ added in v0.5.0
type RelaySwitch2PMDeviceCommandSetModeIfExposer struct{}
RelaySwitch2PMDeviceCommandSetModeIfExposer represents the SetMode command parameters
func (*RelaySwitch2PMDeviceCommandSetModeIfExposer) JSONSchemaIf ¶ added in v0.5.0
func (parameter *RelaySwitch2PMDeviceCommandSetModeIfExposer) JSONSchemaIf() interface{}
JSONSchemaIf returns the JSON schema if block for the RelaySwitch2PMDevice command parameter for SetMode
func (*RelaySwitch2PMDeviceCommandSetModeIfExposer) JSONSchemaThen ¶ added in v0.5.0
func (parameter *RelaySwitch2PMDeviceCommandSetModeIfExposer) JSONSchemaThen() interface{}
JSONSchemaThen returns the JSON schema then block for the RelaySwitch2PMDevice command parameter for SetMode
type RelaySwitch2PMDeviceStatusBody ¶ added in v0.5.0
type RelaySwitch2PMDeviceStatusBody struct {
CommonDevice
Online bool `json:"online"`
Switch1Status int `json:"switch1Status"`
Switch2Status int `json:"switch2Status"`
Switch1Voltage int `json:"switch1voltage"`
Switch2Voltage int `json:"switch2voltage"`
Version string `json:"version"`
Switch1Power int `json:"switch1power"`
Switch2Power int `json:"switch2power"`
Switch1UsedElectricity int `json:"switch1usedElectricity"`
Switch2UsedElectricity int `json:"switch2usedElectricity"`
Switch1ElectricCurrent int `json:"switch1electricCurrent"`
Switch2ElectricCurrent int `json:"switch2electricCurrent"`
Calibrate bool `json:"calibrate"`
Position int `json:"position"`
IsStuck string `json:"isStuck"`
}
RelaySwitch2PMDeviceStatusBody represents the status of a Relay Switch 2PM device
type RelaySwitch2PMDeviceStatusResponse ¶ added in v0.5.0
type RelaySwitch2PMDeviceStatusResponse struct {
CommonResponse
Body *RelaySwitch2PMDeviceStatusBody `json:"body"`
}
RelaySwitch2PMDeviceStatusResponse represents the response from getting the status of a Relay Switch 2PM device
type RelaySwitchMode ¶ added in v0.3.2
type RelaySwitchMode int
type RemoteDevice ¶
type RemoteDevice struct {
CommonDeviceListItem
}
type ResponseParser ¶
func GetDeviceStatusResponseParser ¶
func GetDeviceStatusResponseParser(response interface{}) ResponseParser
func GetDevicesResponseParser ¶
func GetDevicesResponseParser(response *GetDevicesResponse) ResponseParser
type RobotVacuumCleanerComboDevice ¶ added in v0.5.0
type RobotVacuumCleanerComboDevice struct {
CommonDeviceListItem
}
func (*RobotVacuumCleanerComboDevice) ChangeParam ¶ added in v0.5.0
func (device *RobotVacuumCleanerComboDevice) ChangeParam(floorCleaningParam *FloorCleaningParam) (*CommonResponse, error)
ChangeParam sends a command to change the cleaning parameters of the RobotVacuumCleanerComboDevice.
func (*RobotVacuumCleanerComboDevice) Dock ¶ added in v0.5.0
func (device *RobotVacuumCleanerComboDevice) Dock() (*CommonResponse, error)
Dock sends a command to return the RobotVacuumCleanerComboDevice to its charging dock.
func (*RobotVacuumCleanerComboDevice) ExecCommand ¶ added in v0.5.0
func (device *RobotVacuumCleanerComboDevice) ExecCommand(jsonString string) (*CommonResponse, error)
ExecCommand sends a command to the RobotVacuumCleanerComboDevice
func (*RobotVacuumCleanerComboDevice) GetAnyStatusBody ¶ added in v0.5.0
func (device *RobotVacuumCleanerComboDevice) GetAnyStatusBody() (any, error)
GetAnyStatusBody returns the status of the device as a value of type `any`
func (*RobotVacuumCleanerComboDevice) GetCommandParameterJSONSchema ¶ added in v0.5.0
func (device *RobotVacuumCleanerComboDevice) GetCommandParameterJSONSchema() (string, error)
GetCommandParameterJSONSchema returns the JSON schema for the RobotVacuumCleanerComboDevice command parameter
func (*RobotVacuumCleanerComboDevice) GetStatus ¶ added in v0.5.0
func (device *RobotVacuumCleanerComboDevice) GetStatus() (*RobotVacuumCleanerComboDeviceStatusResponse, error)
GetStatus retrieves the status of the RobotVacuumCleanerComboDevice
func (*RobotVacuumCleanerComboDevice) Pause ¶ added in v0.5.0
func (device *RobotVacuumCleanerComboDevice) Pause() (*CommonResponse, error)
Pause sends a command to pause the RobotVacuumCleanerComboDevice.
func (*RobotVacuumCleanerComboDevice) SetVolume ¶ added in v0.5.0
func (device *RobotVacuumCleanerComboDevice) SetVolume(volume int) (*CommonResponse, error)
SetVolume sends a command to set the volume of the RobotVacuumCleanerComboDevice.
func (*RobotVacuumCleanerComboDevice) StartClean ¶ added in v0.5.0
func (device *RobotVacuumCleanerComboDevice) StartClean(startFloorCleaningParam *StartFloorCleaningComboParam) (*CommonResponse, error)
StartClean sends a command to start cleaning the RobotVacuumCleanerComboDevice.
type RobotVacuumCleanerComboDeviceCommandChangeParamIfExposer ¶ added in v0.5.0
type RobotVacuumCleanerComboDeviceCommandChangeParamIfExposer struct{}
RobotVacuumCleanerComboDeviceCommandChangeParamIfExposer represents the changeParam command parameters
func (*RobotVacuumCleanerComboDeviceCommandChangeParamIfExposer) JSONSchemaIf ¶ added in v0.5.0
func (parameter *RobotVacuumCleanerComboDeviceCommandChangeParamIfExposer) JSONSchemaIf() interface{}
JSONSchemaIf returns the JSON schema if block for the RobotVacuumCleanerComboDevice command parameter for changeParam
func (*RobotVacuumCleanerComboDeviceCommandChangeParamIfExposer) JSONSchemaThen ¶ added in v0.5.0
func (parameter *RobotVacuumCleanerComboDeviceCommandChangeParamIfExposer) JSONSchemaThen() interface{}
JSONSchemaThen returns the JSON schema then block for the RobotVacuumCleanerComboDevice command parameter for changeParam
type RobotVacuumCleanerComboDeviceCommandParameter ¶ added in v0.5.0
type RobotVacuumCleanerComboDeviceCommandParameter struct {
Command string `` /* 257-byte string literal not displayed */
Action string `json:"action" title:"Action" enum:"sweep,mop" description:"sweep:sweep only, mop:mop only"`
FanLevel int `json:"fanLevel" title:"FanLevel" minimum:"1" maximum:"4" description:"Fan level (1-4)"`
WaterLevel int `json:"waterLevel" title:"WaterLevel" minimum:"1" maximum:"2" description:"Water level (1-2)"`
Times int `json:"times" title:"Times" minimum:"1" maximum:"2639999" description:"the number of cycles"`
Volume int `json:"volume" title:"Volume" minimum:"0" maximum:"100" description:"Volume level (0-100)"`
// contains filtered or unexported fields
}
RobotVacuumCleanerComboDeviceCommandParameter is a struct that represents the command parameter for the RobotVacuumCleanerComboDevice
func (*RobotVacuumCleanerComboDeviceCommandParameter) JSONSchemaAllOf ¶ added in v0.5.0
func (parameter *RobotVacuumCleanerComboDeviceCommandParameter) JSONSchemaAllOf() []interface{}
JSONSchemaAllOf returns the JSON schema allOf block for the RobotVacuumCleanerComboDevice command parameter
type RobotVacuumCleanerComboDeviceCommandSetVolumeIfExposer ¶ added in v0.5.0
type RobotVacuumCleanerComboDeviceCommandSetVolumeIfExposer struct{}
RobotVacuumCleanerComboDeviceCommandSetVolumeIfExposer represents the setVolume command parameters
func (*RobotVacuumCleanerComboDeviceCommandSetVolumeIfExposer) JSONSchemaIf ¶ added in v0.5.0
func (parameter *RobotVacuumCleanerComboDeviceCommandSetVolumeIfExposer) JSONSchemaIf() interface{}
JSONSchemaIf returns the JSON schema if block for the RobotVacuumCleanerComboDevice command parameter for setVolume
func (*RobotVacuumCleanerComboDeviceCommandSetVolumeIfExposer) JSONSchemaThen ¶ added in v0.5.0
func (parameter *RobotVacuumCleanerComboDeviceCommandSetVolumeIfExposer) JSONSchemaThen() interface{}
JSONSchemaThen returns the JSON schema then block for the RobotVacuumCleanerComboDevice command parameter for setVolume
type RobotVacuumCleanerComboDeviceCommandStartCleanIfExposer ¶ added in v0.5.0
type RobotVacuumCleanerComboDeviceCommandStartCleanIfExposer struct{}
RobotVacuumCleanerComboDeviceCommandStartCleanIfExposer represents the startClean command parameters
func (*RobotVacuumCleanerComboDeviceCommandStartCleanIfExposer) JSONSchemaIf ¶ added in v0.5.0
func (parameter *RobotVacuumCleanerComboDeviceCommandStartCleanIfExposer) JSONSchemaIf() interface{}
JSONSchemaIf returns the JSON schema if block for the RobotVacuumCleanerComboDevice command parameter for startClean
func (*RobotVacuumCleanerComboDeviceCommandStartCleanIfExposer) JSONSchemaThen ¶ added in v0.5.0
func (parameter *RobotVacuumCleanerComboDeviceCommandStartCleanIfExposer) JSONSchemaThen() interface{}
JSONSchemaThen returns the JSON schema then block for the RobotVacuumCleanerComboDevice command parameter for startClean
type RobotVacuumCleanerComboDeviceStatusBody ¶ added in v0.5.0
type RobotVacuumCleanerComboDeviceStatusBody struct {
CommonDevice
WorkingStatus string `json:"workingStatus"`
OnlineStatus string `json:"onlineStatus"`
Battery int `json:"battery"`
TaskType string `json:"taskType"`
}
RobotVacuumCleanerComboDeviceStatusBody represents the status body of a Robot Vacuum Cleaner Combo device
type RobotVacuumCleanerComboDeviceStatusResponse ¶ added in v0.5.0
type RobotVacuumCleanerComboDeviceStatusResponse struct {
CommonResponse
Body *RobotVacuumCleanerComboDeviceStatusBody `json:"body"`
}
RobotVacuumCleanerComboDeviceStatusResponse represents the status response for a Robot Vacuum Cleaner Combo device
type RobotVacuumCleanerDevice ¶ added in v0.3.2
type RobotVacuumCleanerDevice struct {
CommonDeviceListItem
}
func (*RobotVacuumCleanerDevice) Dock ¶ added in v0.3.2
func (device *RobotVacuumCleanerDevice) Dock() (*CommonResponse, error)
Dock sends a command to return the RobotVacuumCleanerDevice to its charging dock.
func (*RobotVacuumCleanerDevice) ExecCommand ¶ added in v0.4.0
func (device *RobotVacuumCleanerDevice) ExecCommand(jsonString string) (*CommonResponse, error)
ExecCommand sends a command to the RobotVacuumCleanerDevice
func (*RobotVacuumCleanerDevice) GetAnyStatusBody ¶ added in v0.3.5
func (device *RobotVacuumCleanerDevice) GetAnyStatusBody() (any, error)
GetAnyStatusBody returns the status of the device as a value of type `any`
func (*RobotVacuumCleanerDevice) GetCommandParameterJSONSchema ¶ added in v0.4.0
func (device *RobotVacuumCleanerDevice) GetCommandParameterJSONSchema() (string, error)
GetCommandParameterJSONSchema returns the JSON schema for the RobotVacuumCleanerDevice command parameter
func (*RobotVacuumCleanerDevice) GetStatus ¶ added in v0.3.2
func (device *RobotVacuumCleanerDevice) GetStatus() (*RobotVacuumCleanerDeviceStatusResponse, error)
func (*RobotVacuumCleanerDevice) SetPowerLevel ¶ added in v0.3.2
func (device *RobotVacuumCleanerDevice) SetPowerLevel(powerLevel RobotVacuumCleanerPowerLevel) (*CommonResponse, error)
SetPowerLevel sends a command to set the suction power level of the RobotVacuumCleanerDevice.
func (*RobotVacuumCleanerDevice) Start ¶ added in v0.3.2
func (device *RobotVacuumCleanerDevice) Start() (*CommonResponse, error)
Start sends a command to start vacuuming the RobotVacuumCleanerDevice
func (*RobotVacuumCleanerDevice) Stop ¶ added in v0.3.2
func (device *RobotVacuumCleanerDevice) Stop() (*CommonResponse, error)
Stop sends a command to stop vacuuming the RobotVacuumCleanerDevice
type RobotVacuumCleanerDeviceCommandParameter ¶ added in v0.4.0
type RobotVacuumCleanerDeviceCommandParameter struct {
Command string `` /* 213-byte string literal not displayed */
PowerLevel int `json:"powerLevel" title:"PowerLevel" minimum:"0" maximum:"3" description:"Power level: 0:Quiet, 1:Standard, 2:Strong, 3:Max"`
// contains filtered or unexported fields
}
RobotVacuumCleanerDeviceCommandParameter is a struct that represents the command parameter for the RobotVacuumCleanerDevice
func (*RobotVacuumCleanerDeviceCommandParameter) JSONSchemaAllOf ¶ added in v0.4.0
func (parameter *RobotVacuumCleanerDeviceCommandParameter) JSONSchemaAllOf() []interface{}
JSONSchemaAllOf returns the JSON schema allOf block for the RobotVacuumCleanerDevice command parameter
type RobotVacuumCleanerDeviceCommandSetPowerLevelIfExposer ¶ added in v0.4.0
type RobotVacuumCleanerDeviceCommandSetPowerLevelIfExposer struct{}
RobotVacuumCleanerDeviceCommandSetPowerLevelIfExposer represents the SetPowerLevel command parameters
func (*RobotVacuumCleanerDeviceCommandSetPowerLevelIfExposer) JSONSchemaIf ¶ added in v0.4.0
func (parameter *RobotVacuumCleanerDeviceCommandSetPowerLevelIfExposer) JSONSchemaIf() interface{}
JSONSchemaIf returns the JSON schema if block for the RobotVacuumCleanerDevice command parameter for SetPowerLevel
func (*RobotVacuumCleanerDeviceCommandSetPowerLevelIfExposer) JSONSchemaThen ¶ added in v0.4.0
func (parameter *RobotVacuumCleanerDeviceCommandSetPowerLevelIfExposer) JSONSchemaThen() interface{}
JSONSchemaThen returns the JSON schema then block for the RobotVacuumCleanerDevice command parameter for SetPowerLevel
type RobotVacuumCleanerDeviceStatusBody ¶ added in v0.3.2
type RobotVacuumCleanerDeviceStatusBody struct {
CommonDevice
WorkingStatus string `json:"workingStatus"`
OnlineStatus string `json:"onlineStatus"`
Battery int `json:"battery"`
}
type RobotVacuumCleanerDeviceStatusResponse ¶ added in v0.3.2
type RobotVacuumCleanerDeviceStatusResponse struct {
CommonResponse
Body *RobotVacuumCleanerDeviceStatusBody `json:"body"`
}
type RobotVacuumCleanerPowerLevel ¶ added in v0.3.2
type RobotVacuumCleanerPowerLevel int
RobotVacuumCleanerPowerLevel represents the power level of the RobotVacuumCleanerDevice.
type RobotVacuumCleanerSDevice ¶ added in v0.5.0
type RobotVacuumCleanerSDevice struct {
CommonDeviceListItem
}
func (*RobotVacuumCleanerSDevice) AddWaterForHumi ¶ added in v0.5.0
func (device *RobotVacuumCleanerSDevice) AddWaterForHumi() (*CommonResponse, error)
AddWaterForHumi sends a command to refill the mind-blowing Evaporative Humidifier (Auto-refill) in the RobotVacuumCleanerSDevice.
func (*RobotVacuumCleanerSDevice) ChangeParam ¶ added in v0.5.0
func (device *RobotVacuumCleanerSDevice) ChangeParam(floorCleaningParam *FloorCleaningParam) (*CommonResponse, error)
ChangeParam sends a command to change the cleaning parameters of the RobotVacuumCleanerSDevice.
func (*RobotVacuumCleanerSDevice) Dock ¶ added in v0.5.0
func (device *RobotVacuumCleanerSDevice) Dock() (*CommonResponse, error)
Dock sends a command to return the RobotVacuumCleanerSDevice to its charging dock.
func (*RobotVacuumCleanerSDevice) ExecCommand ¶ added in v0.5.0
func (device *RobotVacuumCleanerSDevice) ExecCommand(jsonString string) (*CommonResponse, error)
ExecCommand sends a command to the RobotVacuumCleanerSDevice
func (*RobotVacuumCleanerSDevice) GetAnyStatusBody ¶ added in v0.5.0
func (device *RobotVacuumCleanerSDevice) GetAnyStatusBody() (any, error)
GetAnyStatusBody returns the status of the device as a value of type `any`
func (*RobotVacuumCleanerSDevice) GetCommandParameterJSONSchema ¶ added in v0.5.0
func (device *RobotVacuumCleanerSDevice) GetCommandParameterJSONSchema() (string, error)
GetCommandParameterJSONSchema returns the JSON schema for the RobotVacuumCleanerSDevice command parameter
func (*RobotVacuumCleanerSDevice) GetStatus ¶ added in v0.5.0
func (device *RobotVacuumCleanerSDevice) GetStatus() (*RobotVacuumCleanerSDeviceStatusResponse, error)
func (*RobotVacuumCleanerSDevice) Pause ¶ added in v0.5.0
func (device *RobotVacuumCleanerSDevice) Pause() (*CommonResponse, error)
Pause sends a command to pause the RobotVacuumCleanerSDevice.
func (*RobotVacuumCleanerSDevice) SelfClean ¶ added in v0.5.0
func (device *RobotVacuumCleanerSDevice) SelfClean(mode SelfCleaningMode) (*CommonResponse, error)
SelfClean sends a command to start self-cleaning the RobotVacuumCleanerSDevice.
func (*RobotVacuumCleanerSDevice) SetVolume ¶ added in v0.5.0
func (device *RobotVacuumCleanerSDevice) SetVolume(volume int) (*CommonResponse, error)
SetVolume sends a command to set the volume of the RobotVacuumCleanerSDevice.
func (*RobotVacuumCleanerSDevice) StartClean ¶ added in v0.5.0
func (device *RobotVacuumCleanerSDevice) StartClean(startFloorCleaningParam *StartFloorCleaningParam) (*CommonResponse, error)
StartClean sends a command to start cleaning the RobotVacuumCleanerSDevice.
type RobotVacuumCleanerSDeviceCommandChangeParamIfExposer ¶ added in v0.5.0
type RobotVacuumCleanerSDeviceCommandChangeParamIfExposer struct{}
RobotVacuumCleanerSDeviceCommandChangeParamIfExposer represents the ChangeParam command parameters
func (*RobotVacuumCleanerSDeviceCommandChangeParamIfExposer) JSONSchemaIf ¶ added in v0.5.0
func (parameter *RobotVacuumCleanerSDeviceCommandChangeParamIfExposer) JSONSchemaIf() interface{}
JSONSchemaIf returns the JSON schema if block for the RobotVacuumCleanerSDevice command parameter for ChangeParam
func (*RobotVacuumCleanerSDeviceCommandChangeParamIfExposer) JSONSchemaThen ¶ added in v0.5.0
func (parameter *RobotVacuumCleanerSDeviceCommandChangeParamIfExposer) JSONSchemaThen() interface{}
JSONSchemaThen returns the JSON schema then block for the RobotVacuumCleanerSDevice command parameter for ChangeParam
type RobotVacuumCleanerSDeviceCommandParameter ¶ added in v0.5.0
type RobotVacuumCleanerSDeviceCommandParameter struct {
Command string `` /* 353-byte string literal not displayed */
Action string `json:"action" title:"Action" enum:"sweep,sweep_mop" description:"sweep:sweep only, sweep_mop:sweep and mop"`
FanLevel int `json:"fanLevel" title:"FanLevel" minimum:"1" maximum:"4" description:"Fan level (1-4)"`
WaterLevel int `json:"waterLevel" title:"WaterLevel" minimum:"1" maximum:"2" description:"Water level (1-2)"`
Times int `json:"times" title:"Times" minimum:"1" maximum:"2639999" description:"the number of cycles"`
Volume int `json:"volume" title:"Volume" minimum:"0" maximum:"100" description:"Volume level (0-100)"`
Mode int `json:"mode" title:"Mode" minimum:"1" maximum:"3" description:"Self-cleaning mode: 1:wash mop, 2:dry, 3:terminate"`
// contains filtered or unexported fields
}
RobotVacuumCleanerSDeviceCommandParameter is a struct that represents the command parameter for the RobotVacuumCleanerSDevice
func (*RobotVacuumCleanerSDeviceCommandParameter) JSONSchemaAllOf ¶ added in v0.5.0
func (parameter *RobotVacuumCleanerSDeviceCommandParameter) JSONSchemaAllOf() []interface{}
JSONSchemaAllOf returns the JSON schema allOf block for the RobotVacuumCleanerSDevice command parameter
type RobotVacuumCleanerSDeviceCommandSelfCleanIfExposer ¶ added in v0.5.0
type RobotVacuumCleanerSDeviceCommandSelfCleanIfExposer struct{}
RobotVacuumCleanerSDeviceCommandSelfCleanIfExposer represents the SelfClean command parameters
func (*RobotVacuumCleanerSDeviceCommandSelfCleanIfExposer) JSONSchemaIf ¶ added in v0.5.0
func (parameter *RobotVacuumCleanerSDeviceCommandSelfCleanIfExposer) JSONSchemaIf() interface{}
JSONSchemaIf returns the JSON schema if block for the RobotVacuumCleanerSDevice command parameter for SelfClean
func (*RobotVacuumCleanerSDeviceCommandSelfCleanIfExposer) JSONSchemaThen ¶ added in v0.5.0
func (parameter *RobotVacuumCleanerSDeviceCommandSelfCleanIfExposer) JSONSchemaThen() interface{}
JSONSchemaThen returns the JSON schema then block for the RobotVacuumCleanerSDevice command parameter for SelfClean
type RobotVacuumCleanerSDeviceCommandSetVolumeIfExposer ¶ added in v0.5.0
type RobotVacuumCleanerSDeviceCommandSetVolumeIfExposer struct{}
RobotVacuumCleanerSDeviceCommandSetVolumeIfExposer represents the SetVolume command parameters
func (*RobotVacuumCleanerSDeviceCommandSetVolumeIfExposer) JSONSchemaIf ¶ added in v0.5.0
func (parameter *RobotVacuumCleanerSDeviceCommandSetVolumeIfExposer) JSONSchemaIf() interface{}
JSONSchemaIf returns the JSON schema if block for the RobotVacuumCleanerSDevice command parameter for SetVolume
func (*RobotVacuumCleanerSDeviceCommandSetVolumeIfExposer) JSONSchemaThen ¶ added in v0.5.0
func (parameter *RobotVacuumCleanerSDeviceCommandSetVolumeIfExposer) JSONSchemaThen() interface{}
JSONSchemaThen returns the JSON schema then block for the RobotVacuumCleanerSDevice command parameter for SetVolume
type RobotVacuumCleanerSDeviceCommandStartCleanIfExposer ¶ added in v0.5.0
type RobotVacuumCleanerSDeviceCommandStartCleanIfExposer struct{}
RobotVacuumCleanerSDeviceCommandStartCleanIfExposer represents the StartClean command parameters
func (*RobotVacuumCleanerSDeviceCommandStartCleanIfExposer) JSONSchemaIf ¶ added in v0.5.0
func (parameter *RobotVacuumCleanerSDeviceCommandStartCleanIfExposer) JSONSchemaIf() interface{}
JSONSchemaIf returns the JSON schema if block for the RobotVacuumCleanerSDevice command parameter for StartClean
func (*RobotVacuumCleanerSDeviceCommandStartCleanIfExposer) JSONSchemaThen ¶ added in v0.5.0
func (parameter *RobotVacuumCleanerSDeviceCommandStartCleanIfExposer) JSONSchemaThen() interface{}
JSONSchemaThen returns the JSON schema then block for the RobotVacuumCleanerSDevice command parameter for StartClean
type RobotVacuumCleanerSDeviceStatusBody ¶ added in v0.5.0
type RobotVacuumCleanerSDeviceStatusResponse ¶ added in v0.5.0
type RobotVacuumCleanerSDeviceStatusResponse struct {
CommonResponse
Body *RobotVacuumCleanerSDeviceStatusBody `json:"body"`
}
type RollerShadeDevice ¶ added in v0.3.2
type RollerShadeDevice struct {
CommonDeviceListItem
BleVersion string `json:"bleVersion"`
GroupingDevicesIds []string `json:"groupingDevicesIds"`
Group bool `json:"group"`
Master bool `json:"master"`
GroupName string `json:"groupName"`
}
func (*RollerShadeDevice) ExecCommand ¶ added in v0.4.0
func (device *RollerShadeDevice) ExecCommand(jsonString string) (*CommonResponse, error)
ExecCommand sends a command to the RollerShadeDevice
func (*RollerShadeDevice) GetAnyStatusBody ¶ added in v0.3.5
func (device *RollerShadeDevice) GetAnyStatusBody() (any, error)
GetAnyStatusBody returns the status of the device as a value of type `any`
func (*RollerShadeDevice) GetCommandParameterJSONSchema ¶ added in v0.4.0
func (device *RollerShadeDevice) GetCommandParameterJSONSchema() (string, error)
GetCommandParameterJSONSchema returns the JSON schema for the RollerShadeDevice command parameter
func (*RollerShadeDevice) GetStatus ¶ added in v0.3.2
func (device *RollerShadeDevice) GetStatus() (*RollerShadeDeviceStatusResponse, error)
func (*RollerShadeDevice) SetPosition ¶ added in v0.3.2
func (device *RollerShadeDevice) SetPosition(position int) (*CommonResponse, error)
SetPosition sends a command to set the position of the RollerShadeDevice
type RollerShadeDeviceCommandParameter ¶ added in v0.4.0
type RollerShadeDeviceCommandParameter struct {
Command string `json:"command" title:"Command" enum:"SetPosition" description:"SetPosition:set position" required:"true"`
Position int `json:"position" title:"Position" minimum:"0" maximum:"100" description:"Position (0-100)" required:"true"`
// contains filtered or unexported fields
}
RollerShadeDeviceCommandParameter is a struct that represents the command parameter for the RollerShadeDevice
type RollerShadeDeviceStatusBody ¶ added in v0.3.2
type RollerShadeDeviceStatusResponse ¶ added in v0.3.2
type RollerShadeDeviceStatusResponse struct {
CommonResponse
Body *RollerShadeDeviceStatusBody `json:"body"`
}
type SelfCleaningMode ¶ added in v0.3.2
type SelfCleaningMode int
type StartFloorCleaningComboParam ¶ added in v0.5.0
type StartFloorCleaningComboParam struct {
Action FloorCleaningActionCombo `json:"action"`
Param FloorCleaningComboParam `json:"param"`
}
StartFloorCleaningComboParam represents the parameters for starting floor cleaning mode for Combo devices.
func NewStartFloorCleaningComboParam ¶ added in v0.5.0
func NewStartFloorCleaningComboParam(action FloorCleaningActionCombo, fanLevel int, times int) (*StartFloorCleaningComboParam, error)
NewStartFloorCleaningComboParam creates a new StartFloorCleaningComboParam instance with validation.
type StartFloorCleaningParam ¶ added in v0.3.2
type StartFloorCleaningParam struct {
Action FloorCleaningAction `json:"action"`
Param FloorCleaningParam `json:"param"`
}
StartFloorCleaningParam represents the parameters for starting floor cleaning mode.
func NewStartFloorCleaningParam ¶ added in v0.3.2
func NewStartFloorCleaningParam(action FloorCleaningAction, fanLevel int, waterLevel int, times int) (*StartFloorCleaningParam, error)
NewStartFloorCleaningParam creates a new StartFloorCleaningParam instance with validation.
type StatusGettable ¶ added in v0.3.5
StatusGettable is an interface that defines a method to get the status of a device as a value of type `any`
type StripLightDevice ¶ added in v0.3.2
type StripLightDevice struct {
CommonDeviceListItem
}
func (*StripLightDevice) ExecCommand ¶ added in v0.4.0
func (device *StripLightDevice) ExecCommand(jsonString string) (*CommonResponse, error)
ExecCommand sends a command to the StripLightDevice
func (*StripLightDevice) GetAnyStatusBody ¶ added in v0.3.5
func (device *StripLightDevice) GetAnyStatusBody() (any, error)
GetAnyStatusBody returns the status of the device as a value of type `any`
func (*StripLightDevice) GetCommandParameterJSONSchema ¶ added in v0.4.0
func (device *StripLightDevice) GetCommandParameterJSONSchema() (string, error)
GetCommandParameterJSONSchema returns the JSON schema for the StripLightDevice command parameter
func (*StripLightDevice) GetStatus ¶ added in v0.3.2
func (device *StripLightDevice) GetStatus() (*StripLightDeviceStatusResponse, error)
func (*StripLightDevice) SetBrightness ¶ added in v0.3.2
func (device *StripLightDevice) SetBrightness(brightness int) (*CommonResponse, error)
SetBrightness sends a command to set the brightness of the StripLightDevice
func (*StripLightDevice) SetColor ¶ added in v0.3.2
func (device *StripLightDevice) SetColor(color color.RGBA) (*CommonResponse, error)
SetColor sends a command to set the color of the StripLightDevice
func (*StripLightDevice) Toggle ¶ added in v0.3.2
func (device *StripLightDevice) Toggle() (*CommonResponse, error)
Toggle sends a command to toggle the StripLightDevice
func (*StripLightDevice) TurnOff ¶ added in v0.3.2
func (device *StripLightDevice) TurnOff() (*CommonResponse, error)
TurnOff sends a command to turn off the StripLightDevice
func (*StripLightDevice) TurnOn ¶ added in v0.3.2
func (device *StripLightDevice) TurnOn() (*CommonResponse, error)
TurnOn sends a command to turn on the StripLightDevice
type StripLightDeviceCommandParameter ¶ added in v0.4.0
type StripLightDeviceCommandParameter struct {
Command string `` /* 258-byte string literal not displayed */
Brightness int `json:"brightness" title:"Brightness" minimum:"1" maximum:"100" description:"Brightness level (1-100)"`
Red int `json:"red" title:"Red" minimum:"0" maximum:"255" description:"Red color value (0-255)"`
Green int `json:"green" title:"Green" minimum:"0" maximum:"255" description:"Green color value (0-255)"`
Blue int `json:"blue" title:"Blue" minimum:"0" maximum:"255" description:"Blue color value (0-255)"`
// contains filtered or unexported fields
}
StripLightDeviceCommandParameter is a struct that represents the command parameter for the StripLightDevice
func (*StripLightDeviceCommandParameter) JSONSchemaAllOf ¶ added in v0.4.0
func (parameter *StripLightDeviceCommandParameter) JSONSchemaAllOf() []interface{}
JSONSchemaAllOf returns the JSON schema allOf block for the StripLightDevice command parameter
type StripLightDeviceCommandSetBrightnessIfExposer ¶ added in v0.4.0
type StripLightDeviceCommandSetBrightnessIfExposer struct{}
StripLightDeviceCommandSetBrightnessIfExposer represents the SetBrightness command parameters
func (*StripLightDeviceCommandSetBrightnessIfExposer) JSONSchemaIf ¶ added in v0.4.0
func (parameter *StripLightDeviceCommandSetBrightnessIfExposer) JSONSchemaIf() interface{}
JSONSchemaIf returns the JSON schema if block for the StripLightDevice command parameter for SetBrightness
func (*StripLightDeviceCommandSetBrightnessIfExposer) JSONSchemaThen ¶ added in v0.4.0
func (parameter *StripLightDeviceCommandSetBrightnessIfExposer) JSONSchemaThen() interface{}
JSONSchemaThen returns the JSON schema then block for the StripLightDevice command parameter for SetBrightness
type StripLightDeviceCommandSetColorIfExposer ¶ added in v0.4.0
type StripLightDeviceCommandSetColorIfExposer struct{}
StripLightDeviceCommandSetColorIfExposer represents the SetColor command parameters
func (*StripLightDeviceCommandSetColorIfExposer) JSONSchemaIf ¶ added in v0.4.0
func (parameter *StripLightDeviceCommandSetColorIfExposer) JSONSchemaIf() interface{}
JSONSchemaIf returns the JSON schema if block for the StripLightDevice command parameter for SetColor
func (*StripLightDeviceCommandSetColorIfExposer) JSONSchemaThen ¶ added in v0.4.0
func (parameter *StripLightDeviceCommandSetColorIfExposer) JSONSchemaThen() interface{}
JSONSchemaThen returns the JSON schema then block for the StripLightDevice command parameter for SetColor
type StripLightDeviceStatusBody ¶ added in v0.3.2
type StripLightDeviceStatusBody struct {
CommonDevice
Power string `json:"power"`
Version string `json:"version"`
Brightness int `json:"brightness"`
Color string `json:"color"`
}
type StripLightDeviceStatusResponse ¶ added in v0.3.2
type StripLightDeviceStatusResponse struct {
CommonResponse
Body *StripLightDeviceStatusBody `json:"body"`
}
type SwitchableDevice ¶ added in v0.3.5
type SwitchableDevice interface {
TurnOn() (*CommonResponse, error)
TurnOff() (*CommonResponse, error)
}
SwitchableDevice represents a device that can be switched ON or OFF.
type VideoDoorbellDevice ¶ added in v0.5.0
type VideoDoorbellDevice struct {
CommonDeviceListItem
}
VideoDoorbellDevice represents a SwitchBot Video Doorbell device
func (*VideoDoorbellDevice) DisableMotionDetection ¶ added in v0.5.0
func (device *VideoDoorbellDevice) DisableMotionDetection() (*CommonResponse, error)
DisableMotionDetection disables motion detection on the Video Doorbell
func (*VideoDoorbellDevice) EnableMotionDetection ¶ added in v0.5.0
func (device *VideoDoorbellDevice) EnableMotionDetection() (*CommonResponse, error)
EnableMotionDetection enables motion detection on the Video Doorbell
func (*VideoDoorbellDevice) ExecCommand ¶ added in v0.5.0
func (device *VideoDoorbellDevice) ExecCommand(jsonString string) (*CommonResponse, error)
ExecCommand sends a command to the VideoDoorbellDevice
func (*VideoDoorbellDevice) GetAnyStatusBody ¶ added in v0.5.0
func (device *VideoDoorbellDevice) GetAnyStatusBody() (any, error)
GetAnyStatusBody returns the status of the device as a value of type `any`
func (*VideoDoorbellDevice) GetCommandParameterJSONSchema ¶ added in v0.5.0
func (device *VideoDoorbellDevice) GetCommandParameterJSONSchema() (string, error)
GetCommandParameterJSONSchema returns the JSON schema for the VideoDoorbellDevice command parameter
func (*VideoDoorbellDevice) GetStatus ¶ added in v0.5.0
func (device *VideoDoorbellDevice) GetStatus() (*VideoDoorbellDeviceStatusResponse, error)
GetStatus retrieves the current status of the VideoDoorbellDevice
type VideoDoorbellDeviceCommandParameter ¶ added in v0.5.0
type VideoDoorbellDeviceCommandParameter struct {
Command string `` /* 207-byte string literal not displayed */
// contains filtered or unexported fields
}
VideoDoorbellDeviceCommandParameter is a struct that represents the command parameter for the VideoDoorbellDevice
type VideoDoorbellDeviceStatusBody ¶ added in v0.5.0
type VideoDoorbellDeviceStatusBody struct {
CommonDevice
Online bool `json:"online"`
Battery int `json:"battery"`
Version string `json:"version"`
}
VideoDoorbellDeviceStatusBody represents the status body of a Video Doorbell device
type VideoDoorbellDeviceStatusResponse ¶ added in v0.5.0
type VideoDoorbellDeviceStatusResponse struct {
CommonResponse
Body *VideoDoorbellDeviceStatusBody `json:"body"`
}
VideoDoorbellDeviceStatusResponse represents the status response for a Video Doorbell device
type WaterLeakDetectorDevice ¶ added in v0.3.2
type WaterLeakDetectorDevice struct {
CommonDeviceListItem
}
func (*WaterLeakDetectorDevice) GetAnyStatusBody ¶ added in v0.3.5
func (device *WaterLeakDetectorDevice) GetAnyStatusBody() (any, error)
GetAnyStatusBody returns the status of the device as a value of type `any`
func (*WaterLeakDetectorDevice) GetStatus ¶ added in v0.3.2
func (device *WaterLeakDetectorDevice) GetStatus() (*WaterLeakDetectorDeviceStatusResponse, error)
type WaterLeakDetectorDeviceStatusBody ¶ added in v0.3.2
type WaterLeakDetectorDeviceStatusBody struct {
CommonDevice
Battery int `json:"battery"`
Version string `json:"version"`
Status bool `json:"status"`
}
type WaterLeakDetectorDeviceStatusResponse ¶ added in v0.3.2
type WaterLeakDetectorDeviceStatusResponse struct {
CommonResponse
Body *WaterLeakDetectorDeviceStatusBody `json:"body"`
}
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
examples
|
|
|
command_device
command
|
|
|
command_infrared_device
command
|
|
|
get_device_status
command
|
|
|
get_devices
command
|
|
|
get_infrared_devices
command
|
|