characteristic

package
v0.0.31 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 9 Imported by: 26

Documentation

Overview

Package characteristic implements the HomeKit characteristics.

Index

Constants

View Source
const (
	ActiveInactive int = 0
	ActiveActive   int = 1
)
View Source
const (
	AirParticulateSize2_5Μm int = 0
	AirParticulateSize10Μm  int = 1
)
View Source
const (
	AirQualityUnknown   int = 0
	AirQualityExcellent int = 1
	AirQualityGood      int = 2
	AirQualityFair      int = 3
	AirQualityInferior  int = 4
	AirQualityPoor      int = 5
)
View Source
const (
	PermissionRead          = "pr" // The characteristic can only be read by paired controllers.
	PermissionWrite         = "pw" // The characteristic can only be written by paired controllers.
	PermissionTimedWrite    = "tw" // The characteristic allows only timed write procedure.
	PermissionEvents        = "ev" // The characteristic supports events.
	PermissionHidden        = "hd" // The characteristic is hidden from the user.
	PermissionWriteResponse = "wr" // The characteristic supports write response.
)
View Source
const (
	UnitPercentage              = "percentage" // %
	UnitArcDegrees              = "arcdegrees" // °
	UnitCelsius                 = "celsius"    // °C
	UnitLux                     = "lux"        // lux
	UnitSeconds                 = "seconds"    // sec
	UnitPPM                     = "ppm"        // ppm
	UnitMicrogramsPerCubicMeter = "micrograms/m^3"
)
View Source
const (
	FormatString = "string"
	FormatBool   = "bool"
	FormatFloat  = "float"
	FormatUInt8  = "uint8"
	FormatUInt16 = "uint16"
	FormatUInt32 = "uint32"
	FormatInt32  = "int32"
	FormatUInt64 = "uint64"
	FormatData   = "data"
	FormatTLV8   = "tlv8"
)
View Source
const (
	CarbonDioxideDetectedCO2LevelsNormal   int = 0
	CarbonDioxideDetectedCO2LevelsAbnormal int = 1
)
View Source
const (
	CarbonMonoxideDetectedCOLevelsNormal   int = 0
	CarbonMonoxideDetectedCOLevelsAbnormal int = 1
)
View Source
const (
	ChargingStateNotCharging   int = 0
	ChargingStateCharging      int = 1
	ChargingStateNotChargeable int = 2
)
View Source
const (
	ClosedCaptionsDisabled int = 0
	ClosedCaptionsEnabled  int = 1
)
View Source
const (
	ContactSensorStateContactDetected    int = 0
	ContactSensorStateContactNotDetected int = 1
)
View Source
const (
	CurrentAirPurifierStateInactive     int = 0
	CurrentAirPurifierStateIdle         int = 1
	CurrentAirPurifierStatePurifyingAir int = 2
)
View Source
const (
	CurrentDoorStateOpen    int = 0
	CurrentDoorStateClosed  int = 1
	CurrentDoorStateOpening int = 2
	CurrentDoorStateClosing int = 3
	CurrentDoorStateStopped int = 4
)
View Source
const (
	CurrentFanStateInactive   int = 0
	CurrentFanStateIdle       int = 1
	CurrentFanStateBlowingAir int = 2
)
View Source
const (
	CurrentHeaterCoolerStateInactive int = 0
	CurrentHeaterCoolerStateIdle     int = 1
	CurrentHeaterCoolerStateHeating  int = 2
	CurrentHeaterCoolerStateCooling  int = 3
)
View Source
const (
	CurrentHeatingCoolingStateOff  int = 0
	CurrentHeatingCoolingStateHeat int = 1
	CurrentHeatingCoolingStateCool int = 2
)
View Source
const (
	CurrentHumidifierDehumidifierStateInactive      int = 0
	CurrentHumidifierDehumidifierStateIdle          int = 1
	CurrentHumidifierDehumidifierStateHumidifying   int = 2
	CurrentHumidifierDehumidifierStateDehumidifying int = 3
)
View Source
const (
	CurrentMediaStatePlay    int = 0
	CurrentMediaStatePause   int = 1
	CurrentMediaStateStop    int = 2
	CurrentMediaStateUnknown int = 3
)
View Source
const (
	CurrentSlatStateFixed    int = 0
	CurrentSlatStateJammed   int = 1
	CurrentSlatStateSwinging int = 2
)
View Source
const (
	CurrentVisibilityStateShown  int = 0
	CurrentVisibilityStateHidden int = 1
)
View Source
const (
	DiscoverBridgedAccessoriesStartDiscovery int = 0
	DiscoverBridgedAccessoriesStopDiscovery  int = 1
)
View Source
const (
	FilterChangeIndicationFilterOK     int = 0
	FilterChangeIndicationChangeFilter int = 1
)
View Source
const (
	InUseNotInUse int = 0
	InUseInUse    int = 1
)
View Source
const (
	InputDeviceTypeOther       int = 0
	InputDeviceTypeTv          int = 1
	InputDeviceTypeRecording   int = 2
	InputDeviceTypeTuner       int = 3
	InputDeviceTypePlayback    int = 4
	InputDeviceTypeAudioSystem int = 5
)
View Source
const (
	InputSourceTypeOther          int = 0
	InputSourceTypeHomeScreen     int = 1
	InputSourceTypeApplication    int = 10
	InputSourceTypeTuner          int = 2
	InputSourceTypeHdmi           int = 3
	InputSourceTypeCompositeVideo int = 4
	InputSourceTypeSVideo         int = 5
	InputSourceTypeComponentVideo int = 6
	InputSourceTypeDvi            int = 7
	InputSourceTypeAirplay        int = 8
	InputSourceTypeUsb            int = 9
)
View Source
const (
	IsConfiguredNotConfigured int = 0
	IsConfiguredConfigured    int = 1
)
View Source
const (
	LeakDetectedLeakNotDetected int = 0
	LeakDetectedLeakDetected    int = 1
)
View Source
const (
	LockCurrentStateUnsecured int = 0
	LockCurrentStateSecured   int = 1
	LockCurrentStateJammed    int = 2
	LockCurrentStateUnknown   int = 3
)
View Source
const (
	LockLastKnownActionSecuredPhysicallyInterior   int = 0
	LockLastKnownActionUnsecuredPhysicallyInterior int = 1
	LockLastKnownActionSecuredPhysicallyExterior   int = 2
	LockLastKnownActionUnsecuredPhysicallyExterior int = 3
	LockLastKnownActionSecuredByKeypad             int = 4
	LockLastKnownActionUnsecuredByKeypad           int = 5
	LockLastKnownActionSecuredRemotely             int = 6
	LockLastKnownActionUnsecuredRemotely           int = 7
	LockLastKnownActionSecuredByAutoSecureTimeout  int = 8
)
View Source
const (
	LockPhysicalControlsControlLockDisabled int = 0
	LockPhysicalControlsControlLockEnabled  int = 1
)
View Source
const (
	LockTargetStateUnsecured int = 0
	LockTargetStateSecured   int = 1
)
View Source
const (
	OccupancyDetectedOccupancyNotDetected int = 0
	OccupancyDetectedOccupancyDetected    int = 1
)
View Source
const (
	PictureModeOther          int = 0
	PictureModeStandard       int = 1
	PictureModeCalibrated     int = 2
	PictureModeCalibratedDark int = 3
	PictureModeVivid          int = 4
	PictureModeGame           int = 5
	PictureModeComputer       int = 6
	PictureModeCustom         int = 7
)
View Source
const (
	PositionStateDecreasing int = 0
	PositionStateIncreasing int = 1
	PositionStateStopped    int = 2
)
View Source
const (
	PowerModeSelectionShow int = 0
	PowerModeSelectionHide int = 1
)
View Source
const (
	ProgramModeNoProgramScheduled         int = 0
	ProgramModeProgramScheduled           int = 1
	ProgramModeProgramScheduledManualMode int = 2
)
View Source
const (
	ProgrammableSwitchEventSinglePress int = 0
	ProgrammableSwitchEventDoublePress int = 1
	ProgrammableSwitchEventLongPress   int = 2
)
View Source
const (
	RemoteKeyRewind      int = 0
	RemoteKeyFastForward int = 1
	RemoteKeyExit        int = 10
	RemoteKeyPlayPause   int = 11
	RemoteKeyInfo        int = 15
	RemoteKeyNextTrack   int = 2
	RemoteKeyPrevTrack   int = 3
	RemoteKeyArrowUp     int = 4
	RemoteKeyArrowDown   int = 5
	RemoteKeyArrowLeft   int = 6
	RemoteKeyArrowRight  int = 7
	RemoteKeySelect      int = 8
	RemoteKeyBack        int = 9
)
View Source
const (
	RotationDirectionClockwise        int = 0
	RotationDirectionCounterclockwise int = 1
)
View Source
const (
	SecuritySystemCurrentStateStayArm        int = 0
	SecuritySystemCurrentStateAwayArm        int = 1
	SecuritySystemCurrentStateNightArm       int = 2
	SecuritySystemCurrentStateDisarmed       int = 3
	SecuritySystemCurrentStateAlarmTriggered int = 4
)
View Source
const (
	SecuritySystemTargetStateStayArm  int = 0
	SecuritySystemTargetStateAwayArm  int = 1
	SecuritySystemTargetStateNightArm int = 2
	SecuritySystemTargetStateDisarm   int = 3
)
View Source
const (
	ServiceLabelNamespaceDots           int = 0
	ServiceLabelNamespaceArabicNumerals int = 1
)
View Source
const (
	SlatTypeHorizontal int = 0
	SlatTypeVertical   int = 1
)
View Source
const (
	SleepDiscoveryModeNotDiscoverable    int = 0
	SleepDiscoveryModeAlwaysDiscoverable int = 1
)
View Source
const (
	SmokeDetectedSmokeNotDetected int = 0
	SmokeDetectedSmokeDetected    int = 1
)
View Source
const (
	StatusFaultNoFault      int = 0
	StatusFaultGeneralFault int = 1
)
View Source
const (
	StatusJammedNotJammed int = 0
	StatusJammedJammed    int = 1
)
View Source
const (
	StatusLowBatteryBatteryLevelNormal int = 0
	StatusLowBatteryBatteryLevelLow    int = 1
)
View Source
const (
	StatusTamperedNotTampered int = 0
	StatusTamperedTampered    int = 1
)
View Source
const (
	SwingModeSwingDisabled int = 0
	SwingModeSwingEnabled  int = 1
)
View Source
const (
	TargetAirPurifierStateManual int = 0
	TargetAirPurifierStateAuto   int = 1
)
View Source
const (
	TargetAirQualityExcellent int = 0
	TargetAirQualityGood      int = 1
	TargetAirQualityFair      int = 2
)
View Source
const (
	TargetDoorStateOpen   int = 0
	TargetDoorStateClosed int = 1
)
View Source
const (
	TargetFanStateManual int = 0
	TargetFanStateAuto   int = 1
)
View Source
const (
	TargetHeaterCoolerStateAuto int = 0
	TargetHeaterCoolerStateHeat int = 1
	TargetHeaterCoolerStateCool int = 2
)
View Source
const (
	TargetHeatingCoolingStateOff  int = 0
	TargetHeatingCoolingStateHeat int = 1
	TargetHeatingCoolingStateCool int = 2
	TargetHeatingCoolingStateAuto int = 3
)
View Source
const (
	TargetHumidifierDehumidifierStateHumidifierOrDehumidifier int = 0
	TargetHumidifierDehumidifierStateHumidifier               int = 1
	TargetHumidifierDehumidifierStateDehumidifier             int = 2
)
View Source
const (
	TargetMediaStatePlay  int = 0
	TargetMediaStatePause int = 1
	TargetMediaStateStop  int = 2
)
View Source
const (
	TargetSlatStateManual int = 0
	TargetSlatStateAuto   int = 1
)
View Source
const (
	TargetVisibilityStateShown  int = 0
	TargetVisibilityStateHidden int = 1
)
View Source
const (
	TemperatureDisplayUnitsCelsius    int = 0
	TemperatureDisplayUnitsFahrenheit int = 1
)
View Source
const (
	ValveTypeGenericValve int = 0
	ValveTypeIrrigation   int = 1
	ValveTypeShowerHead   int = 2
	ValveTypeWaterFaucet  int = 3
)
View Source
const (
	VolumeControlTypeNone                int = 0
	VolumeControlTypeRelative            int = 1
	VolumeControlTypeRelativeWithCurrent int = 2
	VolumeControlTypeAbsolute            int = 3
)
View Source
const (
	VolumeSelectorIncrement int = 0
	VolumeSelectorDecrement int = 1
)
View Source
const TypeAccessoryFlags = "A6"
View Source
const TypeAccessoryIdentifier = "57"
View Source
const TypeActive = "B0"
View Source
const TypeActiveIdentifier = "E7"
View Source
const TypeActivityInterval = "23B"
View Source
const TypeAdministratorOnlyAccess = "1"
View Source
const TypeAirParticulateDensity = "64"
View Source
const TypeAirParticulateSize = "65"
View Source
const TypeAirQuality = "95"
View Source
const TypeAppMatchingIdentifier = "A4"
View Source
const TypeAudioFeedback = "5"
View Source
const TypeBatteryLevel = "68"
View Source
const TypeBrightness = "8"
View Source
const TypeCarbonDioxideDetected = "92"
View Source
const TypeCarbonDioxideLevel = "93"
View Source
const TypeCarbonDioxidePeakLevel = "94"
View Source
const TypeCarbonMonoxideDetected = "69"
View Source
const TypeCarbonMonoxideLevel = "90"
View Source
const TypeCarbonMonoxidePeakLevel = "91"
View Source
const TypeCategory = "A3"
View Source
const TypeChargingState = "8F"
View Source
const TypeClosedCaptions = "DD"
View Source
const TypeColorTemperature = "CE"
View Source
const TypeConfigureBridgedAccessory = "A0"
View Source
const TypeConfigureBridgedAccessoryStatus = "9D"
View Source
const TypeConfiguredName = "E3"
View Source
const TypeContactSensorState = "6A"
View Source
const TypeCoolingThresholdTemperature = "D"
View Source
const TypeCurrentAirPurifierState = "A9"
View Source
const TypeCurrentAmbientLightLevel = "6B"
View Source
const TypeCurrentDoorState = "E"
View Source
const TypeCurrentFanState = "AF"
View Source
const TypeCurrentHeaterCoolerState = "B1"
View Source
const TypeCurrentHeatingCoolingState = "F"
View Source
const TypeCurrentHorizontalTiltAngle = "6C"
View Source
const TypeCurrentHumidifierDehumidifierState = "B3"
View Source
const TypeCurrentMediaState = "E0"
View Source
const TypeCurrentPosition = "6D"
View Source
const TypeCurrentRelativeHumidity = "10"
View Source
const TypeCurrentSlatState = "AA"
View Source
const TypeCurrentTemperature = "11"
View Source
const TypeCurrentTiltAngle = "C1"
View Source
const TypeCurrentTime = "9B"
View Source
const TypeCurrentTransport = "22B"
View Source
const TypeCurrentVerticalTiltAngle = "6E"
View Source
const TypeCurrentVisibilityState = "135"
View Source
const TypeDayOfTheWeek = "98"
View Source
const TypeDigitalZoom = "11D"
View Source
const TypeDiscoverBridgedAccessories = "9E"
View Source
const TypeDiscoveredBridgedAccessories = "9F"
View Source
const TypeDisplayOrder = "136"
View Source
const TypeFilterChangeIndication = "AC"
View Source
const TypeFilterLifeLevel = "AB"
View Source
const TypeFirmwareRevision = "52"
View Source
const TypeHardwareRevision = "53"
View Source
const TypeHeartBeat = "24A"
View Source
const TypeHeatingThresholdTemperature = "12"
View Source
const TypeHoldPosition = "6F"
View Source
const TypeHue = "13"
View Source
const TypeIdentifier = "E6"
View Source
const TypeIdentify = "14"
View Source
const TypeImageMirroring = "11F"
View Source
const TypeImageRotation = "11E"
View Source
const TypeInUse = "D2"
View Source
const TypeInputDeviceType = "DC"
View Source
const TypeInputSourceType = "DB"
View Source
const TypeIsConfigured = "D6"
View Source
const TypeLeakDetected = "70"
View Source
const TypeLinkQuality = "9C"
View Source
const TypeLockControlPoint = "19"
View Source
const TypeLockCurrentState = "1D"
View Source
const TypeLockLastKnownAction = "1C"
View Source
const TypeLockManagementAutoSecurityTimeout = "1A"
View Source
const TypeLockPhysicalControls = "A7"
View Source
const TypeLockTargetState = "1E"
View Source
const TypeLogs = "1F"
View Source
const TypeManufacturer = "20"
View Source
const TypeModel = "21"
View Source
const TypeMotionDetected = "22"
View Source
const TypeMute = "11A"
View Source
const TypeName = "23"
View Source
const TypeNightVision = "11B"
View Source
const TypeNitrogenDioxideDensity = "C4"
View Source
const TypeObstructionDetected = "24"
View Source
const TypeOccupancyDetected = "71"
View Source
const TypeOn = "25"
View Source
const TypeOpticalZoom = "11C"
View Source
const TypeOutletInUse = "26"
View Source
const TypeOzoneDensity = "C3"
View Source
const TypePM10Density = "C7"
View Source
const TypePM2_5Density = "C6"
View Source
const TypePairSetup = "4C"
View Source
const TypePairVerify = "4E"
View Source
const TypePairingFeatures = "4F"
View Source
const TypePairingPairings = "50"
View Source
const TypePictureMode = "E2"
View Source
const TypePing = "23C"
View Source
const TypePositionState = "72"
View Source
const TypePowerModeSelection = "DF"
View Source
const TypeProgramMode = "D1"
View Source
const TypeProgrammableSwitchEvent = "73"
View Source
const TypeProgrammableSwitchOutputState = "74"
View Source
const TypeReachable = "63"
View Source
const TypeRelativeHumidityDehumidifierThreshold = "C9"
View Source
const TypeRelativeHumidityHumidifierThreshold = "CA"
View Source
const TypeRemainingDuration = "D4"
View Source
const TypeRemoteKey = "E1"
View Source
const TypeResetFilterIndication = "AD"
View Source
const TypeRotationDirection = "28"
View Source
const TypeRotationSpeed = "29"
View Source
const TypeSaturation = "2F"
View Source
const TypeSecuritySystemAlarmType = "8E"
View Source
const TypeSecuritySystemCurrentState = "66"
View Source
const TypeSecuritySystemTargetState = "67"
View Source
const TypeSelectedCameraRecordingConfiguration = "209"
View Source
const TypeSelectedRTPStreamConfiguration = "117"
View Source
const TypeSelectedStreamConfiguration = "117"
View Source
const TypeSerialNumber = "30"
View Source
const TypeServiceLabelIndex = "CB"
View Source
const TypeServiceLabelNamespace = "CD"
View Source
const TypeSetDuration = "D3"
View Source
const TypeSetupEndpoints = "118"
View Source
const TypeSlatType = "C0"
View Source
const TypeSleepDiscoveryMode = "E8"
View Source
const TypeSleepInterval = "23A"
View Source
const TypeSmokeDetected = "76"
View Source
const TypeSoftwareRevision = "54"
View Source
const TypeStatusActive = "75"
View Source
const TypeStatusFault = "77"
View Source
const TypeStatusJammed = "78"
View Source
const TypeStatusLowBattery = "79"
View Source
const TypeStatusTampered = "7A"
View Source
const TypeStreamingStatus = "120"
View Source
const TypeSulphurDioxideDensity = "C5"
View Source
const TypeSupportedAudioRecordingConfiguration = "207"
View Source
const TypeSupportedAudioStreamConfiguration = "115"
View Source
const TypeSupportedCameraRecordingConfiguration = "205"
View Source
const TypeSupportedRTPConfiguration = "116"
View Source
const TypeSupportedVideoRecordingConfiguration = "206"
View Source
const TypeSupportedVideoStreamConfiguration = "114"
View Source
const TypeSwingMode = "B6"
View Source
const TypeTargetAirPurifierState = "A8"
View Source
const TypeTargetAirQuality = "AE"
View Source
const TypeTargetDoorState = "32"
View Source
const TypeTargetFanState = "BF"
View Source
const TypeTargetHeaterCoolerState = "B2"
View Source
const TypeTargetHeatingCoolingState = "33"
View Source
const TypeTargetHorizontalTiltAngle = "7B"
View Source
const TypeTargetHumidifierDehumidifierState = "B4"
View Source
const TypeTargetMediaState = "137"
View Source
const TypeTargetPosition = "7C"
View Source
const TypeTargetRelativeHumidity = "34"
View Source
const TypeTargetSlatState = "BE"
View Source
const TypeTargetTemperature = "35"
View Source
const TypeTargetTiltAngle = "C2"
View Source
const TypeTargetVerticalTiltAngle = "7D"
View Source
const TypeTargetVisibilityState = "134"
View Source
const TypeTemperatureDisplayUnits = "36"
View Source
const TypeTimeUpdate = "9A"
View Source
const TypeTunnelConnectionTimeout = "61"
View Source
const TypeTunneledAccessoryAdvertising = "60"
View Source
const TypeTunneledAccessoryConnected = "59"
View Source
const TypeTunneledAccessoryStateNumber = "58"
View Source
const TypeVOCDensity = "C8"
View Source
const TypeValveType = "D5"
View Source
const TypeVersion = "37"
View Source
const TypeVolume = "119"
View Source
const TypeVolumeControlType = "E9"
View Source
const TypeVolumeSelector = "EA"
View Source
const TypeWaterLevel = "B5"
View Source
const TypeWifiCapabilities = "22C"
View Source
const TypeWifiConfigurationControl = "22D"

Variables

View Source
var TestConn net.Conn = &fakeConn{}

Functions

This section is empty.

Types

type AccessoryFlags

type AccessoryFlags struct {
	*Int
}

func NewAccessoryFlags

func NewAccessoryFlags() *AccessoryFlags

type AccessoryIdentifier

type AccessoryIdentifier struct {
	*String
}

func NewAccessoryIdentifier

func NewAccessoryIdentifier() *AccessoryIdentifier

type Active

type Active struct {
	*Int
}

func NewActive

func NewActive() *Active

type ActiveIdentifier

type ActiveIdentifier struct {
	*Int
}

func NewActiveIdentifier

func NewActiveIdentifier() *ActiveIdentifier

type ActivityInterval added in v0.0.20

type ActivityInterval struct {
	*Int
}

func NewActivityInterval added in v0.0.20

func NewActivityInterval() *ActivityInterval

type AdministratorOnlyAccess

type AdministratorOnlyAccess struct {
	*Bool
}

func NewAdministratorOnlyAccess

func NewAdministratorOnlyAccess() *AdministratorOnlyAccess

type AirParticulateDensity

type AirParticulateDensity struct {
	*Float
}

func NewAirParticulateDensity

func NewAirParticulateDensity() *AirParticulateDensity

type AirParticulateSize

type AirParticulateSize struct {
	*Int
}

func NewAirParticulateSize

func NewAirParticulateSize() *AirParticulateSize

type AirQuality

type AirQuality struct {
	*Int
}

func NewAirQuality

func NewAirQuality() *AirQuality

type AppMatchingIdentifier

type AppMatchingIdentifier struct {
	*Bytes
}

func NewAppMatchingIdentifier

func NewAppMatchingIdentifier() *AppMatchingIdentifier

type AudioFeedback

type AudioFeedback struct {
	*Bool
}

func NewAudioFeedback

func NewAudioFeedback() *AudioFeedback

type BatteryLevel

type BatteryLevel struct {
	*Int
}

func NewBatteryLevel

func NewBatteryLevel() *BatteryLevel

type Bool

type Bool struct {
	*C
}

func NewBool

func NewBool(typ string) *Bool

func (*Bool) OnSetRemoteValue added in v0.0.7

func (c *Bool) OnSetRemoteValue(fn func(v bool) error)

OnSetRemoteValue set c.SetValueRequestFunc and calls fn. If the function returns an error, the code -70402 is included in the HTTP response.

func (*Bool) OnValueRemoteUpdate

func (c *Bool) OnValueRemoteUpdate(fn func(v bool))

OnValueRemoteUpdate calls fn when the value of the C was updated by a paired controller (ex. iOS device).

func (*Bool) OnValueUpdate

func (c *Bool) OnValueUpdate(fn func(old, new bool, req *http.Request))

OnValueRemoteUpdate calls fn when the value of the characteristic was updated. If the provided http request is not nil, the value was updated by a paired controller (ex. iOS device).

func (*Bool) SetValue

func (c *Bool) SetValue(v bool)

SetValue sets the value of c to v.

func (*Bool) Value

func (c *Bool) Value() bool

Value returns the value of c as bool.

type Brightness

type Brightness struct {
	*Int
}

func NewBrightness

func NewBrightness() *Brightness

type Bytes

type Bytes struct {
	*C
}

func NewBytes

func NewBytes(t string) *Bytes

func (*Bytes) OnSetRemoteValue added in v0.0.7

func (c *Bytes) OnSetRemoteValue(fn func(v []byte) error)

OnSetRemoteValue set c.SetValueRequestFunc and calls fn. If the function returns an error, the code -70402 is included in the HTTP response.

func (*Bytes) OnValueRemoteUpdate

func (c *Bytes) OnValueRemoteUpdate(fn func(v []byte))

OnValueRemoteUpdate calls fn when the value of the characteristic was updated. If the provided http request is not nil, the value was updated by a paired controller (ex. iOS device).

func (*Bytes) OnValueUpdate

func (c *Bytes) OnValueUpdate(fn func(old, new []byte, r *http.Request))

OnValueRemoteUpdate calls fn when the value of the C was updated by a paired controller (ex. iOS device).

func (*Bytes) SetValue

func (c *Bytes) SetValue(v []byte)

func (*Bytes) Value

func (c *Bytes) Value() []byte

Value returns the value of c as byte array.

type C

type C struct {
	// Id is the unique identifier
	Id uint64

	// Type is the characteristic type (ex. "8" for brightness)
	Type string

	// Permissions are the permissions
	Permissions []string

	// Description is a custom description
	Description string

	// Val is the stored value
	Val interface{}

	// Format is the value format (FormatString, FormatBool, ...)
	Format string

	// Unit is the value unit (UnitPercentage, UnitArcDegrees, ...)
	Unit string

	// MaxLen is the maximum length of Val (maximum characters if the format is "string")
	MaxLen int

	// MaxVal is the maximum value of Val (only for integers and floats)
	MaxVal interface{}

	// MinVal is the minimum value of Val (only for integers and floats)
	MinVal interface{}

	// StepVal is the step value of Val (only for integers and floats)
	StepVal interface{}

	// ValidVals are the valid values for integer characteristics.
	ValidVals []int

	// ValidRange is a 2 element array the valid range start and end.
	ValidRange []int

	// Stores which connected client has events enabled for this characteristic.
	Events map[string]bool

	// ValueRequestFunc is called when the value of C is requested by a
	// paired controller via an HTTP request.
	// If the value of C represents the state of a remote object, you can use
	// this function to communicate with that object (ex. over the network).
	// If the communication fails, you can return a code != 0.
	// In this case, the server responds with the HTTP status code 500 and the code
	// in the response body (as defined in HAP-R2 6.7.1.4 HAP Status Codes).
	ValueRequestFunc func(request *http.Request) (value interface{}, code int)

	// SetValueRequestFunc is called when the value of C is updated by an
	// HTTP request coming from a paired controller.
	// If the value of C represents the state of a remote object, you can use
	// this function to communicate with that object (ex. over the network).
	// If the communication fails, you can return a code != 0.
	// In this case, the server responds with the HTTP status code 500 and the code
	// in the response body (as defined in HAP-R2 6.7.1.4 HAP Status Codes).
	SetValueRequestFunc func(value interface{}, request *http.Request) (response interface{}, code int)
	// contains filtered or unexported fields
}

C is a characteristic

func New

func New() *C

New returns a new characteristic.

func (*C) IsObservable

func (c *C) IsObservable() bool

IsObservable returns true if clients are allowed to observe the value of the characteristic.

func (*C) IsReadable

func (c *C) IsReadable() bool

IsReadable returns true if clients are allowed to read the value of the characteristic.

func (*C) IsWritable

func (c *C) IsWritable() bool

IsWritable returns true if clients are allowed to update the value of the characteristic.

func (*C) IsWriteOnly

func (c *C) IsWriteOnly() bool

IsObservable returns true if the value of the characteristic can only be updated, but not read.

func (*C) IsWriteResponse added in v0.0.27

func (c *C) IsWriteResponse() bool

IsWriteResponse returns true if the value can return a response on write

func (*C) MarshalJSON

func (c *C) MarshalJSON() ([]byte, error)

func (*C) OnCValueUpdate

func (c *C) OnCValueUpdate(fn ValueUpdateFunc)

OnCValueUpdate register the given function which is called when the value of the characteristic is updated.

func (*C) RequiresTimedWrite added in v0.0.27

func (c *C) RequiresTimedWrite() bool

RequiresTimedWrite returns true if the value can only be set with a timed write procedure.

func (*C) SetValueRequest

func (c *C) SetValueRequest(val interface{}, req *http.Request) (interface{}, int)

Sets the value of c to val and returns a status code. The server invokes this function when the value is updated by an http request.

func (*C) Value added in v0.0.30

func (c *C) Value() interface{}

Value returns the value of C

func (*C) ValueRequest

func (c *C) ValueRequest(req *http.Request) (interface{}, int)

ValueRequest returns the value of C and a status code. If the value of c cannot be read (because it is writeonly), the status code -70405 is returned.

type CarbonDioxideDetected

type CarbonDioxideDetected struct {
	*Int
}

func NewCarbonDioxideDetected

func NewCarbonDioxideDetected() *CarbonDioxideDetected

type CarbonDioxideLevel

type CarbonDioxideLevel struct {
	*Float
}

func NewCarbonDioxideLevel

func NewCarbonDioxideLevel() *CarbonDioxideLevel

type CarbonDioxidePeakLevel

type CarbonDioxidePeakLevel struct {
	*Float
}

func NewCarbonDioxidePeakLevel

func NewCarbonDioxidePeakLevel() *CarbonDioxidePeakLevel

type CarbonMonoxideDetected

type CarbonMonoxideDetected struct {
	*Int
}

func NewCarbonMonoxideDetected

func NewCarbonMonoxideDetected() *CarbonMonoxideDetected

type CarbonMonoxideLevel

type CarbonMonoxideLevel struct {
	*Float
}

func NewCarbonMonoxideLevel

func NewCarbonMonoxideLevel() *CarbonMonoxideLevel

type CarbonMonoxidePeakLevel

type CarbonMonoxidePeakLevel struct {
	*Float
}

func NewCarbonMonoxidePeakLevel

func NewCarbonMonoxidePeakLevel() *CarbonMonoxidePeakLevel

type Category

type Category struct {
	*Int
}

func NewCategory

func NewCategory() *Category

type ChargingState

type ChargingState struct {
	*Int
}

func NewChargingState

func NewChargingState() *ChargingState

type ClosedCaptions

type ClosedCaptions struct {
	*Int
}

func NewClosedCaptions

func NewClosedCaptions() *ClosedCaptions

type ColorTemperature

type ColorTemperature struct {
	*Int
}

func NewColorTemperature

func NewColorTemperature() *ColorTemperature

type ConfigureBridgedAccessory

type ConfigureBridgedAccessory struct {
	*Bytes
}

func NewConfigureBridgedAccessory

func NewConfigureBridgedAccessory() *ConfigureBridgedAccessory

type ConfigureBridgedAccessoryStatus

type ConfigureBridgedAccessoryStatus struct {
	*Bytes
}

func NewConfigureBridgedAccessoryStatus

func NewConfigureBridgedAccessoryStatus() *ConfigureBridgedAccessoryStatus

type ConfiguredName

type ConfiguredName struct {
	*String
}

func NewConfiguredName

func NewConfiguredName() *ConfiguredName

type ContactSensorState

type ContactSensorState struct {
	*Int
}

func NewContactSensorState

func NewContactSensorState() *ContactSensorState

type CoolingThresholdTemperature

type CoolingThresholdTemperature struct {
	*Float
}

func NewCoolingThresholdTemperature

func NewCoolingThresholdTemperature() *CoolingThresholdTemperature

type CurrentAirPurifierState

type CurrentAirPurifierState struct {
	*Int
}

func NewCurrentAirPurifierState

func NewCurrentAirPurifierState() *CurrentAirPurifierState

type CurrentAmbientLightLevel

type CurrentAmbientLightLevel struct {
	*Float
}

func NewCurrentAmbientLightLevel

func NewCurrentAmbientLightLevel() *CurrentAmbientLightLevel

type CurrentDoorState

type CurrentDoorState struct {
	*Int
}

func NewCurrentDoorState

func NewCurrentDoorState() *CurrentDoorState

type CurrentFanState

type CurrentFanState struct {
	*Int
}

func NewCurrentFanState

func NewCurrentFanState() *CurrentFanState

type CurrentHeaterCoolerState

type CurrentHeaterCoolerState struct {
	*Int
}

func NewCurrentHeaterCoolerState

func NewCurrentHeaterCoolerState() *CurrentHeaterCoolerState

type CurrentHeatingCoolingState

type CurrentHeatingCoolingState struct {
	*Int
}

func NewCurrentHeatingCoolingState

func NewCurrentHeatingCoolingState() *CurrentHeatingCoolingState

type CurrentHorizontalTiltAngle

type CurrentHorizontalTiltAngle struct {
	*Int
}

func NewCurrentHorizontalTiltAngle

func NewCurrentHorizontalTiltAngle() *CurrentHorizontalTiltAngle

type CurrentHumidifierDehumidifierState

type CurrentHumidifierDehumidifierState struct {
	*Int
}

func NewCurrentHumidifierDehumidifierState

func NewCurrentHumidifierDehumidifierState() *CurrentHumidifierDehumidifierState

type CurrentMediaState

type CurrentMediaState struct {
	*Int
}

func NewCurrentMediaState

func NewCurrentMediaState() *CurrentMediaState

type CurrentPosition

type CurrentPosition struct {
	*Int
}

func NewCurrentPosition

func NewCurrentPosition() *CurrentPosition

type CurrentRelativeHumidity

type CurrentRelativeHumidity struct {
	*Float
}

func NewCurrentRelativeHumidity

func NewCurrentRelativeHumidity() *CurrentRelativeHumidity

type CurrentSlatState

type CurrentSlatState struct {
	*Int
}

func NewCurrentSlatState

func NewCurrentSlatState() *CurrentSlatState

type CurrentTemperature

type CurrentTemperature struct {
	*Float
}

func NewCurrentTemperature

func NewCurrentTemperature() *CurrentTemperature

type CurrentTiltAngle

type CurrentTiltAngle struct {
	*Int
}

func NewCurrentTiltAngle

func NewCurrentTiltAngle() *CurrentTiltAngle

type CurrentTime

type CurrentTime struct {
	*String
}

func NewCurrentTime

func NewCurrentTime() *CurrentTime

type CurrentTransport

type CurrentTransport struct {
	*Bool
}

func NewCurrentTransport

func NewCurrentTransport() *CurrentTransport

type CurrentVerticalTiltAngle

type CurrentVerticalTiltAngle struct {
	*Int
}

func NewCurrentVerticalTiltAngle

func NewCurrentVerticalTiltAngle() *CurrentVerticalTiltAngle

type CurrentVisibilityState

type CurrentVisibilityState struct {
	*Int
}

func NewCurrentVisibilityState

func NewCurrentVisibilityState() *CurrentVisibilityState

type DayOfTheWeek

type DayOfTheWeek struct {
	*Int
}

func NewDayOfTheWeek

func NewDayOfTheWeek() *DayOfTheWeek

type DigitalZoom

type DigitalZoom struct {
	*Float
}

func NewDigitalZoom

func NewDigitalZoom() *DigitalZoom

type DiscoverBridgedAccessories

type DiscoverBridgedAccessories struct {
	*Int
}

func NewDiscoverBridgedAccessories

func NewDiscoverBridgedAccessories() *DiscoverBridgedAccessories

type DiscoveredBridgedAccessories

type DiscoveredBridgedAccessories struct {
	*Int
}

func NewDiscoveredBridgedAccessories

func NewDiscoveredBridgedAccessories() *DiscoveredBridgedAccessories

type DisplayOrder

type DisplayOrder struct {
	*Bytes
}

func NewDisplayOrder

func NewDisplayOrder() *DisplayOrder

type FilterChangeIndication

type FilterChangeIndication struct {
	*Int
}

func NewFilterChangeIndication

func NewFilterChangeIndication() *FilterChangeIndication

type FilterLifeLevel

type FilterLifeLevel struct {
	*Float
}

func NewFilterLifeLevel

func NewFilterLifeLevel() *FilterLifeLevel

type FirmwareRevision

type FirmwareRevision struct {
	*String
}

func NewFirmwareRevision

func NewFirmwareRevision() *FirmwareRevision

type Float

type Float struct {
	*C
}

func NewFloat

func NewFloat(t string) *Float

func (*Float) MaxValue

func (c *Float) MaxValue() float64

func (*Float) MinValue

func (c *Float) MinValue() float64

func (*Float) OnSetRemoteValue added in v0.0.7

func (c *Float) OnSetRemoteValue(fn func(v float64) error)

OnSetRemoteValue set c.SetValueRequestFunc and calls fn. If the function returns an error, the code -70402 is included in the HTTP response.

func (*Float) OnValueRemoteUpdate

func (c *Float) OnValueRemoteUpdate(fn func(v float64))

OnValueRemoteUpdate calls fn when the value of the C was updated by a paired controller (ex. iOS device).

func (*Float) OnValueUpdate

func (c *Float) OnValueUpdate(fn func(new, old float64, r *http.Request))

OnValueRemoteUpdate calls fn when the value of the characteristic was updated. If the provided http request is not nil, the value was updated by a paired controller (ex. iOS device).

func (*Float) SetMaxValue

func (c *Float) SetMaxValue(v float64)

func (*Float) SetMinValue

func (c *Float) SetMinValue(v float64)

func (*Float) SetStepValue

func (c *Float) SetStepValue(v float64)

func (*Float) SetValue

func (c *Float) SetValue(v float64)

SetValue sets a value

func (*Float) StepValue

func (c *Float) StepValue() float64

func (*Float) Value

func (c *Float) Value() float64

Value returns the value of c as float64.

type HardwareRevision

type HardwareRevision struct {
	*String
}

func NewHardwareRevision

func NewHardwareRevision() *HardwareRevision

type HeartBeat added in v0.0.20

type HeartBeat struct {
	*Int
}

func NewHeartBeat added in v0.0.20

func NewHeartBeat() *HeartBeat

type HeatingThresholdTemperature

type HeatingThresholdTemperature struct {
	*Float
}

func NewHeatingThresholdTemperature

func NewHeatingThresholdTemperature() *HeatingThresholdTemperature

type HoldPosition

type HoldPosition struct {
	*Bool
}

func NewHoldPosition

func NewHoldPosition() *HoldPosition

type Hue

type Hue struct {
	*Float
}

func NewHue

func NewHue() *Hue

type Identifier

type Identifier struct {
	*Int
}

func NewIdentifier

func NewIdentifier() *Identifier

type Identify

type Identify struct {
	*Bool
}

func NewIdentify

func NewIdentify() *Identify

type ImageMirroring

type ImageMirroring struct {
	*Bool
}

func NewImageMirroring

func NewImageMirroring() *ImageMirroring

type ImageRotation

type ImageRotation struct {
	*Float
}

func NewImageRotation

func NewImageRotation() *ImageRotation

type InUse

type InUse struct {
	*Int
}

func NewInUse

func NewInUse() *InUse

type InputDeviceType

type InputDeviceType struct {
	*Int
}

func NewInputDeviceType

func NewInputDeviceType() *InputDeviceType

type InputSourceType

type InputSourceType struct {
	*Int
}

func NewInputSourceType

func NewInputSourceType() *InputSourceType

type Int

type Int struct {
	*C
}

func NewInt

func NewInt(t string) *Int

func (*Int) MaxValue

func (c *Int) MaxValue() int

func (*Int) MinValue

func (c *Int) MinValue() int

func (*Int) OnSetRemoteValue added in v0.0.7

func (c *Int) OnSetRemoteValue(fn func(v int) error)

OnSetRemoteValue set c.SetValueRequestFunc and calls fn. If the function returns an error, the code -70402 is included in the HTTP response.

func (*Int) OnValueRemoteUpdate

func (c *Int) OnValueRemoteUpdate(fn func(v int))

OnValueRemoteUpdate calls fn when the value of the C was updated by a paired controller (ex. iOS device).

func (*Int) OnValueUpdate

func (c *Int) OnValueUpdate(fn func(new, old int, r *http.Request))

OnValueRemoteUpdate calls fn when the value of the characteristic was updated. If the provided http request is not nil, the value was updated by a paired controller (ex. iOS device).

func (*Int) SetMaxValue

func (c *Int) SetMaxValue(v int)

func (*Int) SetMinValue

func (c *Int) SetMinValue(v int)

func (*Int) SetStepValue

func (c *Int) SetStepValue(v int)

func (*Int) SetValue

func (c *Int) SetValue(v int) error

SetValue sets a value

func (*Int) StepValue

func (c *Int) StepValue() int

func (*Int) Value

func (c *Int) Value() int

Value returns the value of c as integer.

type IsConfigured

type IsConfigured struct {
	*Int
}

func NewIsConfigured

func NewIsConfigured() *IsConfigured

type LeakDetected

type LeakDetected struct {
	*Int
}

func NewLeakDetected

func NewLeakDetected() *LeakDetected

type LinkQuality

type LinkQuality struct {
	*Int
}

func NewLinkQuality

func NewLinkQuality() *LinkQuality

type LockControlPoint

type LockControlPoint struct {
	*Bytes
}

func NewLockControlPoint

func NewLockControlPoint() *LockControlPoint

type LockCurrentState

type LockCurrentState struct {
	*Int
}

func NewLockCurrentState

func NewLockCurrentState() *LockCurrentState

type LockLastKnownAction

type LockLastKnownAction struct {
	*Int
}

func NewLockLastKnownAction

func NewLockLastKnownAction() *LockLastKnownAction

type LockManagementAutoSecurityTimeout

type LockManagementAutoSecurityTimeout struct {
	*Int
}

func NewLockManagementAutoSecurityTimeout

func NewLockManagementAutoSecurityTimeout() *LockManagementAutoSecurityTimeout

type LockPhysicalControls

type LockPhysicalControls struct {
	*Int
}

func NewLockPhysicalControls

func NewLockPhysicalControls() *LockPhysicalControls

type LockTargetState

type LockTargetState struct {
	*Int
}

func NewLockTargetState

func NewLockTargetState() *LockTargetState

type Logs

type Logs struct {
	*Bytes
}

func NewLogs

func NewLogs() *Logs

type Manufacturer

type Manufacturer struct {
	*String
}

func NewManufacturer

func NewManufacturer() *Manufacturer

type Model

type Model struct {
	*String
}

func NewModel

func NewModel() *Model

type MotionDetected

type MotionDetected struct {
	*Bool
}

func NewMotionDetected

func NewMotionDetected() *MotionDetected

type Mute

type Mute struct {
	*Bool
}

func NewMute

func NewMute() *Mute

type Name

type Name struct {
	*String
}

func NewName

func NewName() *Name

type NightVision

type NightVision struct {
	*Bool
}

func NewNightVision

func NewNightVision() *NightVision

type NitrogenDioxideDensity

type NitrogenDioxideDensity struct {
	*Float
}

func NewNitrogenDioxideDensity

func NewNitrogenDioxideDensity() *NitrogenDioxideDensity

type ObstructionDetected

type ObstructionDetected struct {
	*Bool
}

func NewObstructionDetected

func NewObstructionDetected() *ObstructionDetected

type OccupancyDetected

type OccupancyDetected struct {
	*Int
}

func NewOccupancyDetected

func NewOccupancyDetected() *OccupancyDetected

type On

type On struct {
	*Bool
}

func NewOn

func NewOn() *On

type OpticalZoom

type OpticalZoom struct {
	*Float
}

func NewOpticalZoom

func NewOpticalZoom() *OpticalZoom

type OutletInUse

type OutletInUse struct {
	*Bool
}

func NewOutletInUse

func NewOutletInUse() *OutletInUse

type OzoneDensity

type OzoneDensity struct {
	*Float
}

func NewOzoneDensity

func NewOzoneDensity() *OzoneDensity

type PM10Density

type PM10Density struct {
	*Float
}

func NewPM10Density

func NewPM10Density() *PM10Density

type PM2_5Density

type PM2_5Density struct {
	*Float
}

func NewPM2_5Density

func NewPM2_5Density() *PM2_5Density

type PairSetup

type PairSetup struct {
	*Bytes
}

func NewPairSetup

func NewPairSetup() *PairSetup

type PairVerify

type PairVerify struct {
	*Bytes
}

func NewPairVerify

func NewPairVerify() *PairVerify

type PairingFeatures

type PairingFeatures struct {
	*Int
}

func NewPairingFeatures

func NewPairingFeatures() *PairingFeatures

type PairingPairings

type PairingPairings struct {
	*Bytes
}

func NewPairingPairings

func NewPairingPairings() *PairingPairings

type PictureMode

type PictureMode struct {
	*Int
}

func NewPictureMode

func NewPictureMode() *PictureMode

type Ping added in v0.0.20

type Ping struct {
	*Bytes
}

func NewPing added in v0.0.20

func NewPing() *Ping

type PositionState

type PositionState struct {
	*Int
}

func NewPositionState

func NewPositionState() *PositionState

type PowerModeSelection

type PowerModeSelection struct {
	*Int
}

func NewPowerModeSelection

func NewPowerModeSelection() *PowerModeSelection

type ProgramMode

type ProgramMode struct {
	*Int
}

func NewProgramMode

func NewProgramMode() *ProgramMode

type ProgrammableSwitchEvent

type ProgrammableSwitchEvent struct {
	*Int
}

func NewProgrammableSwitchEvent

func NewProgrammableSwitchEvent() *ProgrammableSwitchEvent

type ProgrammableSwitchOutputState

type ProgrammableSwitchOutputState struct {
	*Int
}

func NewProgrammableSwitchOutputState

func NewProgrammableSwitchOutputState() *ProgrammableSwitchOutputState

type Reachable

type Reachable struct {
	*Bool
}

func NewReachable

func NewReachable() *Reachable

type RelativeHumidityDehumidifierThreshold

type RelativeHumidityDehumidifierThreshold struct {
	*Float
}

func NewRelativeHumidityDehumidifierThreshold

func NewRelativeHumidityDehumidifierThreshold() *RelativeHumidityDehumidifierThreshold

type RelativeHumidityHumidifierThreshold

type RelativeHumidityHumidifierThreshold struct {
	*Float
}

func NewRelativeHumidityHumidifierThreshold

func NewRelativeHumidityHumidifierThreshold() *RelativeHumidityHumidifierThreshold

type RemainingDuration

type RemainingDuration struct {
	*Int
}

func NewRemainingDuration

func NewRemainingDuration() *RemainingDuration

type RemoteKey

type RemoteKey struct {
	*Int
}

func NewRemoteKey

func NewRemoteKey() *RemoteKey

type ResetFilterIndication

type ResetFilterIndication struct {
	*Int
}

func NewResetFilterIndication

func NewResetFilterIndication() *ResetFilterIndication

type RotationDirection

type RotationDirection struct {
	*Int
}

func NewRotationDirection

func NewRotationDirection() *RotationDirection

type RotationSpeed

type RotationSpeed struct {
	*Float
}

func NewRotationSpeed

func NewRotationSpeed() *RotationSpeed

type Saturation

type Saturation struct {
	*Float
}

func NewSaturation

func NewSaturation() *Saturation

type SecuritySystemAlarmType

type SecuritySystemAlarmType struct {
	*Int
}

func NewSecuritySystemAlarmType

func NewSecuritySystemAlarmType() *SecuritySystemAlarmType

type SecuritySystemCurrentState

type SecuritySystemCurrentState struct {
	*Int
}

func NewSecuritySystemCurrentState

func NewSecuritySystemCurrentState() *SecuritySystemCurrentState

type SecuritySystemTargetState

type SecuritySystemTargetState struct {
	*Int
}

func NewSecuritySystemTargetState

func NewSecuritySystemTargetState() *SecuritySystemTargetState

type SelectedCameraRecordingConfiguration

type SelectedCameraRecordingConfiguration struct {
	*Bytes
}

func NewSelectedCameraRecordingConfiguration

func NewSelectedCameraRecordingConfiguration() *SelectedCameraRecordingConfiguration

type SelectedRTPStreamConfiguration

type SelectedRTPStreamConfiguration struct {
	*Bytes
}

func NewSelectedRTPStreamConfiguration

func NewSelectedRTPStreamConfiguration() *SelectedRTPStreamConfiguration

type SelectedStreamConfiguration

type SelectedStreamConfiguration struct {
	*Bytes
}

func NewSelectedStreamConfiguration

func NewSelectedStreamConfiguration() *SelectedStreamConfiguration

type SerialNumber

type SerialNumber struct {
	*String
}

func NewSerialNumber

func NewSerialNumber() *SerialNumber

type ServiceLabelIndex

type ServiceLabelIndex struct {
	*Int
}

func NewServiceLabelIndex

func NewServiceLabelIndex() *ServiceLabelIndex

type ServiceLabelNamespace

type ServiceLabelNamespace struct {
	*Int
}

func NewServiceLabelNamespace

func NewServiceLabelNamespace() *ServiceLabelNamespace

type SetDuration

type SetDuration struct {
	*Int
}

func NewSetDuration

func NewSetDuration() *SetDuration

type SetupEndpoints

type SetupEndpoints struct {
	*Bytes
}

func NewSetupEndpoints

func NewSetupEndpoints() *SetupEndpoints

type SlatType

type SlatType struct {
	*Int
}

func NewSlatType

func NewSlatType() *SlatType

type SleepDiscoveryMode

type SleepDiscoveryMode struct {
	*Int
}

func NewSleepDiscoveryMode

func NewSleepDiscoveryMode() *SleepDiscoveryMode

type SleepInterval added in v0.0.20

type SleepInterval struct {
	*Int
}

func NewSleepInterval added in v0.0.20

func NewSleepInterval() *SleepInterval

type SmokeDetected

type SmokeDetected struct {
	*Int
}

func NewSmokeDetected

func NewSmokeDetected() *SmokeDetected

type SoftwareRevision

type SoftwareRevision struct {
	*String
}

func NewSoftwareRevision

func NewSoftwareRevision() *SoftwareRevision

type StatusActive

type StatusActive struct {
	*Bool
}

func NewStatusActive

func NewStatusActive() *StatusActive

type StatusFault

type StatusFault struct {
	*Int
}

func NewStatusFault

func NewStatusFault() *StatusFault

type StatusJammed

type StatusJammed struct {
	*Int
}

func NewStatusJammed

func NewStatusJammed() *StatusJammed

type StatusLowBattery

type StatusLowBattery struct {
	*Int
}

func NewStatusLowBattery

func NewStatusLowBattery() *StatusLowBattery

type StatusTampered

type StatusTampered struct {
	*Int
}

func NewStatusTampered

func NewStatusTampered() *StatusTampered

type StreamingStatus

type StreamingStatus struct {
	*Bytes
}

func NewStreamingStatus

func NewStreamingStatus() *StreamingStatus

type String

type String struct {
	*C
}

func NewString

func NewString(typ string) *String

func (*String) OnSetRemoteValue added in v0.0.7

func (c *String) OnSetRemoteValue(fn func(v string) error)

OnSetRemoteValue set c.SetValueRequestFunc and calls fn. If the function returns an error, the code -70402 is included in the HTTP response.

func (*String) OnValueRemoteUpdate

func (c *String) OnValueRemoteUpdate(fn func(v string))

OnValueRemoteUpdate calls fn when the value of the C was updated by a paired controller (ex. iOS device).

func (*String) OnValueUpdate

func (c *String) OnValueUpdate(fn func(new, old string, r *http.Request))

OnValueRemoteUpdate calls fn when the value of the characteristic was updated. If the provided http request is not nil, the value was updated by a paired controller (ex. iOS device).

func (*String) SetValue

func (c *String) SetValue(v string)

SetValue sets the value of c to v.

func (*String) Value

func (c *String) Value() string

Value returns the value of c as string.

type SulphurDioxideDensity

type SulphurDioxideDensity struct {
	*Float
}

func NewSulphurDioxideDensity

func NewSulphurDioxideDensity() *SulphurDioxideDensity

type SupportedAudioRecordingConfiguration

type SupportedAudioRecordingConfiguration struct {
	*Bytes
}

func NewSupportedAudioRecordingConfiguration

func NewSupportedAudioRecordingConfiguration() *SupportedAudioRecordingConfiguration

type SupportedAudioStreamConfiguration

type SupportedAudioStreamConfiguration struct {
	*Bytes
}

func NewSupportedAudioStreamConfiguration

func NewSupportedAudioStreamConfiguration() *SupportedAudioStreamConfiguration

type SupportedCameraRecordingConfiguration

type SupportedCameraRecordingConfiguration struct {
	*Bytes
}

func NewSupportedCameraRecordingConfiguration

func NewSupportedCameraRecordingConfiguration() *SupportedCameraRecordingConfiguration

type SupportedRTPConfiguration

type SupportedRTPConfiguration struct {
	*Bytes
}

func NewSupportedRTPConfiguration

func NewSupportedRTPConfiguration() *SupportedRTPConfiguration

type SupportedVideoRecordingConfiguration

type SupportedVideoRecordingConfiguration struct {
	*Bytes
}

func NewSupportedVideoRecordingConfiguration

func NewSupportedVideoRecordingConfiguration() *SupportedVideoRecordingConfiguration

type SupportedVideoStreamConfiguration

type SupportedVideoStreamConfiguration struct {
	*Bytes
}

func NewSupportedVideoStreamConfiguration

func NewSupportedVideoStreamConfiguration() *SupportedVideoStreamConfiguration

type SwingMode

type SwingMode struct {
	*Int
}

func NewSwingMode

func NewSwingMode() *SwingMode

type TargetAirPurifierState

type TargetAirPurifierState struct {
	*Int
}

func NewTargetAirPurifierState

func NewTargetAirPurifierState() *TargetAirPurifierState

type TargetAirQuality

type TargetAirQuality struct {
	*Int
}

func NewTargetAirQuality

func NewTargetAirQuality() *TargetAirQuality

type TargetDoorState

type TargetDoorState struct {
	*Int
}

func NewTargetDoorState

func NewTargetDoorState() *TargetDoorState

type TargetFanState

type TargetFanState struct {
	*Int
}

func NewTargetFanState

func NewTargetFanState() *TargetFanState

type TargetHeaterCoolerState

type TargetHeaterCoolerState struct {
	*Int
}

func NewTargetHeaterCoolerState

func NewTargetHeaterCoolerState() *TargetHeaterCoolerState

type TargetHeatingCoolingState

type TargetHeatingCoolingState struct {
	*Int
}

func NewTargetHeatingCoolingState

func NewTargetHeatingCoolingState() *TargetHeatingCoolingState

type TargetHorizontalTiltAngle

type TargetHorizontalTiltAngle struct {
	*Int
}

func NewTargetHorizontalTiltAngle

func NewTargetHorizontalTiltAngle() *TargetHorizontalTiltAngle

type TargetHumidifierDehumidifierState

type TargetHumidifierDehumidifierState struct {
	*Int
}

func NewTargetHumidifierDehumidifierState

func NewTargetHumidifierDehumidifierState() *TargetHumidifierDehumidifierState

type TargetMediaState

type TargetMediaState struct {
	*Int
}

func NewTargetMediaState

func NewTargetMediaState() *TargetMediaState

type TargetPosition

type TargetPosition struct {
	*Int
}

func NewTargetPosition

func NewTargetPosition() *TargetPosition

type TargetRelativeHumidity

type TargetRelativeHumidity struct {
	*Float
}

func NewTargetRelativeHumidity

func NewTargetRelativeHumidity() *TargetRelativeHumidity

type TargetSlatState

type TargetSlatState struct {
	*Int
}

func NewTargetSlatState

func NewTargetSlatState() *TargetSlatState

type TargetTemperature

type TargetTemperature struct {
	*Float
}

func NewTargetTemperature

func NewTargetTemperature() *TargetTemperature

type TargetTiltAngle

type TargetTiltAngle struct {
	*Int
}

func NewTargetTiltAngle

func NewTargetTiltAngle() *TargetTiltAngle

type TargetVerticalTiltAngle

type TargetVerticalTiltAngle struct {
	*Int
}

func NewTargetVerticalTiltAngle

func NewTargetVerticalTiltAngle() *TargetVerticalTiltAngle

type TargetVisibilityState

type TargetVisibilityState struct {
	*Int
}

func NewTargetVisibilityState

func NewTargetVisibilityState() *TargetVisibilityState

type TemperatureDisplayUnits

type TemperatureDisplayUnits struct {
	*Int
}

func NewTemperatureDisplayUnits

func NewTemperatureDisplayUnits() *TemperatureDisplayUnits

type TimeUpdate

type TimeUpdate struct {
	*Bool
}

func NewTimeUpdate

func NewTimeUpdate() *TimeUpdate

type TunnelConnectionTimeout

type TunnelConnectionTimeout struct {
	*Int
}

func NewTunnelConnectionTimeout

func NewTunnelConnectionTimeout() *TunnelConnectionTimeout

type TunneledAccessoryAdvertising

type TunneledAccessoryAdvertising struct {
	*Bool
}

func NewTunneledAccessoryAdvertising

func NewTunneledAccessoryAdvertising() *TunneledAccessoryAdvertising

type TunneledAccessoryConnected

type TunneledAccessoryConnected struct {
	*Bool
}

func NewTunneledAccessoryConnected

func NewTunneledAccessoryConnected() *TunneledAccessoryConnected

type TunneledAccessoryStateNumber

type TunneledAccessoryStateNumber struct {
	*Float
}

func NewTunneledAccessoryStateNumber

func NewTunneledAccessoryStateNumber() *TunneledAccessoryStateNumber

type V added in v0.0.14

type V struct {
	Value interface{}
}

func (V) MarshalJSON added in v0.0.14

func (v V) MarshalJSON() ([]byte, error)

type VOCDensity

type VOCDensity struct {
	*Float
}

func NewVOCDensity

func NewVOCDensity() *VOCDensity

type ValueUpdateFunc

type ValueUpdateFunc func(c *C, new, old interface{}, req *http.Request)

ValueUpdateFunc is the value updated function for a characteristic.

type ValveType

type ValveType struct {
	*Int
}

func NewValveType

func NewValveType() *ValveType

type Version

type Version struct {
	*String
}

func NewVersion

func NewVersion() *Version

type Volume

type Volume struct {
	*Int
}

func NewVolume

func NewVolume() *Volume

type VolumeControlType

type VolumeControlType struct {
	*Int
}

func NewVolumeControlType

func NewVolumeControlType() *VolumeControlType

type VolumeSelector

type VolumeSelector struct {
	*Int
}

func NewVolumeSelector

func NewVolumeSelector() *VolumeSelector

type WaterLevel

type WaterLevel struct {
	*Float
}

func NewWaterLevel

func NewWaterLevel() *WaterLevel

type WifiCapabilities

type WifiCapabilities = struct {
	*Int
}

func NewWifiCapabilities

func NewWifiCapabilities() *WifiCapabilities

type WifiConfigurationControl

type WifiConfigurationControl = struct {
	*Bytes
}

func NewWifiConfigurationControl

func NewWifiConfigurationControl() *WifiConfigurationControl

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL