The Hiphonix service is a lightweight embedded server for the Hiphonix Player Device. It provides a Mongoose WebSocket API for the Hiphonix Player Client to implement, allowing command & control over the following subsystems:
- MPD via
libmpdclient
- Wifi
iw
vialibnl
connman
viaDBUS
- System
- Power
- Configuration Reset/Restore
- Update
This project is inspired by the very cool ympd project.
The WebSocket API endpoint is available at http://hiphonix/ws
- MPD_API_GET_OUTPUTS
- Event:
{ type: "outputnames" }
- Event:
- MPD_API_GET_BROWSE,(int) page,(string) path
- Usage:
MPD_API_GET_BROWSE,0,/
- Event:
{ type: "browse" }
- Usage:
- MPD_API_GET_PLAYLIST,(string) path
- Usage:
MPD_API_GET_PLAYLIST,PinkFloyd
- Event:
{ type: "playlist" }
- Usage:
- MPD_API_SEARCH,(string) search
- Usage:
MPD_API_SEARCH,radiohead
- Event:
{ type: "search" }
- Usage:
- MPD_API_GET_QUEUE,(int) songid
- Event:
{ type: "queue" }
- Event:
- MPD_API_SAVE_QUEUE
- MPD_API_ADD_TRACK,(string) path
- Usage:
MPD_API_ADD_TRACK,Pink Floyd - The Thin Ice.mp3
- Event:
{ type: "update_queue" }
- Usage:
- MPD_API_MOVE_TRACK,(int) pos,(int) pos
- Usage:
MPD_API_MOVE_TRACK,1,2
- Event:
{ type: "update_queue" }
- Usage:
- MPD_API_ADD_PLAY_TRACK
- MPD_API_ADD_PLAYLIST,(string) playlist
- Usage:
MPD_API_ADD_PLAYLIST,PinkFloyd
- Event:
{ type: "update_queue" }
- Usage:
- MPD_API_RM_TRACK
- MPD_API_PLAY_TRACK
- Event:
{ type: "song_change" }
- Event:
- MPD_API_SET_PLAY
- Event:
{ type: "song_change" }
- Event:
- MPD_API_SET_PAUSE
- MPD_API_SET_NEXT
- Event:
{ type: "song_change" }
- Event:
- MPD_API_SET_PREV
- Event:
{ type: "song_change" }
- Event:
- MPD_API_SET_SEEK,(int) trackId,(int) seekTime
- Usage:
MPD_API_SET_SEEK,1,1
- Usage:
- MPD_API_SET_VOLUME,(int) level
- Usage:
MPD_API_SET_VOLUME,100
- Usage:
- MPD_API_TOGGLE_RANDOM,(intbool) 0|1
- MPD_API_TOGGLE_CONSUME,(intbool) 0|1
- MPD_API_TOGGLE_SINGLE,(intbool) 0|1
- MPD_API_TOGGLE_CROSSFADE,(intbool) 0|1
- MPD_API_TOGGLE_REPEAT,(intbool) 0|1
- MPD_API_TOGGLE_OUTPUT,(intbool) 0|1
- MPD_API_SET_MPDHOST
- MPD_API_SET_MPDPASS
- MPD_API_UPDATE_DB
- Event:
{ type: "update" }
- Event:
- NET_SCAN
- NET_LIST
- Usage:
NET_LIST
- Event:
{ type: "networks" }
- Usage:
- NET_JOIN
- NET_DISCONNECT
- NET_RESET
- SYS_RESTART
- SYS_RESET
- SYS_UPGRADE
status
:{ type: "status", data: "..." }
outputs
:{ type: "outputs", data: "..." }
update_queue
:{ type: "update_queue" }
song_change
:{ type: "song_change" }