maximilianvoss / musicsync Goto Github PK
View Code? Open in Web Editor NEWSyncing your Toniebox with Spotify Playlists
License: Apache License 2.0
Syncing your Toniebox with Spotify Playlists
License: Apache License 2.0
This is in no way an official an endorsement of this project by Boxine, but personally I think it's awesome!
This night, one user sent about 1-2 requests every second which modify a Tonie over and over with the same content without waiting for it to be done transcoding.
For privacy reasons, Boxine does not associate the HTTP user-agent with detailed logging data (we just group it into android app, iOS app, other for these logs), but based on the extremely high frequency I am certain the user-agent Apache-HttpClient/4.5.5 (Java/1.8.0_275)
is responsible.
This project should set an HTTP-user agent like spotify-toniebox-sync (v1.2.3)
so that Boxine can report the bugs to the project causing it. After all, somewhere there is likely a user wondering why their Tonie never finishes transcoding.
Hey good evening. Very nice project, which i want to use for my kinds streaming spotify-playlists via a tonie-figure. I have done the following steps:
Install the spotify client via "raspotify" (https://github.com/dtcooper/raspotify), because of issues like "Das Laden der konfigurierten Datei »non-free/binary-armhf/Packages« wird übersprungen, da das Depot »http://repository.spotify.com stable InRelease« die Architektur »armhf« nicht unterstützt." if i wanted to install it through your step "sudo apt-get install -y spotify-client".
Install was working fine with an easy-install method:
curl -sL https://dtcooper.github.io/raspotify/install.sh | sh
I must change your link for the repository-clone to get it installed - because it has changed
git clone https://github.com/maximilianvoss/spotify-toniebox-sync.git
ln -sf $PWD/spotify-toniebox-sync/bin/sp /usr/local/bin
ln -sf $PWD/spotify-toniebox-sync/bin/stream_recorder.pl /usr/local/bin/
I found all the codes I need for the property-files and generated the refreshToken
I did the mapping for the daemon in the properties, and started the daemon after installing maven on my RPI and bulding a jar with all dependencies.
Can you help me please on the issue regarding spotify - i guess the client is not working the same as the one you suggested and also the double-check of ? Thanks, Erik.
Hi,
I would really install yout build but I'm struggling hard with the start.
What Hardware do I need?
What is the package and where do I install it?
Thnx for any clarification.
BR
Hi,
first of all I have to say, that I am exited to find such a project here. Thank you for your effort!
I clone the repo and build like suggested. Everything works fine, Afterwards I edited the "_remote.repositories" file. I added
spotify.clientId=lxvkslfdgko1289378 # my client id
spotify.clientSecret=skldjflsdkj28137891 # my secret
spotify.redirectUri=http://aisjd93042903.mytonie.de # my redirectUri
The letters and numbers above are randomly. Originally I added by values from the developer page. Afterwards I run
java -jar spotify-toniebox-sync-[VERSION]-jar-with-dependencies.jar --apicode
And got:
FATAL: : URI Syntax Exception for "<redirectUri>"
Exception in thread "main" java.lang.NullPointerException at com.wrapper.spotify.requests.authorization.authorization_code.AuthorizationCodeUriRequest$Builder.redirect_uri(AuthorizationCodeUriRequest.java:74)
at com.wrapper.spotify.SpotifyApi.authorizationCodeUri(SpotifyApi.java:406) at rocks.voss.spotifytonieboxsync.SpotifyAuthenticationSetup.getSignInUrl(SpotifyAuthenticationSetup.java:29)
at rocks.voss.spotifytonieboxsync.Application.main(Application.java:40)
What I am doing wrong? Do I have to add my spotify credentials in another file?
Thanks for your help
thanks a lot for this great project. I'm trying to get it set up but I can't get past setting up spotify.
I filled out the musicsync.properties file with my spotify account details and placed the file into the package/target/output/
directory. But when I execute ./musicsync --spotify-apicode
I only get
~/software/spotify-toniebox-sync/package/target/output$ ./musicsync --spotify-apicode
Usage: spotify-toniebox-sync.jar [--daemon | --input INPUT --output OUTPUT]
--daemon
Run in daemon mode to sync periodically all lists in the properties file
--input INPUT
Define an input source for a one-time run
--output OUTPUT
Define an output destination for a one-time run
Input Plugins:
Output Plugins:
I little help would be greatly appreciated. Thanks
Heyho,
thank you for your awesome work.
The installation of spotify-toniebox-sync
, generation of spotify URI and access token went like a blast but unfortunately, I get the following error running the daemon as well as single cmd:
$ ./musicsync --input spotify:playlist:XXXfoobarXXX --output toniebox:XXX-XXX-XXX-XXX-XXXfoobar:XXXfoobar
02 Jul 2021 21:15:53,702 - ERROR:rocks.voss.musicsync.plugins.input.spotify.SpotifyInputPlugin:establishConnection:28: SpotifyWebApiException
com.wrapper.spotify.exceptions.detailed.BadRequestException: Invalid client
at com.wrapper.spotify.SpotifyHttpManager.getResponseBody(SpotifyHttpManager.java:298)
at com.wrapper.spotify.SpotifyHttpManager.post(SpotifyHttpManager.java:174)
at com.wrapper.spotify.requests.AbstractRequest.postJson(AbstractRequest.java:131)
at com.wrapper.spotify.requests.authorization.authorization_code.AuthorizationCodeRefreshRequest.execute(AuthorizationCodeRefreshRequest.java:33)
at rocks.voss.musicsync.plugins.input.spotify.SpotifyAuthenticationSetup.refreshToken(SpotifyAuthenticationSetup.java:43)
at rocks.voss.musicsync.plugins.input.spotify.SpotifyInputPlugin.establishConnection(SpotifyInputPlugin.java:24)
at rocks.voss.musicsync.Application.sync(Application.java:61)
at rocks.voss.musicsync.Application.main(Application.java:42)
02 Jul 2021 21:15:54,962 - ERROR:rocks.voss.musicsync.plugins.input.spotify.SpotifyInputPlugin:getTracklist:88: SpotifyWebApiException
com.wrapper.spotify.exceptions.detailed.UnauthorizedException: Invalid access token
at com.wrapper.spotify.SpotifyHttpManager.getResponseBody(SpotifyHttpManager.java:300)
at com.wrapper.spotify.SpotifyHttpManager.get(SpotifyHttpManager.java:154)
at com.wrapper.spotify.requests.AbstractRequest.getJson(AbstractRequest.java:117)
at com.wrapper.spotify.requests.data.playlists.GetListOfCurrentUsersPlaylistsRequest.execute(GetListOfCurrentUsersPlaylistsRequest.java:35)
at rocks.voss.musicsync.plugins.input.spotify.PlaylistHandler.getPlaylists(PlaylistHandler.java:29)
at rocks.voss.musicsync.plugins.input.spotify.SpotifyInputPlugin.getTracklist(SpotifyInputPlugin.java:72)
at rocks.voss.musicsync.Application.sync(Application.java:64)
at rocks.voss.musicsync.Application.main(Application.java:42)
spotify is installed, logged in, running and checked via VNC.
Versions:
spotify-toniebox-sync: latest master
spotify: 1.1.55.498.gf9a83c60
OS: Ubuntu 18.04.5 LTS
Do you have any thoughts on this. I checked the access token like a hundred times, so I think the problem is the earlier error regarding the Invalid client
.
Best regards
hey,
i tried to do the install step by step as you explained. but at the point "java -jar spotify-toniebox-sync-[VERSION]-jar-with-dependencies.jar --apicode" i got stuck. would you be so kind to explain what to do at this point ? i dont even know what VERSION to put in.
your tool looks great and seems to be exactly what i've been looking for, but i cant figure out how to install...
sorry for being such a noob :(
I think the install instructions are deprecated, at least most of the commands won't work in a newer Ubuntu release.
Can somebody update them or help me get this thing running?
I hope to get this running, sounds very very cool.
Hello,
how do i clone the donwload-service repository. git asks for a password, which i don't have.
Thank you!
Hi! Thanks heaps for this project! I think I'll make great use of it once I get it to work :)
I'm getting the error below when trying to sync - any ideas? It seems to be reading the playlist just fine but then failing on the individual songs.
07 Feb 2021 14:15:07,242 - INFO:rocks.voss.musicsync.plugins.input.spotify.SpotifyRecordingHandler:isFileValid:95: File doesn't exists
07 Feb 2021 14:15:07,244 - INFO:rocks.voss.musicsync.plugins.input.spotify.SpotifyRecordingHandler:downloadFile:37: Downloading: spotify:track:1eMhNaN4a92qoidBbkQCmG
07 Feb 2021 14:15:07,875 - ERROR:rocks.voss.musicsync.plugins.output.toniebox.TonieboxOutputPlugin:uploadTracks:48: IOException
java.io.FileNotFoundException: /Users/andreasprivate/dev/tools/spotify-toniebox-sync/package/target/output/cache/1eMhNaN4a92qoidBbkQCmG.mp3 (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.(FileInputStream.java:138)
at org.apache.http.entity.mime.content.FileBody.writeTo(FileBody.java:116)
at org.apache.http.entity.mime.AbstractMultipartForm.doWriteTo(AbstractMultipartForm.java:134)
at org.apache.http.entity.mime.AbstractMultipartForm.writeTo(AbstractMultipartForm.java:157)
at org.apache.http.entity.mime.MultipartFormEntity.writeTo(MultipartFormEntity.java:113)
at org.apache.http.impl.DefaultBHttpClientConnection.sendRequestEntity(DefaultBHttpClientConnection.java:156)
at org.apache.http.impl.conn.CPoolProxy.sendRequestEntity(CPoolProxy.java:160)
at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:238)
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:272)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)
at rocks.voss.toniebox.RequestHandler.executeRequest(RequestHandler.java:176)
at rocks.voss.toniebox.RequestHandler.executePostRequest(RequestHandler.java:147)
at rocks.voss.toniebox.RequestHandler.uploadFile(RequestHandler.java:115)
at rocks.voss.toniebox.beans.toniebox.CreativeTonie.uploadFile(CreativeTonie.java:76)
at rocks.voss.musicsync.plugins.output.toniebox.TonieboxOutputPlugin.uploadTracks(TonieboxOutputPlugin.java:44)
at rocks.voss.musicsync.Application.sync(Application.java:74)
at rocks.voss.musicsync.Application.main(Application.java:52)
Has some notation in the spotify universe changed? Does it need additional permissions to download the file?
Java-Version
java -version
openjdk version "1.8.0_252"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_252-b09)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.252-b09, mixed mode)
On MacOS Big Sur 11.1
Would be great if you could help!
Thanks,
Andreas
P.S.: It should be "File doesn't exist" :)
Also, I needed to apply the parseArgs fix that's described in the issues section already - maybe pull that into the code? #23
First: great project!
unfortunately I’m getting the following error:
Exception in thread "main" java.lang.NullPointerException
at rocks.voss.musicsync.Application.sync(Application.java:61)
at rocks.voss.musicsync.Application.main(Application.java:52)
I run on:
openjdk version "1.8.0_265"
OpenJDK Runtime Environment (build 1.8.0_265-8u265-b01-0ubuntu2~16.04-b01)
OpenJDK 64-Bit Server VM (build 25.265-b01, mixed mode)
From my understanding it has something to with the input connection…
Any ideas?
Ola,
Got a question got the project up and running but keep getting the following error
23 Jan 2021 12:52:20,448 - INFO:rocks.voss.musicsync.plugins.output.toniebox.TonieboxOutputPlugin:getCreativeTonie:201: IOException
com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.lang.String out of START_OBJECT token
at [Source: N/A; line: -1, column: -1] (through reference chain: rocks.voss.toniebox.beans.toniebox.CreativeTonie["transcodingErrors"])
at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:164)
at com.fasterxml.jackson.databind.DeserializationContext.mappingException(DeserializationContext.java:575)
at com.fasterxml.jackson.databind.deser.std.StdDeserializer._parseString(StdDeserializer.java:612)
at com.fasterxml.jackson.databind.deser.std.StringArrayDeserializer.deserialize(StringArrayDeserializer.java:69)
at com.fasterxml.jackson.databind.deser.std.StringArrayDeserializer.deserialize(StringArrayDeserializer.java:18)
at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:464)
at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:98)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:295)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:121)
at com.fasterxml.jackson.databind.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:151)
at com.fasterxml.jackson.databind.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:18)
at com.fasterxml.jackson.databind.ObjectMapper._readValue(ObjectMapper.java:2860)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:1569)
at com.fasterxml.jackson.databind.ObjectMapper.treeToValue(ObjectMapper.java:1902)
at rocks.voss.toniebox.beans.Transformer.createBean(Transformer.java:26)
at rocks.voss.toniebox.beans.Transformer.createBean(Transformer.java:17)
at rocks.voss.toniebox.RequestHandler.executeRequest(RequestHandler.java:181)
at rocks.voss.toniebox.RequestHandler.executeGetRequest(RequestHandler.java:133)
at rocks.voss.toniebox.RequestHandler.getCreativeTonies(RequestHandler.java:82)
at rocks.voss.toniebox.TonieHandler.getCreativeTonies(TonieHandler.java:64)
at rocks.voss.musicsync.plugins.output.toniebox.TonieboxOutputPlugin.getCreativeTonie(TonieboxOutputPlugin.java:189)
at rocks.voss.musicsync.plugins.output.toniebox.TonieboxOutputPlugin.orderTracks(TonieboxOutputPlugin.java:70)
at rocks.voss.musicsync.Application.sync(Application.java:75)
at rocks.voss.musicsync.Application.main(Application.java:52)
full log https://pastebin.com/1k00r3vP
Platform:
openjdk version "1.8.0_275"
OpenJDK Runtime Environment (build 1.8.0_275-8u275-b01-0ubuntu1~20.10-b01)
OpenJDK 64-Bit Server VM (build 25.275-b01, mixed mode)
It actually authenticates because when I change my credentials I get different kind of errors, also checked the creative tonie id like a 100 times :(
Any idea where to look?
Chris,
I wanted to install it in my Windows Docker Environment, but mvn install -Pdocker gets a Win32 related error. Looks like running a .sh Script directly in CMD.
Am i missing some path-Variables for Docker?
Build of "Music Sync Package Docker" fails.
Should I better run it on my NAS?
Cannot run program "D:\Docker\musicsync-master\package\docker\src\main\resources\build_package.sh" (in directory "D:\Docker\musicsync-master\package\docker"): CreateProcess error=193, %1 ist keine zulässige Win32-Anwendung -> [Help 1]
And yes, I am a bit of a Newbie, only want to get this working for my kids :)
Hi, I have managed to configure and execute musicsync on RaspberryPI. It seems like the playlist is being read from Spotify but then I get an error when the file is to be stored in the cache directory.
I have tried multiple variations of the path in the config e.g. absolute path and so on. I also set permissions to 777. In the output below the cache dir. is defined in the config to: "cachePath": "file_cache3" . The application created the file it self under ~/musicsync/package/application/target/ after startup, so I am assuming that the application has all rights required to create directories and files.
I also installed FFmpeg according to this issue: #29. This issue states also a lack of error output. Is there a fix ?
Here is my Output: ( So far I have concidered the warnings about multiple bindings of SLF4J as irrelevant )
Thanks for any help !
pi@raspberrypi:~/musicsync/package/application/target $ musicsync
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:///home/pi/musicsync/package/application/target/./modules/log4j-slf4j-impl-2.14.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/pi/musicsync/package/application/target/modules/log4j-slf4j-impl-2.14.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
2021-12-24 20:50:31,888 main WARN Could not locate file file:/home/pi/musicsync/package/application/target/log4j2.xml
2021-12-24 20:50:31,899 main WARN Could not locate file file:/home/pi/musicsync/package/application/target/log4j2.xml
Dec 24, 2021 8:50:50 PM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (java.io.FileNotFoundException) caught when processing request to {s}->https://bxn-toniecloud-prod-upload.s3.amazonaws.com:443: file_cache3/6KxcW9t7ae5kPntqfYtKtv.mp3 (No such file or directory)
Dec 24, 2021 8:50:50 PM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request to {s}->https://bxn-toniecloud-prod-upload.s3.amazonaws.com:443
Dec 24, 2021 8:50:51 PM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (java.io.FileNotFoundException) caught when processing request to {s}->https://bxn-toniecloud-prod-upload.s3.amazonaws.com:443: file_cache3/6KxcW9t7ae5kPntqfYtKtv.mp3 (No such file or directory)
Dec 24, 2021 8:50:51 PM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request to {s}->https://bxn-toniecloud-prod-upload.s3.amazonaws.com:443
Dec 24, 2021 8:50:51 PM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (java.io.FileNotFoundException) caught when processing request to {s}->https://bxn-toniecloud-prod-upload.s3.amazonaws.com:443: file_cache3/6KxcW9t7ae5kPntqfYtKtv.mp3 (No such file or directory)
Dec 24, 2021 8:50:51 PM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request to {s}->https://bxn-toniecloud-prod-upload.s3.amazonaws.com:443
20:50:51.888 [main] ERROR rocks.voss.musicsync.plugins.output.toniebox.TonieboxOutputPlugin - Exception
java.io.FileNotFoundException: file_cache3/6KxcW9t7ae5kPntqfYtKtv.mp3 (No such file or directory)
at java.io.FileInputStream.open0(Native Method) ~[?:?]
at java.io.FileInputStream.open(FileInputStream.java:219) ~[?:?]
at java.io.FileInputStream.(FileInputStream.java:157) ~[?:?]
at org.apache.http.entity.mime.content.FileBody.writeTo(FileBody.java:116) ~[httpmime-4.5.13.jar:4.5.13]
at org.apache.http.entity.mime.AbstractMultipartForm.doWriteTo(AbstractMultipartForm.java:134) ~[httpmime-4.5.13.jar:4.5.13]
at org.apache.http.entity.mime.AbstractMultipartForm.writeTo(AbstractMultipartForm.java:157) ~[httpmime-4.5.13.jar:4.5.13]
at org.apache.http.entity.mime.MultipartFormEntity.writeTo(MultipartFormEntity.java:113) ~[httpmime-4.5.13.jar:4.5.13]
at org.apache.http.impl.DefaultBHttpClientConnection.sendRequestEntity(DefaultBHttpClientConnection.java:156) ~[httpcore-4.4.13.jar:4.4.13]
at org.apache.http.impl.conn.CPoolProxy.sendRequestEntity(CPoolProxy.java:152) ~[httpclient-4.5.13.jar:4.5.13]
at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:238) ~[httpcore-4.4.13.jar:4.4.13]
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123) ~[httpcore-4.4.13.jar:4.4.13]
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:272) ~[httpclient-4.5.13.jar:4.5.13]
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186) ~[httpclient-4.5.13.jar:4.5.13]
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) ~[httpclient-4.5.13.jar:4.5.13]
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) ~[httpclient-4.5.13.jar:4.5.13]
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) ~[httpclient-4.5.13.jar:4.5.13]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) ~[httpclient-4.5.13.jar:4.5.13]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108) ~[httpclient-4.5.13.jar:4.5.13]
at rocks.voss.toniebox.RequestHandler.executeRequest(RequestHandler.java:183) ~[toniebox-api-3.3.jar:?]
at rocks.voss.toniebox.RequestHandler.executePostRequest(RequestHandler.java:154) ~[toniebox-api-3.3.jar:?]
at rocks.voss.toniebox.RequestHandler.uploadFile(RequestHandler.java:122) ~[toniebox-api-3.3.jar:?]
at rocks.voss.toniebox.beans.toniebox.CreativeTonie.uploadFile(CreativeTonie.java:76) ~[toniebox-api-3.3.jar:?]
at rocks.voss.musicsync.plugins.output.toniebox.TonieboxOutputPlugin.uploadTrack(TonieboxOutputPlugin.java:57) [musicsync-plugins-output-toniebox-3.0.jar:?]
at rocks.voss.musicsync.plugins.output.toniebox.TonieboxOutputPlugin.uploadTracks(TonieboxOutputPlugin.java:41) [musicsync-plugins-output-toniebox-3.0.jar:?]
at rocks.voss.musicsync.application.Application.syncBulk(Application.java:140) [musicsync-application-3.0.jar:?]
at rocks.voss.musicsync.application.Application.sync(Application.java:98) [musicsync-application-3.0.jar:?]
at rocks.voss.musicsync.application.Application.main(Application.java:72) [musicsync-application-3.0.jar:?]
I got the following error:
/tonie/spotify-toniebox-sync/target# java -jar spotify-toniebox-sync-1.3-SNAPSHOT-jar-with-dependencies.jar --apicode
Jun 05, 2020 7:02:30 PM com.wrapper.spotify.SpotifyHttpManager makeUri
SEVERE: URI Syntax Exception for ""
Exception in thread "main" java.lang.NullPointerException
at com.wrapper.spotify.requests.authorization.authorization_code.AuthorizationCodeUriRequest$Builder.redirect_uri(AuthorizationCodeUriRequest.java:74)
at com.wrapper.spotify.SpotifyApi.authorizationCodeUri(SpotifyApi.java:406)
at rocks.voss.spotifytonieboxsync.SpotifyAuthenticationSetup.getSignInUrl(SpotifyAuthenticationSetup.java:29)
at rocks.voss.spotifytonieboxsync.Application.main(Application.java:40)
Hey Guys,
i'm a little bit at a loss because of want to run this tooling on a windows 10 environment. Is it possible or do we need a linux based os? If you have some advice for a windows setting, let me know. Best regards!
Hi @maximilianvoss.
first of all, thanks for making this public available.
I'm trying to get your appclication running.
I'm still trying to get it running, and go through your README files...
My plan is also, if I ever got this running, make an easy docker-compose
file for it, so people later have just do a git clone, enter the variables for the json and than start with docker-compose up
I tried the docker version, and I got this error
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.097 s
[INFO] Finished at: 2022-09-23T11:39:59Z
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/). Please verify you invoked Maven from the correct directory. -> [Help 1]
[ERROR]
I was running the
mvn clean install -Pdocker
from the main folder.
is that correct?
any idea?
also you have in the Readme something like
musicsync --spotify-apicode` after storing values to `musicsync.json`
where is the musicync executable?
I would be really happy, if you can go again through your README and make it more easy for everyone to follow up.
I try to run your spotify-tonie-sync... but I do not get it work, after some installation trouble I am now able to run it. I try booth single and daemon... here are the log:
I hope someone can help me out... (I just installed the spotify-toniebox-sync and NOT the toniebox-api, I guess this is inclued in the spotify sync?)
Thanks, Matthias
10 Oct 2020 01:45:59,738 - ERROR:rocks.voss.spotifytonieboxsync.Application:main:71: IOException
com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "errors" (class rocks.voss.toniebox.beans.toniebox.JWTToken), not marked as ignorable (one known property: "jwt"])
at [Source: N/A; line: -1, column: -1] (through reference chain: rocks.voss.toniebox.beans.toniebox.JWTToken["errors"])
at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:79)
at com.fasterxml.jackson.databind.DeserializationContext.reportUnknownProperty(DeserializationContext.java:555)
at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:708)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1160)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:315)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:121)
at com.fasterxml.jackson.databind.ObjectMapper._readValue(ObjectMapper.java:2860)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:1569)
at com.fasterxml.jackson.databind.ObjectMapper.treeToValue(ObjectMapper.java:1902)
at rocks.voss.toniebox.beans.Transformer.createBean(Transformer.java:23)
at rocks.voss.toniebox.beans.Transformer.createBean(Transformer.java:16)
at rocks.voss.toniebox.RequestHandler.executeRequest(RequestHandler.java:149)
at rocks.voss.toniebox.RequestHandler.executePostRequest(RequestHandler.java:115)
at rocks.voss.toniebox.RequestHandler.Login(RequestHandler.java:47)
at rocks.voss.toniebox.TonieHandler.login(TonieHandler.java:45)
at rocks.voss.spotifytonieboxsync.Application.main(Application.java:61)
I have tested the refactored Version 2.0 on my RPI. But if i am starting the daemon, it ends in NullpointerExceptions every ms.
28 Apr. 2020 11:59:26,378 - ERROR:rocks.voss.musicsync.Application:main:47: Exception
java.lang.NullPointerException
at rocks.voss.musicsync.Application.sync(Application.java:61)
at rocks.voss.musicsync.Application.main(Application.java:42)
Does somebody else have this problem as well? @maximilianvoss any idea?
Hey Guys,
i'm a little bit at a loss because of want to run this tooling on a windows 10 environment. Is it possible or do we need a linux based os? If you have some advice for a windows setting, let me know. Best regards!
Hey @maximilianvoss 👋,
for several days now I try to get your project up and running by following the instructions you give at https://github.com/maximilianvoss/musicsync#docker-image. It just sounds like the perfect missing piece for the Toniebox. So first of all, thank you for open sourcing your work!
What I did so far:
package/docker/src/main/resources/docker/base
./build.sh
in package/docker/src/main/resources/docker/base
Now, when I try to build the project with mvn clean install -Pdocker
I get a build failure for Music Sync Package Docker, see (1). Checking the web, it seems as if some configurations are missing (which I didn't add yet).
So I update musicsync.json
, spotify
and vnc
in package/docker/src/main/resources/docker/application/config
. Following the instructions in https://github.com/maximilianvoss/musicsync/blob/master/plugins/spotify/README.md I need to run musicsync --spotify-apicode
to retrieve a refresh token. But at this point I can't find that script. So I guess I have to build the application first?
Hence I run mvn clean install
, which will output the script in package/application/target
. But running the script now leads to a file not found exception, see (2).
At this point I don't really know what else to try. I'm new to Java, so there might be something obvious that I'm missing, sorry. Maybe you could help pointing me into the right direction?
Greetings, Malte.
(1):
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Music Sync 3.1:
[INFO]
[INFO] Music Sync ......................................... SUCCESS [ 0.528 s]
[INFO] Music Sync Package ................................. SUCCESS [ 0.010 s]
[INFO] Music Sync Package Docker .......................... FAILURE [ 0.540 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.270 s
[INFO] Finished at: 2022-01-05T19:43:34+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:exec (Build Package) on project musicsync-package-docker: Command execution failed.: Process exited with an error: 1 (Exit value: 1) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :musicsync-package-docker
(2)
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:///home/malte/projects/musicsync/package/application/target/./modules/log4j-slf4j-impl-2.17.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/malte/projects/musicsync/package/application/target/modules/log4j-slf4j-impl-2.17.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
2022-01-05 19:58:20,169 main WARN Could not locate file file:/home/malte/projects/musicsync/package/application/target/log4j2.xml
2022-01-05 19:58:20,170 main WARN Could not locate file file:/home/malte/projects/musicsync/package/application/target/log4j2.xml
Exception in thread "main" java.io.FileNotFoundException: musicsync.json (No such file or directory)
at java.base/java.io.FileInputStream.open0(Native Method)
at java.base/java.io.FileInputStream.open(FileInputStream.java:219)
at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
at java.base/java.io.FileInputStream.<init>(FileInputStream.java:112)
at rocks.voss.musicsync.application/rocks.voss.musicsync.application.Application.main(Application.java:60)
Hi,
First of all thank you for the great work!
I have a question regarding the use of the trackname property: why doesn't the default value use the id at the start as explained in the README file? The thing is that the commit of my changed tonie fails when I use the ID but otherwise duplicate songs are uploaded. I couldn't track this issue down yet but was wondering whether this feature is really usable/complete yet or if I'm doing something wrong?!
IOException after starting the daemon in spotify-toniebox-sync.log:
. 2019 16:53:08,197 - ERROR:rocks.voss.spotifytonieboxsync.Application:main:71: IOException
com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "ownerName" (class rocks.voss.toniebox.beans.toniebox.Household), not marked as ignorable (6 known properties: , "access", "canLeave", "id", "image", "name", "foreignCreativeTonieContent"])
at [Source: N/A; line: -1, column: -1] (through reference chain: rocks.voss.toniebox.beans.toniebox.Household["ownerName"])
at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:79)
at com.fasterxml.jackson.databind.DeserializationContext.reportUnknownProperty(DeserializationContext.java:555)
at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:708)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1160)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:315)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:121)
at com.fasterxml.jackson.databind.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:151)
at com.fasterxml.jackson.databind.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:18)
at com.fasterxml.jackson.databind.ObjectMapper._readValue(ObjectMapper.java:2860)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:1569)
at com.fasterxml.jackson.databind.ObjectMapper.treeToValue(ObjectMapper.java:1902)
at rocks.voss.toniebox.beans.Transformer.createBean(Transformer.java:23)
at rocks.voss.toniebox.beans.Transformer.createBean(Transformer.java:16)
at rocks.voss.toniebox.RequestHandler.executeRequest(RequestHandler.java:149)
at rocks.voss.toniebox.RequestHandler.executeGetRequest(RequestHandler.java:106)
at rocks.voss.toniebox.RequestHandler.getHouseholds(RequestHandler.java:55)
at rocks.voss.toniebox.TonieHandler.getHouseholds(TonieHandler.java:55)
at rocks.voss.spotifytonieboxsync.Application.main(Application.java:62)
The problem seems to be in the function "tonieHandler.getHouseholds();" of the Application.java. Propable Tonies has changed its api? Or is sth additional needed as the "https://github.com/maximilianvoss/toniebox-api" what is not described in the readme?
Hi, first of all, thanks for the great work! Unfortunately I cannot get this to work. It seems there is a problem with the Household returned from the tonies site. Do you have ay idea what might be the reason? Unfortunately my JAVA knowledge is very limited.
Here ist the stacktrace:
ERROR:rocks.voss.spotifytonieboxsync.Application:main:71: IOException
com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "ownerName" (class rocks.voss.toniebox.beans.toniebox.Household), not marked as ignorable (6 known properties: , "access", "canLeave", "id", "image", "name", "foreignCreativeTonieContent"])
at [Source: N/A; line: -1, column: -1] (through reference chain: rocks.voss.toniebox.beans.toniebox.Household["ownerName"])
at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:79)
at com.fasterxml.jackson.databind.DeserializationContext.reportUnknownProperty(DeserializationContext.java:555)
at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:708)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1160)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:315)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:121)
at com.fasterxml.jackson.databind.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:151)
at com.fasterxml.jackson.databind.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:18)
at com.fasterxml.jackson.databind.ObjectMapper._readValue(ObjectMapper.java:2860)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:1569)
at com.fasterxml.jackson.databind.ObjectMapper.treeToValue(ObjectMapper.java:1902)
at rocks.voss.toniebox.beans.Transformer.createBean(Transformer.java:23)
at rocks.voss.toniebox.beans.Transformer.createBean(Transformer.java:16)
at rocks.voss.toniebox.RequestHandler.executeRequest(RequestHandler.java:149)
at rocks.voss.toniebox.RequestHandler.executeGetRequest(RequestHandler.java:106)
at rocks.voss.toniebox.RequestHandler.getHouseholds(RequestHandler.java:55)
at rocks.voss.toniebox.TonieHandler.getHouseholds(TonieHandler.java:55)
at rocks.voss.spotifytonieboxsync.Application.main(Application.java:62)
I'm getting this exception following the instructions in the README file.
Do you know what does it mean?
26 May 2020 19:37:38,319 - ERROR:rocks.voss.spotifytonieboxsync.Application:main:71: IOException com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "ownerName" (class rocks.voss.toniebox.beans.toniebox.Household), not marked as ignorable (6 known properties: , "access", "canLeave", "id", "image", "name", "foreignCreativeTonieContent"]) at [Source: N/A; line: -1, column: -1] (through reference chain: rocks.voss.toniebox.beans.toniebox.Household["ownerName"]) at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:79) at com.fasterxml.jackson.databind.DeserializationContext.reportUnknownProperty(DeserializationContext.java:555) at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:708) at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1160) at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:315) at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:121) at com.fasterxml.jackson.databind.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:151) at com.fasterxml.jackson.databind.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:18) at com.fasterxml.jackson.databind.ObjectMapper._readValue(ObjectMapper.java:2860) at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:1569) at com.fasterxml.jackson.databind.ObjectMapper.treeToValue(ObjectMapper.java:1902) at rocks.voss.toniebox.beans.Transformer.createBean(Transformer.java:23) at rocks.voss.toniebox.beans.Transformer.createBean(Transformer.java:16) at rocks.voss.toniebox.RequestHandler.executeRequest(RequestHandler.java:149) at rocks.voss.toniebox.RequestHandler.executeGetRequest(RequestHandler.java:106) at rocks.voss.toniebox.RequestHandler.getHouseholds(RequestHandler.java:55) at rocks.voss.toniebox.TonieHandler.getHouseholds(TonieHandler.java:55) at rocks.voss.spotifytonieboxsync.Application.main(Application.java:62)
Good evening,
thanks a lot for this great project!
I managed to compile musicsync in my WSL Ubuntu 18.04 environment without any error.
However, when it comes to connecting it to Spotify there seems to be an issue.
That is, calling `./musicsync --spotify-apicode´ just produces the standard output:
`Usage: spotify-toniebox-sync.jar [--daemon | --input INPUT --output OUTPUT]
--daemon
Run in daemon mode to sync periodically all lists in the properties file
--input INPUT
Define an input source for a one-time run
--output OUTPUT
Define an output destination for a one-time run
Input Plugins:
--spotify-apicode
Generate an API Code URL to get attach Application to Spotify Account
--spotify-code CODE
Generate a Refresh token out of the Spotify Code
Output Plugins:
--toniebox-username USERNAME
Set the Toniebox username to login to Toniebox
--toniebox-password PASSWORD
Set the password for the Toniebox user for login
--filesystem-directory DIRECTORY
Set the output path for the files`
No error and the logfile is empty as well.
I followed the instructions carefully and checked it several times...
Do you know about this issue?
Kind regards
Florian
Hi Max, thanks heaps for moving this to java11!
I'm trying to run it on latest MacOS 12.1.
When running it, it runs into read timeout exceptions on the spotify.api. Any clues? Running ping or normal curl commands from the same terminal works just fine.
Cheers,
Andreas
Hi,
after setting up everything I run the script (just to sync it once, not the daemon) and get this error in spotify-toniebox-sync.log:
28 May 2020 17:40:34,354 - ERROR:rocks.voss.spotifytonieboxsync.Application:main:71: IOException
com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "ownerName" (class rocks.voss.toniebox.beans.toniebox.Household), not marked as ignorable (6 known properties: , "access", "canLeave", "id", "image", "name", "foreignCreativeTonieContent"])
at [Source: N/A; line: -1, column: -1] (through reference chain: rocks.voss.toniebox.beans.toniebox.Household["ownerName"])
at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:79)
at com.fasterxml.jackson.databind.DeserializationContext.reportUnknownProperty(DeserializationContext.java:555)
at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:708)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1160)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:315)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:121)
at com.fasterxml.jackson.databind.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:151)
at com.fasterxml.jackson.databind.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:18)
at com.fasterxml.jackson.databind.ObjectMapper._readValue(ObjectMapper.java:2860)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:1569)
at com.fasterxml.jackson.databind.ObjectMapper.treeToValue(ObjectMapper.java:1902)
at rocks.voss.toniebox.beans.Transformer.createBean(Transformer.java:23)
at rocks.voss.toniebox.beans.Transformer.createBean(Transformer.java:16)
at rocks.voss.toniebox.RequestHandler.executeRequest(RequestHandler.java:149)
at rocks.voss.toniebox.RequestHandler.executeGetRequest(RequestHandler.java:106)
at rocks.voss.toniebox.RequestHandler.getHouseholds(RequestHandler.java:55)
at rocks.voss.toniebox.TonieHandler.getHouseholds(TonieHandler.java:55)
at rocks.voss.spotifytonieboxsync.Application.main(Application.java:62)
Toniebox User (Email) and Password are correct. Checked 3 times...and copied & pasted from the same source(keypass) that I use to login to the Tonies side.
Any idea?
Thanks a lot.
I created a Spotify clientID, clientSecret and set the redirectUri, built the project and tried to run musicsync --spotify-apicode as per the documentation.
Unfortunately it's not working, output is:
~/spotify-toniebox-sync/package/target/output$ sudo ./musicsync --spotify-apicode
Usage: spotify-toniebox-sync.jar [--daemon | --input INPUT --output OUTPUT]
--daemon
Run in daemon mode to sync periodically all lists in the properties file
--input INPUT
Define an input source for a one-time run
--output OUTPUT
Define an output destination for a one-time run
Input Plugins:
Output Plugins:
Honestly I have no idea about Java but to me it looks like the plugins are not "registered" and therefor the --spotify-apicode command is unknown?!
Hello, thank you for this great project!
I'm a newbie in JAVA and trying to get it to run using this java version:
openjdk version "1.8.0_232b09"
OpenJDK Runtime Environment (build 1.8.0_232b09-201911100920-dcevm8u232b09)
Dynamic Code Evolution 64-Bit Server VM (build 25.232b09-bdcevm8u23209, mixed mode)
I have succesfully build the project, copied the musicsync.properties
into package/target/output
and adapted clientId and clientSecret. However. After ./musicsync --spotify-apicode
, I just get this result:
Usage: spotify-toniebox-sync.jar [--daemon | --input INPUT --output OUTPUT]
--daemon
Run in daemon mode to sync periodically all lists in the properties file
--input INPUT
Define an input source for a one-time run
--output OUTPUT
Define an output destination for a one-time run
Input Plugins:
--spotify-apicode
Generate an API Code URL to get attach Application to Spotify Account
--spotify-code CODE
Generate a Refresh token out of the Spotify Code
Output Plugins:
--toniebox-username USERNAME
Set the Toniebox username to login to Toniebox
--toniebox-password PASSWORD
Set the password for the Toniebox user for login
--filesystem-directory DIRECTORY
Set the output path for the files
What do I do wrong??
@maximilianvoss Sry, but I am having the same issue, building and using a new *.jar after your merge. The error-message is the same as i wrote in #2 (comment).
@maximilianvoss + @JonasBrand Had you tested the fix? Am i wrong or isn't this fix working at all?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.