evalphobia / google-home-client-go

Google Home client for golang
MIT License
31 stars 4 forks source link

Multiple devices at once? #8

Open Dontmindmes opened 5 years ago

Dontmindmes commented 5 years ago

Hey could you please add capabilities for multiple devices?

evalphobia commented 5 years ago

I think we should use the different instance to manipulate multiple devices in common situation.

cli1, _ := googlehome.NewClientWithConfig(googlehome.Config{
    Hostname: "192.168.0.1",
    Lang:     "en",
    Accent:   "GB",
})

cli2, _ := googlehome.NewClientWithConfig(googlehome.Config{
    Hostname: "192.168.0.2",
    Lang:     "ja",
})

But it's not difficult (except error handling) to add another struct which contains multiple clients, I'll consider it! 🌵

Dontmindmes commented 5 years ago

I actually recently discovered something that allows to broad cast to all Google's homes at the same time with out any difference