homebridge-samsungtv-control2
homebridge-samsungtv-control2 copied to clipboard
Unparsable model name
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.
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.
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.
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" } ] }
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.
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 ?
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.
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.
What does the pairing command show? If you patched it correctly, it should not be skipping it.
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!
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...
Maybe, when getting such an unparsable model name, try parsing the hostname instead.
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 amodels
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.
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.