Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speaker discovery issue #4

Open
hilli opened this issue Feb 21, 2024 · 0 comments
Open

Speaker discovery issue #4

hilli opened this issue Feb 21, 2024 · 0 comments
Assignees

Comments

@hilli
Copy link
Owner

hilli commented Feb 21, 2024

Make speaker discovery more resilient.

 ~ % kefw2 config speaker discover --save
No speakers found
~ % kefw2 config speaker discover --save
panic: interface conversion: interface {} is nil, not []interface {}

goroutine 1 [running]:
github.com/hilli/go-kef-w2/kefw2.(*KEFSpeaker).getId(0x14000031970)
	github.com/hilli/go-kef-w2/kefw2/kefw2.go:82 +0x3b0
github.com/hilli/go-kef-w2/kefw2.(*KEFSpeaker).UpdateInfo(0x14000031970)
	github.com/hilli/go-kef-w2/kefw2/kefw2.go:51 +0x9c
github.com/hilli/go-kef-w2/kefw2.NewSpeaker({0x14000175340?, 0x0?})
	github.com/hilli/go-kef-w2/kefw2/kefw2.go:35 +0x70
github.com/hilli/go-kef-w2/kefw2.DiscoverSpeakers()
	github.com/hilli/go-kef-w2/kefw2/discover.go:17 +0xa4
github.com/hilli/go-kef-w2/cmd/kefw2/cmd.init.func3(0x14000117100?, {0x101203e9a?, 0x4?, 0x101203e76?})
	github.com/hilli/go-kef-w2/cmd/kefw2/cmd/config_speaker.go:37 +0x70
github.com/spf13/cobra.(*Command).execute(0x1016e3560, {0x14000090920, 0x1, 0x1})
	github.com/spf13/cobra@v1.8.0/command.go:987 +0x828
github.com/spf13/cobra.(*Command).ExecuteC(0x1016e5ac0)
	github.com/spf13/cobra@v1.8.0/command.go:1115 +0x344
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/cobra@v1.8.0/command.go:1039
github.com/hilli/go-kef-w2/cmd/kefw2/cmd.Execute()
	github.com/hilli/go-kef-w2/cmd/kefw2/cmd/root.go:85 +0x58
main.main()
	./kefw2.go:27 +0x1c
  • If no speakers are found, do not create an invalid config (If that's what's happening)
  • Suggest adding speaker manually with kefw2 config speaker add <IP>
@hilli hilli self-assigned this Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant