hc2

package
v1.32.2 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: MIT Imports: 3 Imported by: 0

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