nettigo / namf

Nettigo Air Monitor Firmware
GNU General Public License v3.0
33 stars 19 forks source link

[Feature request] Send device ID via mDNS #31

Closed bieniu closed 3 years ago

bieniu commented 3 years ago

Home Assistant uses zeroconf to discover a NAM device on the local network and propose a configuration of the integration to the user. The hostname is checked, if it contains NAM- that means this is a NAM device.

If the user changes the network name in the NAM device configuration, the hostname of the device will also change and the HA will not be able to discover the device.

Adding an additional text ID information with the default hostname (NAM-12345678) would solve this problem.

This is an example of mDNS information from Shelly device with ID:

image

netmaniac commented 3 years ago

It should be supported in 38rc6. Code is in beta, so if You want You may test it by building current beta and uploading to sensor. Or wait for next beta release to check. But for me it should work :smiley: Screenshot from 2021-05-17 13-14-04

bieniu commented 3 years ago

Great, I'm already using beta to test new features.

netmaniac commented 3 years ago

New beta on update server (38rc6)

bieniu commented 3 years ago

One more thing... sorry for being late

Would it also be possible to add another one text field manufacturer with a value such as Nettigo or something similar?

I wonder if the field ID shouldn't be lowercase. This is safer when it comes to possible typos.

netmaniac commented 3 years ago

Can be done. So, new TXT field with key manufacturer, right? Also downcase on ID value is possible. Probably with next beta.

bieniu commented 3 years ago

Great, thanks!

netmaniac commented 3 years ago

OK, commit 8269356046547bb5f6c296fc0d2ca2287b4063f9 done that. With next beta will be deployed