I was wondering why the hostname of ESP is not recognized in the list of devices. I thought the Unit Name in tab Config is used for that. https://espeasy.readthedocs.io/en/lates ... onfig.html
Is there something wrong in the config of my LAN, Router or Accesspoint? Some other devices are named correct.
Has a relation with the config of hostname I suppose? Unit Name in tab Config is SDM630M_Teslalader
What could be a solution?
Hostname not recognized
Moderators: grovkillen, Stuntteam, TD-er
Re: Hostname not recognized
Maybe there is something with this TP-link not accepting dashes or underscores in the name?
Do you use a static IP for ESPEasy?
Some routers only register the hostname if it was used for a DHCP request and for static IP config there is no such request.
Do you use a static IP for ESPEasy?
Some routers only register the hostname if it was used for a DHCP request and for static IP config there is no such request.
Re: Hostname not recognized
I made some changes and it can be a combination of router, accesspoint and maybe ESPeasy..
The ESP had a fixed IP in its config...
I made a reservation in the router (Netgear R7000)
I removed the fixed IP in ESP by wiping all fields about IP.
After a reboot the device got the same address and a hostname in the router and accesspoint but a difference in the hostname... In the router the underscore was changed in a dash...
So I removed the underscore in ESPeasy and in the list of reservations in the router..
Lesson learned:
After I removed the underscore in the hostname of the ESP the hostname shows up in the accesspoint.
The router is able to show both characters, dashes as well as underscores and spaces.. Not sure about the accesspoint of TP-Link.
This is the list of hostnames in the Netgear router:
And this are now the connected devices:
So this problem is solved.. Though not fully understood.
The ESP had a fixed IP in its config...
I made a reservation in the router (Netgear R7000)
I removed the fixed IP in ESP by wiping all fields about IP.
After a reboot the device got the same address and a hostname in the router and accesspoint but a difference in the hostname... In the router the underscore was changed in a dash...
So I removed the underscore in ESPeasy and in the list of reservations in the router..
Lesson learned:
After I removed the underscore in the hostname of the ESP the hostname shows up in the accesspoint.
The router is able to show both characters, dashes as well as underscores and spaces.. Not sure about the accesspoint of TP-Link.
This is the list of hostnames in the Netgear router:
And this are now the connected devices:
So this problem is solved.. Though not fully understood.
Re: Hostname not recognized
Well, TD-er already wrote a possible cause above; when using a fixed IP address, the ESP plainly connects to the router, claiming the configured IP-address, not sharing much other information except the (required) MAC address.
But when using DHCP, it has to do a formal request for an IP address, that does include more information like the hostname, so the router uses that.
According to RFC952, a hostname can only consist of characters a-z (case-insensitive), digits 0-9 and dash (-), and when sending out the hostname, ESPEasy replaces all not-allowed characters by a dash (though that doesn't show in your router-overview , but maybe you removed the underscore from the name, so there's nothing to replace ).
/Ton (PayPal.me)
Re: Hostname not recognized
Thnx Ton for reflection,
I had an idea about usual characters but was not sure about underscore. That character is accepted in ESPeasy in the field of the name. But not allways in the router and the dhcp-server as far as I understand from your reply.
To be clear: yes, I removed the underscore in the name of the ESP. After that correction, the change was picked up in the accesspoint of TP-Link.
But it is still strange that I can use spaces in the reservation for Ip-address in the router.
And the charging station (Linux) can send a underscore in the hostname to both the Netgear router and TP-Link accesspoint... Despite the RFC952.
So conventions are not real rules. Never mind.
I had an idea about usual characters but was not sure about underscore. That character is accepted in ESPeasy in the field of the name. But not allways in the router and the dhcp-server as far as I understand from your reply.
To be clear: yes, I removed the underscore in the name of the ESP. After that correction, the change was picked up in the accesspoint of TP-Link.
But it is still strange that I can use spaces in the reservation for Ip-address in the router.
And the charging station (Linux) can send a underscore in the hostname to both the Netgear router and TP-Link accesspoint... Despite the RFC952.
So conventions are not real rules. Never mind.
Re: Hostname not recognized
Pieter,
Thanks for the encouragement
It's ESPEasy that's removing any non-allowed characters from the hostname, and using DHCP is the reason the name is now picked up by the router.
As there are routers and other network devices that don't accept names that do not conform to RFC952, ESPEasy has to play by the rules, and despite any limitations only use allowed characters in the hostname.
That the router does allow spaces and other characters like underscores probably makes it more 'user friendly', but it's also outside of official specs. But that shouldn't be an issue, as it's only used for displaying the device name
Thanks for the encouragement
It's ESPEasy that's removing any non-allowed characters from the hostname, and using DHCP is the reason the name is now picked up by the router.
As there are routers and other network devices that don't accept names that do not conform to RFC952, ESPEasy has to play by the rules, and despite any limitations only use allowed characters in the hostname.
That the router does allow spaces and other characters like underscores probably makes it more 'user friendly', but it's also outside of official specs. But that shouldn't be an issue, as it's only used for displaying the device name
/Ton (PayPal.me)
Re: Hostname not recognized
Well those RFCs are considered to be the standard and should be followed strictly, according to the purists (and I consider myself also a purist when someone else is not following those RFC's )
However "RFC" stands for "Request For Comments".
The first hit on Google does describe it well I think:
However "RFC" stands for "Request For Comments".
The first hit on Google does describe it well I think:
Also some RFC's supersede older ones, which can also cause some conflicting definitions or specs.(Request For Comments) A document that describes the specifications for a recommended technology. Although the word "request" is in the title, if the specification is ratified, it becomes a standards document. Not all RFCs become standards; some are designated indefinitely with Informational or Experimental status.
Re: Hostname not recognized
Most routers also act as local DNS server.
For example my Fritzbox does allow me to use "nuc" as hostname which will resolve to an IP-address as set in the Fritzbox.
(even ones with DHCP assigned IPs)
Who is online
Users browsing this forum: No registered users and 0 guests