meteremail

package
v0.2024.4 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Overview

Package meteremail provides an automation that collects the instantaneous meter readings for a set of given devices. The automation uses the Meter API to fetch meter readings on a configurable fixed date, formats a summary email using html/template and sends it to some recipients using smtp with a CSV file for detailed readings. Test program for meter reading automation is in 'cmd/tools/test-meteremail/main.go'.

Index

Constants

View Source
const AutoName = "meteremail"
View Source
const MeterTypeElectric = 2
View Source
const MeterTypeWater = 1

Variables

View Source
var Factory auto.Factory = factory{}

Functions

This section is empty.

Types

type Attrs

type Attrs struct {
	Now                  time.Time
	Stats                []Stats
	ReadingsByFloorZone  map[string]map[string][]Stats // map floor -> zone -> reading
	EnergySummaryReports []SummaryReport
	WaterSummaryReports  []SummaryReport
}

type MeterReading

type MeterReading struct {
	MeterType MeterType
	Date      time.Time
	Reading   float32
}

type MeterType

type MeterType uint8

type Stats

type Stats struct {
	Source       config.Source
	MeterReading MeterReading
}

type SummaryReport

type SummaryReport struct {
	Floor        string
	Zone         string
	TotalReading float32
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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