Skip to content

Instantly share code, notes, and snippets.

@frazei
Last active July 26, 2022 09:43
Show Gist options
  • Save frazei/09d69242a8beed0cf0a1c193a45a650a to your computer and use it in GitHub Desktop.
Save frazei/09d69242a8beed0cf0a1c193a45a650a to your computer and use it in GitHub Desktop.
API Sony HAP-S1

API Sony HAP-S1

Sony HAP-S1 is a High-Resolution Audio HDD player.

There is also a variant called HAP-Z1ES.

Web Browser App

The main page is accessible via http://IPADDR:60100/HAP.html and redirects to the version 2.0 of the application:

http://IPADDR:60100/HAP_app.html

There are also other two versions (broken) accessible by clicking on the text "Sony HDD Audio Player HAP-S1 Web Browser App":

http://192.168.1.69:60100/HAP_ver.1.2.1.html
http://192.168.1.69:60100/HAP_v1.0.html

API list with examples using curl

Power

get power status

curl -i -d '{"method":"getPowerStatus","id":1,"params":[],"version":"1.1"}' http://IPADDR:60200/sony/system

set power ON

curl -i -d '{"method":"setPowerStatus","id":1,"params":[{"status":"active"}],"version":"1.1"}' http://IPADDR:60200/sony/system

set power OFF

curl -i -d '{"method":"setPowerStatus","id":55,"params":[{"status":"off"}],"version":"1.1"}' http://IPADDR:60200/sony/system

Music

pause/play

curl -i -d '{"method":"pausePlayingContent","id":"1","params":[],"version":"1.0"}' http://IPADDR:60200/sony/avContent

next/prev

curl -i -d '{"method":"setPlayNextContent","id":"1","params":[],"version":"1.0"}' http://IPADDR:60200/sony/avContent
curl -i -d '{"method":"setPlayPreviousContent","id":"1","params":[],"version":"1.0"}' http://IPADDR:60200/sony/avContent

get/set volume level

curl -i -d '{"method":"getVolumeInformation","id":"1","params":[],"version":"1.1"}' http://IPADDR:60200/sony/audio
curl -i -d '{"method":"setAudioVolume","id":"1","params":[{"volume":"25"}],"version":"1.0"}' http://IPADDR:60200/sony/audio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment