model

package
v0.0.0-...-c4bdd08 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllSwitchMode = []SwitchMode{
	SwitchModeOn,
	SwitchModeOff,
}

Functions

This section is empty.

Types

type ControllerMode

type ControllerMode string

ControllerMode Auto, Manual, Off, Hysteria

type DeleteTemperatureControllerReturnType

type DeleteTemperatureControllerReturnType struct {
	// The ID of the deleted Controller
	ID string `json:"id"`
	// Temperatures Probes that were associated with this controller
	TemperatureProbes []*string `json:"temperatureProbes"`
}

DeleteTemperatureControllerReturnType The deleted controller

type HysteriaSettingsInput

type HysteriaSettingsInput struct {
	// Indicates if these settings have been configured yet
	Configured *bool `json:"configured"`
	// When this temperature is hit, turn on the cooling output
	MaxTemp *string `json:"maxTemp"`
	// When this temperature is hit, turn on the heating output
	MinTemp *string `json:"minTemp"`
	// The minimum amount of time to turn the outputs on for.
	MinTime *int `json:"minTime"`
}

The new settings for hysteria mode

type ManualSettingsInput

type ManualSettingsInput struct {
	// Indicates if these settings have been configured yet
	Configured *bool `json:"configured"`
	// The time for one duty cycle in seconds
	CycleTime *int `json:"cycleTime"`
	// The manual duty cycle percentage for this controller
	DutyCycle *int `json:"dutyCycle"`
}

The new manual settings for this controller

type PidSettingsInput

type PidSettingsInput struct {
	// Indicates if these settings have been configured yet
	Configured *bool `json:"configured"`
	// The automatic cycle time in seconds
	CycleTime *int `json:"cycleTime"`
	// The minimum delay between turning an output on and off in seconds
	Delay *int `json:"delay"`
	// The derivative calculation value
	Derivative *float64 `json:"derivative"`
	// The integral calculation value
	Integral *float64 `json:"integral"`
	// The proportional calculation value
	Proportional *float64 `json:"proportional"`
	// The friendly name of the GPIO Value
	Gpio *string `json:"gpio"`
}

The settings for heating or cooling on a temperature controller

type SettingsInput

type SettingsInput struct {
	// The new brewery name (blank for no change)
	BreweryName *string `json:"breweryName"`
}

The new settings for this brewery

type SwitchMode

type SwitchMode string
const (
	SwitchModeOn  SwitchMode = "on"
	SwitchModeOff SwitchMode = "off"
)

func (SwitchMode) IsValid

func (e SwitchMode) IsValid() bool

func (SwitchMode) MarshalGQL

func (e SwitchMode) MarshalGQL(w io.Writer)

func (SwitchMode) String

func (e SwitchMode) String() string

func (*SwitchMode) UnmarshalGQL

func (e *SwitchMode) UnmarshalGQL(v interface{}) error

type SwitchSettingsInput

type SwitchSettingsInput struct {
	// The Id of the switch, if no ID, create a new switch
	ID *string `json:"id"`
	// The new Name for the switch (required during switch creation)
	Name *string `json:"name"`
	// The new GPIO for the switch (required during switch creation)
	Gpio *string `json:"gpio"`
	// The new state for the switch
	State *SwitchMode `json:"state"`
}

type TempProbeDetails

type TempProbeDetails struct {
	// The ID of an object
	ID string `json:"id"`
	// The physical address of this probe
	PhysAddr *string `json:"physAddr"`
	// The value of the reading
	Reading *string `json:"reading"`
	// The friendly name of this probe
	Name *string `json:"name"`
	// The time that this reading was updated
	Updated *time.Time `json:"updated"`
}

A device that reads a temperature and is assigned to a temperature controller

type TemperatureControllerSettingsInput

type TemperatureControllerSettingsInput struct {
	// The controller Id
	ID string `json:"id"`
	// The name of the controller.
	Name *string `json:"name"`
	// The new mode for the controller
	Mode *ControllerMode `json:"mode"`
	// The PID Settings for the cooling output
	CoolSettings *PidSettingsInput `json:"coolSettings"`
	// The PID settings for the heating output
	HeatSettings *PidSettingsInput `json:"heatSettings"`
	// The hysteria settings for controlling this temperature controller
	HysteriaSettings *HysteriaSettingsInput `json:"hysteriaSettings"`
	// The manual settings for this temperature controller
	ManualSettings *ManualSettingsInput `json:"manualSettings"`
	// The target for auto mode
	SetPoint *string `json:"setPoint"`
}

Used to configure a controller

type TemperatureProbe

type TemperatureProbe struct {
	// The physical address of this probe
	PhysAddr *string `json:"physAddr"`
	// The value of the reading
	Reading *string `json:"reading"`
	// The time that this reading was updated
	Updated *time.Time `json:"updated"`
}

A device that reads a temperature

Jump to

Keyboard shortcuts

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