home-assistant / home-assistant/core

when I play TTS to mpd integration, 4 errors are logged trying to fetch art files

Open
#77,997 46 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

integration: mpd
Dominant language
Python
Stars
90.8k
Forks
38.7k
Avg merge
1d 2h
Merged PRs (30d)
597

Description

### The problem

I am getting a set of 4 errors in the core log when I play TTS to the MPD integration. Other media_player devices don't generate these errors when they play the same TTS files. The MPD addon appears to have 4 corresponding CURL errors. The MPD addon also has the same 4 CURL errors when it plays non-TTS sound files, but those don't get logged in core at all. It appears the MPD integration is not filtering these CURL errors raised by the MPD addon.

This is the same issue as #47889, but I'm having to start a new issue because that issue was never acknowledged by the integration owner and it got closed as stale. If the issue lies outside of the MPD integration, please confirm true source of the issue.

My system plays a lot of TTS, so this is inflating my logs significantly.

Is it possible to disable art lookup? Not only would that work around my issue, but it would be more efficient to avoid the lookups.

### What version of Home Assistant Core has the issue?

2022.9.0

### What was the last working version of Home Assistant Core?

_No response_

### What type of installation are you running?

Home Assistant OS

### Integration causing the issue

mpd

### Link to integration documentation on our website

https://www.home-assistant.io/integrations/mpd/

### Diagnostics information

_No response_

### Example YAML snippet

_No response_

### Anything in the logs that might be useful for us?

```txt
* From core log:
Logger: homeassistant.components.tts
Source: components/tts/__init__.py:707
Integration: Text-to-Speech (TTS) (documentation, issues)
First occurred: 5:55:04 PM (8 occurrences)
Last logged: 5:56:12 PM
Error on load tts: Wrong tts file format!

* From MPD add-on log:
exception: CURL failed: The requested URL returned error: 404
exception: CURL failed: The requested URL returned error: 404
exception: CURL failed: The requested URL returned error: 404
exception: CURL failed: The requested URL returned error: 404
player: played "http://192.168.34.13:8123/api/tts_proxy/9c3de9e8ebd203887310ec65b109597256112c6a_en_-_google_translate.mp3"
```

### Additional information

_No response_

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with components/tts/__init__.py:707 and the MPD integration documentation, then compare the core TTS error with the MPD add-on's four CURL 404 errors. Trace whether the errors originate in the MPD integration or TTS handling; done means the source is identified and the unwanted art-lookup errors no longer inflate the core log.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.