Julius-Bendt / homebridge-sonos-player

Apache License 2.0
3 stars 0 forks source link

Support environments where SSDP doesn't work #2

Closed Glurz closed 11 months ago

Glurz commented 11 months ago

Hi

Thanks for your plugin! I wanted to give it a try but unfortunately, SSDP doesn't seem to work and my Sonos system cannot be found by my homebridge installation. I don't know why... According to https://npm.io/package/@svrooij/sonos, there's the option to configure a static IP of a Sonos device. Would it be possible for your plugin to optionally allow the configuration of this IP that serves as a fallback for failed discovery?

Thanks!

Julius-Bendt commented 11 months ago

Hello @Glurz,

I've added an option to discover the system from a known device, such as explain in the link you provided.

I hope to have this tested sometime tomorrow, and will push a release to npm by then

Glurz commented 11 months ago

Thanks @Julius-Bendt! That was fast!

Julius-Bendt commented 11 months ago

np!

I've released the changes, but I didn't had the chance to test it - could you try it and let me know if the changes works?

Glurz commented 11 months ago

Hi @Julius-Bendt

It doesn't work yet. There's an "await" missing in front of the InitializeFromDevice statement. If you add this, then the devices are found.

Glurz commented 11 months ago

@Julius-Bendt please allow another question: if i turn the toggle on, the configured mp3 is played. That's great. I would have expected for the toggle to turn off automatically again once the mp3 finishes playing (or the timeout has elapsed). Why does "turn off toggle" stop the entire playback? If I understand the current behavior correctly, the mp3 cannot be played twice without stopping the playback. Thanks for your effort!

Julius-Bendt commented 11 months ago

It doesn't work yet. There's an "await" missing in front of the InitializeFromDevice statement. If you add this, then the devices are found.

Darn it, I knew I forgot something. I'll update it quick - look out for 1.1.2. Should be out when you see this message

@Julius-Bendt please allow another question: if i turn the toggle on, the configured mp3 is played. That's great. I would have expected for the toggle to turn off automatically again once the mp3 finishes playing (or the timeout has elapsed). Why does "turn off toggle" stop the entire playback? If I understand the current behavior correctly, the mp3 cannot be played twice without stopping the playback. Thanks for your effort!

I don't quite remember why it doesnt toggles off. It might have something with a bug I fixed in version 1.1.1. Could you open a new issue? it makes easier to track the progress and create changelogs for new versions

I'll look into it in the new year :D

Glurz commented 11 months ago

Thanks @Julius-Bendt. I'll open another issue for the other findings. This one here's now working. Thanks a lot.