Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LineIn selection after deprecation of player.play.avtransport #214

Open
shbert opened this issue May 12, 2022 · 5 comments
Open

LineIn selection after deprecation of player.play.avtransport #214

shbert opened this issue May 12, 2022 · 5 comments
Assignees
Labels
awaiting feedback awaiting feedback from the creator of this issue documentation Improvements or additions to documentation

Comments

@shbert
Copy link

shbert commented May 12, 2022

Thanks for the node, works really nice :)

I saw, that the method player.play.avtransport is deprecated.
Using this way was the only method to select a line-in from another player, such as the sonos-port.

I tested queue.uri, streamhttp, both of them do not accept the syntax "x-rincon-stream:RINCON_"
I came across this with an old issue/instruction: #2
I also was not able to find something in the documentation.

Proposal:

  • Either enable one of the methods to accept this URI
  • Implement a special function (like "player.play.linein") on group level, which allows to select the player linein based on player name as parameter or sonos-config item
@hklages hklages added documentation Improvements or additions to documentation awaiting feedback awaiting feedback from the creator of this issue labels May 13, 2022
@hklages hklages self-assigned this May 13, 2022
@hklages
Copy link
Owner

hklages commented May 13, 2022

Thanks for the node, works really nice :)
Your original node was the starting point :-).

You can use player.play.linein and msg.playerName = <coordinator_name>. That should work and the group plays the line in content. If the coordinator does not have a line in you can set any player with line as coordinator (coordinator.delegate).
SONOS does not support a line in at a non coordinator as source for a group.

player.* and group.* commands work together. The group.* commands just automatically sends the command to the coordinator. player. are more general.

Does that work for your use case?

@shbert
Copy link
Author

shbert commented May 16, 2022

Thanks for the quick response. Works partially. The behavior is somewhat not as expected, at least for me :).

If I got your instructions right: with the described method I need always to create a group first. With the avstream method I can play from any linein enabled player, without having it in a group, which in some cases has advantages/is easier to implement.

What also confuses me is, that the documentation of player.play.linein states, that "If player belongs to group (as joiner) it will leave the group." (obviously it works with creating the group via the household.create.group command, since it is not a joiner. This might be also related to your comment, that I can change the coordinater with the delegate method?)

player.* and group.* commands work together. The group.* commands just automatically sends the command to the coordinator. player. are more general.

Just a minor remark, if this behavior is implemented that way, it would be also nice to have a play command / select linein command on group level.

I hope I got your hints right, if not, I need to retry.

@hklages
Copy link
Owner

hklages commented May 16, 2022

Hi

If I got your instructions right: with the described method I need always to create a group first.

No. Only if you want to play line-in on multiple players (more then 1)

Maybe the following helps to better understand it - my group definition is different :-)

A single player is also a group. This group consists exactly of 1 coordinator and no joiner.
So all group commands can be applied to a single player as that is also a group - in my definition.
Therefore: To play line-in on a single player --> just use player.play.linein and use - optionally - any group command such as set volume, mute, ... (in this case you can also use player commands to set volume, mute, ...)

A group of two players consists of exactly one coordinator (as always) and exactly one joiner.
To play line-in of the coordinator just use player.play.linein and send the command to the coordinator. As the coordinator is never a joiner the player (coordinator) stays in that group and plays line-in.

To play line-in of the joiner you have first to make that player to coordinator and then send player.play.linein to the "new" coordinator.

Grouping is nothing else as setting AVTransport of a player (the joiner) to the address of the coordinator. If you send the player.play.linein to joiner the player will leave the group.

Does that make it clear? Let me know what your want to achieve and I will suggest how to do that.

@shbert
Copy link
Author

shbert commented May 16, 2022

Thanks for the explanation. So far so good.
I think I understand now how group and player usage is meant, still I'm confused, so let me try to describe the situation.

  1. I have a stereo-pair of players in one room (playername: A).
  2. I have a sonos port with its input connected to an audio source (playername: PORT).
    Now I want, that player A, plays the audio input from player PORT.

When I call method player.play.linein and inject message.playerName the players name (no matter what combination I try), either it selects the linein on the sonos port and does not change player A (which is not what I want) or it results in an error, that linein is not available. This behavior is kind of logical according to your explanation of group and player. And as mentioned in my previous post, I was not able to identify any other option than using a real group. But this limits me in playing something different on PORT (or if something is currently playing there I have to stop it), then I can reconfigure, so that I can play it on A. (okok with some workarounds I can get it maybe working, ....)

My simplified testing flow:
[{"id":"22d9c68fd9bd1b10","type":"inject","z":"7c9e39a5876bfeef","name":"","props":[{"p":"playerName","v":"A","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":570,"y":820,"wires":[["a80ef47e149b8f66"]]},{"id":"a80ef47e149b8f66","type":"sonos-universal","z":"7c9e39a5876bfeef","confignode":"172705dc8b028c15","command":"player.play.linein","state":"","stateType":"str","avoidCheckPlayerAvailability":false,"name":"","x":780,"y":820,"wires":[["eb994f022b46e76f"]]},{"id":"1b361edab01de23c","type":"debug","z":"7c9e39a5876bfeef","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1270,"y":820,"wires":[]},{"id":"eb994f022b46e76f","type":"sonos-universal","z":"7c9e39a5876bfeef","confignode":"e03d966a2ae1c709","command":"group.toggle.playback","state":"","stateType":"str","avoidCheckPlayerAvailability":false,"name":"","x":1020,"y":820,"wires":[["1b361edab01de23c"]]},{"id":"172705dc8b028c15","type":"sonos-config","name":"PORT","ipaddress":"192.168.178.10"},{"id":"e03d966a2ae1c709","type":"sonos-config","name":"A","serialnum":"","ipaddress":"192.168.178.11"}]

I hope I do not do anything really dumb wrong... ;)

@hklages
Copy link
Owner

hklages commented May 16, 2022

Hi -

I hope I do not do anything really dumb wrong... ;)

Definitely not - the device "PORT" makes the difference. line-in is for devices such as Sonos Play:5, .... with a build in line-in.

Could you please send the output of

a) household.get.groups
b) while playing anything from the PORT on your stereo pair: group.get.trackplus.

to nrcsplus@gmail.com or attach it here.

It might be that I have to create a "line-in at Sonos PORT" command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting feedback awaiting feedback from the creator of this issue documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants