hc2

package
v1.34.2 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2025 License: MIT Imports: 3 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(acc telegraf.Accumulator, sectionBytes, roomBytes, devicesBytes []byte) error

Parse parses data from sections, rooms and devices, and adds measurements containing parsed data.

Types

type Devices

type Devices struct {
	ID         uint16 `json:"id"`
	Name       string `json:"name"`
	RoomID     uint16 `json:"roomID"`
	Type       string `json:"type"`
	Enabled    bool   `json:"enabled"`
	Properties struct {
		BatteryLevel *string     `json:"batteryLevel"`
		Dead         string      `json:"dead"`
		Energy       *string     `json:"energy"`
		Power        *string     `json:"power"`
		Value        interface{} `json:"value"`
		Value2       *string     `json:"value2"`
	} `json:"properties"`
}

Devices contains devices information

type LinkRoomsSections

type LinkRoomsSections struct {
	Name      string
	SectionID uint16
}

LinkRoomsSections links rooms to sections

type Rooms

type Rooms struct {
	ID        uint16 `json:"id"`
	Name      string `json:"name"`
	SectionID uint16 `json:"sectionID"`
}

Rooms contains rooms information

type Sections

type Sections struct {
	ID   uint16 `json:"id"`
	Name string `json:"name"`
}

Sections contains sections information

Jump to

Keyboard shortcuts

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