meross

module
v0.0.0-...-1c24bed Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2018 License: MIT

README

meross

Golang library to Meross API based on the Python library https://github.com/albertogeniola/MerossIot

build

make

test

make test

usage

import "github.com/codeboten/meross"

func main() {
	client := api.NewClient(os.Getenv("MEROSS_EMAIL"), os.Getenv("MEROSS_PASSWORD"))

	err := client.Login()
	if err != nil {
		fmt.Printf("Login error: %v\n", err)
	}
	devices, err := client.GetSupportedDevices()
	if err != nil {
		fmt.Printf("GetSupportedDevices error: %v\n", err)
	}

	if len(devices) == 0 {
		fmt.Printf("No devices found")
		return
	}
	fmt.Printf("Found devices: %v\n", devices)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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