2021-06-25, 12:42
hi,every one!
I have two devices, a small linux computer, and a kodi with libreelec system
Now, I want to use crontab to execute timing task calls on linux libreelec jsonrpc play music,
how do I do it ?
I want to play music by calling jsonrpc api on linux machine And pause playback ctr
![Full sized picture Image](https://i.loli.net/2021/06/25/fD4ZUBTuNwjM5x7.png)
When I call with the following api, it seems to have no effect
the calling method is as follows
curl --location --request POST 'http://192.168.50.23:8080/jsonrpc?jsonrpc?Player.Open' \
--header 'Content-Type: application/json' \
--data-raw '[{"jsonrpc":"2.0","method":"Player.Open","params":{"item":{"position":0,"playlistid":0},"options":{}},"id":244}]'
curl --location --request POST 'https://192.168.50.23:8080/jsonrpc?Base' \
--header 'Content-Type: application/json' \
--data-raw '[{"jsonrpc":"2.0","method":"Player.GetProperties","params":[0,["playlistid","speed","position","totaltime","time","percentage","shuffled","repeat","canrepeat","canshuffle","canseek","partymode"]],"id":13},{"jsonrpc":"2.0","method":"Player.GetItem","params":[0,["title","thumbnail","file","artist","genre","year","rating","album","track","duration","playcount","dateadded","episode","artistid","albumid","tvshowid","fanart"]],"id":14}]'
please help me! Please help me see these two issues
1, When libreelec starts up every time, calling jsonrpc player.open music does not work?
2, "id":14? How to get the jsonrpc id parameter, how to get this id
I have two devices, a small linux computer, and a kodi with libreelec system
Now, I want to use crontab to execute timing task calls on linux libreelec jsonrpc play music,
how do I do it ?
I want to play music by calling jsonrpc api on linux machine And pause playback ctr
![Full sized picture Image](https://i.loli.net/2021/06/25/fD4ZUBTuNwjM5x7.png)
When I call with the following api, it seems to have no effect
the calling method is as follows
curl --location --request POST 'http://192.168.50.23:8080/jsonrpc?jsonrpc?Player.Open' \
--header 'Content-Type: application/json' \
--data-raw '[{"jsonrpc":"2.0","method":"Player.Open","params":{"item":{"position":0,"playlistid":0},"options":{}},"id":244}]'
curl --location --request POST 'https://192.168.50.23:8080/jsonrpc?Base' \
--header 'Content-Type: application/json' \
--data-raw '[{"jsonrpc":"2.0","method":"Player.GetProperties","params":[0,["playlistid","speed","position","totaltime","time","percentage","shuffled","repeat","canrepeat","canshuffle","canseek","partymode"]],"id":13},{"jsonrpc":"2.0","method":"Player.GetItem","params":[0,["title","thumbnail","file","artist","genre","year","rating","album","track","duration","playcount","dateadded","episode","artistid","albumid","tvshowid","fanart"]],"id":14}]'
please help me! Please help me see these two issues
1, When libreelec starts up every time, calling jsonrpc player.open music does not work?
2, "id":14? How to get the jsonrpc id parameter, how to get this id