homebridge-samsungtv-control2 icon indicating copy to clipboard operation
homebridge-samsungtv-control2 copied to clipboard

Unparsable model name

Open djfanatix opened this issue 4 years ago • 13 comments

hi,

when I do a device search i get a feedback that 'Found Unparsable model name' What does tis mean? I have a UE55LS003 (The Frame TV) the UUID is detected.

djfanatix avatar Aug 04 '20 07:08 djfanatix

I wrote a model name parser that is being used to determine the age of the tv to guess the correct port number for example. This parser is based on this samsung document (german) that unfortunately seems to be incomplete in case of your tv. I will have to do some research to be able to parse these kind of model numbers as well.

mmende avatar Aug 04 '20 07:08 mmende

I get the same error with a LE40C750 from 2010. It reports its model name as "Samsung DTV DMR". Maybe add a manual override option to the config.

ttimpe avatar Sep 25 '20 22:09 ttimpe

I get the same error with a UA46C6900 from 2010 - Model also reports as "Samsung DTV DMR" and friendly name reports as "TV-46C6900"

npx homebridge-samsungtv-control discover Searching for devices... Found unparsable model name (Samsung DTV DMR) for device TV-46C6900, usn: "uuid:76f07c21-519f-a4ad-8a24-d0c441941c8e". Skipping it.

I can see in detectdevices.ts the option to read modelNumber from homebridge config, but it doesn't appear to work, unless I'm doing something wrong?

{ "platform": "SamsungTVControl", "devices": [ { "usn": "uuid:76f07c21-519f-a4ad-8a24-d0c441941c8e", "name": "Lounge TV", "modelName": "UA46C6900" } ] }

rohanki avatar Sep 26 '20 01:09 rohanki

Try adding the MAC address to the device using the "Mac" property. I ended up just patching the method to parse the serial number by overriding the sn variable, which works.

ttimpe avatar Sep 26 '20 08:09 ttimpe

Try adding the MAC address to the device using the "Mac" property. I ended up just patching the method to parse the serial number by overriding the sn variable, which works.

THanks for the suggestion - adding MAC didn't help. I'm extremely average with JavaScript - can you give me a hint as to what you ended up patching @ttimpe ?

rohanki avatar Sep 26 '20 12:09 rohanki

Go to the parseSerialNumber function in the compiled plugin, put sn = "YOURSERIALWITHOUTDASHES" before any other lines, thus overriding the input parameter. This is extremely hacky and will be overridden with the next update.

ttimpe avatar Sep 26 '20 12:09 ttimpe

Go to the parseSerialNumber function in the compiled plugin, put sn = "YOURSERIALWITHOUTDASHES" before any other lines, thus overriding the input parameter. This is extremely hacky and will be overridden with the next update.

Thanks for your help. Totally get how hacky it is and that any update will wipe any edits made. I don't think that worked - but there's nothing showing in the homebridge log for the plugin at all, so maybe it's not even loading? strange that running the npx-homebridge-samsungtv-control discover at least discovers an unparsable model, but I don't seem to get the same text in the homebridge log.

rohanki avatar Sep 26 '20 12:09 rohanki

What does the pairing command show? If you patched it correctly, it should not be skipping it.

ttimpe avatar Sep 26 '20 20:09 ttimpe

What does the pairing command show? If you patched it correctly, it should not be skipping it.

It's controllable over legacy protocol, so pairing isn't required. The npx homebridge-samsungtv-control legacy command successfully sends the mute key.

Even after patching the snparser, I still get: Searching for devices... Found unparsable model name (Samsung DTV DMR) for device TV-46C6900, usn: "uuid:76f07c21-519f-a4ad-8a24-d0c441941c8e". Skipping it.

Guess I failed to patch properly!

rohanki avatar Sep 27 '20 00:09 rohanki

I don't really know how to handle the non parsable models yet. Hardcoding model numbers is not really an option since this would require me to update the plugin each time a new samsung tv comes out and furthermore this wouldn't solve the problem for model names like Samsung DTV DMR. I thought about adding a models property to the config where you could manually tell the plugin for each usn the model infos like year etc. (like proposed by @ttimpe). But improving the parser is also on my list...

mmende avatar Sep 27 '20 07:09 mmende

Maybe, when getting such an unparsable model name, try parsing the hostname instead.

ttimpe avatar Sep 27 '20 07:09 ttimpe

I don't really know how to handle the non parsable models yet. Hardcoding model numbers is not really an option since this would require me to update the plugin each time a new samsung tv comes out and furthermore this wouldn't solve the problem for model names like Samsung DTV DMR. I thought about adding a models property to the config where you could manually tell the plugin for each usn the model infos like year etc. (like proposed by @ttimpe). But improving the parser is also on my list...

It wouldn't be that annoying for users to add extra info if the parser is unable to work it out. I wonder if Samsung DTV DMR is specific to older models? If so, what extra information beyond using legacy control does your plugin need to know about each model? I've had a look through all the upnp properties my particular model UA46C6900 presents and not one of them is anything close to actual model number. The closest is the friendly name at TV-46C6900 but that doesn't give you enough give you technology or location. Although your parser would detect the C series at 2010, but the serialnumber field of mine begins with 2008. Strange.

rohanki avatar Sep 27 '20 12:09 rohanki

As SAMSUNG has/had a remote app themselves, maybe it is possible to find out how it parses the model. Also, the public IP address of the Homebridge server could be used to determinate location and region info. And if you wanna go even further, just send a power off command of each type to the TV, check if it's still pingable, etc.

ttimpe avatar Sep 28 '20 06:09 ttimpe