presencebypingadapter

package
v0.0.0-...-f8c32d9 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Deduces a person's presence by her device (e.g. cell phone). Turns out this is not a good idea because aggressive power saving means the devices will miss ping requests

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(ctx context.Context, adapter *hapitypes.Adapter) error

Types

type Presence

type Presence struct {
	Person  string
	Present bool
}

type ProbeRequest

type ProbeRequest struct {
	PingPacket icmp.Echo
	IP         net.IP
	GotReply   chan interface{} // closed when got back reply
}

type ProbeResponse

type ProbeResponse struct {
	ID      int
	Timeout bool
}

Jump to

Keyboard shortcuts

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