Documentation
¶
Overview ¶
Package feature defines the basic requirements of a feature
Index ¶
- type Fake
- func (f *Fake) Exists() bool
- func (f *Fake) GetTopic() string
- func (f *Fake) Max() int
- func (f *Fake) Min() int
- func (f *Fake) Name() string
- func (f *Fake) OnSet() (chan string, error)
- func (f *Fake) OnSetFunc(func(string)) error
- func (f *Fake) OnUpdate() (chan string, error)
- func (f *Fake) OnUpdateFunc(func(string)) error
- func (f *Fake) Set(string) error
- func (f *Fake) SetTopic() string
- func (f *Fake) Step() int
- func (f *Fake) Update(string) error
- func (f *Fake) UpdateInfo(*Info) []*InfoUpdate
- func (f *Fake) Value() string
- type Feature
- type Info
- type InfoUpdate
- type Transport
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fake ¶
func (*Fake) OnUpdateFunc ¶
func (*Fake) UpdateInfo ¶
func (f *Fake) UpdateInfo(*Info) []*InfoUpdate
type Feature ¶
type Feature interface { Name() string Min() int Max() int Step() int Exists() bool Set(string) error OnUpdate() (chan string, error) OnUpdateFunc(func(string)) error Update(string) error OnSet() (chan string, error) OnSetFunc(func(string)) error Value() string UpdateInfo(*Info) []*InfoUpdate GetTopic() string SetTopic() string }
Feature represents a feature of a device
type Info ¶
type Info struct { Min int `json:"min,omitempty"` Max int `json:"max,omitempty"` Step int `json:"step,omitempty"` GetTopic string `json:"getTopic,omitempty"` SetTopic string `json:"setTopic,omitempty"` }
Info holds information about a feature
type InfoUpdate ¶
InfoUpdate represents an update to the feature's current info
type Transport ¶
type Transport interface { SubscribeFeature(string) chan []byte UpdateFeature(*Info, []byte) SetFeature(*Info, []byte) }
Transport is the feature's transport
type Type ¶
type Type string
Type is the type of the feature
const ( AccessoryFlags Type = "accessoryFlags" AccessoryIdentifier Type = "accessoryIdentifier" Active Type = "active" AdministratorOnlyAccess Type = "administratorOnlyAccess" AirParticulateDensity Type = "airParticulateDensity" AirParticulateSize Type = "airParticulateSize" AirQuality Type = "airQuality" AppMatchingIdentifier Type = "appMatchingIdentifier" AudioFeedback Type = "audioFeedback" BatteryLevel Type = "batteryLevel" Brightness Type = "brightness" CarbonDioxideDetected Type = "carbonDioxideDetected" CarbonDioxideLevel Type = "carbonDioxideLevel" CarbonDioxidePeakLevel Type = "carbonDioxidePeakLevel" CarbonMonoxideDetected Type = "carbonMonoxideDetected" CarbonMonoxideLevel Type = "carbonMonoxideLevel" CarbonMonoxidePeakLevel Type = "carbonMonoxidePeakLevel" Category Type = "category" ChargingState Type = "chargingState" ColorTemperature Type = "colorTemperature" ConfigureBridgedAccessory Type = "configureBridgedAccessory" ConfigureBridgedAccessoryStatus Type = "configureBridgedAccessoryStatus" ContactSensorState Type = "contactSensorState" CoolingThresholdTemperature Type = "coolingThresholdTemperature" CurrentAirPurifierState Type = "currentAirPurifierState" CurrentAmbientLightLevel Type = "currentAmbientLightLevel" CurrentDoorState Type = "currentDoorState" CurrentFanState Type = "currentFanState" CurrentHeaterCoolerState Type = "currentHeaterCoolerState" CurrentHeatingCoolingState Type = "currentHeatingCoolingState" CurrentHorizontalTiltAngle Type = "currentHorizontalTiltAngle" CurrentHumidifierDehumidifierState Type = "currentHumidifierDehumidifierState" CurrentPosition Type = "currentPosition" CurrentRelativeHumidity Type = "currentRelativeHumidity" CurrentSlatState Type = "currentSlatState" CurrentTemperature Type = "currentTemperature" CurrentTiltAngle Type = "currentTiltAngle" CurrentTime Type = "currentTime" CurrentVerticalTiltAngle Type = "currentVerticalTiltAngle" DayOfTheWeek Type = "dayOfTheWeek" DigitalZoom Type = "digitalZoom" DiscoverBridgedAccessories Type = "discoverBridgedAccessories" DiscoveredBridgedAccessories Type = "discoveredBridgedAccessories" FilterChangeIndication Type = "filterChangeIndication" FilterLifeLevel Type = "filterLifeLevel" FirmwareRevision Type = "firmwareRevision" HardwareRevision Type = "hardwareRevision" HeatingThresholdTemperature Type = "heatingThresholdTemperature" HoldPosition Type = "holdPosition" Hue Type = "hue" Identify Type = "identify" ImageMirroring Type = "imageMirroring" ImageRotation Type = "imageRotation" InUse Type = "inUse" IsConfigured Type = "isConfigured" LeakDetected Type = "leakDetected" LinkQuality Type = "linkQuality" LockControlPoint Type = "lockControlPoint" LockCurrentState Type = "lockCurrentState" LockLastKnownAction Type = "lockLastKnownAction" LockManagementAutoSecurityTimeout Type = "lockManagementAutoSecurityTimeout" LockPhysicalControls Type = "lockPhysicalControls" LockTargetState Type = "lockTargetState" Logs Type = "logs" Manufacturer Type = "manufacturer" Model Type = "model" MotionDetected Type = "motionDetected" Mute Type = "mute" Name Type = "name" NightVision Type = "nightVision" NitrogenDioxideDensity Type = "nitrogenDioxideDensity" ObstructionDetected Type = "obstructionDetected" OccupancyDetected Type = "occupancyDetected" On Type = "on" OpticalZoom Type = "opticalZoom" OutletInUse Type = "outletInUse" OzoneDensity Type = "ozoneDensity" PairSetup Type = "pairSetup" PairVerify Type = "pairVerify" PairingFeatures Type = "pairingFeatures" PairingPairings Type = "pairingPairings" PM10Density Type = "pm10Density" PM2_5Density Type = "pm2_5Density" PositionState Type = "positionState" ProgrammableSwitchEvent Type = "programmableSwitchEvent" ProgrammableSwitchOutputState Type = "programmableSwitchOutputState" ProgramMode Type = "programMode" Reachable Type = "reachable" RelativeHumidityDehumidifierThreshold Type = "relativeHumidityDehumidifierThreshold" RelativeHumidityHumidifierThreshold Type = "relativeHumidityHumidifierThreshold" RemainingDuration Type = "remainingDuration" ResetFilterIndication Type = "resetFilterIndication" RotationDirection Type = "rotationDirection" RotationSpeed Type = "rotationSpeed" Saturation Type = "saturation" SecuritySystemAlarmType Type = "securitySystemAlarmType" SecuritySystemCurrentState Type = "securitySystemCurrentState" SecuritySystemTargetState Type = "securitySystemTargetState" SelectedRTPStreamConfiguration Type = "selectedRTPStreamConfiguration" SelectedStreamConfiguration Type = "selectedStreamConfiguration" SerialNumber Type = "serialNumber" ServiceLabelIndex Type = "serviceLabelIndex" ServiceLabelNamespace Type = "serviceLabelNamespace" SetDuration Type = "setDuration" SetupEndpoints Type = "setupEndpoints" SlatType Type = "slatType" SmokeDetected Type = "smokeDetected" SoftwareRevision Type = "softwareRevision" StatusActive Type = "statusActive" StatusFault Type = "statusFault" StatusJammed Type = "statusJammed" StatusLowBattery Type = "statusLowBattery" StatusTampered Type = "statusTampered" StreamingStatus Type = "streamingStatus" SulphurDioxideDensity Type = "sulphurDioxideDensity" SupportedAudioStreamConfiguration Type = "supportedAudioStreamConfiguration" SupportedRTPConfiguration Type = "supportedRTPConfiguration" SupportedVideoStreamConfiguration Type = "supportedVideoStreamConfiguration" SwingMode Type = "swingMode" TargetAirPurifierState Type = "targetAirPurifierState" TargetAirQuality Type = "targetAirQuality" TargetDoorState Type = "targetDoorState" TargetFanState Type = "targetFanState" TargetHeaterCoolerState Type = "targetHeaterCoolerState" TargetHeatingCoolingState Type = "targetHeatingCoolingState" TargetHorizontalTiltAngle Type = "targetHorizontalTiltAngle" TargetHumidifierDehumidifierState Type = "targetHumidifierDehumidifierState" TargetPosition Type = "targetPosition" TargetRelativeHumidity Type = "targetRelativeHumidity" TargetSlatState Type = "targetSlatState" TargetTemperature Type = "targetTemperature" TargetTiltAngle Type = "targetTiltAngle" TargetVerticalTiltAngle Type = "targetVerticalTiltAngle" TemperatureDisplayUnits Type = "temperatureDisplayUnits" TimeUpdate Type = "timeUpdate" TunnelConnectionTimeout Type = "tunnelConnectionTimeout" TunneledAccessoryAdvertising Type = "tunneledAccessoryAdvertising" TunneledAccessoryConnected Type = "tunneledAccessoryConnected" TunneledAccessoryStateNumber Type = "tunneledAccessoryStateNumber" ValveType Type = "valveType" Version Type = "version" VOCDensity Type = "vocDensity" Volume Type = "volume" WaterLevel Type = "waterLevel" CurrentPower Type = "currentPower" CurrentVoltage Type = "currentVoltage" CurrentAmpere Type = "currentAmpere" EnergyUsed Type = "energyUsed" )
All feature types
Click to show internal directories.
Click to hide internal directories.