From 337581be66fba67f61ff58ba8eea0b602f3c1b04 Mon Sep 17 00:00:00 2001 From: Jarno Rankinen Date: Sat, 18 Feb 2023 19:37:43 +0200 Subject: [PATCH] #6 Data structures for /status endpoint --- enervent-ctrl-go/pingvinKL/pingvinKL.go | 27 +++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/enervent-ctrl-go/pingvinKL/pingvinKL.go b/enervent-ctrl-go/pingvinKL/pingvinKL.go index 2ab8ee4..aa167e7 100644 --- a/enervent-ctrl-go/pingvinKL/pingvinKL.go +++ b/enervent-ctrl-go/pingvinKL/pingvinKL.go @@ -38,6 +38,33 @@ type pingvinRegister struct { Type string `json:"type"` Description string `json:"description"` Reserved bool `json:"reserved"` + Multiplier int `json:"multiplier"` +} + +type pingvinVentInfo struct { + supplyHeated int `json:"supply_heated"` + supplyHrc int `json:"supply_hrc"` + supplyIntake int `json:"supply_intake"` + supplyIntake24h int `json:"supply_intake_24h"` + supplyHum int `json:"supply_hum"` + extractIntake int `json:"extract_intake"` + extractHrc int `json:"extract_hrc"` + extractHum int `json:"extract_hum"` + extractHum48h int `json:"extract_hum_48h"` +} + +type PingvinStatus struct { + HeaterPct int `json:"heater_pct"` + HrcPct int `json:"hrc_pct"` + TempSetting int `json:"temp_setting"` + FanPct int `json:"fan_pct"` + VentInfo pingvinVentInfo `json:"vent_info"` + HrcEffIn int `json:"hrc_efficiency_in"` + HrcEffEx int `json:"hrc_efficiency_ex"` + OpMode string `json:"op_mode"` + DaysUntilService int `json:"days_until_service"` + Uptime string `json:"uptime"` + SystemTime string `json:"system_time"` } func newCoil(address string, symbol string, description string) pingvinCoil {