Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[denonmarantz] Wrong brand is set in vendor property #16690

Closed
jlaur opened this issue Apr 27, 2024 · 3 comments · Fixed by #16692
Closed

[denonmarantz] Wrong brand is set in vendor property #16690

jlaur opened this issue Apr 27, 2024 · 3 comments · Fixed by #16692
Assignees
Labels
bug An unexpected problem or unintended behavior of an add-on

Comments

@jlaur
Copy link
Contributor

jlaur commented Apr 27, 2024

I just purchased a Denon AVC-X4800H to replace my beloved old Denon AVR-3808, and I noticed the wrong brand being set in the vendor property:

image

Serial number is the same as the MAC address, which starts with 00:06:78.

My old 3808 recievers's MAC address starts with 00:05:CD.

Expected Behavior

If vendor can be determined reliably, it should be set. Otherwise the property should not be set.

Current Behavior

The vendor is set based on false assumptions about MAC addresses:

/**
* Match the serial number, vendor and model of the discovered AVR.
* Input is like "0006781D58B1@Marantz SR5008._raop._tcp.local."
* A Denon AVR serial (MAC address) starts with 0005CD
* A Marantz AVR serial (MAC address) starts with 000678
*/
private static final Pattern DENON_MARANTZ_PATTERN = Pattern
.compile("^((?:0005CD|000678)[A-Z0-9]+)@(.+)\\._raop\\._tcp\\.local\\.$");
/**
* Denon AVRs have a MAC address / serial number starting with 0005CD
*/
private static final String DENON_MAC_PREFIX = "0005CD";
/**
* Marantz AVRs have a MAC address / serial number starting with 000678
*/
private static final String MARANTZ_MAC_PREFIX = "000678";

and set here:

* The Vendor is not available from the mDNS result.
* We assign the Vendor based on our assumptions of the MAC address prefix.
*/
String vendor = "";
if (serial.startsWith(MARANTZ_MAC_PREFIX)) {
vendor = "Marantz";
} else if (serial.startsWith(DENON_MAC_PREFIX)) {
vendor = "Denon";
}

The assumption might have been correct in the past, but it seems that Sound United is now sharing more technology between the two brands, so it can no longer be assumed.

Possible Solution

Determining vendor should not be based on MAC address. It seems there is enough mDNS information to determine it:

image

I need to get my old 3808 online, and will check the mDNS result for this one as well.

Your Environment

  • Version used: 4.2 snapshot
@jlaur jlaur added the bug An unexpected problem or unintended behavior of an add-on label Apr 27, 2024
@jlaur jlaur self-assigned this Apr 27, 2024
@jlaur
Copy link
Contributor Author

jlaur commented Apr 27, 2024

Additionally, the label is created like this: "Denon AVC-X4800H (Marantz Denon AVC-X4800H)"

@jlaur
Copy link
Contributor Author

jlaur commented Apr 27, 2024

It seems old my Denon AVR-3808 can not be found through mDNS at all, only UPnP (screenshot from Device Spy):

image

As text:

  • Base URL http://192.168.0.44:8080/
  • Device icon Present, 48x48
  • Device URN urn:schemas-upnp-org:device:MediaRenderer:1
  • Embedded devices 0
  • Expiration timeout 1800
  • Friendly name Network Audio
  • Has presentation True
  • Interface to host 192.168.0.3
  • Manufacturer DENON
  • Manufacturer URL http://www.denon.com
  • Model description AV SURROUND RECEIVER
  • Model name AVR-3808
  • Model number 3808
  • Model URL http://www.denon.com/
  • Presentation URL http://192.168.0.44:8080/index.html
  • Remote endpoint 192.168.0.44:8080
  • Serial number 0005CDxxx
  • Services 4
  • Standard type MediaRenderer
  • Version 1.0

@jlaur
Copy link
Contributor Author

jlaur commented Apr 27, 2024

Related: #16035

jlaur added a commit to jlaur/openhab-addons that referenced this issue Apr 27, 2024
Resolves openhab#16690

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
jlaur added a commit to jlaur/openhab-addons that referenced this issue Apr 27, 2024
Resolves openhab#16690

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
jlaur added a commit to jlaur/openhab-addons that referenced this issue Apr 28, 2024
Resolves openhab#16690

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
jlaur added a commit to jlaur/openhab-addons that referenced this issue Apr 29, 2024
Resolves openhab#16690

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
lsiepel pushed a commit that referenced this issue Apr 29, 2024
Resolves #16690

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant