jishi / node-sonos-http-api

An HTTP API bridge for Sonos easing automation. Hostable on any node.js capable device, like a raspberry pi or similar.
http://jishi.github.io/node-sonos-http-api/
MIT License
1.83k stars 462 forks source link

Say/clip commands don't seem to use new announcement API features #808

Open rfiorentino1 opened 2 years ago

rfiorentino1 commented 2 years ago

Hi. It seems as if the clip/clipall, and say/sayall commands are changing the playback stream for Sonos, instead of using the dedicated Sonos API commands for tts and playing clips, because Sonos now supports ducking current audio, and playing a clip or TTS announcement, then restoring original audio to it's current volume. When playing a clip through this server, it changes the playback to the mp3 file, and does not resume playback of previously playing material. If possible, using the Sonos-specific commands for announcements would eliminate the need to figure out what was playing beforehand, etc, because it doesn't touch the current audio stream at all, it just plays over it. Just a thought/observation, let me know if I can be of any help in testing etc.

Thanks so much!

jsiegenthaler commented 2 years ago

This project has 147 open issues and 17 pull requests, and the last release was 4 years ago.... a lot of people including myself would like to help in keeping this project maintained and up-to-date, but we are all subject to @jishi allowing that....

jenskastensson commented 2 years ago

Thanks, @jsiegenthaler, I'm also interested. If @jishi has abandoned the project (I'm not blaming her/him, it is a great project) what is the best way forward in your opinion?

jsiegenthaler commented 2 years ago

I guess @jishi has to invite other people to collaborate

csharpen commented 2 years ago

+1 for me also hoping this could use the native commands/API. Performing a TTS while doing Atmos playback on an ARC soundbar doesn't recover well.

I don't believe @jishi has abandoned it. There were comments in other issues that they are happy to review and accept quality code merges. I'm sure everyone would appreciate a few more contributors - just pick something to improve, fork, update, merge request. Hard to convince them it will be well-done until it's seen.

barrydegraaff commented 2 years ago

In response to @jsiegenthaler

Here are my 2 forks of node-sonos-http-api and node-sonos-discovery.

https://github.com/barrydegraaff/node-sonos-discovery https://github.com/barrydegraaff/node-sonos-http-api

To make it work, install the original node-sonos-http-api and then copy paste the files from my repo's over the originals to add additional features and fixes. You will have to copy node-sonos-discovery into the node_modules of node-sonos-http-api.

Many of the added work comes from pull requests and issues from the original project and some own work. Please let me know if it works for you.

node-sonos-discovery

This is a dependancy of the node-sonos-http-api, with the following changes:

node-sonos-http-api

The following API's are added:

addtoqueue
Add track to the current queue of specified player. You can obtain track uri from /favorites/detailed call. When using Sonos music library (CIFS) and know the path of a song you can construct the uri by using encodeURIComponent. The request will accept:

Examples:

removefromqueue Remove track from queue.

loudness
Can only be invoked per player, not on a grouped or zone. You can call the players individually even if they are in a group or zone.

balance
Can only be invoked per player, not on a grouped or zone. You can call the players individually even if they are in a group or zone. You can use balance to create a stereo pair of speakers of a different type by setting balance and then group them.

led
Can only be invoked per player, not on a grouped or zone. You can call the players individually even if they are in a group or zone.

putting this info in https://github.com/barrydegraaff/node-sonos-http-api/wiki

jsiegenthaler commented 2 years ago

Why can't the many forks and branches be merged into one master project so that we have a single, stable, known good working project?

It's really difficult for a normal user to follow all the various branches and forks and know which is the newest and best to use.... I don't want to have to review everyone's changes to make a decision as to which fork would be the best for me.

barrydegraaff commented 2 years ago

In an ideal world... most of the changes above have been sent as PR's to this project some time ago, I stopped sending PR's as nothing happens, I collected all my changes in one repo, you can use them -or not- or use them as reference, it is what I did with everyone else's PR's.