watch

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2022 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateWatchCommand

func CreateWatchCommand() *cobra.Command

CreateWatchCommand creates the cobra command for watching the bridge

Types

type CallbackData

type CallbackData struct {
	ID                    int                  `json:"nukiId"`
	Type                  nuki.DeviceType      `json:"deviceType"`
	Mode                  nuki.LockMode        `json:"mode"`
	State                 nuki.LockState       `json:"state"`
	StateName             string               `json:"stateName"`
	BatteryCritical       bool                 `json:"batteryCritical"`
	BatteryCharging       bool                 `json:"batteryCharging"`
	BatteryChargeState    uint8                `json:"batteryChargeState"`
	KeypadBatteryCritical bool                 `json:"keypadBatteryCritical"`
	DoorsensorState       nuki.DoorsensorState `json:"doorsensorState,omitempty"`
	DoorsensorStateName   string               `json:"doorsensorStateName,omitempty"`
	RingactionTimestamp   time.Time            `json:"ringactionTimestamp,omitempty" dbus:"-"` // Encoding of timestamps leads to an error '"dbus: connection closed by user"'
	RingactionState       bool                 `json:"ringactionState,omitempty"`
}

CallbackData represents all data delivered by the Nuki bridge in the callback

func (*CallbackData) NukiID

func (d *CallbackData) NukiID() *nuki.ID

NukiID assembles the ID from a result

Jump to

Keyboard shortcuts

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