1) not use the complete URL return as code, but only the code part (my stupidity)
2) do NOT replace localhost with 192.168.1.xxx
3) change saveuservariable into adduservariable
4) make sure 'new device are allowed for 5 minutes' after activating hardware
5) not the modification of the user variable activates spotify but selecting the output speaker in devices
status june 2020: useless / does not work. Not supported anymore on GitHub, as illustrated by post september 2019 So change saveuservariable into adduservariable
Would be great to have domoticz start my playlist on Echo
Error occured in request for getting acces_tokens from Spotify, error code: 400, reason: Bad Request. Seems either client_id, client_secret or code is incorrect. Please note that the code received from Spotify could only be used once. Please get a new one from spotify.
Code: Select all
2020-05-31 13:50:41.865 (Zwave.me USB) Temp (tempZolder)
2020-05-31 13:50:43.275 (spotify) Pushing 'onStopCallback' on to queue
2020-05-31 13:50:43.318 (spotify) Processing 'onStopCallback' message
2020-05-31 13:50:43.318 (spotify) Message handler 'onStop' not callable, ignored.
2020-05-31 13:50:43.883 (spotify) Debug logging mask set to: PYTHON PLUGIN QUEUE IMAGE DEVICE CONNECTION MESSAGE ALL
2020-05-31 13:50:43.883 (spotify) Calling domoticz API: http://192.168.0.107:8080/json.htm?type=command¶m=getuservariables
2020-05-31 13:50:43.902 (spotify) {'LastUpdate': '2020-05-31 12:56:00', 'Name': 'spotify-access_token', 'Type': '2', 'Value': '', 'idx': '70'}
2020-05-31 13:50:43.902 (spotify) {'LastUpdate': '2020-05-31 12:56:00', 'Name': 'spotify-refresh_token', 'Type': '2', 'Value': '', 'idx': '71'}
2020-05-31 13:50:43.902 (spotify) {'LastUpdate': '2020-05-31 12:56:00', 'Name': 'spotify-retrievaldate', 'Type': '2', 'Value': '', 'idx': '72'}
2020-05-31 13:50:43.902 (spotify) {'LastUpdate': '2020-05-31 13:41:05', 'Name': 'spotify-searchTxt', 'Type': '2', 'Value': 'jan smit', 'idx': '73'}
2020-05-31 13:50:43.902 (spotify) Not all spotify token variables are available, let's get it
2020-05-31 13:50:43.902 (spotify) Getting tokens using data: {'grant_type': 'authorization_code', 'code': 'AQCvlHzprbKAdmFoIzIKv4kAXVMFwT1TgOC5qrXPVDBcC0W0zB6DE5M7v322dmjNm8flHTnLMEOIJ7Je2_X52TXqcwZ7U1vPaT7ZyJx6gnSACMCJlBLBzpoHtxdI4J1Gm_mf_m2aMvI8efsKtiWjyZN5l3my-EmPt4nD3pNa8VmAYCj7UF_194Rl1mgFL9PuVYscOgtMdVy5uuHzjRIOk8jAapZYT7QXYV4bX7TB_2GIg3U#', 'redirect_uri': 'http://localhost'}
2020-05-31 13:50:43.903 (spotify) For basic headers using client_id: 43d3f37d8143461198c8c3cd864a3169, client_secret: 0a7edc072b524835b972c06a6c14276b
2020-05-31 13:50:43.903 (spotify) Getting tokens using header: {'Authorization': 'Basic NDNkM2YzN2Q4MTQzNDYxMTk4YzhjM2NkODY0YTMxNjk6MGE3ZWRjMDcyYjUyNDgzNWI5NzJjMDZhNmMxNDI3NmI='}
2020-05-31 13:50:43.275 Status: (spotify) Stop directive received.
2020-05-31 13:50:43.275 Status: (spotify) Exiting work loop.
2020-05-31 13:50:43.576 Status: (spotify) Stopping threads.
2020-05-31 13:50:43.576 Status: (spotify) Stopped.
2020-05-31 13:50:43.576 Status: (spotify) Started.
2020-05-31 13:50:43.881 Status: (spotify) Initialized version 0.2, author 'djj'
2020-05-31 13:50:43.880 Status: (spotify) Entering work loop.
2020-05-31 13:50:43.960 Error: (spotify)Error occured in request for getting acces_tokens from Spotify, error code: 400, reason: Bad Request. Seems either client_id, client_secret or code is incorrect. Please note that the code received from Spotify could only be used once. Please get a new one from spotify.
2020-05-31 13:50:45.552 (stroommeter-USB1) P1 Smart Meter (Stroom)