mqtt / use hostname option doesn't work on LAN / Mega32
Moderators: grovkillen, Stuntteam, TD-er
mqtt / use hostname option doesn't work on LAN / Mega32
Build 20100 - Mega32
Build time Mar 30 2018 16:13:45
Using DHCP for networking.
My LAN has an internal DNS server, which resolves local hostnames just fine.
home.local resolves to 192.168.11.5
Setting the "use hostname" (home.local)option for OpenHAB MQTT results in faillure to connect to MQTT.
Setting the "use IP address" (192.168.11.5) option for OpenHAB MQTT results in connection to MQTT.
What am i missing ?
Build time Mar 30 2018 16:13:45
Using DHCP for networking.
My LAN has an internal DNS server, which resolves local hostnames just fine.
home.local resolves to 192.168.11.5
Setting the "use hostname" (home.local)option for OpenHAB MQTT results in faillure to connect to MQTT.
Setting the "use IP address" (192.168.11.5) option for OpenHAB MQTT results in connection to MQTT.
What am i missing ?
Last edited by Tommmii on 15 Apr 2018, 13:13, edited 1 time in total.
Re: mqtt / use hostname option doesn't work on LAN
Is 'home.local' resolvable on other computers in the same network?
Re: mqtt / use hostname option doesn't work on LAN
yes it is, that's what i meant when i wrote "home.local resolves to 192.168.11.5"
I was asking in anther thread how to get the dhcp details, such as DNS server.
This is why I was asking.
However, ESP Easy is getting NTP information from the default ntp host.
So ESP Easy knows how to resolve pool.ntp.org to one of the ntp pool addresses.
But it doesn't resolve home.local to the MQTT server's address 192.168.11.5 (LAN).
Next step, set up an NTP server on the LAN, and point ESP Easy towards that hostname...
I was asking in anther thread how to get the dhcp details, such as DNS server.
This is why I was asking.
However, ESP Easy is getting NTP information from the default ntp host.
So ESP Easy knows how to resolve pool.ntp.org to one of the ntp pool addresses.
But it doesn't resolve home.local to the MQTT server's address 192.168.11.5 (LAN).
Next step, set up an NTP server on the LAN, and point ESP Easy towards that hostname...
Re: mqtt / use hostname option doesn't work on LAN
I tested a LAN based NTP server , serial debug shows :
So that works fine.
Pinging the LAN based mqtt server from another host (win pc in this ex) also works fine :
using home.local as the mqtt server works with all other devices on the lan.
using home.local with ESP Easy, serial debug shows :
niet lekker
Code: Select all
NTP : NTP send to nas.local (192.168.11.4)
NTP : NTP replied: 11 mSec
Pinging the LAN based mqtt server from another host (win pc in this ex) also works fine :
Code: Select all
Pinging home.local [192.168.11.5] with 32 bytes of data:
Reply from 192.168.11.5: bytes=32 time<1ms TTL=64
using home.local with ESP Easy, serial debug shows :
Code: Select all
FILE : Saved /config.dat
FILE : Saved /config.dat
FILE : Saved /security.dat
Ram usage: Webserver only: 5340 including Core: 0
MQTT : Intentional reconnect
MQTT : Failed to connect to broker
MQTT : Intentional reconnect
MQTT : Failed to connect to broker
MQTT : Intentional reconnect
MQTT : Failed to connect to broker
Re: mqtt / use hostname option doesn't work on LAN
Ha een Nederlander
What is the name of the ESP device itself?
I could add the IP address of the MQTT connect attempt in the log.
What is the name of the ESP device itself?
I could add the IP address of the MQTT connect attempt in the log.
Re: mqtt / use hostname option doesn't work on LAN
Vlaming, but close enough
the ESP32 shows up in my DHCP server leases with hostname esp3202-0
edit :
the device is getting the correct LAN based dns server.
the ESP32 shows up in my DHCP server leases with hostname esp3202-0
Code: Select all
Pinging esp3202-0.local [192.168.11.127] with 32 bytes of data:
Reply from 192.168.11.127: bytes=32 time=4ms TTL=255
the device is getting the correct LAN based dns server.
Code: Select all
"WiFi":{
,
"IP":"192.168.11.127",
"Subnet Mask":"255.255.255.0",
"Gateway IP":"192.168.11.1",
"MAC address":"edited",
"DNS 1":"192.168.11.2",
"DNS 2":"0.0.0.0",
Re: mqtt / use hostname option doesn't work on LAN
shamelessly bumping this... could some one at least please try it, to confirm/deny ?
Re: mqtt / use hostname option doesn't work on LAN
Is the IP of DNS correct? It is often the same as the router and thus the gateway.
But here they differ.
So could you post the relevant results of "ipconfig /all" (Windows) or the route table + resolv.conf and ifconfig when using Linux on another computer?
But here they differ.
So could you post the relevant results of "ipconfig /all" (Windows) or the route table + resolv.conf and ifconfig when using Linux on another computer?
Re: mqtt / use hostname option doesn't work on LAN
the ip's are totally correct.
I run a separate DHCP/DNS server.
I run a separate DHCP/DNS server.
Code: Select all
Ethernet adapter Ethernet:
Connection-specific DNS Suffix . : local
Description . . . . . . . . . . . : Intel(R) 82579LM Gigabit Network Connection
Physical Address. . . . . . . . . : 00-21-CC-redacted
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 192.168.11.135(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : Saturday 14 April 2018 09:12:15
Lease Expires . . . . . . . . . . : Sunday 15 April 2018 09:12:15
Default Gateway . . . . . . . . . : 192.168.11.1
DHCP Server . . . . . . . . . . . : 192.168.11.2
DNS Servers . . . . . . . . . . . : 192.168.11.2
NetBIOS over Tcpip. . . . . . . . : Enabled
PS C:\Users\Tom> nslookup esp3202-0.local
Server: server.local
Address: 192.168.11.2
Name: esp3202-0.local
Address: 192.168.11.127
PS C:\Users\Tom>
Re: mqtt / use hostname option doesn't work on LAN / Mega32
I'm having the same issue when I use the hostname it never connects.
My use case: I'm developint a plant monitoring system using a rpi zero w and Node-RED. The pi runs the mqtt broker. I have a Wemos D1 min running ESPeasy. If I specify the IP address in ESPeasy it works fine, but I want to use the Hostname so when I move this to a new network, I won't need to worry about the IP address.
Any solution to this?
My use case: I'm developint a plant monitoring system using a rpi zero w and Node-RED. The pi runs the mqtt broker. I have a Wemos D1 min running ESPeasy. If I specify the IP address in ESPeasy it works fine, but I want to use the Hostname so when I move this to a new network, I won't need to worry about the IP address.
Any solution to this?
Re: mqtt / use hostname option doesn't work on LAN / Mega32
Good News, I just upgraded to the ESP_Easy_mega-20181214_normal_ESP8266_4096.bin and it is now WORKING!!!
Who is online
Users browsing this forum: No registered users and 3 guests