Hostname support for easy discovery

Received my Pixelblazes to play around with and they are fun tools. I know the discovery page is there but it’s still the first thing in ages which needs plain IP addresses to work with rather than nice hostnames. With more ESP projects in the network it’s also hard to distinguish them from other stuff on the network (like an nmap scan). Currently they are the ones without a proper hostname which makes them kinda findable but still…

I don’t know what the specifics of the implementation are, but for other ESP projects I use this code:

#ifdef ESP32
  WiFi.setHostname(hostname);
#else
  WiFi.hostname(hostname);
#endif

I would like to see that the name ends up as the hostname of the given Pixelblaze.

It might be neat for the hostname (to reduce the likelihood of name collisions) to prefix them with pixelblaze. Which would end up like this: pixelblazeName. The pixelblaze with the name Livingroom would then be pixelblazeLivingroom or pixelblaze-Livingroom and other devices also named Livingroom are less likely to have the same name then.

Having hostnames (and therefore DNS entries) in the network is way easier to handle in my opinion.

Thanks for the awesome project!

1 Like

I have code in place for this, but the underlying library is a bit buggy. I think I found a workaround though! Should make it’s way into the next version.

2 Likes