more G-Labs products

Author Topic: Synology Audio Station  (Read 1377 times)

October 27, 2015, 07:15:26 PM
Read 1377 times

gbremmer

  • *
  • Information
  • Newbie
  • Posts: 23
I would like to make a Synology Audio station app. I use the Audio station to stream and make playlists.
When I enter the following commands i can play audio in my living room using the commandline in Homegenie.You have to use cookies that will expire after a certain period.

Variables:
$Ipaddress = Synology IP Address
$port = Synology port (normally 5000)
$username = Synology Username
$password = Synology Password
$playeruid = ID of the upnp device

Login:      
Code: [Select]
wget -qO - --save-cookies cookies.txt --post-data "api=SYNO.API.Auth&version=2&method=login&account=$username&passwd=$passwd&session=AudiStation&format=cookie" http://$ipaddress:$port/webapi/auth.cgi
Get music players
Code: [Select]
wget -qO - --load-cookies cookies.txt --post-data "api=SYNO.AudioStation.RemotePlayer&version=1&method=list" http://$ipaddress:$port/webapi/AudioStation/remote_player.cgi
After listing these music players (upnp) we need the uuid, for example: uuid:8ebb6d8d-feca-288c-6c8b-56903cb21fc2
Perhaps we can just make a variable what the user has to fill in.

Play
Code: [Select]
wget -qO - --load-cookies cookies.txt --post-data "api=SYNO.AudioStation.RemotePlayer&method=control&action=play&id=$playeruid&version=2" http://$ipaddress:$port/webapi/AudioStation/remote_player.cgiStop

Code: [Select]
wget -qO - --load-cookies cookies.txt --post-data "api=SYNO.AudioStation.RemotePlayer&method=control&action=stop&id=$playeruid&version=2" http://$ipaddress:$port/webapi/AudioStation/remote_player.cgi
I will try to make a translation to C# but i'm not a real good programmer...  I don't know how to post the cookies..



There are no comments for this topic. Do you want to be the first?