HD Homerun issues - IP change needed but DVR not deleting from PMS

Server Version#: 1.40.1.8120-7000
Player Version#: 4.123.2
Tuner Make/Model: HDHomeRun FLEX QUATRO
Guide/Lineup name:
Using XMLTV?:
Channel number/Name:
<If providing server logs please do NOT turn on verbose logging, only debug logging should be enabled>

Need to move PMS & the HD Homerun to a different subnet on the network however despite being able to move the HD Homerun and provide it with a static IP via DHCP, Plex appears to be holding onto the old IP in it’s database and is not adding it back to Plex as it’s a known device so is expecting it on the old IP.

I’ve searched the internet and various forums looking for answers and trying different methods to resolve the issue but my patience has now worn out :slight_smile:

How can I remove the old device from the database? I have already tried looking into resolving it by using Plex SQLite and the media_provider_resources like some others have suggested or deleting the EPG files in Plugin Support but no joy. I’ve also looked at checking the database but the integrity check comes back OK.

The steps I had taken are:

  1. Remove the DVR by deleting it from PMS while the server using the old subnet.
  2. Stop PMS
  3. Change IP’s for server and HD Homerun
  4. Restart PMS then HD Homerun
  5. Try re-add the DVR to Plex using the new IP but PMS is still searching for the device using the old IP despite not having a DVR configured.

Plex does not want to appear to release the device from its known devices list which is therefore locking the device to the IP address and unable to re-add. Currently I’ve had to open up a route to the subnet so it can continue to talk to the DVR but I need to be able to have the DVR talking on the new subnet.

Note: Similar to the forum post here and possibly here but rebooting the server should do the same thing?

So you:

  1. Deleted the DVR
  2. Stopped Plex
  3. /usr/lib/plexmediaserver/Plex\ SQLite com.plexapp.plugins.library.db “delete from media_provider_resources;”
  4. rm all tv.plex.providers* files from the “/Plex Media Server/Plug-in Support/Databases” directory
  5. Restarted Plex

These problems usually show up when you have hidden database corruption so I would dump and repair the database as well.

If you list out the database directory after you have stopped Plex and you see *.db-shm and *.db-wal files that is a good indication that the database isn’t shutting down cleanly. I would also look and see if your database backups are being created every 3 days and are current.

  • Checked ‘com.plexapp.plugins.library.db’ no media_provider_resources table found (reverted to a previous backup and no tables shown when .tables in SQLite??
  • No tv.plex.providers* in the Databases directory.
  • No *.db-shm and *.db-wal files after shutting down so appears to be ok.
  • Can confirm databases are being backed up every 3 days
  • Checked the database for corrupted data and went though the repair corrupted database process, and even tried rolling back to a previous version to no avail as it keeps latching onto the device and wont release it then wont recognize the new IP
  • Also renamed the current ‘com.plexapp.plugins.library.db’ to *.bak and restarted the server so no libraries but it can’t find the tuner at all, even when manually specifying the IP.

The error I keep getting is
[Req#2279] DVR:Device: Error refreshing existing device device://tv.plex.grabbers.hdhomerun/12602xxx, marking as dead.

This appears to be the identifier preventing it from working. I’ve found using CURL i can get the device information. Surely this could be a way of removing the device but I’m not even 20% up to speed with CURL and PUT commands or if its even possible.

curl -L -X GET ‘http://[ip obscured] :32400/media/grabbers/devices’ -H ‘Accept: application/json’ -H ‘X-Plex-Token: [token obscured]’

{“MediaContainer”:{“size”:1,“Device”:[{“key”:“1”,“uuid”:“device://tv.plex.grabbers.hdhomerun/12602xxx”,“uri”:“http://xxx.xxx.xxx.194”,“protocol”:“livetv”,“status”:“dead”,“state”:“enabled”,“lastSeenAt”:1707590418,“canTranscode”:“0”,“deviceAuth”:“[obscured]-[obscured]”,“deviceId”:“12602xxx”,“make”:“Unknown”,“model”:“HDHomeRun FLEX QUATRO”,“modelNumber”:“HDFX-4DT”,“source”:“0”,“sources”:“0,1”,“thumb”:“/:/resources/dvr/device-generic-560.png”,“title”:“Freeview”,“tuners”:“4”}]}}

Appears I can delete the device but this doesn’t help as its then unrecognized it seems and we’re back to the opposite of cannot discover device.

Need to drill in more on the no tables shown with .table, this is what you should see:

sqlite> .tables
accounts                             media_items
activities                           media_metadata_mappings
blobs                                media_part_settings
custom_channels                      media_parts
devices                              media_provider_resources
directories                          media_stream_settings
external_metadata_items              media_streams
external_metadata_sources            media_subscriptions
fts4_metadata_titles                 metadata_agent_providers
fts4_metadata_titles_docsize         metadata_item_accounts
fts4_metadata_titles_icu             metadata_item_clusterings
fts4_metadata_titles_icu_docsize     metadata_item_clusters
fts4_metadata_titles_icu_segdir      metadata_item_setting_markers
fts4_metadata_titles_icu_segments    metadata_item_settings
fts4_metadata_titles_icu_stat        metadata_item_views
fts4_metadata_titles_segdir          metadata_items
fts4_metadata_titles_segments        metadata_relations
fts4_metadata_titles_stat            metadata_subscription_desired_items
fts4_tag_titles                      play_queue_generators
fts4_tag_titles_docsize              play_queue_items
fts4_tag_titles_icu                  play_queues
fts4_tag_titles_icu_docsize          plugin_permissions
fts4_tag_titles_icu_segdir           plugin_prefixes
fts4_tag_titles_icu_segments         plugins
fts4_tag_titles_icu_stat             preferences
fts4_tag_titles_segdir               remote_id_translation
fts4_tag_titles_segments             schema_migrations
fts4_tag_titles_stat                 section_locations
hub_templates                        spellfix_metadata_titles
library_section_permissions          spellfix_metadata_titles_vocab
library_sections                     spellfix_tag_titles
library_timeline_entries             spellfix_tag_titles_vocab
locatables                           statistics_bandwidth
location_places                      statistics_media
locations                            statistics_resources
locations_node                       stream_types
locations_parent                     taggings
locations_rowid                      tags
media_grabs                          versioned_metadata_items
media_item_settings                  view_settings

Are you using the Plex SQLite or a separate version?

Using Plex SQLite though SSH.

It appears that deleting the device using ssh & curl removes it fully from the system and it now works when readding it to the system … except not on .2 !!!

So i’m going to live with .5

curl -L -X DELETE ‘http://192.168.100.1:32400/media/grabbers/devices/[key]’ -H ‘X-Plex-Token: [token]’

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.