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

Don´t publish MQTT Sensor if device name is "(name not found)" #732

Closed
3 of 4 tasks
AdmiralRaccoon opened this issue Jul 9, 2024 · 5 comments
Closed
3 of 4 tasks
Labels
Feature request➕ New feature or request next release/in dev image🚀 This is coming in the next release or was already released if the issue is Closed.

Comments

@AdmiralRaccoon
Copy link

AdmiralRaccoon commented Jul 9, 2024

Is there an existing issue for this?

  • I have searched the existing open and closed issues

Am I willing to test this? 🧪

  • I will do my best to test this feature on the netlertx-dev image when requested within 48h and report bugs to help deliver a great user experience for everyone and not to break existing installations.

Can I help implement this? 👩‍💻👨‍💻

  • Yes
  • No

Is your feature request related to a problem? Please describe

Many hostnames can not be resolved, and NetAlertX tags the name as (name not found).

Usually, I will change the name manually, but the MQTT Plugin has already published the device to home Assistant, and the entites will have the name "sensor.name_not_found_last_ip_1, sensor.name_not_found_last_ip_2", and so on, resulting in renaming each entity in Home Assistant to the correct name.

Describe the solution you'd like

If NetAlertX detects a device and can´t resolve the hostname and tags it as (Name not found), these devices should not been published by MQTT, as long as the device has not been renamed.

EDIT: After thinking about, it would be nice if this could be and optional feature for every subnet. If this would be a global feature, i wouldn´t be informed if there are any new devices in the guest vlan, as they often have blank names (especially android devices). And for guest devices, there is no need for manually naming.

Describe alternatives you've considered

Renaming all entities manually in Home Assistant. :-D

Anything else?

@AdmiralRaccoon AdmiralRaccoon added the Feature request➕ New feature or request label Jul 9, 2024
@jokob-sk
Copy link
Owner

jokob-sk commented Jul 9, 2024

Hey @AdmiralRaccoon ,

That makes sense.

image

This should be available in the next release. Please have a look at the netalertx-dev docker image, in about 15 minutes (or after the last action finishes) from now.

👉If I don't get a confirmation that this is working I might pull out the feature to prevent bugs.

Make sure you refresh your browser cache - and click the 🔄 refresh button in the top right corner.

It would be great if you could test this (backup everything first or use a new container) on your end by switching to the above image and letting me know if the issue was resolved/the new feature is working.

⭐ This feature took 30min ⏳ to implement - consider becoming a sponsor or sharing the app on socials⭐

Thanks in advance,
j

@jokob-sk jokob-sk added the next release/in dev image🚀 This is coming in the next release or was already released if the issue is Closed. label Jul 9, 2024
@AdmiralRaccoon
Copy link
Author

thanks, I will test it as second thing in the morning. first thing is coffee

@AdmiralRaccoon
Copy link
Author

I´ve tried testing it but I´m struggling getting the device page loaded:
The Loading Icon won´t disappear, I tried clearing cache, private window, another browser.

Usually, it disappears after some time, but today nothing happens since 1,5 hours.

image

However, when going through the "monitoring" tab, I can see my "Name not found" test devices, and this time they don´t appear within Home Assistant, so I guess it works.

@jokob-sk
Copy link
Owner

Great, thanks for checking!

Make sure you refresh your browser cache - and click the 🔄 refresh button in the top right corner. If the issue persists, please screenshot the Dev Console tab in your browser. I'm also pushing out a couple of fixes, but they should not influence this.

@jokob-sk
Copy link
Owner

Releasing -> closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature request➕ New feature or request next release/in dev image🚀 This is coming in the next release or was already released if the issue is Closed.
Projects
None yet
Development

No branches or pull requests

2 participants