Control from Raspberry Pi

General discussions.

Moderator: moderators

Control from Raspberry Pi

Postby tchinou1 » Thu Mar 03, 2016 9:16 pm

Hi guys ! I want to control my subsonic server (play, pause, start playlist, maybe the volume) from a Raspberry pi running a Debian server on the same LAN. What would be the best way of doing it ?
Of course, I would also like to still be able to control it from the web or mobile app.

Thanks ! :)
tchinou1
 
Posts: 8
Joined: Thu Mar 03, 2016 9:09 pm

Re: Control from Raspberry Pi

Postby ibot » Fri Mar 04, 2016 8:25 am

I dont get what you want to achieve but maybe that helps: If you are running raspbian with desktop you can just open the subsonic webinterface in browser and control your subsonic server.
ibot
 
Posts: 13
Joined: Sat Jan 30, 2016 12:55 pm

Re: Control from Raspberry Pi

Postby tchinou1 » Fri Mar 04, 2016 1:12 pm

I don't have any visual interface. I have a raspberry pi running a python script and when some conditions are true in the script I want it to start a playlist on the subsonic server in jukebox mode.
tchinou1
 
Posts: 8
Joined: Thu Mar 03, 2016 9:09 pm

Re: Control from Raspberry Pi

Postby insann » Mon Mar 07, 2016 11:35 pm

Ok i get it ^^,
you want to control subsonic from command line from host ( were subsonic is installed on ! ) am i right ?
so you need a command line client, i found only 2 and they are half graphical
witch means i don't know if you can use the commands in a script !
but try it it may work just fine !

This one is more up to date ^^ !
https://github.com/spl0k/supysonic

https://github.com/tourn/subcl

so from the manual you may need to write ( for subcl programme ) :
Code: Select all
subcl pp [name of playlist]


didn't search for supysonic command but i think you can do it by yourself ! ;p

or maybe if you're ready to do it , build some script with the REST API documentation !
http://www.subsonic.org/pages/api.jsp

Best regards !
insann
 
Posts: 39
Joined: Sat Nov 14, 2015 6:37 pm

Re: Control from Raspberry Pi

Postby tchinou1 » Mon Mar 07, 2016 11:56 pm

Thanks ! I've wrote a little script using the REST API, but I'll take a look into this !
However I have one problem:
I want to add or set multiple songs to the jukebox queue but it don't work.
If I do this: "action=add&id=85236,2674" I get this: "<jukeboxStatus currentIndex="-1" playing="false" gain="0.741007" position="0"/>"
and if I do this: "action=add&id=85236&id=2674" I get this: "<error code="0" message="NullPointerException"/>"
One song I working great.

Thanks again !
tchinou1
 
Posts: 8
Joined: Thu Mar 03, 2016 9:09 pm

Re: Control from Raspberry Pi

Postby tchinou1 » Tue Mar 08, 2016 1:13 pm

I don't know what was wrong, but now it's working !
tchinou1
 
Posts: 8
Joined: Thu Mar 03, 2016 9:09 pm

Re: Control from Raspberry Pi

Postby insann » Tue Mar 08, 2016 11:57 pm

Great to hear it ! may you past code here so we could maybe use it one day ?

all help on this forum is welcome !

Best regards !

Insann
insann
 
Posts: 39
Joined: Sat Nov 14, 2015 6:37 pm

Re: Control from Raspberry Pi

Postby tchinou1 » Wed Mar 16, 2016 4:37 am

Yes of course ! Sorry for the delay, I'm just starting with Github. Here is my code: https://github.com/tchinou1/Subsonic-Ra ... Pi-Control :)
tchinou1
 
Posts: 8
Joined: Thu Mar 03, 2016 9:09 pm


Return to General

Who is online

Users browsing this forum: No registered users and 16 guests