nimroddolev / chime_tts

A custom Home Assistant integration to play combined audio files before and/or after text-to-speech (TTS) messages
https://nimroddolev.github.io/chime_tts/
MIT License
182 stars 13 forks source link

Not work in home assistant proxmox #191

Closed amgstone closed 1 week ago

amgstone commented 1 week ago

System Health details

Switched from raspberry to proxmox mini PC and chime tts stopped transmitting sonos voice commands

Checklist

Describe the issue

Switched from raspberry to proxmox mini PC and chime tts stopped transmitting sonos voice commands

Reproduction steps

Switched from raspberry to proxmox mini PC and chime tts stopped transmitting sonos voice commands

Debug logs

2024-09-25 17:28:47.998 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ╭────────────────────────────────╮
2024-09-25 17:28:47.998 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] │ Chime TTS Configuration Values │
2024-09-25 17:28:47.999 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ╰────────────────────────────────╯
2024-09-25 17:28:47.999 DEBUG (MainThread) [custom_components.chime_tts]  - queue_timeout: 60
2024-09-25 17:28:47.999 DEBUG (MainThread) [custom_components.chime_tts]  - tts_platform: 'google_translate'
2024-09-25 17:28:47.999 DEBUG (MainThread) [custom_components.chime_tts]  - default_language: 'uk'
2024-09-25 17:28:47.999 DEBUG (MainThread) [custom_components.chime_tts]  - default_voice: None
2024-09-25 17:28:47.999 DEBUG (MainThread) [custom_components.chime_tts]  - default_tld: None
2024-09-25 17:28:47.999 DEBUG (MainThread) [custom_components.chime_tts]  - offset: 450
2024-09-25 17:28:47.999 DEBUG (MainThread) [custom_components.chime_tts]  - fade_transition: 500
2024-09-25 17:28:47.999 DEBUG (MainThread) [custom_components.chime_tts]  - add_cover_art: False
2024-09-25 17:28:47.999 DEBUG (MainThread) [custom_components.chime_tts]  - temp_chimes_path: '/media/sounds/temp/chime_tts/'
2024-09-25 17:28:47.999 DEBUG (MainThread) [custom_components.chime_tts]  - temp_path: '/media/sounds/temp/chime_tts/'
2024-09-25 17:28:47.999 DEBUG (MainThread) [custom_components.chime_tts]  - www_path: '/config/www/chime_tts/'
2024-09-25 17:28:47.999 DEBUG (MainThread) [custom_components.chime_tts]  - media_dir: 'local'
2024-09-25 17:28:47.999 DEBUG (MainThread) [custom_components.chime_tts]  - custom_chimes_path: ''
2024-09-25 17:28:52.096 WARNING (MainThread) [homeassistant.helpers.entity] Update of binary_sensor.vicare_dhw_charging_active is taking over 10 seconds
2024-09-25 17:28:52.097 WARNING (MainThread) [homeassistant.helpers.entity] Update of number.vscotho1_72_heating_curve_shift is taking over 10 seconds
2024-09-25 17:28:52.101 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.vicare_outside_temperature is taking over 10 seconds
2024-09-25 17:28:52.164 ERROR (MainThread) [custom_components.xiaomi_miot.fan] Mi Air Purifier 2(zhimi.airpurifier.m1): Got MiioException while fetching the state: Unable to discover the device 192.168.31.178, mapping: {'air_purifier.on': {'siid': 2, 'piid': 1}, 'air_purifier.mode': {'siid': 2, 'piid': 2}, 'favorite_fan_level-8-1': {'siid': 8, 'piid': 1}, 'physical_controls_locked': {'siid': 7, 'piid': 1}, 'alarm': {'siid': 6, 'piid': 1}, 'indicator_light.on': {'siid': 5, 'piid': 1}, 'indicator_light.brightness': {'siid': 5, 'piid': 2}, 'filter.filter_life_level': {'siid': 4, 'piid': 1}, 'filter.filter_used_time': {'siid': 4, 'piid': 2}, 'environment.relative_humidity': {'siid': 3, 'piid': 1}, 'environment.pm2_5_density': {'siid': 3, 'piid': 2}, 'environment.temperature': {'siid': 3, 'piid': 3}}, max_properties: 10/12

Diagnostics dump

No response

nimroddolev commented 1 week ago

Hi @amgstone. The log messages in your post only show your configuration values. Can you please send additional log messages that include a call to the chime_tts.say action so that I might be able to understand what goes wrong?

amgstone commented 1 week ago

2024-09-25 17:44:08.113 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ╔══════════════════════════════════════╗ 2024-09-25 17:44:08.114 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ║ Chime TTS Say Called. Version v1.1.4 ║ 2024-09-25 17:44:08.114 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ╚══════════════════════════════════════╝ 2024-09-25 17:44:08.114 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Adding service call to queue 2024-09-25 17:44:08.114 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ╭────────────────────╮ 2024-09-25 17:44:08.114 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] │ General Parameters │ 2024-09-25 17:44:08.114 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ╰────────────────────╯ 2024-09-25 17:44:08.114 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] entity_ids = ['media_player.kitchen'] 2024-09-25 17:44:08.114 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] chime_path = bells 2024-09-25 17:44:08.114 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] end_chime_path = bright 2024-09-25 17:44:08.114 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] cache = False 2024-09-25 17:44:08.114 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] offset = 450.0 2024-09-25 17:44:08.114 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] final_delay = 0.0 2024-09-25 17:44:08.114 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] message = m,n,nm,m 2024-09-25 17:44:08.114 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] language = uk 2024-09-25 17:44:08.114 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] tts_speed = 100.0 2024-09-25 17:44:08.114 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] tts_pitch = 0 2024-09-25 17:44:08.114 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce = False 2024-09-25 17:44:08.115 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] fade_audio = False 2024-09-25 17:44:08.115 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] volume_level = 0.75 2024-09-25 17:44:08.115 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join_players = True 2024-09-25 17:44:08.115 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] unjoin_players = False 2024-09-25 17:44:08.115 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] media_players_array: 2024-09-25 17:44:08.115 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 0: entity_id: media_player.kitchen 2024-09-25 17:44:08.115 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: sonos 2024-09-25 17:44:08.115 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: 0.11 2024-09-25 17:44:08.115 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: 0.75 2024-09-25 17:44:08.115 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: False 2024-09-25 17:44:08.115 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: True 2024-09-25 17:44:08.115 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: True 2024-09-25 17:44:08.115 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ╭─────────────────╮ 2024-09-25 17:44:08.115 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] │ Preparing Audio │ 2024-09-25 17:44:08.115 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ╰─────────────────╯ 2024-09-25 17:44:08.115 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] Local path to chime: /config/custom_components/chime_tts/mp3s/bells.mp3 2024-09-25 17:44:08.115 DEBUG (MainThread) [custom_components.chime_tts] - Retrieving audio from path: "/config/custom_components/chime_tts/mp3s/bells.mp3"... 2024-09-25 17:44:08.191 DEBUG (MainThread) [custom_components.chime_tts] ...audio retrieved. Duration: 0.944s 2024-09-25 17:44:08.192 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - Using default TTS platform: 'google_translate' 2024-09-25 17:44:08.192 DEBUG (MainThread) [custom_components.chime_tts] - Generating new TTS audio with parameters: 2024-09-25 17:44:08.192 DEBUG (MainThread) [custom_components.chime_tts] tts_platform = 'google_translate' 2024-09-25 17:44:08.192 DEBUG (MainThread) [custom_components.chime_tts] message = 'm,n,nm,m' 2024-09-25 17:44:08.192 DEBUG (MainThread) [custom_components.chime_tts] cache = False 2024-09-25 17:44:08.192 DEBUG (MainThread) [custom_components.chime_tts] language = 'uk' 2024-09-25 17:44:08.192 DEBUG (MainThread) [custom_components.chime_tts] options = {} 2024-09-25 17:44:08.278 DEBUG (MainThread) [custom_components.chime_tts] ...TTS audio generated in 90.0ms 2024-09-25 17:44:08.281 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] Local path to chime: /config/custom_components/chime_tts/mp3s/bright.mp3 2024-09-25 17:44:08.281 DEBUG (MainThread) [custom_components.chime_tts] - Retrieving audio from path: "/config/custom_components/chime_tts/mp3s/bright.mp3"... 2024-09-25 17:44:08.361 DEBUG (MainThread) [custom_components.chime_tts] ...audio retrieved. Duration: 0.637s 2024-09-25 17:44:08.366 DEBUG (MainThread) [custom_components.chime_tts] - Saving mp3 file to local folder: /media/sounds/temp/chime_tts/... 2024-09-25 17:44:08.462 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] File saved to path: /media/sounds/temp/chime_tts/xkl6qwmw.mp3 2024-09-25 17:44:08.544 DEBUG (MainThread) [custom_components.chime_tts] - Chime TTS audio generated: 2024-09-25 17:44:08.544 DEBUG (MainThread) [custom_components.chime_tts] audio_duration = 4.737 2024-09-25 17:44:08.544 DEBUG (MainThread) [custom_components.chime_tts] local_path = "/media/sounds/temp/chime_tts/xkl6qwmw.mp3" 2024-09-25 17:44:08.544 DEBUG (MainThread) [custom_components.chime_tts] public_path = None 2024-09-25 17:44:08.544 DEBUG (MainThread) [custom_components.chime_tts] * media_content_id = "media-source://media_source/local/sounds/temp/chime_tts/xkl6qwmw.mp3" 2024-09-25 17:44:08.544 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ╭──────────────────────╮ 2024-09-25 17:44:08.544 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] │ Pre-Playback Actions │ 2024-09-25 17:44:08.544 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ╰──────────────────────╯ 2024-09-25 17:44:08.544 WARNING (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Only 1 media_player was found that supports joining speakers into a group. A minimum of 2 is requied. 2024-09-25 17:44:08.544 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ╭────────────────────╮ 2024-09-25 17:44:08.544 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] │ Chime TTS playback │ 2024-09-25 17:44:08.544 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ╰────────────────────╯ 2024-09-25 17:44:08.544 DEBUG (MainThread) [custom_components.chime_tts] 1 Sonos media player detected: 2024-09-25 17:44:08.544 DEBUG (MainThread) [custom_components.chime_tts] - media_player.kitchen 2024-09-25 17:44:08.544 DEBUG (MainThread) [custom_components.chime_tts] Calling media_player.play_media with data: 2024-09-25 17:44:08.545 DEBUG (MainThread) [custom_components.chime_tts] - entity_id: ['media_player.kitchen'] 2024-09-25 17:44:08.545 DEBUG (MainThread) [custom_components.chime_tts] - announce: False 2024-09-25 17:44:08.545 DEBUG (MainThread) [custom_components.chime_tts] - media_content_type: music 2024-09-25 17:44:08.545 DEBUG (MainThread) [custom_components.chime_tts] - media_content_id: media-source://media_source/local/sounds/temp/chime_tts/xkl6qwmw.mp3 2024-09-25 17:44:08.545 DEBUG (MainThread) [custom_components.chime_tts] - extra: {'volume': 75} 2024-09-25 17:44:08.545 DEBUG (MainThread) [custom_components.chime_tts] - Waiting 4.737s for audio playback to complete... 2024-09-25 17:44:13.286 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - Waiting until 1 media_player isn't playing... 2024-09-25 17:44:13.286 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] ✔ media_player.kitchen 2024-09-25 17:44:13.286 DEBUG (MainThread) [custom_components.chime_tts] Removing temporary file: 2024-09-25 17:44:13.286 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] Deleting file /media/sounds/temp/chime_tts/xkl6qwmw.mp3 2024-09-25 17:44:13.287 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ╭───────────────────────────────────────────╮ 2024-09-25 17:44:13.287 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] │──── Chime TTS Say Completed in 5.17 s ────│ 2024-09-25 17:44:13.287 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ╰───────────────────────────────────────────╯

nimroddolev commented 1 week ago

Thank you for the additional log messages.

Based on the logs it seems Chime TTS sucessfully generated the MP3. If your Sonos speaker cannot play the file, it is most likely related to your new setup in Proxmox.

I suggest you test audio playback from Home Assistant. You can enable the cache option when calling chime_tts.say so that the file created by Chime TTS remains on your file system. Look at the log again to get its media_content_id and then try to play the file via media_player.play_media.

amgstone commented 1 week ago

everything is correct, the media player does not work, where to dig, I do not understand why it stopped working

amgstone commented 1 week ago

image not play

nimroddolev commented 1 week ago

I suggest you search/post on the Home Assistant forum as I don't think this is an issue with Chime TTS - but with your Sonos setup.