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.84k stars 463 forks source link

Got status 500 when invoking /MediaRenderer/AVTransport/Control #732

Closed sli-cka closed 4 years ago

sli-cka commented 4 years ago

When I try to Linein my living room speakers to the HDMI connected TV, i receive the following error:

  "Error: Got status 500 when invoking /MediaRenderer/AVTransport/Control\n at Object.invoke (/home/pi/node-sonos-http-api-master/node_modules/sonos-discovery/lib/helpers/soap.js:99:10)\n at Player.setAVTransport (/home/pi/node-sonos-http-api-master/node_modules/sonos-discovery/lib/models/Player.js:727:15)\n at Object.linein (/home/pi/node-sonos-http-api-master/lib/actions/linein.js:17:29)\n at handleAction (/home/pi/node-sonos-http-api-master/lib/sonos-http-api.js:117:35)\n at HttpAPI.requestHandler (/home/pi/node-sonos-http-api-master/lib/sonos-http-api.js:94:21)\n at /home/pi/node-sonos-http-api-master/server.js:50:13\n at Server.finish (/home/pi/node-sonos-http-api-master/node_modules/node-static/lib/node-static.js:111:13)\n at finish (/home/pi/node-sonos-http-api-master/node_modules/node-static/lib/node-static.js:170:14)\n at /home/pi/node-sonos-http-api-master/node_modules/node-static/lib/node-static.js:144:17\n at FSReqWrap.oncomplete (fs.js:153:21)"

Can you help me solving this issue?

jishi commented 4 years ago

the linein action doesn't work with HDMI pr SPDIF inputs. I'm not familiar with how the HDMI input works, since I don't own a beam myself.

There is a workaround (see https://github.com/jishi/node-sonos-http-api/issues/109) but I'm not sure how it works with an HDMI device.

If you could send me the /roomname/status output when you have the hdmi linein selected for your beam, then it would tell me the exact avtransporturi needed to use the workaround. (replacing x-sonos-htastream:RINCON_XXXXXXXXXXXX01400:spdif)

sli-cka commented 4 years ago

Hi jishi,

thanks for your quick reply and this great api. Here is the status output of /roomname/status/

volume 26 mute false equalizer bass -5 treble 0 loudness false speechEnhancement false nightMode true currentTrack duration 0 uri "x-sonos-htastream:RINCON_347E5C9129B101400:spdif" trackUri "x-sonos-htastream:RINCON_347E5C9129B101400:spdif" type "line_in" stationName "" nextTrack artist "" title "" album "" albumArtUri "" duration 0 uri "" trackNo 1 elapsedTime 1145 elapsedTimeFormatted "00:19:05" playbackState "PLAYING" playMode repeat "none" shuffle false crossfade false

Greetings

jishi commented 4 years ago

Okay, looks like it is the same as for the playbar, so the workaround in the issue I mentioned would work.

On Wed, 13 Nov 2019, 17:18 sli-cka, notifications@github.com wrote:

Hi jishi,

thanks for your quick reply and this great api. Here is the status output of /roomname/status/

{"volume":26,"mute":false,"equalizer":{"bass":-5,"treble":0,"loudness":false,"speechEnhancement":false,"nightMode":true},"currentTrack":{"duration":0,"uri":"x-sonos-htastream:RINCON_347E5C9129B101400:spdif","trackUri":"x-sonos-htastream:RINCON_347E5C9129B101400:spdif","type":"line_in","stationName":""},"nextTrack":{"artist":"","title":"","album":"","albumArtUri":"","duration":0,"uri":""},"trackNo":1,"elapsedTime":1145,"elapsedTimeFormatted":"00:19:05","playbackState":"PLAYING","playMode":{"repeat":"none","shuffle":false,"crossfade":false}}

Greetings

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jishi/node-sonos-http-api/issues/732?email_source=notifications&email_token=AAYE2IZ7G5BBRWPTBOEBMVLQTQSGNA5CNFSM4JM3ZFU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOED6V6UQ#issuecomment-553475922, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAYE2I5CN5UUFXEALM7DWCLQTQSGNANCNFSM4JM3ZFUQ .

sli-cka commented 4 years ago

Ok, just found out that replacing /Roomname/linein with /Roomname/setavtransporturi/x-sonos-htastream:RINCON_347E5C9129B101400:spdif is a workaround. Thanks for your help.