Git Product home page Git Product logo

rosskouk / asknavidrome Goto Github PK

View Code? Open in Web Editor NEW
43.0 3.0 5.0 1.07 MB

An Alexa skill to allow streaming of music from Subsonic API compatible media servers on Amazon Echo devices.

Home Page: https://rosskouk.github.io/asknavidrome

License: MIT License

Dockerfile 1.17% Python 93.26% HTML 2.98% Makefile 0.89% CSS 0.58% Batchfile 1.13%
alexa alexa-skills-kit music navidrome python3 self-hosted streaming subsonic

asknavidrome's Introduction

AskNavidrome

Documentation Generator Docker Container

AskNavidrome is an Alexa skill which allows you to play music hosted on a SubSonic API compatible media server, like Navidrome.

You can stream your own music collection to your Echo devices without the restrictions you would normally face with regular streaming services like Amazon Music or Spotify. AskNavidrome allows you to:

  • Skip backwards and forwards in your current queue or playlist without limitation.
  • Avoid paying subscription costs.
  • Avoid being forced to listen to adverts at regular intervals.
  • Actually use the music collection you have already paid for!
  • Run the service on a PC directly or inside a Docker container.

See the full documentation here

asknavidrome's People

Contributors

rosskouk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

asknavidrome's Issues

Display Music Info - Amazon Screen Devices

Hi,

Hope this is the right place to request this, but I was wondering if it would be possible to display song information on Amazon devices with a screen (Echo Show)? At the moment, my screen just displays the Skill Name, followed by the task (e.g. Playing random music).
It would be awesome if we could get the current song title and maybe the album.

Anyway, let me know you thoughts.

Thank you

Issues with playlists

I'm hoping someone can help me out. I'm tearing my hair out trying to get playlists to work.

I have these playlists defined in navidrome:
image

Here's what I defined on the skill (along with the default ones)

image

Going down the line from the web devlopment interface:
"ask navi sonic play the playlist ton"

2024-04-09 17:22:42,854 - root - DEBUG - Request received: {'dialog_state': None,
 'intent': {'confirmation_status': 'NONE',
            'name': 'NaviSonicPlayPlaylist',
            'slots': {'playlist': {'confirmation_status': 'NONE',
                                   'name': 'playlist',
                                   'resolutions': None,
                                   'slot_value': None,
                                   'value': None}}},
 'locale': 'en-US',
 'object_type': 'IntentRequest',
 'request_id': 'amzn1.echo-api.request.39491dfc-7b60-41b8-b8f7-6112d4b4a875',
 'timestamp': datetime.datetime(2024, 4, 9, 17, 22, 42, tzinfo=tzlocal())}
2024-04-09 17:22:42,854 - root - DEBUG - In NaviSonicPlayPlaylist
2024-04-09 17:22:42,854 - root - DEBUG - In GeneralExceptionHandler
2024-04-09 17:22:42,855 - root - ERROR - General Exception: 'NoneType' object has no attribute 'value'
2024-04-09 17:22:42,855 - root - ERROR - Request Type Was: IntentRequest
2024-04-09 17:22:42,855 - root - ERROR - Intent Name Was: NaviSonicPlayPlaylist

"ask navi sonic play the playlist megadeth"
Same error as above.

"ask navi sonic play the playlist a. c. d. c."
(I typed AC/DC, it was converted to the above)

Looked for an album instead of playlist?

2024-04-09 17:25:21,261 - root - DEBUG - Response sent: {'api_response': None,
 'can_fulfill_intent': None,
 'card': None,
 'directives': None,
 'experimentation': None,
 'output_speech': {'object_type': 'SSML',
                   'play_behavior': None,
                   'ssml': "<speak>I couldn't find the album ACDC in the "
                           'collection.</speak>'},
 'reprompt': {'directives': None,
              'output_speech': {'object_type': 'SSML',
                                'play_behavior': None,
                                'ssml': "<speak>I couldn't find the album ACDC "
                                        'in the collection.</speak>'}},
 'should_end_session': False}

"ask navi sonic play the playlist progressive metal"
This seems to really break things. No JSON response on the server.
image

ask navi sonic play the playlist wheel

2024-04-09 17:28:12,142 - root - DEBUG - Request received: {'dialog_state': None,
 'intent': {'confirmation_status': 'NONE',
            'name': 'AMAZON.FallbackIntent',
            'slots': None},
 'locale': 'en-US',
 'object_type': 'IntentRequest',
 'request_id': 'amzn1.echo-api.request.5a640574-c370-4d63-9883-b030f7a51a78',
 'timestamp': datetime.datetime(2024, 4, 9, 17, 28, 11, tzinfo=tzlocal())}
2024-04-09 17:28:12,143 - root - DEBUG - In GeneralExceptionHandler
2024-04-09 17:28:12,143 - root - ERROR - General Exception: Unable to find a suitable request handler
2024-04-09 17:28:12,143 - root - ERROR - Request Type Was: IntentRequest
2024-04-09 17:28:12,143 - root - ERROR - Intent Name Was: AMAZON.FallbackIntent
2024-04-09 17:28:12,143 - werkzeug - INFO - 172.19.0.4 - - [09/Apr/2024 17:28:12] "POST / HTTP/1.0" 200 -

ask navi sonic play the playlist wicked bangers
Worked!!

ask navi sonic play the playlist puscifer

2024-04-09 17:29:58,762 - root - DEBUG - Request received: {'dialog_state': None,
 'intent': {'confirmation_status': 'NONE',
            'name': 'NaviSonicPlayPlaylist',
            'slots': {'playlist': {'confirmation_status': 'NONE',
                                   'name': 'playlist',
                                   'resolutions': None,
                                   'slot_value': None,
                                   'value': None}}},
 'locale': 'en-US',
 'object_type': 'IntentRequest',
 'request_id': 'amzn1.echo-api.request.20687878-7609-456d-a935-886321294dc1',
 'timestamp': datetime.datetime(2024, 4, 9, 17, 29, 58, tzinfo=tzlocal())}
2024-04-09 17:29:58,763 - root - DEBUG - In NaviSonicPlayPlaylist
2024-04-09 17:29:58,763 - root - DEBUG - In GeneralExceptionHandler
2024-04-09 17:29:58,763 - root - ERROR - General Exception: 'NoneType' object has no attribute 'value'
2024-04-09 17:29:58,763 - root - ERROR - Request Type Was: IntentRequest
2024-04-09 17:29:58,763 - root - ERROR - Intent Name Was: NaviSonicPlayPlaylist

The last 3 playlists are stock install and do not exist but still give weird responses.

image

ERROR - Failed to connect to Navidrome

Describe the issue
asknavidrome container not connecting to Navidrome

Operating System
Docker Desktop on Windows 10

To Reproduce
Ran asknavidrome in docker compose with the following file

version: "0.7"
services:
asknavidrome:
container_name: asknavidrome
image: ghcr.io/rosskouk/asknavidrome:latest
ports:
- "5000:5000"
environment:
- NAVI_SKILL_ID=[REDACTED]
- NAVI_SONG_COUNT=50
- NAVI_URL=https://[REDACTED]/audio
- NAVI_USER=[REDACTED]
- NAVI_PASS=[REDACTED]
- NAVI_PORT=443
- NAVI_API_PATH=/rest
- NAVI_API_VER=1.16.1
- NAVI_DEBUG=2

When I run it in docker and look at the logs it says ERROR - Failed to connect to Navidrome.

Logs
2022-11-25 23:53:37,034 - root - INFO - AskNavidrome 0.6!
2022-11-25 23:53:37,034 - root - DEBUG - Getting configutration from the environment...
2022-11-25 23:53:37,035 - root - INFO - Skill ID set to: [REDACTED]
2022-11-25 23:53:37,035 - root - INFO - Minimum song count is set to: 50
2022-11-25 23:53:37,036 - root - INFO - The URL for Navidrome is set to: https://[REDACTED]/audio
2022-11-25 23:53:37,037 - root - INFO - The Navidrome user name is set to: [REDACTED]
2022-11-25 23:53:37,038 - root - INFO - The Navidrome password is set
2022-11-25 23:53:37,038 - root - INFO - The Navidrome port is set to: 443
2022-11-25 23:53:37,039 - root - INFO - The Navidrome API path is set to: /rest
2022-11-25 23:53:37,040 - root - INFO - The Navidrome API version is set to: 1.16.1
2022-11-25 23:53:37,040 - root - DEBUG - Configuration has been successfully loaded
2022-11-25 23:53:37,041 - root - DEBUG - Log level set to DEBUG
2022-11-25 23:53:37,041 - root - DEBUG - MediaQueue object created...
2022-11-25 23:53:37,045 - asknavidrome.subsonic_api - DEBUG - Connected to Navidrome
2022-11-25 23:53:37,046 - asknavidrome.subsonic_api - DEBUG - In function ping()
2022-11-25 23:53:38,800 - asknavidrome.subsonic_api - ERROR - Failed to connect to Navidrome
2022-11-25 23:53:39,854 - root - INFO - AskNavidrome Web Service is ready to start!

  • Serving Flask app 'app'
  • Debug mode: off
    2022-11-25 23:53:39,870 - werkzeug - INFO - WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
  • Running on all addresses (0.0.0.0)
  • Running on http://127.0.0.1:5000
  • Running on http://172.18.0.2:5000
    2022-11-25 23:53:39,871 - werkzeug - INFO - Press CTRL+C to quit
    2022-11-25 23:53:46,727 - werkzeug - INFO - 172.18.0.1 - - [25/Nov/2022 23:53:46] "GET / HTTP/1.1" 405 -
    2022-11-25 23:54:19,598 - werkzeug - INFO - 172.18.0.1 - - [25/Nov/2022 23:54:19] "GET / HTTP/1.1" 405 -
    2022-11-25 23:54:31,878 - werkzeug - INFO - 172.18.0.1 - - [25/Nov/2022 23:54:31] "GET / HTTP/1.1" 405 -
    2022-11-25 23:56:24,625 - werkzeug - INFO - 172.18.0.1 - - [25/Nov/2022 23:56:24] "GET / HTTP/1.1" 405 -

Log error Container

When I try to start Docker container I get this error:

exec /opt/env/bin/python3: exec format error

I'm using Debian 11 OS in a Raspberry pi 4.

[ISSUE] Playback Issue on actual device

I've been able to set this up and test it with my phone and also with the dev console.
However, when I ask an Alexa device, it tells me that "playing music by provider navi sonic is not supported".
No contact is made with the instance.

I've double checked the settings, and they seem to be correct.

Heeewwp please

When i try to tun it i get this error:
Unable to find image 'amzn1.ask.skill.03246e80-cf79-428d-a552-cc47aa8a81f8:latest' locally
docker: Error response from daemon: pull access denied for amzn1.ask.skill.03246e80-cf79-428d-a552-cc47aa8a81f8, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.

What am i doing wrong?

[ISSUE] Play next and previous button not working

When you play songs and there are multiple songs in queue it would be good if the next and previous button can work from the music player which is launched from alexa on phone.

Pause/Play works fine but next and previous doesn't work as this skill is most helpful while driving it would be good if these buttons can work so that changing the song can be done from steering media controls.

Screenshot_20240412-205313~2

Failed to connect to Navidrome

Hello,

i have this error when i start asknavidrome :

2022-12-06 22:05:04,713 - asknavidrome.subsonic_api - DEBUG - Connected to Navidrome
2022-12-06 22:05:04,713 - asknavidrome.subsonic_api - DEBUG - In function ping()
2022-12-06 22:05:04,841 - asknavidrome.subsonic_api - ERROR - Failed to connect to Navidrome

My url and user/password are ok, i test it.

I have no log in navidrome for this error.

Operating System
Unraid/docker

Logs
2022-12-06 22:05:04,712 - root - INFO - AskNavidrome 0.6!
2022-12-06 22:05:04,712 - root - DEBUG - Getting configutration from the environment...
2022-12-06 22:05:04,712 - root - INFO - Skill ID set to: amzn1.ask.xxxxxxxx
2022-12-06 22:05:04,712 - root - INFO - Minimum song count is set to: 50
2022-12-06 22:05:04,712 - root - INFO - The URL for Navidrome is set to: https://navidrome.xxxxxx.fr
2022-12-06 22:05:04,712 - root - INFO - The Navidrome user name is set to: xxxxxxx
2022-12-06 22:05:04,712 - root - INFO - The Navidrome password is set
2022-12-06 22:05:04,712 - root - INFO - The Navidrome port is set to: 443
2022-12-06 22:05:04,712 - root - INFO - The Navidrome API path is set to: /rest
2022-12-06 22:05:04,712 - root - INFO - The Navidrome API version is set to: 1.16.1
2022-12-06 22:05:04,712 - root - DEBUG - Configuration has been successfully loaded
2022-12-06 22:05:04,712 - root - DEBUG - Log level set to DEBUG
2022-12-06 22:05:04,712 - root - DEBUG - MediaQueue object created...
2022-12-06 22:05:04,713 - asknavidrome.subsonic_api - DEBUG - Connected to Navidrome
2022-12-06 22:05:04,713 - asknavidrome.subsonic_api - DEBUG - In function ping()
2022-12-06 22:05:04,841 - asknavidrome.subsonic_api - ERROR - Failed to connect to Navidrome
2022-12-06 22:05:04,964 - root - INFO - AskNavidrome Web Service is ready to start!
2022-12-06 22:05:04,965 - root - WARNING - AskNavidrome debugging has been enabled, this should only be used when testing!

Make Web Service More Resilient

When a problem track is encountered playback is stopped logs like below are generated:

2022-08-20 10:00:31,323 - werkzeug - INFO - 10.44.17.62 - - [20/Aug/2022 10:00:31] "POST / HTTP/1.1" 200 -
2022-08-20 10:01:09,321 - root - DEBUG - In PlaybackFailedHandler
2022-08-20 10:01:09,321 - root - ERROR - Playback Failed: {'message': 'Device playback error',  'object_type': 'MEDIA_ERROR_INTERNAL_DEVICE_ERROR'}
2022-08-20 10:01:09,322 - werkzeug - INFO - 10.44.17.62 - - [20/Aug/2022 10:01:09] "POST / HTTP/1.1" 200 -
2022-08-20 10:01:09,901 - root - DEBUG - In PlaybackStoppedHandler
2022-08-20 10:01:09,901 - root - DEBUG - Stored track offset of: 44628 ms for Set the Fire to the Third Bar
2022-08-20 10:01:09,901 - root - INFO - Playback stopped

Improve PlaybackFailedHandler by adding the following functionality:

  • Log all information about the current song to assist with troubleshooting / problem identification.
  • Move to the next track

The requested skill did not provide a valid response

I hate to ask this but I am stumped.
While I will take a magic bullet, I am really asking where in the logs I find answers.

I am in the Alexa Developer Testing console.
I type "Open Navisonic player" and get "The requested skill did not provide a valid response "

I am using Nginx Proxy Manager and a Lets Encrypt SSL cert.
the URLs are:
music.mydomain.com -> pointing to Navidrome proper
asknavidrome.mydomain.com-> pointing to the Navidrome skill

My skill log is

2023-09-02 19:42:30,290 - root - INFO - AskNavidrome 0.6!
2023-09-02 19:42:30,290 - root - DEBUG - Getting configutration from the environment...
2023-09-02 19:42:30,291 - root - INFO - Skill ID set to: amzn1.ask.skill.<redacted>
2023-09-02 19:42:30,291 - root - INFO - Minimum song count is set to: 50
2023-09-02 19:42:30,291 - root - INFO - The URL for Navidrome is set to: https://music.<redacted>
2023-09-02 19:42:30,291 - root - INFO - The Navidrome user name is set to: <redacted>
2023-09-02 19:42:30,291 - root - INFO - The Navidrome password is set
2023-09-02 19:42:30,291 - root - INFO - The Navidrome port is set to: 443
2023-09-02 19:42:30,291 - root - INFO - The Navidrome API path is set to: /rest
2023-09-02 19:42:30,291 - root - INFO - The Navidrome API version is set to: 1.16.1
2023-09-02 19:42:30,291 - root - DEBUG - Configuration has been successfully loaded
2023-09-02 19:42:30,291 - root - DEBUG - Log level set to DEBUG
2023-09-02 19:42:30,292 - root - DEBUG - MediaQueue object created...
2023-09-02 19:42:30,293 - asknavidrome.subsonic_api - DEBUG - Connected to Navidrome
2023-09-02 19:42:30,293 - asknavidrome.subsonic_api - DEBUG - In function ping()
2023-09-02 19:42:30,910 - asknavidrome.subsonic_api - INFO - Successfully connected to Navidrome
2023-09-02 19:42:30,953 - root - INFO - AskNavidrome Web Service is ready to start!
2023-09-02 19:42:30,957 - root - WARNING - AskNavidrome debugging has been enabled, this should only be used when testing!
2023-09-02 19:42:30,957 - root - WARNING - The /buffer, /queue and /history http endpoints are available publicly!
 * Serving Flask app 'app'
 * Debug mode: off
2023-09-02 19:42:30,961 - werkzeug - INFO - WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on all addresses (0.0.0.0)
 * Running on http://127.0.0.1:5000
 * Running on http://172.18.0.13:5000
2023-09-02 19:42:30,961 - werkzeug - INFO - Press CTRL+C to quit
2023-09-02 19:43:19,563 - werkzeug - INFO - 172.18.0.14 - - [02/Sep/2023 19:43:19] "GET / HTTP/1.1" 405 -
2023-09-02 19:56:47,429 - werkzeug - INFO - 172.18.0.14 - - [02/Sep/2023 19:56:47] "GET / HTTP/1.1" 405 -
2023-09-02 19:56:52,307 - werkzeug - INFO - 172.18.0.14 - - [02/Sep/2023 19:56:52] "GET /history HTTP/1.1" 200 -

I can access the web page at https://asknavidrome.mydomain.com/history. That is the 200 and https://asknavidrome.mydomain.com is the two 405s.

The Alexa Test console is not helpful, and I guess what I am asking is how to I make it helpful

I get nothing on JSON Output 1
From the Device Log SkillDebugger.CaputureDebugingInfo all I get is

{
    "header": {
        "namespace": "SkillDebugger",
        "name": "CaptureDebuggingInfo",
        "messageId": "784c5b69-5c51-4a04-9435-9dbb58679368"
    },
    "payload": {
        "skillId": "amzn1.ask.skill.<redacted>",
        "timestamp": "2023-09-02T17:59:33.850Z",
        "dialogRequestId": "c4be1249-8abd-4726-a02f-b04300b28726",
        "skillRequestId": "amzn1.echo-api.request.<redacted>",
        "type": "SkillExecutionInfo",
        "content": {
            "invocationRequest": {
                "endpoint": "https://asknavidrome.mydomain.com",
                "body": {
                    "version": "1.0",
                    "session": {
                        "new": true,
                        "sessionId": "amzn1.echo-api.session.36e3b99a-6e36-4a94-8909-32606e1f989e",
                        "application": {
                            "applicationId": "amzn1.ask.skill.<redacted>"
                        },
                        "attributes": {},
                        "user": {
                            "userId": "amzn1.ask.account.<redacted>"
                        }
                    },
                    "context": {
                        "System": {
              ...
                            "application": {
                                "applicationId": "amzn1.ask.skill.<redacted>"
                            },
                            "user": {
                                "userId": "amzn1.ask.account.<redacted>"
                            },
                            "device": {
                                "deviceId": "amzn1.ask.device.<redacted>",
                                "supportedInterfaces": {
                                    "AudioPlayer": {}
                                }
                            },
                            "apiEndpoint": "https://api.amazonalexa.com",
                            "apiAccessToken": "<redacted>"
                        }
                    },
                    "request": {
                        "type": "LaunchRequest",
                        "requestId": "amzn1.echo-api.request.<redacted>",
                        "locale": "en-US",
                        "timestamp": "2023-09-02T17:59:33Z",
                        "shouldLinkResultBeReturned": false
                    }
                }
            }
        }
    }
}

That doesn't give me any information about the error at all.

In SkillDebugger.CaputureError all I get is

...
        "code": "SKILL_ENDPOINT_ERROR",
        "description": "Skill execution returned an exception for requestId amzn1.echo-api.request.<redacted>",
...

And then a final SkillDebugger.CaputureDebugingInfo (~1 sec later) says

...
                    "request": {
                        "type": "SessionEndedRequest",
                        "requestId": "amzn1.echo-api.request.d26881dd-1ed7-41f7-9c4b-03872b6c3e81",
                        "timestamp": "2023-09-02T17:59:34Z",
                        "locale": "en-US",
                        "reason": "ERROR",
                        "error": {
                            "type": "INVALID_RESPONSE",
                            "message": "An exception occurred while dispatching the request to the skill."
                        }


I can only guess that either (a) the request dies internally before making it out of the Amazon server and to my server, or (b) the request makes it to the the reverse proxy and goes no further, but normally it would return a 502 (Bad Gateway).

Neither of which I know how to solve, but I am just guessing. I don't see how to get concrete information out of those logs.

Where do I get more information to debug this?

Thanks

[ISSUE] General Exception: Unable to find a suitable request handler

I have navidrome, asknavidrome, nginx, all running in docker containers. I have certs for everything terminating at the nginx side. I've created the skill, added it and tested it. And when I test, I seek this in asknavi logs (level 3):

I built the docker container myself, which appears to have a newer version of python than the one hosted, this the warnings.
However, both the one I built and the one here: ghcr.io/rosskouk/asknavidrome:latest give the same error.

/opt/env/lib/python3.9/site-packages/ask_sdk_webservice_support/verifier.py:376: CryptographyDeprecationWarning: Properties that return a naïve datetime object have been deprecated. Please switch to not_valid_before_utc.
  if not (x509_cert.not_valid_before <= now <=
/opt/env/lib/python3.9/site-packages/ask_sdk_webservice_support/verifier.py:377: CryptographyDeprecationWarning: Properties that return a naïve datetime object have been deprecated. Please switch to not_valid_after_utc.
  x509_cert.not_valid_after):
2024-02-12 02:09:42,225 - root - DEBUG - Request received: {'error': None,
 'locale': 'en-US',
 'object_type': 'SessionEndedRequest',
 'reason': 'USER_INITIATED',
 'request_id': 'amzn1.echo-api.request.11af94fa-81b2-4c04-a2cb-cca464da516c',
 'timestamp': datetime.datetime(2024, 2, 12, 2, 9, 41, tzinfo=tzlocal())}
2024-02-12 02:09:42,225 - root - DEBUG - In SkillEventHandler
2024-02-12 02:09:42,225 - root - DEBUG - Response sent: {'api_response': None,
 'can_fulfill_intent': None,
 'card': None,
 'directives': None,
 'experimentation': None,
 'output_speech': None,
 'reprompt': None,
 'should_end_session': None}
2024-02-12 02:09:42,225 - werkzeug - INFO - 172.19.0.4 - - [12/Feb/2024 02:09:42] "POST / HTTP/1.0" 200 -
2024-02-12 02:09:42,326 - root - DEBUG - Request received: {'dialog_state': None,
 'intent': {'confirmation_status': 'NONE',
            'name': 'AMAZON.FallbackIntent',
            'slots': None},
 'locale': 'en-US',
 'object_type': 'IntentRequest',
 'request_id': 'amzn1.echo-api.request.56c680de-46bc-4b00-8f44-33c93bfc5401',
 'timestamp': datetime.datetime(2024, 2, 12, 2, 9, 41, tzinfo=tzlocal())}
2024-02-12 02:09:42,326 - root - DEBUG - In GeneralExceptionHandler
2024-02-12 02:09:42,327 - root - ERROR - General Exception: Unable to find a suitable request handler
2024-02-12 02:09:42,327 - root - ERROR - Request Type Was: IntentRequest
2024-02-12 02:09:42,327 - root - ERROR - Intent Name Was: AMAZON.FallbackIntent
2024-02-12 02:09:42,327 - werkzeug - INFO - 172.19.0.4 - - [12/Feb/2024 02:09:42] "POST / HTTP/1.0" 200 -

Shuffle queue intent and renew queue intent

If a queue is having 50 songs and you want to re-shuffle them I think it will be good to have a shuffle queue option.
Apart from that an option to dump all the queued items and create new queue on same previous rules with new items.

Provide localization capability

First of all, thank you for the awesome program. The manual is very easy to follow and I got it setup correctly on the first try. It's working like a charm!

As currently Alexa always utters a confirmation hard-coded in English I'd like to see some way to have localization built into the app such that e.g. via environment variable a different locale can be selected. I have no experience in doing such a thing but maybe I can help if you have a recommendation on how to implement it in a good way. Beware, my Python is sub-par ;-)

Also another useful config option could be to disable spoken confirmations altogether.

Play song from Album feature

It would be great to have a feature to play a specific song from an album as multiple versions of same song can be in different albums.
I can see that song by artist is present and album by artist.
An intent for song from album would be good alternative if not able to find the song by artist.

Rework Debugging

Currently debugging is enabled if the NAVI_DEBUG environment variable is set. This should be changed to check if the variable is set to 1 or 0 and the documentation updated appropriately.

In additional enable full request and response debugging when enanled

[ISSUE] Requesting a song title that contains an ampersand in the speech output causes SSML Error

Describe the issue
Requesting a song title that contains an ampersand in the speech output causes SSML Error.

Operating System
Ubuntu x64

To Reproduce
Ask for the song title of a song that contains an ampersand (&) in either the song title, artist and/or album. This will an SSML error (Error: Unexpected character ' ' (code 32)) in the logs

Logs
2024-04-26 20:44:46,859 - root - DEBUG - Response sent: {'api_response': None,
'can_fulfill_intent': None,
'card': None,
'directives': None,
'experimentation': None,
'output_speech': {'object_type': 'SSML',
'play_behavior': None,
'ssml': 'This is Get Down On It by Kool & The Gang, '
'from the album The 50 Greatest Songs'},
'reprompt': None,
'should_end_session': None}
2024-04-26 20:44:46,860 - werkzeug - INFO - 192.168.0.163 - - [26/Apr/2024 20:44:46] "POST / HTTP/1.0" 200 -
2024-04-26 20:44:47,715 - root - DEBUG - Request received: {'error': {'message': 'Invalid SSML Output Speech for requestId '
'amzn1.echo-api.request.21b06285-e5ee-4152-9943-1d95de4b429d. '
'Error: Fatal error occurred when processing SSML '
'content. This usually happens when the SSML is not well '
"formed. Error: Unexpected character ' ' (code 32) "
'(missing name?)\n'
' at [row,col {unknown-source}]: [1,40]',
'object_type': 'INVALID_RESPONSE'},
'locale': 'en-CA',
'object_type': 'SessionEndedRequest',
'reason': 'ERROR',
'request_id': 'redacted',
'timestamp': datetime.datetime(2024, 4, 26, 20, 44, 47, tzinfo=tzlocal())}

Comments
I understand this is an SSML limitation, but I wonder if there would be any way to parse the speech output and replace any ampersand (&) with the word 'and'?

Single Command Invocation?

Describe the solution you'd like
Allow playing of music with a single command (e.g., "Alexa, ask asknavidrome to play my favorites") instead of the two-step command currently available (e.g. 1) "Alexa, ask asknavidrome" [ready] 2) "play my favorites").

Additional context
I'm mostly just wondering if this is a limitation on dev apps because the single-line requests work with apps like Plex. I don't have a lot of experience with Alexa skills, but can figure out the invocations if this is something that's possible.

Ability to Play Internet Radio

Would like to request the ability to play internet radio stations saved in Navidrome.

Maybe we can use the phrase - Ask NaviDrome to play station - RandomRadio

Thanks!

[ISSUE] Skill works but no music played solution

The skill appears to work but no music is played. Errors similar to below appear in the web service log.

Solution that worked for me.
I enabled transcoding in navidrome to mp3 and opus.
It was some songs which were not playing in direct stream so far haven't received the error in long time.

[ISSUE] Setting NAVI_DEBUG=1 does not enable debug mode

Describe the issue
I cannot enable debug mode by setting NAVI_DEBUG=1

Operating System
Raspberry Pi OS running Docker

To Reproduce
Set the environment variable NAVI_DEBUG=1 and run the container. The output shows

Logs
2023-01-01 16:37:29,858 - root - INFO - AskNavidrome 0.6!
2023-01-01 16:37:29,859 - root - DEBUG - Getting configutration from the environment...
2023-01-01 16:37:29,859 - root - INFO - Skill ID set to: [redacted]
2023-01-01 16:37:29,859 - root - INFO - Minimum song count is set to: 50
2023-01-01 16:37:29,859 - root - INFO - The URL for Navidrome is set to: [redacted]
2023-01-01 16:37:29,860 - root - INFO - The Navidrome user name is set to: [redacted]
2023-01-01 16:37:29,860 - root - INFO - The Navidrome password is set
2023-01-01 16:37:29,860 - root - INFO - The Navidrome port is set to: 443
2023-01-01 16:37:29,861 - root - INFO - The Navidrome API path is set to: /rest
2023-01-01 16:37:29,861 - root - INFO - The Navidrome API version is set to: 1.16.1
2023-01-01 16:37:29,861 - root - DEBUG - Configuration has been successfully loaded
2023-01-01 16:37:29,862 - root - INFO - Log level set to INFO
2023-01-01 16:37:30,174 - asknavidrome.subsonic_api - INFO - Successfully connected to Navidrome
2023-01-01 16:37:30,381 - root - INFO - AskNavidrome Web Service is ready to start!

  • Serving Flask app 'app'
  • Debug mode: off
    2023-01-01 16:37:30,395 - werkzeug - INFO - WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.

Comments
I tried with an external env file as well as setting the env value inline to no avail.

[ISSUE] Could not connect with the skill

Describe the issue
I followed the steps but when testing, it cannot connect to my skill. I know I'm doing something wrong, but I cannot determine what can be. I think documentation can me confusing, at least I found it confusing.
In requirements, is stated:

  • Your Music Collection
  • A SubSonic API Compatible Media Server
  • Tags
  • An Amazon Echo Device

But in the Troubleshooting section, it states

Is the endpoint set correctly? The endpoint is the URL to the web service.

Nowhere specifies how to configure the web service. I modified the docker-compose.yml to match my alexa skill ID, navidrome URL, user and password, like this

 version: '3.7'
 services:
     asknavidrome:
         environment:
             - 'NAVI_SKILL_ID=amzn1.ask.skill.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
             - 'NAVI_URL=https://music.example.com'
             - 'NAVI_USER=alexaplayer'
             - 'NAVI_PASS=supersecretpassword'
             - 'NAVI_SONG_COUNT=50'
             - 'NAVI_PORT=443'
             - 'NAVI_API_PATH=/rest'
             - 'NAVI_API_VER=1.16.1'
             - 'NAVI_DEBUG=1'
         ports:
             - '5555:5000'    <-- I've used the port 5555 because I already using port 5000 for other stuff
         image: 'ghcr.io/rosskouk/asknavidrome:latest'
         logging:
             driver: "json-file"
             options:
                 max-size: "10m"
                 max-file: "1"
         deploy:
             restart_policy:
                 condition: on-failure
                 delay: 5s
                 max_attempts: 3
                 window: 120s

And I set up it as https://naviendpoint.example.com, and I see it's reachable from internet, showing this in a browser
image

But no luck, when I test it, it says this

image

{
	"version": "1.0",
	"session": {
		"new": false,
		"sessionId": "amzn1.echo-api.session.7bdeb8c9-52cd-4acc-95f9-7556ab852f53",
		"application": {
			"applicationId": "amzn1.ask.skill.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
		},
		"attributes": {},
		"user": {
			"userId": "amzn1.ask.account.AMA3LQYTH6AWXUQMNZUVKDVCKEB4PXANQVTNARP6Q23QBZWFTOAKRPPYT2TQ7EJMX7PSQTG43GQUORJFOSKLXIWOTEJR6YLTP7APOYPXS3MSVV2AFQJMQMNZUVKDVCKEB4PXANQVTNARP6Q2GIQQX2SFFLWUX4KLYAPWPHXXZM46TUXYSCWMR6BJP5HVGOXL6D5M5WHZUPEQ6PKLCYL2KQFQ"
		}
	},
	"context": {
		"Viewports": [
			{
				"type": "APL",
				"id": "main",
				"shape": "RECTANGLE",
				"dpi": 213,
				"presentationType": "STANDARD",
				"canRotate": false,
				"configuration": {
					"current": {
						"mode": "HUB",
						"video": {
							"codecs": [
								"H_264_42",
								"H_264_41"
							]
						},
						"size": {
							"type": "DISCRETE",
							"pixelWidth": 1280,
							"pixelHeight": 800
						}
					}
				}
			}
		],
		"AudioPlayer": {
			"playerActivity": "IDLE"
		},
		"Viewport": {
			"experiences": [
				{
					"arcMinuteWidth": 346,
					"arcMinuteHeight": 216,
					"canRotate": false,
					"canResize": false
				}
			],
			"mode": "HUB",
			"shape": "RECTANGLE",
			"pixelWidth": 1280,
			"pixelHeight": 800,
			"dpi": 213,
			"currentPixelWidth": 1280,
			"currentPixelHeight": 800,
			"touch": [
				"SINGLE"
			],
			"video": {
				"codecs": [
					"H_264_42",
					"H_264_41"
				]
			}
		},
		"Extensions": {
			"available": {
				"aplext:backstack:10": {}
			}
		},
		"System": {
			"application": {
				"applicationId": "amzn1.ask.skill.e60b74bb-526f-4a06-a68e-88ddccf4bf36"
			},
			"user": {
				"userId": "amzn1.ask.account.AMA3LQYTH6AWXULKLNAV63QVH7IXKM2FEFU4EQ5PAAP3QBZWFTOAKRPPYT2TQ7EJMX7PSQTG43GQUORJFOSKLXIWOTEJR6YLTP7APOYPXSQMNZQMNZUVKDVCKEB4PXANQVTNARP6Q2MNGGIIOQIY3NSSSBDDGIQQX2SFFLWUX4KLYAPWPHXXZM46TUXYSCWMR6BJP5HVGOXL6D5M5WHZUPEQ6PKLCYL2KQFQ"
			},
			"device": {
				"deviceId": "amzn1.ask.device.AMA6OC6WIXPQMNZUVKDVCKEB4PXANQVTNARP6Q2MFQ2C3DM7NCDPG3M7JMMWYCH4FMORWMUKYICWKVMSZBLIBUE4OU2FQYCQA5VRY6IGXXEJGHBQJGZEAMOHIJP6O774ANWGV2O2YLUUKXJNNPRY3B7GEWTT6IKD7NEH2WPG3PV3C4E5C257I5IYR6GS4264EWUGV",
				"supportedInterfaces": {
					"AudioPlayer": {}
				}
			},
			"apiEndpoint": "https://api.eu.amazonalexa.com",
			"apiAccessToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjEifQ.eyJhdWQiOiJodHRwczovL2FwaS5ldS5hbWF6b25hbGV4YS5jb20iLCJpc3MiOiJBbGV4YVNraWxsS2l0Iiwic3ViIjoiYW16bjEuYXNrLnNraWxsLmU2MGI3NGJiLTUyNmYtNGEwNi1hNjhlLTg4ZGRjY2Y0YmYzNiIsImV4cCI6MTcxMzEzODIxNSwiaWF0IjoxNzEzMTM4MTU1LCJuYmYiOjE3MTMxMzgxNTUsInByaXZhdGVDbGFpbXMiOnsiY29udGV4dCI6IkFBQUFBQUFBQVFDVjNKTFRVeEVyVUl1MlI1KytYbWkyVFFFQUFBQUFBQUI0a0c5dDM5TnZ3Qng4TlI1UjNzQjVMUjFsSkNNQ1o0aWNndkRyUC93YmVBLzRYWFg3VkRSTUM4S1VrZDRHcFVpamEzREt0NjZ5dXpvbmxHeUJhUzV6NytwSUhUUW94Y1dHcHpuT3VUdGd1dE9HZWJmRWxoUEJTTDRWSEFMamFkSFBMNk5QZFd6cnJWSE0yN0FMWnQrcTFSYjZJSU9aZGJZVkhGZzVmeHZwMXdJZjZycDJsd1BBOVl4S05iWS9wTjlMN3VkeFM3V2dXYjBpTTZuZ24wbGlqbXNtQVloaUlwNnBBVlVpSURodExXNTlwTTd1Z0RSQko2QXEwdWhrZXJvTU1Sa1dqWFlqUHN0TlI5M0FWWEhTMnQMNZUVKDVCKEB4PXANQVTNARP6Q2kU5ajJmZkFZZ3pwQ0lqK3BEUGluNzV0MWdPQWJJeUZhZ1JydytEYkk4KzFOZ1VkN2pzWEZPOW5DajI1VUJESnE0Q1FNZXpkZVhWQ2I5cy9KSlRuMURQYXdwRzUxaGJBSHBJMTZjVnU5VDMvTE1BczRhUlpiaWVzYmUvRHFFblhSRk9CNlU9IiwiZGV2aWNlSWQiOiJhbXpuMS5hc2suZGV2aWNlLkFNQTZPQzZXSVhQU01DUzUyUEtSUzRCN05LWDZDTVFXMzJNT0FIUFc3WEEyWkE0VExRTUZRMkMzRE03TkNEUEczTTdKTU1XWUNINEZNT1JXTVVLWUlDV0tWTVNaQkxJQlVFNE9VMkZRWUNRQTVWUlk2SUdYWEVKR0hCUUpHWkVBTU9ISUpQNk83NzRBTldHVjJPMllMVVVLWEpOTlBSWTNCN0dFV1RUNklLRDdORUgyV1BHM1BWM0M0QMNZUVKDVCKEB4PXANQVTNARP6Q2g2QVdYVUxLTE5BVjYzUVZIN0lYS00yRkVGVTRFUTVQQUFQM1FCWldGVE9BS1JQUFlUMlRRN0VKTVg3UFNRVEc0M0dRVU9SSkZPU0tMWElXT1RFSlI2WUxUUDdBUE9ZUFhTUU1OWlVWS0RWQ0tFQjRQWEFOUVZUTkFSUDZRMjNNU1ZWMkFGUUpNTkdHSUlPUUlZM05TU1NCRERHSVFRWDJTRkZMV1VYNEtMWUFQV1BIWFhaTTQ2VFVYWVNDV01SNkJKUDVIVkdPWEw2RDVNNVdIWlVQRVE2UEtMQ1lMMktRRlEifX0.lrYe3dIwb8CZOUTpu3LaRCjEf04ZRKuMAF9FhaZtIq0fWtqt98mgv36oAOZWuW7Fv3gHRXa7smYgO_2i0M-NaX6MFYVq9FUB0QhdUfooGZ7ZeoXJF7wp-Eq_a0rT7hWI2kW4WW7D_xPUHH635q7XM2w37sGXCAs5a1kNNNv3IwnVldqXDBI9Bgrb97btkX4XvmKTmNrkyvI9eOC7jopqLz0ph0uzrcuf9QMp0R6wVYfCCJ0AFSJWvA_a3DPwBr4sTO6ZLN86RzvWvpU_R6R_1SPdP1nljf8Xpss1nxeHjKB98JVKR3GLNB_Vq_rq5diQz0VTz4GDEOFf22PMYv9QkA"
		}
	},
	"request": {
		"type": "SessionEndedRequest",
		"requestId": "amzn1.echo-api.request.4bcffdc6-ca9b-439e-b947-5376770f8f45",
		"timestamp": "2024-04-14T23:42:36Z",
		"locale": "es-ES",
		"reason": "ERROR",
		"error": {
			"type": "INVALID_RESPONSE",
			"message": "An exception occurred while dispatching the request to the skill."
		}
	}
}

[ISSUE] 400 Bad Request from Alexa Skill Test

Describe the issue
Followed the documentation, but using the Alexa test I'm getting 400 Bad Request in the logs and Alexa says "There was a problem with the requested skill's response".
I think it might be down to my reverse proxy.
I'm using Swag (Nginx) and Docker.
Certs have been generated.
I added a .conf for the app but it might be incorrect. Is there a suggested .conf?
The site returns 502 Bad Gateway when accessed in the browser.

Logs
navisonic | 2023-05-29 21:14:03,476 - werkzeug - ERROR - 172.19.0.20 - - [29/May/2023 21:14:03] code 400, message Bad request version ("k>±©É¶\x0fÎæ\x00\x008À,À0\x00\x9f̨̩̪À+À/\x00\x9eÀ$À(\x00kÀ#À'\x00gÀ") navisonic | 2023-05-29 21:14:03,476 - werkzeug - INFO - 172.19.0.20 - - [29/May/2023 21:14:03] "��� ·� ³��s*¹zÙo���×fb Ó+�§±À)Ð}�k>±©É¶�Îæ 8À,À0 �̨̩̪À+À/ �À$À( kÀ#À' gÀ" HTTPStatus.BAD_REQUEST -

I'd really appreciate any help to get this setup, thanks!

[ISSUE] Large playlists cause invalid response from alexa skill

Describe the issue
Attempting to play playlist with a large number of songs (>110 from my test) causes alexa to respond with "The requested skill did not provide a valid response.". Decreasing the amount of songs to less than 110 tracks seems to resolve the issue.

Operating System
Ubuntu x64

To Reproduce
Add over 110 tracks to a playlist in navidrome. Attempt to play the playlist using asknavidrome

Logs
2024-04-10 21:08:46,132 - root - DEBUG - Request received: {'dialog_state': None,
'intent': {'confirmation_status': 'NONE',
'name': 'NaviSonicPlayPlaylist',
'slots': {'playlist': {'confirmation_status': 'NONE',
'name': 'playlist',
'resolutions': {'resolutions_per_authority': [{'authority': 'amzn1.er-authority.echo-sdk.amzn1.ask.skill.8e07a780-22a1-4959-8591-61548821b8ea.playlist_names',
'status': {'code': 'ER_SUCCESS_MATCH'},
'values': [{'value': {'id': '4733a44073c81970cccbca6e1ede188b',
'name': 'Sara'}}]}]},
'slot_value': {'object_type': 'Simple',
'resolutions': {'resolutions_per_authority': [{'authority': 'amzn1.er-authority.echo-sdk.amzn1.ask.skill.8e07a780-22a1-4959-8591-61548821b8ea.playlist_names',
'status': {'code': 'ER_SUCCESS_MATCH'},
'values': [{'value': {'id': '4733a44073c81970cccbca6e1ede188b',
'name': 'Sara'}}]}]},
'value': 'Sara'},
'value': 'Sara'}}},
'locale': 'en-CA',
'object_type': 'IntentRequest',
'request_id': 'amzn1.echo-api.request.4eb5df70-97c2-4feb-98fc-2715d90cecc0',
'timestamp': datetime.datetime(2024, 4, 10, 21, 8, 45, tzinfo=tzlocal())}
2024-04-10 21:08:46,132 - root - DEBUG - In NaviSonicPlayPlaylist
2024-04-10 21:08:46,132 - asknavidrome.subsonic_api - DEBUG - In function search_playlist()
2024-04-10 21:08:46,191 - asknavidrome.subsonic_api - DEBUG - Found playlist 8bd66b50-fb72-4451-965e-6245196f6f51
2024-04-10 21:08:46,191 - asknavidrome.subsonic_api - DEBUG - In function build_song_list_from_playlist()
2024-04-10 21:08:46,257 - asknavidrome.media_queue - DEBUG - In clear()
2024-04-10 21:08:46,257 - asknavidrome.subsonic_api - DEBUG - In function get_song_details()
2024-04-10 21:08:46,309 - asknavidrome.subsonic_api - DEBUG - In function get_song_uri()
2024-04-10 21:08:46,309 - asknavidrome.media_queue - DEBUG - In add_track()
2024-04-10 21:08:46,309 - asknavidrome.media_queue - DEBUG - In add_track() - there are 1 tracks in the queue
2024-04-10 21:08:46,309 - asknavidrome.subsonic_api - DEBUG - In function get_song_details()
2024-04-10 21:08:46,362 - asknavidrome.subsonic_api - DEBUG - In function get_song_uri()
2024-04-10 21:08:46,362 - asknavidrome.media_queue - DEBUG - In add_track()
2024-04-10 21:08:46,362 - asknavidrome.media_queue - DEBUG - In add_track() - there are 2 tracks in the queue
2024-04-10 21:08:46,362 - asknavidrome.subsonic_api - DEBUG - In function get_song_details()
2024-04-10 21:08:46,417 - asknavidrome.subsonic_api - DEBUG - In function get_song_uri()
2024-04-10 21:08:46,417 - asknavidrome.media_queue - DEBUG - In add_track()
2024-04-10 21:08:46,417 - asknavidrome.media_queue - DEBUG - In add_track() - there are 3 tracks in the queue
2024-04-10 21:08:46,417 - asknavidrome.subsonic_api - DEBUG - In function get_song_details()
2024-04-10 21:08:46,472 - asknavidrome.subsonic_api - DEBUG - In function get_song_uri()
2024-04-10 21:08:46,472 - asknavidrome.media_queue - DEBUG - In add_track()
2024-04-10 21:08:46,472 - asknavidrome.media_queue - DEBUG - In add_track() - there are 4 tracks in the queue
2024-04-10 21:08:46,472 - asknavidrome.subsonic_api - DEBUG - In function get_song_details()
2024-04-10 21:08:46,532 - asknavidrome.subsonic_api - DEBUG - In function get_song_uri()
2024-04-10 21:08:46,532 - asknavidrome.media_queue - DEBUG - In add_track()
2024-04-10 21:08:46,532 - asknavidrome.media_queue - DEBUG - In add_track() - there are 5 tracks in the queue
...
2024-04-10 21:08:56,912 - asknavidrome.media_queue - DEBUG - In add_track() - there are 162 tracks in the queue
2024-04-10 21:08:56,912 - asknavidrome.media_queue - DEBUG - In shuffle()
2024-04-10 21:08:56,919 - root - INFO - Playing playlist Sara on home mix.
2024-04-10 21:08:56,919 - asknavidrome.media_queue - DEBUG - In get_next_track()
2024-04-10 21:08:56,927 - asknavidrome.controller - DEBUG - In start_playback() - play mode
2024-04-10 21:08:56,927 - asknavidrome.controller - DEBUG - In add_screen_background()
2024-04-10 21:08:56,927 - asknavidrome.controller - DEBUG - Track ID: 53f615c638f2f8a794d6d220c5da5bf3
2024-04-10 21:08:56,927 - asknavidrome.controller - DEBUG - Track Previous ID: bb027c320bff8ed94d24f0e284fb9998
2024-04-10 21:08:56,927 - asknavidrome.controller - INFO - Playing track: Walla Walla by: The Offspring
2024-04-10 21:08:56,929 - root - DEBUG - Response sent: {'api_response': None,
'can_fulfill_intent': None,
'card': {'image': None,
'object_type': 'Standard',
'text': 'Playing playlist Sara on home mix.',
'title': 'AskNavidrome'},
'directives': [{'audio_item': {'metadata': {'art': {'content_description': 'AskNavidrome',
'sources': [{'height_pixels': None,
'size': None,
'url': 'https://github.com/navidrome/navidrome/raw/master/resources/logo-192x192.png',
'width_pixels': None}]},
'background_image': {'content_description': 'AskNavidrome',
'sources': [{'height_pixels': None,
'size': None,
'url': 'https://github.com/navidrome/navidrome/raw/master/resources/logo-192x192.png',
'width_pixels': None}]},
'subtitle': 'Playing playlist '
'Sara on home mix.',
'title': 'AskNavidrome'},
'stream': {'caption_data': None,
'expected_previous_token': None,
'offset_in_milliseconds': 0,
'token': '53f615c638f2f8a794d6d220c5da5bf3',
'url': 'https://homemix.duckdns.org:443/rest/stream.view?f=json&v=1.16.1&c=AskNavidrome&u=michel&s=93782897be156e6555b9e9de36281a44&t=f78a6a83206c9015f3298a5394f84b1c&id=53f615c638f2f8a794d6d220c5da5bf3'}},
'object_type': 'AudioPlayer.Play',
'play_behavior': 'REPLACE_ALL'}],
'experimentation': None,
'output_speech': {'object_type': 'SSML',
'play_behavior': None,
'ssml': 'Playing playlist Sara on home mix.'},
'reprompt': None,
'should_end_session': True}
2024-04-10 21:08:56,930 - werkzeug - INFO - 192.168.0.163 - - [10/Apr/2024 21:08:56] "POST / HTTP/1.0" 200 -
2024-04-10 21:08:57,100 - root - DEBUG - Request received: {'error': {'message': 'An exception occurred while dispatching the request to '
'the skill.',
'object_type': 'INVALID_RESPONSE'},
'locale': 'en-CA',
'object_type': 'SessionEndedRequest',
'reason': 'ERROR',
'request_id': 'amzn1.echo-api.request.ec86dfc8-89a5-43e1-8f77-dfe4c5bc0cfe',
'timestamp': datetime.datetime(2024, 4, 10, 21, 8, 56, tzinfo=tzlocal())}
2024-04-10 21:08:57,100 - root - DEBUG - In SkillEventHandler
2024-04-10 21:08:57,100 - root - DEBUG - Response sent: {'api_response': None,
'can_fulfill_intent': None,
'card': None,
'directives': None,
'experimentation': None,
'output_speech': None,
'reprompt': None,
'should_end_session': None}
2024-04-10 21:08:57,101 - werkzeug - INFO - 192.168.0.163 - - [10/Apr/2024 21:08:57] "POST / HTTP/1.0" 200 -
michel@homeflix:$ ^C
michel@homeflix:
$

Comments
I've attempted to play around with a small (50) and large (200) NAVI_SONG_COUNT variable but this did not change the behavior. I would honestly be happy if only a limited number of random songs were queue'd from the playlist and not the full playlist if this is a limitation from amazon, but being limited to a small playlist is a major inconvenience.

[ISSUE] I can't get AskNavi to work.

I get the following errors:
`10/24/2023 7:30:14 AM 2023-10-24 06:30:14,832 - werkzeug - INFO - 172.18.0.52 - - [24/Oct/2023 06:30:14] "POST / HTTP/1.1" 200 -

10/24/2023 7:30:36 AM 2023-10-24 06:30:36,794 - root - ERROR - General Exception: 'NoneType' object is not iterable

10/24/2023 7:30:36 AM 2023-10-24 06:30:36,794 - root - ERROR - Request Type Was: IntentRequest

10/24/2023 7:30:36 AM 2023-10-24 06:30:36,794 - root - ERROR - Intent Name Was: NaviSonicPlaySongByArtist`

I have checked my account can log into my navidrome instance and can play the files.

asknavi: container_name: asknavi environment: - 'NAVI_SKILL_ID=amzn1.ask.skill.skillcode' - 'NAVI_URL=https://url' - 'NAVI_USER=asknavi' - 'NAVI_PASS=password' - 'NAVI_SONG_COUNT=50' - 'NAVI_PORT=443' - 'NAVI_API_PATH=/rest' - 'NAVI_API_VER=1.16.1' - 'NAVI_DEBUG=1' ports: - '5000:5000' image: 'ghcr.io/rosskouk/asknavidrome:latest' logging: driver: "json-file" options: max-size: "10m" max-file: "1" deploy: restart_policy: condition: on-failure delay: 5s max_attempts: 3 window: 120s

What further information would be useful? I'm sorry I have no idea why my compose isn't showing with the correct formatting.

Update 'Last Played' when playing through asknavidrome

Is your feature request related to a problem? Please describe.
Plays through the asknavidrome skill do not update 'Last Played' date or 'Plays' count in Navidrome.

Describe the solution you'd like
I would like plays through asknavidrome skill to update the 'Last Played' date and 'Plays' count in Navidrome.

Describe alternatives you've considered
N/A

Additional context
I believe there is a setting in the Subsonic API to allow for this because Substreamer (iOS app) is able to update playcounts when playing through the app. I'm only just beginning to learn the Subsonic API, but I would guess the relevant call to implement is here: http://www.subsonic.org/pages/api.jsp#scrobble .

Workaround for limitation mentioned in Documentation

https://rosskouk.github.io/asknavidrome/
Current Documentation mentioned a limitation which is:

You need to open the skill to use it, say Alexa, open Navisonic.

  1. Alexa, open Navisonic
  2. What is playing?

The Workaround which is working is to directly ask alexa to ask the app with the command.

Alexa Ask Navisonic What is Playing?

Similarly
Ask navisonic to star this song.
Ask navisonic to unstar this song.
Ask navisonic to play rock music
Ask navisonic to play playlist "Playlist Name"

[ISSUE] Skill can connect to Ask Navidrome but requests don't process (HTTP Error 403)

Describe the issue
Asknavidrome recieves but is unable to process requests from the alexa skill.
When using the "OPEN InvocationName" command the developer console or device responds with ready but the log shows this error:
2023-06-03 23:25:29,994 - asknavidrome.subsonic_api - ERROR - Failed to connect to Navidrome
When using the "ASK InvocationName to DoAnything" command the console/device can't proceed and the log has this error:
2023-06-03 23:26:47,948 - root - ERROR - General Exception: HTTP Error 403: Forbidden

Operating System
Docker Compose (under Portainer on Ubuntu).

To Reproduce
Ask the device or dev console to "OPEN InvocationName"
Then ask the device or dev console to "ASK InvocationName to play music by ArtistName" or "ASK InvocationName to play music"

Logs
2023-06-03 23:25:28,807 - werkzeug - INFO - 172.31.0.1 - - [03/Jun/2023 23:25:28] "POST / HTTP/1.1" 200 -
2023-06-03 23:25:29,994 - asknavidrome.subsonic_api - ERROR - Failed to connect to Navidrome
2023-06-03 23:25:30,029 - werkzeug - INFO - 172.31.0.1 - - [03/Jun/2023 23:25:30] "POST / HTTP/1.1" 200 -
2023-06-03 23:26:14,473 - root - ERROR - General Exception: HTTP Error 403: Forbidden
2023-06-03 23:26:14,473 - root - ERROR - Request Type Was: IntentRequest
2023-06-03 23:26:14,473 - root - ERROR - Intent Name Was: NaviSonicPlayMusicByGenre
2023-06-03 23:26:14,475 - werkzeug - INFO - 172.31.0.1 - - [03/Jun/2023 23:26:14] "POST / HTTP/1.1" 200 -
2023-06-03 23:26:47,948 - root - ERROR - General Exception: HTTP Error 403: Forbidden
2023-06-03 23:26:47,948 - root - ERROR - Request Type Was: IntentRequest
2023-06-03 23:26:47,948 - root - ERROR - Intent Name Was: NaviSonicPlaySongByArtist
2023-06-03 23:26:47,951 - werkzeug - INFO - 172.31.0.1 - - [03/Jun/2023 23:26:47] "POST / HTTP/1.1" 200 -

Comments
Navidrome instance is externally accessible by android apps and web browsers using the same credentials in the docker compose file)
Asknavidrome service is externally accessible (although shows a 405 method not allowed page when viewed by a browser)
I use cloudflare tunnels to access the containers.

[ISSUE] No Smart Playlists?

Describe the issue
After doing a lot of testing, it seems that the skill will only play static playlists, and not smart playlists (those imported with .nsp files as documented here and here).

Operating System
Docker on Debian.

To Reproduce
"Ask AskNavidrome" [ready] "Play dumbplaylist" [music starts]
"Ask AskNavidrome" [ready] "Play nonexistentplaylist" [I couldn't find a playlist nonexistentplaylist in the collection] (as expected)
"Ask AskNavidrome" [ready] "Play smartplaylist" [blue light circles on Alexa for a bit, then silence].

Logs
The only log I'm getting shows no errors:
2023-12-27 00:52:42,366 - werkzeug - INFO - [ip address redacted] - - [27/Dec/2023 00:52:42] "POST / HTTP/1.1" 200 -

Comments
I suspect that there's something slightly different in the way Navidrome identifies smart playlists that does not allow them to be called without a tweak to the skill.

Add song to playlist

i know there is option to star the song. But an option to add songs to different playlist would be good.
As you already have provided support to for playlists so it would be a good feature to add songs to playlist.
For example slow songs to a different playlist rock to different and so on.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.