jensrossbach / node-red-contrib-sony-audio

Node-RED nodes for accessing Sony Audio Control API
MIT License
2 stars 0 forks source link

"Illegal Argument (3)" when setting input to "video" #49

Closed ewolff96 closed 1 year ago

ewolff96 commented 1 year ago

https://github.com/jensrossbach/node-red-contrib-sony-audio/blob/4cabbddf073d6330da6077fd9c7d3b7e9dbc5d99/nodes/controller.js#L611

When I set my Sony Receiver to input "video" I get a "Illegal Argument (3)" error back from the device. I have a newer Sony STR-AN1000 model. It looks like the issue stems from the fact that "video" is now a standard input name similar to "game" or "tv". The node is auto-appending the "port" as I'm guessing this may have been needed for other models but this causing an error from my AV receiver.

If this auto-append of port could be removed it would fix the issue. Maybe make it an optional feature? I was able to get the "video" input feature to work locally by commenting the source=="video" case from that if statement in controller.js line 611.

Thanks!

jensrossbach commented 1 year ago

Unfortunately the Sony documentation is not very comprehensive, especially in case of the device resource URIs. Therefore I assume that the port parameter is not valid for the extInput:video resource. I was never able to test this as my soundbar doesn't support this resource at all. There was a similar issue in the past (#27, for a different Sony device however) where I had already the same assumption that the extInput:video resource doesn't support the port parameter but this was never finally clarified as I didn't get feedback from the issue submitter.

So I will simply remove the appending of the port parameter in case of extInput:video. As this is a simple fix, I will do it for this package as well as for its successor.

ewolff96 commented 1 year ago

Sounds good to me. Thanks!

jensrossbach commented 1 year ago

Proposed change has been implemented and released with version 1.9.4 in node-red-contrib-sony-audio and version 2.0.3 in node-red-sony-audio.

@ewolff96 Please test the fix and feel free to reopen the issue if anything is not working as expected.

ewolff96 commented 1 year ago

Just updated and tested. Works great! ☺