vincen 71 Posted December 10, 2025 Posted December 10, 2025 Hi It's again me with my problem of terrible slow-down of my Emby Server. It runs on a quite beefy system (based on Debian 12 and RAID arrays) and so far all system monitoring indicates no issue such as lack of RAM, or storage nearly full or processor overbusy. I always had the problem that is server is unusable while it's indexing new contents added in it. If you are already playing something it's fine but browsing libraries is impossible, it spins forever whatever with a web browser or Android app ! It had magically disappeared with the release of version 4.9.1.90 and now after few weeks it's back and even worse than before as now It hangs while playing medias randomly and so you have to stop and play again each time I have already restarted quite few times the Emby server but not much changes. It's also strange that sometimes server works great and sometimes it's very sluggish even if system monitoring indicates no changes in system ressources being used. I'm quite lost about what to do/investigate there... Can I delete safely the cache directory in /var/lib/emby/cache/cache ? (with of course Emby server stopped). I attach logs if someone is able to find something in it ? For information that same server is running Plex also and it has no problem at all. Thanks for help and ideas, Vincèn
Luke 42077 Posted December 10, 2025 Posted December 10, 2025 Hi, please try removing these plugins: CoverArt 4.1.28.0 Disk Space 1.0.6.4 Emby Data Explorer 4.9.1.13 Iconic Image Enhancer 2.7.1.0 Playback Reporting 2.1.0.7 Statistics 3.4.2. Then restart the server and see how things compare. 1
vincen 71 Posted December 11, 2025 Author Posted December 11, 2025 22 hours ago, Luke said: please try removing these plugins: Thanks for the list as I was thinking to try that but not sure which plugins to prioritise ! Change has been quite surprising in term of speed of the server whatever to browse in medias or play/start a media I'll reinstall plugins one by one to find out which one is the problem. I still have sometime some freeze of the server during 30/40s but it doesn't affect streams playing only browsing interface, will update if problem lasts. 1
vincen 71 Posted December 13, 2025 Author Posted December 13, 2025 So after 2 days I can confirm that removal of the specific plugins have quite improved the situation as now Emby server is usable most of time but I still have quite often some extremely sluggish/dead times where server is not answering any requests done to it (it usually lasts 2/3 minutes and then it's fully back to normal). I have checked and there is none load on server processors, ram or storage so it's not linked with a shortage of hardware ressources. Here is an updated log file in case something shows up PS: @Luke can you please remove the logs file of my posts once you have reviewed them ? Thanks
vincen 71 Posted December 21, 2025 Author Posted December 21, 2025 I found out that one responsible for the terrible Emby slowndows are due at the integration I use to control Emby players from Home-Assistant As soon as I deactivate the integration in HA, Emby server becomes so fast Is there a way in logs to see requests done by API use @Luke? I searched for "API" in logs but it gives me also all the requests at the different metadata servers that are unrelated.
Luke 42077 Posted December 21, 2025 Posted December 21, 2025 Hi, there’s no way to do that, although that does seem like a good idea. 1
vincen 71 Posted December 22, 2025 Author Posted December 22, 2025 9 hours ago, Luke said: Hi, there’s no way to do that, although that does seem like a good idea. thanks for confirmation I'm going to fill a Feature request then
yocker 1247 Posted December 22, 2025 Posted December 22, 2025 13 hours ago, vincen said: I found out that one responsible for the terrible Emby slowndows are due at the integration I use to control Emby players from Home-Assistant As soon as I deactivate the integration in HA, Emby server becomes so fast Is there a way in logs to see requests done by API use @Luke? I searched for "API" in logs but it gives me also all the requests at the different metadata servers that are unrelated. You might be able to see the calls in home assistant, at least the once used by home assistant. Not sure.
vincen 71 Posted December 22, 2025 Author Posted December 22, 2025 53 minutes ago, yocker said: You might be able to see the calls in home assistant, Yeah it's how I discovered the integration is very poorly designed as it requests permanently updates of all users in the Emby server and all players existing in it. It probably explains also why it takes ages to startup (more than 5 minutes in my HA system that runs on a beefy PC !).
yocker 1247 Posted December 22, 2025 Posted December 22, 2025 21 minutes ago, vincen said: Yeah it's how I discovered the integration is very poorly designed as it requests permanently updates of all users in the Emby server and all players existing in it. It probably explains also why it takes ages to startup (more than 5 minutes in my HA system that runs on a beefy PC !). I don't have that much knowledge about Home Assistant but can't you make your own "engine" in Home Assistant that just calls the appropriate emby APIs?
vincen 71 Posted December 22, 2025 Author Posted December 22, 2025 11 minutes ago, yocker said: I don't have that much knowledge about Home Assistant but can't you make your own "engine" in Home Assistant that just calls the appropriate emby APIs? Well it's what I did already to get current streams number from Emby but for other features like media player control/updates it's way more complicated. Unhappy so far no Emby integration for HA is usable (the official one is broken since ages, I have tried few alternatives that all have problems, that last one looked better but it just stresses way too much the server by abusing the API for status
yocker 1247 Posted December 22, 2025 Posted December 22, 2025 4 minutes ago, vincen said: Well it's what I did already to get current streams number from Emby but for other features like media player control/updates it's way more complicated. Unhappy so far no Emby integration for HA is usable (the official one is broken since ages, I have tried few alternatives that all have problems, that last one looked better but it just stresses way too much the server by abusing the API for status Sorry to hear that. I got my Home Assistant to make something like this. Shouldn't be impossible to control Emby playback with API usage either somehow, but would most likely would have to be made by your self.
vincen 71 Posted December 23, 2025 Author Posted December 23, 2025 On 12/22/2025 at 9:46 AM, yocker said: I got my Home Assistant to make something like this. Shouldn't be impossible to control Emby playback with API usage either somehow, but would most likely would have to be made by your self. Nice result in HA Yeah but it's quite a lot of work for me I'll continue as before and not be able to use at all my music in Emby on my devices. I have given up on that since first day I switched from Plex to Emby. It's strange as Emby that have a reliable API never got any working well integration for HA while Plex that never had any reliable API has a working integration since always Probably lot more users of Plex than Emby :/
yocker 1247 Posted December 23, 2025 Posted December 23, 2025 2 hours ago, vincen said: Nice result in HA Yeah but it's quite a lot of work for me I'll continue as before and not be able to use at all my music in Emby on my devices. I have given up on that since first day I switched from Plex to Emby. It's strange as Emby that have a reliable API never got any working well integration for HA while Plex that never had any reliable API has a working integration since always Probably lot more users of Plex than Emby What precisely do you need? If "easy" and not too complex to do i can maybe look into at least finding what sensor and API commands and are needed.. No promises as i'm rather busy.
vincen 71 Posted December 24, 2025 Author Posted December 24, 2025 On 12/23/2025 at 12:28 PM, yocker said: If "easy" and not too complex to do i can maybe look into at least finding what sensor and API commands and are needed.. No promises as i'm rather busy. Thanks for offer but not going to be easy I want to be able to get status of a player specific and also be able to select a media of Emby server to play it through a compatible device in HA system !
yocker 1247 Posted December 24, 2025 Posted December 24, 2025 23 minutes ago, vincen said: Thanks for offer but not going to be easy I want to be able to get status of a player specific and also be able to select a media of Emby server to play it through a compatible device in HA system ! So choose media from Emby, choose a device lets say for example TV 1 and play.. Hmm.. Should be durable. Might be easier with DLNA. If the device is already in Home Assistant it's probably possible to use the mediaplayer_device and then just a sensor for Emby for available media.
yocker 1247 Posted December 25, 2025 Posted December 25, 2025 Made this in Home Assistant. Not sure it's what you want but you can work on it to suit you. For the configuration.yaml: # 1. INPUT SELECT HELPERS input_select: emby_movie_selection: name: Emby Movie Selection options: - "Loading..." icon: mdi:movie emby_device_selection: name: Emby Device Selection options: - "Loading..." icon: mdi:devices # 2. SENSORS SECTION sensor: - platform: rest name: emby_movie_library resource: "http://10.0.0.241:8096/emby/Items?Recursive=true&IncludeItemTypes=Movie&Fields=Name,Id&api_key=83b94112074f43d4903bf672cea1be5e" value_template: "{{ value_json.TotalRecordCount if value_json is defined else 0 }}" json_attributes: - Items scan_interval: 3600 # 3. AUTOMATIONS SECTION automation: - alias: "Update Emby Movie Dropdown" id: update_emby_movie_dropdown trigger: - platform: state entity_id: sensor.emby_movie_library - platform: homeassistant event: start action: - service: input_select.set_options target: entity_id: input_select.emby_movie_selection data: options: > {% set items = state_attr('sensor.emby_movie_library', 'Items') %} {% if items != None %} {{ items | map(attribute='Name') | unique | list | sort }} {% else %} {{ ["Loading..."] }} {% endif %} - alias: "Update Emby Device Dropdown" id: update_emby_device_dropdown_ha_all trigger: - platform: homeassistant event: start - platform: time_pattern minutes: "/5" action: - service: input_select.set_options target: entity_id: input_select.emby_device_selection data: options: > {% set media_players = states.media_player | map(attribute='name') | unique | list %} {% if media_players | length > 0 %} {{ media_players | sort }} {% else %} {{ ["No Media Players Found"] }} {% endif %} # 4. SCRIPTS SECTION script: play_selected_emby_movie: alias: "Play Selected Emby Movie" mode: restart sequence: - variables: movie_name: "{{ states('input_select.emby_movie_selection') }}" device_name: "{{ states('input_select.emby_device_selection') }}" movies: "{{ state_attr('sensor.emby_movie_library', 'Items') }}" movie_id: > {% for item in movies if item.Name == movie_name %} {{ item.Id }} {% endfor %} media_player_entity: > {% for state in states.media_player if state.name == device_name %} {{ state.entity_id }} {% endfor %} emby_ip: "10.0.0.241:8096" api_key: "83b94112074f43d4903bf672cea1be5e" - condition: template value_template: "{{ movie_id | trim != '' and media_player_entity | trim != '' }}" - service: media_player.turn_on target: entity_id: "{{ media_player_entity | trim }}" - service: media_player.media_stop target: entity_id: "{{ media_player_entity | trim }}" continue_on_error: true - delay: "00:00:01" - service: media_player.play_media target: entity_id: "{{ media_player_entity | trim }}" data: media_content_id: "http://{{ emby_ip }}/emby/Videos/{{ movie_id | trim }}/stream?static=true&api_key={{ api_key }}" media_content_type: "video/mp4" stop_emby_movie: alias: "Stop Emby Movie" sequence: - variables: device_name: "{{ states('input_select.emby_device_selection') }}" media_player_entity: > {% for state in states.media_player if state.name == device_name %} {{ state.entity_id }} {% endfor %} - condition: template value_template: "{{ media_player_entity | trim != '' }}" # media_stop leaves the app open, turn_off closes the Cast app entirely - service: media_player.turn_off target: entity_id: "{{ media_player_entity | trim }}" And a entities card: type: entities title: Emby Movie Controller show_header_toggle: false entities: - entity: input_select.emby_movie_selection name: 1. Pick a Movie - entity: input_select.emby_device_selection name: 2. Pick a Device - type: button name: " " action_name: Play Movie icon: mdi:play-circle tap_action: action: call-service service: script.play_selected_emby_movie - type: button name: " " action_name: Stop Movie icon: mdi:stop-circle tap_action: action: call-service service: script.stop_emby_movie - type: button name: Refresh Lists icon: mdi:refresh tap_action: action: call-service service: automation.trigger target: entity_id: - automation.update_emby_movie_dropdown - automation.update_emby_device_dropdown_ha_all It will find the movies you have in Emby and show in a dropdown list. Choose a device also from a droplist. Press play and it will cast to that display. Btw.. Don't worry about the API keys in the list, i have reset them on my system plus my test system is not open to the internet. Anyway.. As said i don't know if this is what you were looking for but made it anyway cause i think i can use it my self in my Home Control Console.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now