Documentation
¶
Index ¶
- type SmartThings
- func (pST *SmartThings) DeviceSwitchOnOff(sDeviceName string, bOn bool) bool
- func (pST *SmartThings) Dump()
- func (pST *SmartThings) FindDevice(sDeviceName string) int
- func (pST *SmartThings) FindScene(sName string) int
- func (pST *SmartThings) GetDeviceList() bool
- func (pST *SmartThings) GetDeviceSwitchStatus(sDeviceName string) (err bool, status StDeviceStatus)
- func (pST *SmartThings) GetSceneList() bool
- func (pST *SmartThings) GetStructDevices() bool
- func (pST *SmartThings) GetStructScenes() bool
- func (pST *SmartThings) GetStructs() bool
- func (pST *SmartThings) PrintDeviceList() bool
- func (pST *SmartThings) PrintSceneList() bool
- func (pST *SmartThings) RunScene(sSceneName string) bool
- func (pST *SmartThings) SetToken(sToken string) bool
- func (pST *SmartThings) ValidateDevice(sDeviceName string) bool
- func (pST *SmartThings) ValidateScene(sName string) bool
- type StDeviceStatus
- type StDevices
- type StScenes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SmartThings ¶
type SmartThings struct {
// contains filtered or unexported fields
}
func New ¶
func New() *SmartThings
func (*SmartThings) DeviceSwitchOnOff ¶
func (pST *SmartThings) DeviceSwitchOnOff(sDeviceName string, bOn bool) bool
func (*SmartThings) Dump ¶
func (pST *SmartThings) Dump()
func (*SmartThings) FindDevice ¶
func (pST *SmartThings) FindDevice(sDeviceName string) int
func (*SmartThings) FindScene ¶
func (pST *SmartThings) FindScene(sName string) int
func (*SmartThings) GetDeviceList ¶
func (pST *SmartThings) GetDeviceList() bool
func (*SmartThings) GetDeviceSwitchStatus ¶
func (pST *SmartThings) GetDeviceSwitchStatus(sDeviceName string) (err bool, status StDeviceStatus)
func (*SmartThings) GetSceneList ¶
func (pST *SmartThings) GetSceneList() bool
func (*SmartThings) GetStructDevices ¶
func (pST *SmartThings) GetStructDevices() bool
func (*SmartThings) GetStructScenes ¶
func (pST *SmartThings) GetStructScenes() bool
func (*SmartThings) GetStructs ¶
func (pST *SmartThings) GetStructs() bool
func (*SmartThings) PrintDeviceList ¶
func (pST *SmartThings) PrintDeviceList() bool
func (*SmartThings) PrintSceneList ¶
func (pST *SmartThings) PrintSceneList() bool
func (*SmartThings) RunScene ¶
func (pST *SmartThings) RunScene(sSceneName string) bool
func (*SmartThings) SetToken ¶
func (pST *SmartThings) SetToken(sToken string) bool
func (*SmartThings) ValidateDevice ¶
func (pST *SmartThings) ValidateDevice(sDeviceName string) bool
func (*SmartThings) ValidateScene ¶
func (pST *SmartThings) ValidateScene(sName string) bool
type StDeviceStatus ¶
type StDevices ¶
type StDevices struct {
Links struct{} `json:"_links"`
Items []struct {
Allowed []interface{} `json:"allowed"`
ChildDevices []struct {
Allowed interface{} `json:"allowed"`
DeviceID string `json:"deviceId"`
Profile struct{} `json:"profile"`
} `json:"childDevices,omitempty"`
Components []struct {
Capabilities []struct {
ID string `json:"id"`
Version float64 `json:"version"`
} `json:"capabilities"`
Categories []struct {
CategoryType string `json:"categoryType"`
Name string `json:"name"`
} `json:"categories"`
ID string `json:"id"`
Label string `json:"label"`
} `json:"components"`
CreateTime time.Time `json:"createTime"`
DeviceID string `json:"deviceId"`
DeviceManufacturerCode string `json:"deviceManufacturerCode,omitempty"`
DeviceNetworkType string `json:"deviceNetworkType,omitempty"`
DeviceTypeID string `json:"deviceTypeId,omitempty"`
DeviceTypeName string `json:"deviceTypeName,omitempty"`
Dth *struct {
CompletedSetup bool `json:"completedSetup"`
DeviceNetworkType string `json:"deviceNetworkType"`
DeviceTypeID string `json:"deviceTypeId"`
DeviceTypeName string `json:"deviceTypeName"`
ExecutingLocally bool `json:"executingLocally"`
HubID string `json:"hubId,omitempty"`
InstalledGroovyAppID string `json:"installedGroovyAppId,omitempty"`
NetworkSecurityLevel string `json:"networkSecurityLevel"`
} `json:"dth,omitempty"`
Label string `json:"label"`
LocationID string `json:"locationId"`
ManufacturerName string `json:"manufacturerName"`
Name string `json:"name"`
Ocf *struct {
FirmwareVersion string `json:"firmwareVersion"`
HwVersion string `json:"hwVersion"`
LastSignupTime time.Time `json:"lastSignupTime"`
Locale string `json:"locale"`
ManufacturerName string `json:"manufacturerName"`
ModelNumber string `json:"modelNumber"`
Name string `json:"name"`
OcfDeviceType string `json:"ocfDeviceType"`
PlatformOS string `json:"platformOS"`
PlatformVersion string `json:"platformVersion"`
SpecVersion string `json:"specVersion"`
VendorID string `json:"vendorId"`
VerticalDomainSpecVersion string `json:"verticalDomainSpecVersion"`
} `json:"ocf,omitempty"`
OwnerID string `json:"ownerId,omitempty"`
ParentDeviceID string `json:"parentDeviceId,omitempty"`
PresentationID string `json:"presentationId"`
Profile *struct {
ID string `json:"id"`
} `json:"profile,omitempty"`
RestrictionTier float64 `json:"restrictionTier"`
RoomID string `json:"roomId,omitempty"`
Type string `json:"type"`
Viper *struct {
HwVersion string `json:"hwVersion,omitempty"`
ManufacturerName string `json:"manufacturerName"`
ModelName string `json:"modelName"`
SwVersion string `json:"swVersion,omitempty"`
UniqueIdentifier string `json:"uniqueIdentifier,omitempty"`
} `json:"viper,omitempty"`
Zwave *struct {
DriverID string `json:"driverId"`
ExecutingLocally bool `json:"executingLocally"`
HubID string `json:"hubId"`
NetworkID string `json:"networkId"`
NetworkSecurityLevel string `json:"networkSecurityLevel"`
ProvisioningState string `json:"provisioningState"`
} `json:"zwave,omitempty"`
} `json:"items"`
}
type StScenes ¶
type StScenes struct {
Links struct {
Next interface{} `json:"next"`
Previous interface{} `json:"previous"`
} `json:"_links"`
Items []struct {
APIVersion string `json:"apiVersion"`
CreatedBy string `json:"createdBy"`
CreatedDate float64 `json:"createdDate"`
Editable bool `json:"editable"`
LastExecutedDate float64 `json:"lastExecutedDate"`
LastUpdatedDate float64 `json:"lastUpdatedDate"`
LocationID string `json:"locationId"`
SceneColor interface{} `json:"sceneColor"`
SceneIcon *string `json:"sceneIcon"`
SceneID string `json:"sceneId"`
SceneName string `json:"sceneName"`
} `json:"items"`
}
Click to show internal directories.
Click to hide internal directories.