Posts: 112
Threads: 39
Joined: Jul 2017
Reputation:
1
28.07.2017, 10:40
(This post was last modified: 28.07.2017, 10:41 by Jayce .)
Hello, I'd like to ask if there's a possibility of amati.linea playing youtube videos as it's doing with soundcloud. I'm referring to this example tutorial:
http://openrb.com/stream-soundcloud-song...sh-button/
Thank you very much for any response.
Posts: 41
Threads: 1
Joined: Aug 2015
Reputation:
8
Hi
I'm using Chromecast and HDMI to optical converter. Works perfect.
BR
Posts: 8069
Threads: 43
Joined: Jun 2015
Reputation:
470
We have Spotify Connect support coming soon, but it will require Spotify premium account
Posts: 26
Threads: 2
Joined: Jul 2015
Reputation:
0
(08.08.2017, 12:55) admin Wrote: We have Spotify Connect support coming soon, but it will require Spotify premium account
Any update concerning Spotify Connect ?
Posts: 429
Threads: 100
Joined: Jun 2015
Reputation:
45
Spotify Connect is already supported. We are doing some tests and will release the firmware soon on our website. Please note that you need Premium subscription in order to work. I'll send you a test firmware to email to try it out
Posts: 10
Threads: 2
Joined: Mar 2017
Reputation:
1
(05.02.2018, 08:02) edgars Wrote: Spotify Connect is already supported. We are doing some tests and will release the firmware soon on our website. Please note that you need Premium subscription in order to work. I'll send you a test firmware to email to try it out
Can you send me that firmware to email CEST189@gmail.com?
Thanks
Posts: 8069
Threads: 43
Joined: Jun 2015
Reputation:
470
Posts: 10
Threads: 2
Joined: Mar 2017
Reputation:
1
[attachment=821 Wrote: admin pid='7741' dateline='1521125084']Try this image:
https://dl.openrb.com/audio/imx28-20180313.img
Thank you,
But i update to my device " ERROR" .
look pic.
Attached Files
Thumbnail(s)
Posts: 8069
Threads: 43
Joined: Jun 2015
Reputation:
470
Looks like you have older hardware which is not supported anymore.
Posts: 10
Threads: 2
Joined: Mar 2017
Reputation:
1
(16.03.2018, 08:18) admin Wrote: Looks like you have older hardware which is not supported anymore.
Help me, pls
thanks
Posts: 237
Threads: 31
Joined: May 2018
Reputation:
2
04.02.2020, 15:44
(This post was last modified: 04.02.2020, 15:46 by DGrandes .)
Hi!
Any new with spotify connect?
I´ll try to integrate with Spotify developer but I cant´t get new token. (token expire in 1 hour)
I´ve tried to get token with this but i can´t:
https://developer.spotify.com/documentat...tials-flow
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
local headers_token = {
[
'Authorization' ] =
"Basic " ..
Id_Psw_Encode64 ,
}
function Data_Pedir_Token ()
url =
"https://accounts.spotify.com/api/token"
data =
json.encode ({
[
'grant_type' ] =
"client_credentials" ,
})
return data ,
url
end
function Comando_token (
data ,
url )
headers =
headers_token
url =
url
res ,
err =
dorequestPostSpoty (
url ,
headers ,
"POST" ,
data )
log (
res ,
err )
resjson =
json.decode (
res )
if resjson [
1 ] ==
nil then
return nil
end
return resjson
end
function PedirToken ()
local data ,
url =
Data_Pedir_Token ()
Comando_token (
data ,
url )
end
PedirToken ()
If I get token manualy it works perfectly
Posts: 4935
Threads: 28
Joined: Aug 2017
Reputation:
225
Hi
What do you mean? Spotify was implemented years ago
BR
------------------------------
Ctrl+F5
Posts: 237
Threads: 31
Joined: May 2018
Reputation:
2
(04.02.2020, 15:56) Daniel. Wrote: Hi
What do you mean? Spotify was implemented years ago
BR
I don´t understand. How is implemented?
Posts: 4935
Threads: 28
Joined: Aug 2017
Reputation:
225
Which fw do you have?
You need Spotify Premium account to be able to stream music to SP.
------------------------------
Ctrl+F5
Posts: 237
Threads: 31
Joined: May 2018
Reputation:
2
(04.02.2020, 16:05) Daniel. Wrote: Which fw do you have?
You need Spotify Premium account to be able to stream music to SP.I have 20191015 fw and I have spotify premium.
How can I stream music in LM?
Posts: 4935
Threads: 28
Joined: Aug 2017
Reputation:
225
In LM you cant as it doesn't have speakers
You can stream to amati players. When you play music in spotify app you can select device and one of them will be amati or what name you given to it.
------------------------------
Ctrl+F5
Posts: 237
Threads: 31
Joined: May 2018
Reputation:
2
04.02.2020, 16:24
(This post was last modified: 04.02.2020, 16:33 by DGrandes .)
Sorry I haven´t explained well,
I don´t want to stream in LM.
I want to send an order from LM to spotify acount and spotify speakers/devices (play specific playlist, pause, get status...) and I can do it with manual token but it expires.
When I try to get token by script with this script I can´t do it.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
local headers_token = {
[
'Authorization' ] =
"Basic " ..
Id_Psw_Encode64 ,
}
function Data_Pedir_Token ()
url =
"https://accounts.spotify.com/api/token"
data =
json.encode ({
[
'grant_type' ] =
"client_credentials" ,
})
return data ,
url
end
function Comando_token (
data ,
url )
headers =
headers_token
url =
url
res ,
err =
dorequestPostSpoty (
url ,
headers ,
"POST" ,
data )
log (
res ,
err )
resjson =
json.decode (
res )
if resjson [
1 ] ==
nil then
return nil
end
return resjson
end
function PedirToken ()
local data ,
url =
Data_Pedir_Token ()
Comando_token (
data ,
url )
end
PedirToken ()
It is posible?
Posts: 4935
Threads: 28
Joined: Aug 2017
Reputation:
225
OK, I completely misunderstood you as you posted it under Streaming Player category. Admin should look at it.
PS. I still don't know what is the use for that.
------------------------------
Ctrl+F5
Posts: 8069
Threads: 43
Joined: Jun 2015
Reputation:
470
While this can be implemented with manual copying of tokens this solution might stop working at any point. The problem is that OAuth is means for end-user apps with UI not for server-to-server communication (Spotify server-to-server API does not provide player control). You will need a script to refresh the token periodically as it has a short expiration time.
This example might be helpful. It's for different OAuth service but quite similar. You need to put refresh token into storage variable and use access token from storage in scripts that send API requests.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
url =
require (
'socket.url' )
http =
require (
'ssl.https' )
ltn12 =
require (
'ltn12' )
json =
require (
'json' )
refresh_token =
storage.get (
'oauth_refresh_token' )
if not refresh_token then
log (
'missing refresh_token' )
return
end
local function buildqs (
chunks )
local qs = {}
for k ,
v in pairs (
chunks )
do
qs [ #
qs +
1 ] =
url.escape (
tostring (
k )) ..
'=' ..
url.escape (
tostring (
v ))
end
return table.concat (
qs ,
'&' )
end
payload =
buildqs ({
grant_type =
'refresh_token' ,
client_id =
'CLIENT_ID' ,
client_secret =
'CLIENT_SECRET' ,
refresh_token =
refresh_token ,
})
source =
ltn12.source.string (
payload )
headers = {
[
'content-length' ] =
tostring (#
payload ),
[
'content-type' ] =
'application/x-www-form-urlencoded; charset=UTF-8' ,
}
sink ,
output =
ltn12.sink.table ()
local one ,
code ,
hdrs ,
status =
http.request ({
url =
'ENDPOINT_URL' ,
sink =
sink ,
source =
source ,
method =
'POST' ,
headers =
headers ,
})
res =
table.concat (
output )
if code ==
200 then
res ,
err =
json.pdecode (
res )
if type (
res ) ==
'table' then
storage.set (
'oauth_access_token' ,
res.access_token )
storage.set (
'oauth_refresh_token' ,
res.refresh_token )
else
log (
'json decode failed' ,
res ,
err )
end
else
log (
'error' ,
code ,
res )
end