Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to start media player with specific song #20

Closed
h4de5 opened this issue Aug 15, 2020 · 1 comment
Closed

Trying to start media player with specific song #20

h4de5 opened this issue Aug 15, 2020 · 1 comment

Comments

@h4de5
Copy link

h4de5 commented Aug 15, 2020

Hi,

first of all - thank you for your work on making this API public!

I am trying to get my radio (DIR3100) to play a song from a network share. But can't figure out how to do this over the API. whenever I try to list the navigation items - I get FS_FAIL (even though I have set NavState before).

I tried you PHP api and the fsapi calls directly. php unit tests an other calls work as expected.
Would be great if you could help me further.

best regards

@h4de5
Copy link
Author

h4de5 commented Sep 7, 2020

turns out, if the radio is off for too long, it cannot switch to nav.state and refuses to list items. (other commands still work even in off mode). fixed it by, switching it on and then off again.

whole chain of raw commands to play a certain song from a playlist on a shared server:

# turn radio on
/fsapi/SET/netRemote.sys.power?value=1
# switch to mode media player (maybe different on other devices)
/fsapi/SET/netRemote.sys.mode?value=3
# set nav.state
/fsapi/SET/netRemote.nav.state?value=1
# seleced first entry "shared media"
/fsapi/SET/netRemote.nav.action.navigate?value=0
# select first available server
/fsapi/SET/netRemote.nav.action.navigate?value=0
# select first directory on the server (may differ)
/fsapi/SET/netRemote.nav.action.navigate?value=0
# select entry for playlists (differs for sure)
/fsapi/SET/netRemote.nav.action.navigate?value=7
# select specific playlist (differs for sure)
/fsapi/SET/netRemote.nav.action.navigate?value=2
# select first song - will start auto play
/fsapi/SET/netRemote.nav.action.selectItem?value=0
# set volume
/fsapi/SET/netRemote.sys.audio.volume?value=12
# check if song is played
/fsapi/GET/netRemote.play.info.name

@h4de5 h4de5 closed this as completed Sep 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant