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.85k stars 460 forks source link

Calling pauseall on soundbar with TV input causes Error 500 #741

Open dwm66 opened 4 years ago

dwm66 commented 4 years ago

I'm running a soundbar with my TV on the SPDIF input. During the time the soundbar is set to this input, a pause and - more significant - a /pauseall is causing an Error 500:

Error: Got status 500 when invoking /MediaRenderer/AVTransport/Control at Object.invoke (/app/node_modules/sonos-discovery/lib/helpers/soap.js:99:10) at Player.pause (/app/node_modules/sonos-discovery/lib/models/Player.js:453:15) at /app/lib/actions/pauseall.js:43:21\n at Array.map (<anonymous>) at doPauseAll (/app/lib/actions/pauseall.js:40:6) at Object.pauseAll [as pauseall] (/app/lib/actions/pauseall.js:17:10) at handleAction (/app/lib/sonos-http-api.js:117:35) at HttpAPI.requestHandler (/app/lib/sonos-http-api.js:94:21) at /app/server.js:50:13 at Server.finish (/app/node_modules/node-static/lib/node-static.js:111:13) at finish (/app/node_modules/node-static/lib/node-static.js:170:14) at /app/node_modules/node-static/lib/node-static.js:144:17 at FSReqCallback.oncomplete (fs.js:158:21)"

jishi commented 4 years ago

Soundbars does behave differently than regular line-in devices (that I'm used to), and I can see why the player would error when trying to call a pause.

Ignoring devices that has an spdif/hdmi-arc signal going should be enough, or maybe check the playback state (not sure what state a beam/playbar would be in).

I now own a Beam, so I can easily check and fix it.

dwm66 commented 4 years ago

Thank you, thats good news :)