Categorygithub.com/and3rson/intesis
modulepackage
1.0.1
Repository: https://github.com/and3rson/intesis.git
Documentation: pkg.go.dev

# README

intesis

Interface to control and monitor Intesis adapters (Mitsubishi Air Conditioning systems) with Go.

Usage example

package main

import (
	"context"
	"github.com/and3rson/intesis"
)

func main() {
	intesisManager := intesis.NewManager()
	intesisManager.AddDevice(intesis.NewDevice("ac_one", "192.168.1.101"))
	intesisManager.AddDevice(intesis.NewDevice("ac_two", "192.168.1.102"))
	intesisManager.AddDevice(intesis.NewDevice("ac_three", "192.168.1.103"))
	intesisManager.Run()

	// Set a datapoint
	intesisManager.Devices[0].Set(intesis.UserSetpoint, 250) // Set temperature to 25.0°C
	intesisManager.Devices[1].Set(intesis.OnOff, 1) // Turn on

	for {
		select {
		case event := <-intesisManager.Events:
			// Handle event
			fmt.Printf("Got event: device=%s, datapoint=%s\n", event.Device.Name, event.Datapoint)
		}
	}
}

# Functions

NewDevice creates a new Device.
NewManager creates a new Manager.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

Datapoint struct.
Device struct represents an Intesis device.
Event struct represents an event produced by the device.
Manager struct is a convenience manager for multiple Intesis devices that collects events from all devices.
Response struct represents the payload of the API response.

# Type aliases

Enum of datapoint UIDs.