📝 Note: This has been built with some Claude Sonnet 4.
A Go library for controlling Daikin HVAC systems, ported from the Python pydaikin library. This library provides a simple and efficient way to interact with Daikin air conditioning units over HTTP.
go get github.com/jattkaim/godaikinclient := godaikin.NewClient(nil)
device, err := client.Connect("192.168.1.100")client := godaikin.NewClient(nil)
device, err := client.Connect("192.168.1.100",
godaikin.WithPassword("your_password"))client := godaikin.NewClient(nil)
device, err := client.Connect("192.168.1.100",
godaikin.WithKey("your_key"),
godaikin.WithUUID("your_uuid"))fmt.Printf("Device Type: %s\n", device.GetDeviceType())
fmt.Printf("IP Address: %s\n", device.GetDeviceIP())
fmt.Printf("MAC Address: %s\n", device.GetMAC())
fmt.Printf("Power State: %t\n", device.GetPowerState())
fmt.Printf("Mode: %s\n", device.GetMode())
if temp, err := device.GetInsideTemperature(); err == nil {
fmt.Printf("Inside Temperature: %.1f°C\n", temp)
}
if temp, err := device.GetTargetTemperature(); err == nil {
fmt.Printf("Target Temperature: %.1f°C\n", temp)
}ctx := context.Background()
// Set temperature
err := device.Set(ctx, map[string]string{
"stemp": "24.0", // Set target temperature to 24°C
})
// Change mode
err = device.Set(ctx, map[string]string{
"mode": "cool", // Set to cooling mode
})
// Turn off
err = device.Set(ctx, map[string]string{
"pow": "0", // Power off
})Contributions are welcome! Please feel free to submit issues and pull requests.
This project is licensed under the MIT License.