Go client for the SolarManager API
package main
import (
"fmt"
"os"
"github.com/ingmarstein/solarmanager-go/solarmanager"
)
func main() {
username := os.Getenv("SOLARMANAGER_USERNAME")
password := os.Getenv("SOLARMANAGER_PASSWORD")
smID := os.Getenv("SOLARMANAGER_ID")
client := solarmanager.NewClient(nil, nil, username, password)
sensors, err := client.GetSensors(smID)
if err != nil {
panic(err)
}
fmt.Println(sensors)
}