Jump to content

Trying to configure DLNA-profile for Sony KDL-40WE665 (2017)


Roodee

Recommended Posts

Hi All, I am trying to configure DLNA-profile for my Sony Bravia KDL-40WE665, which supposedly hit the market in 2017. Wasn't there a way to "copy" an existing profile into a new one?

When I just add a new profile, it is pretty much all empty.

When I modify an existing (server-)profile, it says "Internal Server Error" when I save it, and the profile returns to normal when the emby-Server is restarted.

So, what am I missing? What is the easiest way to make up a new profile that is based on an existing one?

Thank you all,
RooDee

 

Link to comment
Share on other sites

This is what I got from renaming the "Sony Bravia (2014)" profile:

image.png.f6812a4b04c03de6964ff80cc55f084a.png

and I got the Internal Server Error on screen! And here is the log:

embyserver-63806207345.txt

However, this time after the restart, the server-included profile "Sony Bravia (2014)" is back, and the my derived profile persisted.

Link to comment
Share on other sites

Happy2Play

@Luke

image.png.c06b06e7454717488b07939e71cb4433.png

2022-12-09 09:45:27.062 Debug Server: http/1.1 POST http://‌‍‍localhost‌:8098/emby/Dlna/Profiles/b80487c4fe939e87c27832879b503568?X-Emby-Client=Emby Web&X-Emby-Device-Name=Microsoft Edge Windows&X-Emby-Device-Id=824ddfe0-a8a4-4b4c-a444-32ba21e5af0a&X-Emby-Client-Version=4.7.10.0&reqformat=json. UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36 Edg/108.0.1462.46
2022-12-09 09:45:27.075 Debug XmlSerializer: Serializing to file C:\Users\Media\Desktop\Stable\programdata\config\dlna\user\Sony Bravia (2017).xml
2022-12-09 09:45:27.107 Error Server: Error processing request
	*** Error Report ***
	Version: 4.7.10.0
	Command line: C:\Users\Media\Desktop\Stable\system\EmbyServer.dll -noautorunwebapp
	Operating system: Microsoft Windows 10.0.25252
	Framework: .NET 6.0.10
	OS/Process: x64/x64
	Runtime: C:/Users/Media/Desktop/Stable/system/System.Private.CoreLib.dll
	Processor count: 8
	Data path: C:\Users\Media\Desktop\Stable\programdata
	Application path: C:\Users\Media\Desktop\Stable\system
	System.InvalidOperationException: System.InvalidOperationException: There was an error generating the XML document.
	 ---> System.InvalidOperationException: Instance validation error: '6' is not a valid value for MediaBrowser.Model.Dlna.ProfileConditionValue.
	   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterDlnaProfile.Write8_ProfileConditionValue(ProfileConditionValue v)
	   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterDlnaProfile.Write9_ProfileCondition(String n, String ns, ProfileCondition o, Boolean isNullable, Boolean needType)
	   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterDlnaProfile.Write13_ResponseProfile(String n, String ns, ResponseProfile o, Boolean isNullable, Boolean needType)
	   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterDlnaProfile.Write21_DlnaProfile(String n, String ns, DlnaProfile o, Boolean isNullable, Boolean needType)
	   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterDlnaProfile.Write22_Profile(Object o)
	   --- End of inner exception stack trace ---
	   at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)
	   at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o)
	   at Emby.Server.Implementations.Serialization.MyXmlSerializer.SerializeToWriter(Object obj, XmlWriter writer)
	   at Emby.Server.Implementations.Serialization.MyXmlSerializer.SerializeToStream(Object obj, Stream stream)
	   at Emby.Server.Implementations.Serialization.MyXmlSerializer.SerializeToFile(Object obj, String file)
	   at Emby.Dlna.DlnaManager.SaveProfile(DlnaProfile profile, String path, DeviceProfileType type, Boolean updateFile)
	   at Emby.Dlna.DlnaManager.UpdateProfile(DlnaProfile submittedProfile)
	   at Emby.Server.Implementations.Services.ServiceController.<>c__DisplayClass6_0.<VoidActionDelegate>b__0(Object service, Object request)
	   at Emby.Server.Implementations.Services.ServiceController.Execute(HttpListenerHost appHost, Object requestDto, IRequest req)
	   at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, RestPath restPath, String responseContentType, CancellationToken cancellationToken)
	   at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, ReadOnlyMemory`1 urlString, ReadOnlyMemory`1 localPath, CancellationToken cancellationToken)
	Source: System.Private.Xml
	TargetSite: Void Serialize(System.Xml.XmlWriter, System.Object, System.Xml.Serialization.XmlSerializerNamespaces, System.String, System.String)
	InnerException: System.InvalidOperationException: Instance validation error: '6' is not a valid value for MediaBrowser.Model.Dlna.ProfileConditionValue.
	Source: Microsoft.GeneratedCode
	TargetSite: System.String Write8_ProfileConditionValue(MediaBrowser.Model.Dlna.ProfileConditionValue)
	   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterDlnaProfile.Write8_ProfileConditionValue(ProfileConditionValue v)
	   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterDlnaProfile.Write9_ProfileCondition(String n, String ns, ProfileCondition o, Boolean isNullable, Boolean needType)
	   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterDlnaProfile.Write13_ResponseProfile(String n, String ns, ResponseProfile o, Boolean isNullable, Boolean needType)
	   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterDlnaProfile.Write21_DlnaProfile(String n, String ns, DlnaProfile o, Boolean isNullable, Boolean needType)
	   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterDlnaProfile.Write22_Profile(Object o)
	
2022-12-09 09:45:27.107 Debug Server: http/1.1 Response 500 to ‌‍‍::1‌. Time: 46ms. http://‌‍‍localhost‌:8098/emby/Dlna/Profiles/b80487c4fe939e87c27832879b503568?X-Emby-Client=Emby Web&X-Emby-Device-Name=Microsoft Edge Windows&X-Emby-Device-Id=824ddfe0-a8a4-4b4c-a444-32ba21e5af0a&X-Emby-Client-Version=4.7.10.0&reqformat=json

But profile is created.

Edited by Happy2Play
Link to comment
Share on other sites

Happy2Play

@Roodee OT you need to look at your SSL certificate.

2022-12-09 18:22:42.211 Error App: Error loading cert from /etc/letsencrypt/live/xxx.xxx/cert.pem

 

Link to comment
Share on other sites

30 minutes ago, Happy2Play said:

@Luke

image.png.c06b06e7454717488b07939e71cb4433.png

2022-12-09 09:45:27.062 Debug Server: http/1.1 POST http://‌‍‍localhost‌:8098/emby/Dlna/Profiles/b80487c4fe939e87c27832879b503568?X-Emby-Client=Emby Web&X-Emby-Device-Name=Microsoft Edge Windows&X-Emby-Device-Id=824ddfe0-a8a4-4b4c-a444-32ba21e5af0a&X-Emby-Client-Version=4.7.10.0&reqformat=json. UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36 Edg/108.0.1462.46
2022-12-09 09:45:27.075 Debug XmlSerializer: Serializing to file C:\Users\Media\Desktop\Stable\programdata\config\dlna\user\Sony Bravia (2017).xml
2022-12-09 09:45:27.107 Error Server: Error processing request
	*** Error Report ***
	Version: 4.7.10.0
	Command line: C:\Users\Media\Desktop\Stable\system\EmbyServer.dll -noautorunwebapp
	Operating system: Microsoft Windows 10.0.25252
	Framework: .NET 6.0.10
	OS/Process: x64/x64
	Runtime: C:/Users/Media/Desktop/Stable/system/System.Private.CoreLib.dll
	Processor count: 8
	Data path: C:\Users\Media\Desktop\Stable\programdata
	Application path: C:\Users\Media\Desktop\Stable\system
	System.InvalidOperationException: System.InvalidOperationException: There was an error generating the XML document.
	 ---> System.InvalidOperationException: Instance validation error: '6' is not a valid value for MediaBrowser.Model.Dlna.ProfileConditionValue.
	   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterDlnaProfile.Write8_ProfileConditionValue(ProfileConditionValue v)
	   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterDlnaProfile.Write9_ProfileCondition(String n, String ns, ProfileCondition o, Boolean isNullable, Boolean needType)
	   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterDlnaProfile.Write13_ResponseProfile(String n, String ns, ResponseProfile o, Boolean isNullable, Boolean needType)
	   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterDlnaProfile.Write21_DlnaProfile(String n, String ns, DlnaProfile o, Boolean isNullable, Boolean needType)
	   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterDlnaProfile.Write22_Profile(Object o)
	   --- End of inner exception stack trace ---
	   at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)
	   at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o)
	   at Emby.Server.Implementations.Serialization.MyXmlSerializer.SerializeToWriter(Object obj, XmlWriter writer)
	   at Emby.Server.Implementations.Serialization.MyXmlSerializer.SerializeToStream(Object obj, Stream stream)
	   at Emby.Server.Implementations.Serialization.MyXmlSerializer.SerializeToFile(Object obj, String file)
	   at Emby.Dlna.DlnaManager.SaveProfile(DlnaProfile profile, String path, DeviceProfileType type, Boolean updateFile)
	   at Emby.Dlna.DlnaManager.UpdateProfile(DlnaProfile submittedProfile)
	   at Emby.Server.Implementations.Services.ServiceController.<>c__DisplayClass6_0.<VoidActionDelegate>b__0(Object service, Object request)
	   at Emby.Server.Implementations.Services.ServiceController.Execute(HttpListenerHost appHost, Object requestDto, IRequest req)
	   at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, RestPath restPath, String responseContentType, CancellationToken cancellationToken)
	   at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, ReadOnlyMemory`1 urlString, ReadOnlyMemory`1 localPath, CancellationToken cancellationToken)
	Source: System.Private.Xml
	TargetSite: Void Serialize(System.Xml.XmlWriter, System.Object, System.Xml.Serialization.XmlSerializerNamespaces, System.String, System.String)
	InnerException: System.InvalidOperationException: Instance validation error: '6' is not a valid value for MediaBrowser.Model.Dlna.ProfileConditionValue.
	Source: Microsoft.GeneratedCode
	TargetSite: System.String Write8_ProfileConditionValue(MediaBrowser.Model.Dlna.ProfileConditionValue)
	   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterDlnaProfile.Write8_ProfileConditionValue(ProfileConditionValue v)
	   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterDlnaProfile.Write9_ProfileCondition(String n, String ns, ProfileCondition o, Boolean isNullable, Boolean needType)
	   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterDlnaProfile.Write13_ResponseProfile(String n, String ns, ResponseProfile o, Boolean isNullable, Boolean needType)
	   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterDlnaProfile.Write21_DlnaProfile(String n, String ns, DlnaProfile o, Boolean isNullable, Boolean needType)
	   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterDlnaProfile.Write22_Profile(Object o)
	
2022-12-09 09:45:27.107 Debug Server: http/1.1 Response 500 to ‌‍‍::1‌. Time: 46ms. http://‌‍‍localhost‌:8098/emby/Dlna/Profiles/b80487c4fe939e87c27832879b503568?X-Emby-Client=Emby Web&X-Emby-Device-Name=Microsoft Edge Windows&X-Emby-Device-Id=824ddfe0-a8a4-4b4c-a444-32ba21e5af0a&X-Emby-Client-Version=4.7.10.0&reqformat=json

But profile is created.

What are the steps to get this to occur?

Link to comment
Share on other sites

1 minute ago, Luke said:

What are the steps to get this to occur?

  • Go to DLNA
  • click on profile "Sony Bravia (2014)"
  • enter new name "Sony KDL-40WE665"
  • click Save

 

Link to comment
Share on other sites

Happy2Play
9 minutes ago, Luke said:

What are the steps to get this to occur?

All I did was go to the Sony Bravia (2013) profile and rename and hit save, but looks like this list might be cached or corrupt as after doing this the default profile is gone until restarted.

Edited by Happy2Play
Link to comment
Share on other sites

9 minutes ago, Happy2Play said:

Seems to be limited to Sony Bravia profiles.

So you were able to (partially) reproduce?  Phew, I thought it was just me...

Link to comment
Share on other sites

Hi @Luke, Hi @Happy2Play, Hi  All,

I've been continuing on this, and have an issue which I don't know if it can be fixed on the emby-side:

On my TV, I choose Video from the Home Screen.
From the list, I choose and connect to my emby server.
TV shows:  [Collections]  [Movies]  [TV Series]
I chose Movies
TV:     [Up (without text)]  [Continue W...]  [Latest]  [Movies]  [Collections]  [Favorites]  [Genres]  [Folders]
I chose Latest
TV does a Reset... goes black, shows the Sony logo, and comes back to normal program.

Normal Log shows nothing.
Debug Log attached.

dlna-debug-TV-reset.txt

 

Also, I am wondering why I cannot see in the log which DLNA-profile was chosen / preferred, whether it is my new dlna profile or one of the existing "Sony Bravia (20??)" ones.

Link to comment
Share on other sites

Another matter, besides the above reset-issue:

As I said I configured my own profile to match my model. I could not figure out which dlna profile is picked and why. So I set the max streaming bit rate to something I would recognize in the logs immediately. I picked 133333333 instead of the default 140000000 bit rate. I saved my profile and even restarted emby. Sure enough,  when i connect with my TV via DLNA, the bit rate iis 140000000. So it is safe to assume that a emby shipped profile is picked, not mine. As it is not logged what Model name the TV used, I cannot fix the regex in my profile settings.

It would be helpful if 

  • I could turn off all server included dlna profiles 
  • any and all info that the TV (dlna client) passes to the emby server during initial negotiation (brand, model, serial) is logged 
  • if emby would log which dlna profile it chose and why (e.g. matched regex for model name)

It would be great if someone could help me get on my feet here. When done, I'll make a write up about how to address issues with DLNA in the fiuture.

Cheers ,
Roodee

Edited by Roodee
Link to comment
Share on other sites

  • 3 weeks later...
On 12/10/2022 at 9:09 AM, Roodee said:

Hi @Luke, Hi @Happy2Play, Hi  All,

I've been continuing on this, and have an issue which I don't know if it can be fixed on the emby-side:

On my TV, I choose Video from the Home Screen.
From the list, I choose and connect to my emby server.
TV shows:  [Collections]  [Movies]  [TV Series]
I chose Movies
TV:     [Up (without text)]  [Continue W...]  [Latest]  [Movies]  [Collections]  [Favorites]  [Genres]  [Folders]
I chose Latest
TV does a Reset... goes black, shows the Sony logo, and comes back to normal program.

Normal Log shows nothing.
Debug Log attached.

dlna-debug-TV-reset.txt 67.99 kB · 1 download

 

Also, I am wondering why I cannot see in the log which DLNA-profile was chosen / preferred, whether it is my new dlna profile or one of the existing "Sony Bravia (20??)" ones.

It's in the log that it's using the default profile:

Quote

2022-12-10 14:23:17.984 Debug Dlna: Using default profile for: Host=ooo.ooo.ooo.11:8096, User-Agent=IPI/1.0 UPnP/1.0 DLNADOC/1.50, Content-Type=text/xml; charset="utf-8", Content-Length=583, SOAPACTION="urn:schemas-upnp-org:service:ContentDirectory:1#Browse"
 

There's no way to know why the device is crashing other than getting debugging info from it directly, which might not be possible.

In my experience though, the most likely reason is that we're sending back something it doesn't like. That could mean unsupported media formats, or it could be something in the metadata for a file that it doesn't like. Unfortunately the process to figure this out is just trial and error and can be quite painful.

Link to comment
Share on other sites

On 12/9/2022 at 1:20 PM, Roodee said:
  • Go to DLNA
  • click on profile "Sony Bravia (2014)"
  • enter new name "Sony KDL-40WE665"
  • click Save

 

OK I see the issue here and I'll push out an update to the Dlna plugin. Thanks.

Link to comment
Share on other sites

  • 2 months later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...