Closed proffalken closed 2 years ago
Hey, sadly I don't know enough about docker and package management to troubleshoot this specific issue. However, since this is not the first time numpy has caused problems, I've worked on dropping the package as a dependency altogether. I still need to do some testing, but the new version could be out by tomorrow or the day after.
Thanks @NiklasReiche, if I find time I'll have a poke around inside the container (I've been too busy to do that recently), but a numpy-free version would be amazing!
OK, I had a poke around inside the container, it looks like numpy can't be installed via pip because the container I'm using is running on Alpine so you constantly get hit by a compilation error.
To complicate things further, apk add py3-numpy
(which is what AppDaemon runs to install system packages) installs numpy into /usr/lib/python3.9/site-packages
however the python path on the system is /usr/local/python3.9/site-packages
, and copying from one to the other blows up as well.
Basically, it looks like the container I'm using is a bit broken, so I'm going to try and rebuild it using full debian and see if that makes a difference.
ok, I switched to dtterastar/appdaemon
and numpy is now installed, just about to try setting this up properly now.
OK, closing this, it was an issue with the underlying OS in the docker container which is fixed if you use the container above.
I'm now seeing the following in the logs, but I'll investigate this another time:
2022-03-16 20:10:06.272379 ERROR spotify_mood_lights_sync: Could not find features for track uri x-sonos-vli:RINCON_949F3E5462E601400:2,spotify:25a25dfe566b06e42d442aa1dfbe4a72. This may be caused by trying to use a non-spotify media_player in 'direct' mode. Try using 'search' mode instead.
Reason: no track features found for uri
Hey @proffalken, for the new error message see https://github.com/NiklasReiche/ad-spotify-mood-lights-sync#media-players. In short, you should try adding mode: search
to the app's config.
The problem here is that in direct
mode the app expects a song ID in Spotify's format, which is provided by the Spotify integration in HA by default. It looks like you are using the Sonos integration for your media_player
, which does not provide the song ID in the correct format (at least that's what I think, as I don't have a device to test this). However, as long as your media_player
has the media_title
and media_artist
state attributes (which for Sonos should be true), you can configure the app to use search
mode, where instead of querying the Spotify API by the song ID, it uses the song title and artist to find the correct track.
@NiklasReiche spotted that, forgot to update this, it's working perfectly now, thanks!
Hey!
This looks like a great project, but I'm having issues getting it up and running when I'm running AppDaemon inside a docker container.
The log output is as follows:
My configuration looks like this:
I see that the various packages get installed, but for some reason it can't find them on the path (full log including error above):