ibc

package module
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2020 License: MIT Imports: 5 Imported by: 0

README

IBC Boiler API

The ibc package provices a go interface to an IBC Boiler.

This package simplifies access to IBC Boiler status information. At this time, the interface is read-only.

The IBC Boiler must be internet/intranet connected and be accessible. It is not reccomended to expose the IBC Boiler to the internet so this library is best accessed via intranet.

This repository also provides the ibcmonitor tool, which allows you to monitor the statistics and status of your boiler, and can be deployed as a docker image. Check it out here

See the cmd/ibcstatus tool for sample usage.

Documentation

Index

Constants

View Source
const (
	Standby      = 0
	Purging      = 1
	Igniting     = 2
	Heating      = 3
	Circulating  = 4
	Error        = 5
	Initializing = 6
)

System Status Constants

View Source
const (
	ReqMasterBoilerData          = 2
	ReqBoilerStatusData          = 3
	ReqBoilerRunProfileData      = 5
	ReqBoilerLogData             = 6
	ReqBoilerErrorLogData        = 7
	ReqBoilerData                = 11
	ReqBoilerStandardData        = 13
	ReqBoilerSetbackData         = 14
	ReqBoilerAdvSetttingsData    = 15
	ReqBoilerLoadSettingsData    = 16
	ReqBoilerMultiSettingData    = 17
	ReqBoilerCleaningSettingData = 18
	ReqBoilerExtDetailData       = 19
	ReqBoilerFactoryData         = 20
	ReqBoilerFactorySettingsData = 21
	ReqSiteLogData               = 23
	ReqClockData                 = 24
	ReqLoadPairingData           = 25
	ReqBoilerCaptureData         = 26
	ReqBoilerTempSensorData      = 27
	ReqBoilerRestore             = 29
	ReqAlertData                 = 31
	ReqLoadStatusData            = 32
	ReqBoilerSiteData            = 34
	ReqBoilerVersions            = 35
	ReqNetworkBoilerData         = 38
	ReqAdvancedOptionsData       = 42
	ReqBoilerSIMData             = 44
	ReqSlaveMACADDRSData         = 49
	ReqProgSetbackData           = 50
	ReqInternetUpdateData        = 51
	ReqPasswordData              = 99
)

Block of constants define Request types.

Variables

This section is empty.

Functions

func GetErrorString added in v1.2.0

func GetErrorString(minErr int, majErr int, sysErr int) string

GetErrorString returns a descripton of the error code specified. Assumes G3 Boilers

Types

type Boiler

type Boiler struct {
	BaseURL string
}

Boiler represents a specific IBC Boiler to interact with.

func (Boiler) GetBoilerData

func (b Boiler) GetBoilerData() (BoilerData, error)

GetBoilerData returns the BoilerStatusData for the current boiler.

func (Boiler) GetBoilerErrLogData added in v1.2.0

func (b Boiler) GetBoilerErrLogData(logEntryNumber int) (BoilerErrorLogData, error)

GetBoilerErrLogData returns the BoilerErrorLogData for the specified logEntryNumber.

func (Boiler) GetBoilerExtDetailData

func (b Boiler) GetBoilerExtDetailData() (BoilerExtDetailData, error)

GetBoilerExtDetailData returns the BoilerExtDetailData response for the current boiler.

func (Boiler) GetBoilerFactoryData

func (b Boiler) GetBoilerFactoryData() (BoilerFactoryData, error)

GetBoilerFactoryData returns the BoilerFactoryData response for the current boiler.

func (Boiler) GetBoilerLogData added in v1.1.0

func (b Boiler) GetBoilerLogData() (BoilerLogData, error)

GetBoilerLogData returns the BoilerStatusData for the current boiler.

func (Boiler) GetBoilerStandardData

func (b Boiler) GetBoilerStandardData() (BoilerStandardData, error)

GetBoilerStandardData returns the BoilerStandardData response for the current boiler.

func (Boiler) GetBoilerStatusData

func (b Boiler) GetBoilerStatusData() (BoilerStatusData, error)

GetBoilerStatusData returns the BoilerStatusData for the current boiler.

func (Boiler) GetData

func (b Boiler) GetData(requestNumber int) (interface{}, error)

GetData queries the boiler and returns a map representing the response.

func (Boiler) GetDataForLoad

func (b Boiler) GetDataForLoad(requestNumber int, loadNumber int) (interface{}, error)

GetDataForLoad queries the boiler about data for a specific load and returns a map representing the response.

func (Boiler) GetLoadStatusData

func (b Boiler) GetLoadStatusData() ([]LoadStatusData, error)

GetLoadStatusData returns the LoadStatusData response for the active loads for the current boiler.

func (Boiler) GetLoadStatusDataForLoad

func (b Boiler) GetLoadStatusDataForLoad(loadNum int) (LoadStatusData, error)

GetLoadStatusDataForLoad returns the LoadStatusData response for the current boiler and specified load.

func (Boiler) TempAsC

func (b Boiler) TempAsC(temp int) float32

TempAsC returns the specified temperature in Celsius. By default, all temperatures returned by the API are Celsius * 4.

func (Boiler) TempAsF

func (b Boiler) TempAsF(temp int) int

TempAsF returns the specified temperature in Fahrenheit. By default, all temperatures returned by the API are Celcius * 4.

type BoilerData

type BoilerData struct {
	//"rbid": 0
	//"object_no": 11,
	Status          int    `json:"status"`
	Master          int    `json:"master"`
	NetMaster       int    `json:"net_master"`
	Warnings        int    `json:"warnings"`
	Imperial        int    `json:"imperial"`
	OnTime          int    `json:"ontime"`
	BoilerID        int    `json:"boiler_id"`
	DIMTime         int    `json:"dim_time"`
	Configured      int    `json:"configured"`
	ModelNum        int    `json:"model_num"`
	DesignT         int    `json:"designT"`
	Model           string `json:"model"`
	FirmwareVersion string `json:"fwversion"`
	FirmwareDate    string `json:"fwdate"`
	SICCModule      bool   `json:"sicc_module"`
}

BoilerData represents the data returend by the ReqBoilerData request

type BoilerErrorLogData added in v1.2.0

type BoilerErrorLogData struct {
	//"rbid": 0
	//"object_no": 7
	//log_no:
	Time           string `json:"Time"`
	Date           string `json:"Date"`
	MinErr         int    `json:"MinErr"`
	MajErr         int    `json:"MajErr"`
	SysErr         int    `json:"SysErr"`
	HeatOut        int    `json:"HeatOut"`
	FanRPM         int    `json:"FanRPM"`
	InletTemp      int    `json:"InletTemp"`
	OutletTemp     int    `json:"OutletTemp"`
	BoardTemp      int    `json:"BoardTemp"`
	DiffPressure   int    `json:"DiffPressure"`
	InletTRate     int    `json:"InletTRate"`
	OutletTRate    int    `json:"OutletTRate"`
	InletPressure  int    `json:"InletPressure"`
	OutletPressure int    `json:"OutletPressure"`
	FlameSense     int    `json:"FlameSense"`
	SIMFlame       int    `json:"SIM_Flame"`
	SIMStatus      int    `json:"SIM_Status"`
	FanDutyCycle   int    `json:"FanDutyCycle"`
	BVGauge        int    `json:"BV_Gauge"`
}

BoilerErrorLogData represents the data for an single entry in the error log.

type BoilerExtDetailData

type BoilerExtDetailData struct {
	// "rbid": 0
	// "object_no": 19
	BoilerID       int     `json:"BoilerID"`
	Status         string  `json:"Status"`
	Warnings       string  `json:"Warnings"`
	Errors         string  `json:"Errors"`
	MBH            int     `json:"MBH"`
	SupplyTemp     int     `json:"SupplyT"`
	ReturnTemp     int     `json:"ReturnT"`
	TargetTemp     int     `json:"TargetT"`
	StackTemp      int     `json:"StackT"`
	AirTemp        int     `json:"AirT"`
	IndoorTemp     int     `json:"IndoorT"`
	OutdoorTemp    int     `json:"OutdoorT"`
	SecondaryTemp  int     `json:"SecondaryT"`
	TankTemp       int     `json:"TankT"`
	InletPressure  float64 `json:"InletPressure"`
	OutletPressure float64 `json:"OutletPressure"`
	DeltaPressure  float64 `json:"DeltaPressure"`
	Servicing      int     `json:"Servicing"`
	Cycles         int     `json:"Cycles"`
	MajorError     int     `json:"MajorError"`
	MinorError     int     `json:"MinorError"`
	SystemError    int     `json:"SystemError"`
	WarnFlags      int     `json:"WarnFlags"`
	Pumps          int     `json:"Pumps"`
	OpStatus       int     `json:"OpStatus"`
}

BoilerExtDetailData represents the data returend by the ReqReqBoilerExtDetailData request.

func (BoilerExtDetailData) CallingLoadNumbers

func (bedd BoilerExtDetailData) CallingLoadNumbers() []int

CallingLoadNumbers returns the load numbers that is currently calling for heat but is not being serviced.

func (BoilerExtDetailData) CirculatingLoadNumbers

func (bedd BoilerExtDetailData) CirculatingLoadNumbers() []int

CirculatingLoadNumbers returns the load numbers the boiler is currently circulating.

func (BoilerExtDetailData) ServicingLoadNumbers

func (bedd BoilerExtDetailData) ServicingLoadNumbers() []int

ServicingLoadNumbers returns the load numbers the boiler is currently servicing.

type BoilerFactoryData

type BoilerFactoryData struct {
	//"rbid": 0
	//"object_no": 20
	InletP     int `json:"InletP"`
	OutletP    int `json:"OutletP"`
	DeltaP     int `json:"DeltaP"`
	FlowRate   int `json:"FlowRate"`
	FanSpeed   int `json:"FanSpeed"`
	FanDuty    int `json:"FanDuty"`
	FanTarget  int `json:"FanTarget"`
	RequiredP  int `json:"RequiredP"`
	FanP       int `json:"FanP"`
	OffsetP    int `json:"OffsetP"`
	VentFactor int `json:"VentFactor"`
	VarDuty    int `json:"VarDuty"`
	Responding int `json:"Responding"`
	Firing     int `json:"Firing"`
	Available  int `json:"Available"`
	FCurrent   int `json:"F_Current"`
	HeatOut    int `json:"HeatOut"`
	FanHeatOut int `json:"FanHeatOut"`
	InletT     int `json:"InletT"`
	OutletT    int `json:"OutletT"`
	StackT     int `json:"StackT"`
	RPMLimit   int `json:"RPMLimit"`
	SICCFlame  int `json:"SICC_Flame"`
}

BoilerFactoryData represents the data returned by the ReqBoilerFactoryData request.

type BoilerLogData added in v1.1.0

type BoilerLogData struct {
	//"rbid": 0
	//"object_no": 6
	PowerOnHrs   int `json:"PowerOnHrs"`
	BurnerOnHrs  int `json:"BurnerOnHrs"`
	Load1OnTime  int `json:"Load1OnTime"`
	Load2OnTime  int `json:"Load2OnTime"`
	Load3OnTime  int `json:"Load3OnTime"`
	Load4OnTime  int `json:"Load4OnTime"`
	RemoteOnTime int `json:"RemoteOnTime"`
	Starts       int `json:"Starts"`
	Trials       int `json:"Trials"`
	Errors       int `json:"Errors"`
	Warnings     int `json:"Warnings"`
	LogEntries   int `json:"LogEntries"`
	Cycles       int `json:"Cycles"`
	BiasCount    int `json:"BiasCount"`
}

BoilerLogData represents the data returned by the ReqBoilerLogData request

type BoilerStandardData

type BoilerStandardData struct {
	//"rbid": 0
	//"object_no": 13
	Load1Type    int  `json:"Load1Type"`
	Load2Type    int  `json:"Load2Type"`
	Load3Type    int  `json:"Load3Type"`
	Load4Type    int  `json:"Load4Type"`
	Load1Emitter int  `json:"Load1Emitter"`
	Load2Emitter int  `json:"Load2Emitter"`
	Load3Emitter int  `json:"Load3Emitter"`
	Load4Emitter int  `json:"Load4Emitter"`
	SB1Enable    bool `json:"SB1Enable"`
	SB2Enable    bool `json:"SB2Enable"`
	SB3Enable    bool `json:"SB3Enable"`
	SB4Enable    bool `json:"SB4Enable"`
	Occupied     int  `json:"Occupied"`
	Imperial     int  `json:"Imperial"`
}

BoilerStandardData represnets the data returned by the ReqBoilerStandardData request.

func (BoilerStandardData) GetLoadTypeName

func (bsd BoilerStandardData) GetLoadTypeName(loadType int) string

GetLoadTypeName returns the name of the specified load type. Pass in the value of Load1Type as the parameter.

type BoilerStatusData

type BoilerStatusData struct {
	//"rbid": 0
	//"object_no": 3
	Status int `json:"status"`
	// MBH is Thousands of BTUs per hour
	MBH                     int `json:"mbh"`
	SupplyTemp              int `json:"supplyT"`
	ReturnTemp              int `json:"returnT"`
	SecondaryTemp           int `json:"secondaryT"`
	DomesticWaterHeaterTemp int `json:"dhwT"`
	PSIG                    int `json:"psig"`
	Warning                 int `json:"warning"`
}

BoilerStatusData represents the data returned from the ReqBoilerStatusData request.

type LoadStatusData

type LoadStatusData struct {
	// "rbid": 0
	// "object_no": 32
	Load         int `json:"Load"`
	Type         int `json:"Type"`
	HeatOut      int `json:"HeatOut"`
	SupplyTemp   int `json:"SupplyT"`
	ReturnTemp   int `json:"ReturnT"`
	BoilerMax    int `json:"BoilerMax"`
	BoilerDiff   int `json:"BoilerDiff"`
	Cycles       int `json:"Cycles"`
	Priority     int `json:"Priority"`
	Temperature1 int `json:"Temperature1"`
	Temperature2 int `json:"Temperature2"`
	Temperature3 int `json:"Temperature3"`
	Temperature4 int `json:"Temperature4"`
	Temperature5 int `json:"Temperature5"`
	Temperature6 int `json:"Temperature6"`
}

LoadStatusData represents the data returned by the ReqLoadStatusData request.

func (LoadStatusData) LoadTypeName

func (lsd LoadStatusData) LoadTypeName() string

LoadTypeName returns the name of the LoadType for this Load.

Directories

Path Synopsis
tools

Jump to

Keyboard shortcuts

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