profile for Perette at Stack Overflow, Q&A for professional and enthusiast programmers

Devious Fish
pianod Documentation

Title: pianod2 Documentation Summary: pianod2 launch instructions, protocol, command set, and filter grammar.

pianod2 Documentation

pianod2 is a music player as a UNIX daemon, supporting Pandora and local music collections. The football socket library exposes both IPv4 and IPv6 sockets for control, which can be done via nc(1), telnet(1), or via a Websocket connection from a browser. The included web client can connect via HTTP or HTTPS (if enabled/configured).

The package includes piano, a shell script to access and control the music server. This allows control from other shell scripts, and provides a reference implementation for communicating with the daemon over the line protocol.

Warning: pianod2 line protocol is incompatible with that of the original pianod. And you might want to use the JSON protocol anyway.

This documentation is include with pianod2 in Markdown format. It is also available in HTML.

Which Protocol?

pianod2 supports 2 protocols:

  • A line-based protocol in the traditions of FTP, SMTP, POP, and other UNIX services. Use port 4445.
  • A more modern-style, JSON protocol. Connect to port 4446 and issue the greeting "HELO pianod json\n".
  • Either of these can be used over TLS by using port 4447 and issuing the greeting after the TLS handshake.
  • To use JSON over a websocket connection, include the query parameter protocol=json when opening the websocket connection to port 4446 or 4447.

These procedures select the response protocol. Commands/requests can be issued in either form at any time.

For clarity, “commands” refers to command-line style directives, while “request” refers to JSON style.