Author Topic: Adding softsqueeeze as LMCE's player  (Read 2173 times)

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 884
  • Living with LMCE
    • View Profile
Adding softsqueeeze as LMCE's player
« on: January 14, 2008, 09:51:57 am »
Hi,

I just tried to add softsqueeze to fake LMCE to think it's HW player. I sent detection message and it got "detected", but it seems that it's not controllable through LMCE. Something is different, so it doesn't work. But it would be nice to have player on your laptop winPC, that could be synchronized with HW squeezeboxes and controlable from LMCE....

Anyone with more experience doing this  ?

Regards,

Bulek.
Thanks in advance,

regards,

Bulek.

1audio

  • Addicted
  • *
  • Posts: 552
    • View Profile
Re: Adding softsqueeeze as LMCE's player
« Reply #1 on: January 14, 2008, 10:18:08 am »
1) Is it visible in slimserver?
2) You may need to add it to LMCE manually. I have done this but I can't remember how and its not obvious.

darrenmason

  • Addicted
  • *
  • Posts: 529
    • View Profile
Re: Adding softsqueeeze as LMCE's player
« Reply #2 on: January 14, 2008, 11:55:54 am »
Bulek,

I was playing around doing something very similar. Needs some defines in slimserver streamer device from memory.

I was going to do the code changes when I sort a dev environment out, which I have put off until 7.10 comes out.

I think some thought may need to go into the addressing as well. I had planned to have multiple software based devices in one machine, hooked up to different sound cards but it currently uses MAC addresses for addressing.

will probably get to do something within the next few weeks.

Regards
Darren

Matthew

  • Douchebag
  • Addicted
  • *
  • Posts: 567
    • View Profile
Re: Adding softsqueeeze as LMCE's player
« Reply #3 on: January 14, 2008, 05:19:32 pm »
Does the current LMCE MD system use anything other than SlimServer to stream audio (only) around the network? Like maybe an audio-only stream from MythTV, or some other existing component? I like the idea of using SoftSqueeze for audio distribution, especially to add "Bluetooth speakers" hacked as the audio output for SoftSqueeze. But I want to be careful of conflicts and confusing redundancy, and look at other existing solutions for clues to adding new ones.

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 884
  • Living with LMCE
    • View Profile
Re: Adding softsqueeeze as LMCE's player
« Reply #4 on: January 14, 2008, 06:42:19 pm »
1) Is it visible in slimserver?
2) You may need to add it to LMCE manually. I have done this but I can't remember how and its not obvious.

1. yeap, it is visible and I can control it from slimserver...
2. I faked detection command, and the rest was the same as in real slimserver - therefore got all media scenarios for it etc.. But probably did something stupid, I just figured out dummy MAC (in proper range of course), so probably this is the cause of problems, although I can control this player normally through slimserver web interface...

I just cannot control it from LMCE - either choosing songs or do simple pause/play/stop commands...

Anyone with more insight ? IT would be cool to control/sync player on my laptop from LMCE.....

Thanks in advance,

regards,

Bulek.
Thanks in advance,

regards,

Bulek.

1audio

  • Addicted
  • *
  • Posts: 552
    • View Profile
Re: Adding softsqueeeze as LMCE's player
« Reply #5 on: January 14, 2008, 07:01:06 pm »
Is the player running on your laptop? Or are you using an Orbiter from your laptop?

I think LMCE needs to be tricked about the IP addresses. I know from painful experience that it doesn't know how to have different devices share ip addresses or rooms.

Matthew

  • Douchebag
  • Addicted
  • *
  • Posts: 567
    • View Profile
Re: Adding softsqueeeze as LMCE's player
« Reply #6 on: January 14, 2008, 07:29:49 pm »
I think LMCE needs to be tricked about the IP addresses. I know from painful experience that it doesn't know how to have different devices share ip addresses or rooms.

Do you mean that each device has to have its own IP address, even if multiple devices that don't have IP#s themself are connected to a single Core/MD/Hybrid/Orbiter host that therefore shares its IP among its connected devices?

And do you also mean that LMCE cannot have more than a single device, even if they each have their own IP#, assigned to a single room?

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2420
    • View Profile
    • ago control
Re: Adding softsqueeeze as LMCE's player
« Reply #7 on: January 14, 2008, 07:56:20 pm »
the squeezebox protocol uses the mac of the player. So I assume softsqueeze registers with some mac (the show players command on the slimserver would be helpful). The Squeezebox device in pluto for the softsqueeze  should use that mac. Pluto should then handle the softsqueeze like the hardware players.

Maybe this is plain wrong ;)

best regards,
Hari
rock your home - http://www.agocontrol.com home automation

Matthew

  • Douchebag
  • Addicted
  • *
  • Posts: 567
    • View Profile
Re: Adding softsqueeeze as LMCE's player
« Reply #8 on: January 14, 2008, 08:16:04 pm »
the squeezebox protocol uses the mac of the player. So I assume softsqueeze registers with some mac (the show players command on the slimserver would be helpful). The Squeezebox device in pluto for the softsqueeze  should use that mac. Pluto should then handle the softsqueeze like the hardware players.

Maybe this is plain wrong ;)

LMCE uses MAC address detection in its DHCPd monitor to start SlimServer when a SqueezeBox MAC (from the manufacturer's range) is detected. Since SoftSqueeze (and perhaps other SW clients) will stand in for a HW SqueezeBox, but without the MAC in the required range, the detection should also detect other clues that SlimServer is being requested, like explicit assertions. Where's the codepath starting with the DHCPd monitor through activating SlimServer, so we can look at where to add it, and whether to revise SoftSqueeze, or wrap it, or use some other, existing detectable SoftSqueeze clue?

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 884
  • Living with LMCE
    • View Profile
Re: Adding softsqueeeze as LMCE's player
« Reply #9 on: January 14, 2008, 09:00:32 pm »
Hi,

I did this (to clarify) :
- I've made up proper MAC and send detection event
- LMCE did everything same as with HW player
- I've put SoftSB into one of the rooms

Now: I can control it from slimserver (CoreIP:9000), but not from LMCE (have also changed MAC to real laptop MAC with no gain). If MAC addresses would be involved, then I couldn't control it from slimserver or am I wrong ?

regards,

Bulek.
Thanks in advance,

regards,

Bulek.

1audio

  • Addicted
  • *
  • Posts: 552
    • View Profile
Re: Adding softsqueeeze as LMCE's player
« Reply #10 on: January 14, 2008, 09:01:16 pm »
Adding a squeezebox in the same room as a media director doesn't work because the orbiter doesn't see it as a separate device. However you can create virtual rooms like "background music" and "whole house" to support these special requirements. The ability to get the Softsqueeze on the same ip as the MD to work will be a challenge. It may work but the database may get confused. When you have two MD's in one room the Orbiters get very confused and start doing really weird things.

Matthew

  • Douchebag
  • Addicted
  • *
  • Posts: 567
    • View Profile
Re: Adding softsqueeeze as LMCE's player
« Reply #11 on: January 14, 2008, 09:07:10 pm »
Adding a squeezebox in the same room as a media director doesn't work because the orbiter doesn't see it as a separate device. However you can create virtual rooms like "background music" and "whole house" to support these special requirements. The ability to get the Softsqueeze on the same ip as the MD to work will be a challenge. It may work but the database may get confused. When you have two MD's in one room the Orbiters get very confused and start doing really weird things.

Maybe the SoftSqueeze instance can get wrapped in a script that adds a second IP# to the MD ethernet interface, or a new virtual ethernet interface (with its own dhcp client and IP#). Would that keep everything in order, letting the second IP# look like a separate device to the Core?

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2420
    • View Profile
    • ago control
Re: Adding softsqueeeze as LMCE's player
« Reply #12 on: January 14, 2008, 09:31:04 pm »
from: http://192.168.80.1:9000/html/docs/cli-api.html

Quote
<playerid> is the unique identifier for the player, usually (but not guaranteed to be) the MAC address of the player.

a real squeezebox 3:
Code: [Select]
dcerouter_48407:/var/log/pluto# telnet localhost 7890
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
player count ?
player count 1
player id 0 ?
player id 0 00%3A04%3A20%3A06%3A42%3A42

maybe http://svn.charonmedia.org/trac.cgi/browser/trunk/src/Slim_Server_Streamer/Slim_Server_Streamer.cpp will give some hints..

best regards,
Hari
rock your home - http://www.agocontrol.com home automation

Matthew

  • Douchebag
  • Addicted
  • *
  • Posts: 567
    • View Profile
Re: Adding softsqueeeze as LMCE's player
« Reply #13 on: January 14, 2008, 09:36:28 pm »
from: http://192.168.80.1:9000/html/docs/cli-api.html

Quote
<playerid> is the unique identifier for the player, usually (but not guaranteed to be) the MAC address of the player.

a real squeezebox 3:
Code: [Select]
dcerouter_48407:/var/log/pluto# telnet localhost 7890
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
player count ?
player count 1
player id 0 ?
player id 0 00%3A04%3A20%3A06%3A42%3A42

maybe http://svn.charonmedia.org/trac.cgi/browser/trunk/src/Slim_Server_Streamer/Slim_Server_Streamer.cpp will give some hints..

What's the dump for a SoftSqueeze?

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 884
  • Living with LMCE
    • View Profile
Re: Adding softsqueeeze as LMCE's player
« Reply #14 on: January 14, 2008, 10:05:25 pm »
Hi,

I have softsqueezebox on windows Laptop. Only Winxp is running on it, but this shouldn't be a problem... I have also put it into fresh room, with no other media devices... (it asked me on configuration - everything was the same as with HW player)...

I also can control him from slimserver, so I guess communication with it is ok... Only LMCE does nothing with it...

Regards,

Bulek.



Excerpt from DCERouter log (it seems ok, but I guess not enough info is displayed there ):

Quote
08      01/14/08 22:10:18.219           Received Message from 38 (Windows XP PC/tablet (Horiz) / Living Room/Family Room) to 10 (Media Plug-in / Home Theater), type 1 id 43 Command:MH Play Media, retry none, parameters: <0x6ce31b90>
08      01/14/08 22:10:18.219             Parameter 2(PK_Device): 0 <0x6ce31b90>
08      01/14/08 22:10:18.219             Parameter 13(Filename): !F29842 <0x6ce31b90>
08      01/14/08 22:10:18.219             Parameter 29(PK_MediaType): 0 <0x6ce31b90>
08      01/14/08 22:10:18.219             Parameter 44(PK_DeviceTemplate): 0 <0x6ce31b90>
08      01/14/08 22:10:18.219             Parameter 45(PK_EntertainArea): 4 <0x6ce31b90>
08      01/14/08 22:10:18.219             Parameter 116(Resume): 0 <0x6ce31b90>
08      01/14/08 22:10:18.219             Parameter 117(Repeat): 0 <0x6ce31b90>
08      01/14/08 22:10:18.220           Received Message from 38 (Windows XP PC/tablet (Horiz) / Living Room/Family Room) to 6 (Datagrid Plug-in / Home Theater), type 1 id 35 Command:Populate Datagrid, retry none, parameters: <0xa3f02b90>
08      01/14/08 22:10:18.220             Parameter 4(PK_Variable): 0 <0xa3f02b90>
08      01/14/08 22:10:18.220             Parameter 5(Value To Assign):  <0xa3f02b90>
08      01/14/08 22:10:18.220             Parameter 10(ID): 66 <0xa3f02b90>
08      01/14/08 22:10:18.220             Parameter 15(DataGrid ID): MediaFile_38 <0xa3f02b90>
08      01/14/08 22:10:18.220             Parameter 38(PK_DataGrid): 63 <0xa3f02b90>
08      01/14/08 22:10:18.220             Parameter 39(Options): 4||||1,2|0|13|0 | 2 | 535 <0xa3f02b90>
08      01/14/08 22:10:18.220             Parameter 40(IsSuccessful): 1 <0xa3f02b90>
08      01/14/08 22:10:18.220             Parameter 44(PK_DeviceTemplate): 0 <0xa3f02b90>
08      01/14/08 22:10:18.220             Parameter 60(Width): 1 <0xa3f02b90>
08      01/14/08 22:10:18.220             Parameter 61(Height): 8 <0xa3f02b90>
07      01/14/08 22:10:18.223           Event #21 has no handlers <0xa970db90>
07      01/14/08 22:10:18.223           Received Message from 10 (Media Plug-in / Home Theater) to -1001 (unknown / ), type 2 id 21 Event:Listening to Media, retry none, parameters: <0xa970db90>
07      01/14/08 22:10:18.223             Parameter 27(PK_Room): 16 <0xa970db90>
01      01/14/08 22:10:18.224           About to call CMD_Play_Media sole master to 159 play media within start streaming <0x8a6cfb90>
05      01/14/08 22:10:18.224           Is streaming ?: 1 <0x8a6cfb90>
05      01/14/08 22:10:18.224           play media command sent from 157 to 159! <0x8a6cfb90>
05      01/14/08 22:10:18.224           Media_Plugin::CheckForAlternatePipes no destination for EA 4 Robi-Laptop <0x8a6cfb90>
08      01/14/08 22:10:18.225           Received Message from 157 (SlimServer Plug-In / ) to 159 (Slim Server Streamer / ), type 1 id 249 Command:Start Streaming, retry none, parameters: <0x986ebb90>
08      01/14/08 22:10:18.225             Parameter 29(PK_MediaType): 0 <0x986ebb90>
08      01/14/08 22:10:18.225             Parameter 41(StreamID): 1018 <0x986ebb90>
08      01/14/08 22:10:18.225             Parameter 42(MediaPosition):  <0x986ebb90>
08      01/14/08 22:10:18.225             Parameter 59(MediaURL):  <0x986ebb90>
08      01/14/08 22:10:18.225             Parameter 105(StreamingTargets): 160, <0x986ebb90>
08      01/14/08 22:10:18.225           Received Message from 157 (SlimServer Plug-In / ) to 159 (Slim Server Streamer / ), type 1 id 37 Command:Play Media, retry none, parameters: <0x986ebb90>
08      01/14/08 22:10:18.225             Parameter 29(PK_MediaType): 4 <0x986ebb90>
08      01/14/08 22:10:18.225             Parameter 41(StreamID): 1018 <0x986ebb90>
08      01/14/08 22:10:18.225             Parameter 42(MediaPosition):  <0x986ebb90>
08      01/14/08 22:10:18.225             Parameter 59(MediaURL): /home/public/data/audio/Media [41]/TERRITORIAL/ENGLISH/ENGLISH OLDIES/ABBA/Gold - Greatest Hits (Signature Issue)/ABBA - Fernando - Gold - Greatest Hits (Signature Issue).mp3 <0x986ebb90>
08      01/14/08 22:10:18.226           Received Message from 10 (Media Plug-in / Home Theater) to 160 (Robi Laptop / Robi-Laptop), type 1 id 192 Command:On, retry none, parameters: <0xa970db90>
08      01/14/08 22:10:18.226             Parameter 97(PK_Pipe): 1 <0xa970db90>
08      01/14/08 22:10:18.226             Parameter 98(PK_Device_Pipes):  <0xa970db90>
08      01/14/08 22:10:18.232           Received Message from 10 (Media Plug-in / Home Theater) to 38 (Windows XP PC/tablet (Horiz) / Living Room/Family Room), type 1 id 242 Command:Set Now Playing, retry none, parameters: <0xa970db90>
08      01/14/08 22:10:18.232             Parameter 3(PK_DesignObj): 54,4962,47,244,224,230 <0xa970db90>
08      01/14/08 22:10:18.232             Parameter 5(Value To Assign): ABBA
Gold - Greatest Hits (Signature Issue) <0xa970db90>
08      01/14/08 22:10:18.232             Parameter 9(Text): Fernando <0xa970db90>
08      01/14/08 22:10:18.232             Parameter 29(PK_MediaType): 4 <0xa970db90>
08      01/14/08 22:10:18.232             Parameter 41(StreamID): 1018 <0xa970db90>
08      01/14/08 22:10:18.232             Parameter 48(Value): 1 <0xa970db90>
08      01/14/08 22:10:18.232             Parameter 50(Name):  <0xa970db90>
08      01/14/08 22:10:18.232             Parameter 103(List PK Device): 159,159,159,,0,0,0 <0xa970db90>
08      01/14/08 22:10:18.232             Parameter 120(Retransmit): 1 <0xa970db90>
05      01/14/08 22:10:18.233           Media_Plugin::StartMedia() function call completed with honors! <0x8a6cfb90>
« Last Edit: January 14, 2008, 10:11:50 pm by bulek »
Thanks in advance,

regards,

Bulek.