question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

known_devices.yaml MAC is character sensitive

See original GitHub issue

The problem

Chaning mac-address of known_devces.yaml entry enforces user to keep MAC address uppercase, otherwise after restart it will ‘recreate’ device with ‘new’ mac and throw an error of duplicate entry.

Environment

  • Home Assistant Core release with the issue: 2021.1.5
  • Last working Home Assistant Core release (if known): n/a
  • Operating environment (OS/Container/Supervised/Core): Supervised Debian 10
  • Integration causing this issue: device_tracker
  • Link to integration documentation on our website: https://www.home-assistant.io/integrations/device_tracker/

Problem-relevant configuration.yaml

Has changed MAC phone address of entry:

anna_phone:
  mac: 48:6c:68:d4:02:a4
  name: Ania
  picture: '/local/faces/ania.jpg'
  track: true

and after restart there’s new entry in known_devices.yaml created:

48_6c_68_d4_02_a4:
  name: 48_6c_68_d4_02_a4
  mac: 48:6C:68:D4:02:A4
  icon:
  picture:
  track: true

Traceback/Error logs

Logger: homeassistant.components.device_tracker
Source: components/device_tracker/legacy.py:413
Integration: Śledzenie urządzeń (documentation, issues)
First occurred: 5:43:19 (1 occurrences)
Last logged: 5:43:19

Duplicate device MAC addresses detected 48:6C:68:D4:02:A4

Additional information

After I copy paste ‘uppercase’ MAC from newly detected device to the anna_phone declaration and restart, error is gone and so is tracker working properly.

Duplicated MAC error is also misinformating, as it’s not user that did duplicate the entry, but it did it by itself not recognising properly that it has already been declared manually.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:13 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
nick2525commented, Jan 7, 2022

/still valid

2reactions
andriejcommented, Jan 26, 2021

Best would be to strip every char that is not a-F and 0-9 😃 But still would be thing with some routers printing :c: for :0c: mac. Anyway - I think I’ve already read some discussion about MAC parsing somewhere in HA’s repo - would be the best to implement solution from there to this integration.

Could be this one: https://github.com/home-assistant/core/pull/4764/files

Read more comments on GitHub >

github_iconTop Results From Across the Web

Known_devices.yaml needs a good cleaning! - Configuration
This deletes all lines between a 12 character string starting at the beginning of the line, where every character is a valid hexidecimal...
Read more >
Columns &Filebench - USENIX
to replace VPNs into sensitive networks with gateways over ... processing systems could also have different characteristics and design ...
Read more >
Schedule a horizontal Discovery
A Discovery schedule determines what horizontal Discovery searches for, when it runs, and which MID Servers are used. Create a Discovery schedule for...
Read more >
Cisco 800 Series Integrated Services Routers Software ...
This guide provides an overview and explains how to configure the various features for the Cisco 810, Cisco. 860, Cisco 880, and Cisco...
Read more >
master · Clément Hampaï / Elastic filebeat armhf - GitLab
the most common options, please see filebeat.yml in the same directory. ... If not set "$HOME/.aws/credentials" is used on Linux/Mac.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found