Version: v0.0.0-...-5385bce Latest Latest

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

Go to latest
Published: Jun 2, 2020 License: Apache-2.0 Imports: 14 Imported by: 2




This section is empty.


This section is empty.


func SetPins

func SetPins(p []Pin)

SetPins sets the list of pins


type Pin

type Pin struct {
	Pin  int  `json:"pin"`
	Flip bool `json:"flip"`

	BlueberryPresets string `json:"blueberry_presets"`
	Presets          struct {
		Connected    map[string]string `json:"connected"`
		Disconnected map[string]string `json:"disconnected"`
	} `json:"presets"`

	ReadFrequency     string `json:"read-frequency"`
	ReadsBeforeChange int    `json:"reads-before-change"`
	TrueUpFrequency   string `json:"true-up-frequency"`

	ChangeRequests []request `json:"change"`
	TrueUpRequests []request `json:"true-up"`

	Connected bool `json:"connected"`

Pin .

func GetPins

func GetPins() []Pin

GetPins gets the list of pins

func (Pin) BuildingID

func (p Pin) BuildingID() string

BuildingID returns this pi's building id

func (Pin) CurrentPreset

func (p Pin) CurrentPreset(hostname string) string

CurrentPreset returns the preset the hostname should be set to

func (*Pin) Monitor

func (p *Pin) Monitor()

Monitor starts monitoring the signal on a pin

func (Pin) Room

func (p Pin) Room() string

Room returns this pi's room number

func (Pin) RoomID

func (p Pin) RoomID() string

RoomID returns this pi's room id

func (Pin) SystemID

func (p Pin) SystemID() string

SystemID returns this pi's device id

func (Pin) Time

func (p Pin) Time() string

Time returns the current time

Source Files

Jump to

Keyboard shortcuts

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