Documentation
¶
Index ¶
- func DDebug(device *Device) *zerolog.Event
- func DError(device *Device) *zerolog.Event
- func DInfo(device *Device) *zerolog.Event
- type Actor
- type AlarmActorPayload
- type ArmingSensorValue
- type BatteryLevelSensorValue
- type BatteryWarningSensorValue
- type ContactSensorValue
- type Device
- type DisarmingSensorValue
- type Id
- type LinkQualitySensorValue
- type MotionSensorValue
- type PanicSensorValue
- type Sensor
- type SmokeSensorValue
- type Spec
- type StateActorPayload
- type TamperSensorValues
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AlarmActorPayload ¶
type ArmingSensorValue ¶
type BatteryLevelSensorValue ¶
type BatteryLevelSensorValue struct {
BatteryLevel float32
}
type BatteryWarningSensorValue ¶
type BatteryWarningSensorValue struct {
BatteryWarning bool
}
type ContactSensorValue ¶
type ContactSensorValue struct {
Contact bool
}
type Device ¶
type Device struct { Id Id `json:"id"` Zone zone.Id `json:"zone"` Active bool `json:"-"` Spec Spec `json:"-"` State map[Sensor]any `json:"-"` }
func DeviceFromConfig ¶
func DeviceFromConfig(config config.DeviceConfig) Device
type DisarmingSensorValue ¶
type DisarmingSensorValue struct {
Pin string
}
type LinkQualitySensorValue ¶
type LinkQualitySensorValue struct {
LinkQuality float32
}
type MotionSensorValue ¶
type MotionSensorValue struct {
Motion bool
}
type PanicSensorValue ¶
type PanicSensorValue struct {
Panic bool
}
type Sensor ¶
type Sensor string
const ( MotionSensor Sensor = "motion" ContactSensor Sensor = "contact" SmokeSensor Sensor = "smoke" PanicSensor Sensor = "panic" BatteryWarningSensor Sensor = "battery-warning" TamperSensor Sensor = "tamper" BatteryLevelSensor Sensor = "battery-level" LinkQualitySensor Sensor = "link-quality" ArmingSensor Sensor = "arming" DisarmingSensor Sensor = "disarming" )
type SmokeSensorValue ¶
type SmokeSensorValue struct {
Smoke bool
}
type Spec ¶
type Spec struct { Id Id DisplayName string Vendor string Model string Description string Sensors []Sensor Actors []Actor }
func (Spec) HumanReadableName ¶
func (Spec) IsRelevant ¶
type TamperSensorValues ¶
type TamperSensorValues struct {
Tamper bool
}
Click to show internal directories.
Click to hide internal directories.