PhJuke - Music Jukebox for Photon

Home Page


   User Interface
   Directory Browsing
   PHJ Files
   Remote Control
   The FAQ


Change Log


Remote Control via the Network

If you want to control PhJuke from another host, add the line

port n

to your preferences file ($HOME/.phjuke), where n is a number between 1024 and 65535. (Edit your preferences file while PhJuke isn't running, since it overwrites the file on exit.)

PhJuke accepts TCP connections on the specified port number and speaks a simple text network protocol. It recognizes the following commands, which may be terminated with a carriage return (^M) or newline (^J).

PhJuke responds with any data requested by the command, then a three-digit status code and a text status message. Currently only two status codes are defined, 200 (success) and 500 (command unrecognized). All results are newline-terminated.

play | pause | prev | next | stop
Simulate a press of the corresponding button on the user interface.

Clear the current playlist.

Close the network connection. You may also simply close the TCP connection from the client side.

launch path
Simulate the selection of a playlist, song, or directory in the browser.

quit path
Shuts down PhJuke.

save path
Save the current playlist. The path should end with a .m3u extension or PhJuke won't be able to load it.

Query for the current status of the browser. This command returns some or all of the following, in no particular order (and other values may be added in the future, so don't make assumptions about the number of lines in the result):
mode One of play or stop.
length The length of the current track in seconds.
time The position in the current track in seconds.
artist The name of the current track's artist.
album The name of the current track's album.
track The name of the current track.

Future additions to the network protocol, depending on demand, may include track selection and playlist management as well as server-initiated status updates.

For remote control from a Windows system using hotkeys, I recommend the TCP plugin for Girder, the favorite automation package among the home theater PC crowd. It has a bit of a learning curve, but is very powerful.

Steven Grimm