INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: HTTP command for opening URL to specified zone  (Read 5038 times)

twb1000

  • Junior Woodchuck
  • **
  • Posts: 51
HTTP command for opening URL to specified zone
« on: July 14, 2015, 01:27:21 pm »

Try to make some commands for direct opening of internet radio stations to specific zone.  Can you provide an example?

Perhaps some variation on this for opening URL in zone 2

MCWS/v1/Control/MCC?Command=20001&Parameter=(url),50331648
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42053
  • Shoes gone again!
Re: HTTP command for opening URL to specified zone
« Reply #1 on: July 14, 2015, 01:31:05 pm »

Try this:
MCWS/v1/Playback/PlayByFilename?Filenames=http://www.myradio.com/1.mp3
Logged
Matt Ashland, JRiver Media Center

mjcrhbsh01

  • Recent member
  • *
  • Posts: 30
Re: HTTP command for opening URL to specified zone
« Reply #2 on: July 14, 2015, 02:22:58 pm »

Just note that currently this command will always play to the active zone regardless of the zone in the command. This is something that will be fixed in the next build.

See this thread: http://yabb.jriver.com/interact/index.php?topic=98507.0
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42053
  • Shoes gone again!
Re: HTTP command for opening URL to specified zone
« Reply #3 on: July 14, 2015, 02:27:50 pm »

Just note that currently this command will always play to the active zone regardless of the zone in the command. This is something that will be fixed in the next build.


It's getting the zone just fine in our code.

Code: [Select]
// get the zone
CPlayerZone * pZone = GetZone(Context, this);

// post the message
if (pZone != NULL)
{
pPlay->m_nZone = pZone->GetZoneID();
PostMCC(MCC_PLAY_ADVANCED, (intn) pPlay);
Logged
Matt Ashland, JRiver Media Center

twb1000

  • Junior Woodchuck
  • **
  • Posts: 51
Re: HTTP command for opening URL to specified zone
« Reply #4 on: July 14, 2015, 02:35:25 pm »

Just to be sure where would the zone specifier be placed in this command:

MCWS/v1/Playback/PlayByFilename?Filenames=http://www.antenne.de/webradio/channels/chillout.m3u

perhaps zone 2  (this command is working on current zone)
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42053
  • Shoes gone again!
Re: HTTP command for opening URL to specified zone
« Reply #5 on: July 14, 2015, 02:40:12 pm »

Just to be sure where would the zone specifier be placed in this command:

MCWS/v1/Playback/PlayByFilename?Filenames=http://www.antenne.de/webradio/channels/chillout.m3u

Like this:
MCWS/v1/Playback/PlayByFilename?Filenames=http://www.antenne.de/webradio/channels/chillout.m3u&ZoneType=Name&Zone=Stereo
Logged
Matt Ashland, JRiver Media Center

mjcrhbsh01

  • Recent member
  • *
  • Posts: 30
Re: HTTP command for opening URL to specified zone
« Reply #6 on: July 14, 2015, 02:53:34 pm »

It's getting the zone just fine in our code.

Code: [Select]
// get the zone
CPlayerZone * pZone = GetZone(Context, this);

// post the message
if (pZone != NULL)
{
pPlay->m_nZone = pZone->GetZoneID();
PostMCC(MCC_PLAY_ADVANCED, (intn) pPlay);

I don't understand code so I don't know what it shows. But it has not been working for me, and it was actually you that I was quoting from the other thread that you found the bug & it will be fixed in the next build, so I am confused.

http://yabb.jriver.com/interact/index.php?topic=98507.msg681431#msg681431
Logged

twb1000

  • Junior Woodchuck
  • **
  • Posts: 51
Re: HTTP command for opening URL to specified zone
« Reply #7 on: July 14, 2015, 03:15:45 pm »

Like this:
MCWS/v1/Playback/PlayByFilename?Filenames=http://www.antenne.de/webradio/channels/chillout.m3u&ZoneType=Name&Zone=Stereo

I have tried some variations on this (getting no luck).  Not sure if you use zone name or zone # as the identification and where it sits in the command line. 

Zone 2 would be "JRiver 2"

 
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10789
Re: HTTP command for opening URL to specified zone
« Reply #8 on: July 14, 2015, 03:22:06 pm »

I have tried some variations on this (getting no luck).  Not sure if you use zone name or zone # as the identification and where it sits in the command line. 

Zone 2 would be "JRiver 2"

 

You'll need a new build of MC for this to work, at least 127 IIRC:
Logged
~ nevcairiel
~ Author of LAV Filters

mjcrhbsh01

  • Recent member
  • *
  • Posts: 30
Re: HTTP command for opening URL to specified zone
« Reply #9 on: July 14, 2015, 09:05:31 pm »

You'll need a new build of MC for this to work, at least 127 IIRC:

What does "127 IIRC " mean?
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 71682
  • Where did I put my teeth?
Re: HTTP command for opening URL to specified zone
« Reply #10 on: July 14, 2015, 10:02:10 pm »

Build 127.  Coming in a few days.
Logged

mjcrhbsh01

  • Recent member
  • *
  • Posts: 30
Re: HTTP command for opening URL to specified zone
« Reply #11 on: July 14, 2015, 10:11:48 pm »

Build 127.  Coming in a few days.

Great! Thanks.
Logged

twb1000

  • Junior Woodchuck
  • **
  • Posts: 51
Re: HTTP command for opening URL to specified zone
« Reply #12 on: July 15, 2015, 03:18:11 pm »

Awesome!
Logged

twb1000

  • Junior Woodchuck
  • **
  • Posts: 51
Re: HTTP command for opening URL to specified zone
« Reply #13 on: July 15, 2015, 04:36:33 pm »

It occurred to me that perhaps I might simply need to be smarter than the problem:
issue 2 separate commands; one to select the zone and a second command to play the stream on the selected zone.
Logged

mjcrhbsh01

  • Recent member
  • *
  • Posts: 30
Re: HTTP command for opening URL to specified zone
« Reply #14 on: July 15, 2015, 05:55:08 pm »

It occurred to me that perhaps I might simply need to be smarter than the problem:
issue 2 separate commands; one to select the zone and a second command to play the stream on the selected zone.

That's what I am currently doing as a temporary workaround. I use the Tasker app on Android to issue the "Zones" command to retrieve the currently active zone & save it to a variable, I then send the "SetZone" command to make the zone where I want to play the file the active zone, I then send the "PlaybyFilename" command, then I send the "Zones" command again to set the active zone back to what it was before.
Logged

twb1000

  • Junior Woodchuck
  • **
  • Posts: 51
Re: HTTP command for opening URL to specified zone
« Reply #15 on: July 15, 2015, 10:19:29 pm »

Yeah, I think I am going to wait for the next version.
Logged

twb1000

  • Junior Woodchuck
  • **
  • Posts: 51
Re: HTTP command for opening URL to specified zone
« Reply #16 on: July 27, 2015, 08:10:52 pm »

Like this:
MCWS/v1/Playback/PlayByFilename?Filenames=http://www.antenne.de/webradio/channels/chillout.m3u&ZoneType=Name&Zone=Stereo

I am back to this again . . . .
So how would my command look if I wanted to play this URL to lets say zone "JRiver 2"

Zone information follows:

<?xml version="1.0" encoding="UTF-8" standalone="true"?>
-<Response Status="OK">
<Item Name="NumberZones">7</Item>
<Item Name="CurrentZoneID">0</Item>
<Item Name="CurrentZoneIndex">0</Item>
<Item Name="ZoneName0">Media Server PC</Item>
<Item Name="ZoneID0">0</Item>
<Item Name="ZoneGUID0">{36EAFE41-FCC1-4BE0-820B-2CD1AA7C3DAA}</Item>
<Item Name="ZoneDLNA0">0</Item>
<Item Name="ZoneName1">JRiver 1</Item>
<Item Name="ZoneID1">10000</Item>
<Item Name="ZoneGUID1">{529CB8FF-0E94-43D0-93D7-F3177A9BF701}</Item>
<Item Name="ZoneDLNA1">0</Item>
<Item Name="ZoneName2">JRiver 2</Item>
<Item Name="ZoneID2">10001</Item>
<Item Name="ZoneGUID2">{E1E2F4ED-3299-4B52-B3E0-1959D4C872A2}</Item>
<Item Name="ZoneDLNA2">0</Item>
<Item Name="ZoneName3">JRiver 3</Item>
<Item Name="ZoneID3">10002</Item>
<Item Name="ZoneGUID3">{229E36E0-9FB3-43A3-8530-80F68B07B5F7}</Item>
<Item Name="ZoneDLNA3">0</Item>
<Item Name="ZoneName4">JRiver 4</Item>
<Item Name="ZoneID4">10004</Item>
<Item Name="ZoneGUID4">{DB0DE9B5-3ED9-4203-9EF1-FD8885A389D5}</Item>
<Item Name="ZoneDLNA4">0</Item>
<Item Name="ZoneName5">Loft</Item>
<Item Name="ZoneID5">10006</Item>
<Item Name="ZoneGUID5">{648c86c0-1e9b-11b2-91e1-9270a678fadf}</Item>
<Item Name="ZoneDLNA5">1</Item>
<Item Name="ZoneName6">Yamaha DLNA</Item>
<Item Name="ZoneID6">10005</Item>
<Item Name="ZoneGUID6">{5f9ec1b3-ed59-1900-4530-00a0deb538cb}</Item>
<Item Name="ZoneDLNA6">1</Item>
</Response> 
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10789
Re: HTTP command for opening URL to specified zone
« Reply #17 on: July 28, 2015, 04:40:53 am »

Just add the zone parameters like in the example.

Either by ID:
MCWS/v1/Playback/PlayByFilename?Filenames=http://www.antenne.de/webradio/channels/chillout.m3u&ZoneType=ID&Zone=10001

Or by Name (escaping the space):
MCWS/v1/Playback/PlayByFilename?Filenames=http://www.antenne.de/webradio/channels/chillout.m3u&ZoneType=Name&Zone=JRiver%202
Logged
~ nevcairiel
~ Author of LAV Filters

twb1000

  • Junior Woodchuck
  • **
  • Posts: 51
Re: HTTP command for opening URL to specified zone
« Reply #18 on: July 28, 2015, 09:57:56 am »

For some reason this command does not seem be working for me.  I can execute other commands such volume control and volume presets.  I do have the latest build .131.   Other commands I can execute either though iRule or directly via browser.

http://192.168.1.9:52199/MCWS/v1/Playback/PlayByFilename?Filenames=http://www.antenne.de/webradio/channels/chillout.m3u&ZoneType=ID&Zone=10001

comes back with response in browser of:
<?xml version="1.0" encoding="UTF-8" standalone="true"?>
<Response Status="OK"/>
Logged

twb1000

  • Junior Woodchuck
  • **
  • Posts: 51
Re: HTTP command for opening URL to specified zone
« Reply #19 on: July 29, 2015, 12:15:20 pm »

OK, this seems to be working.  Thank you!
Logged
Pages: [1]   Go Up