mdns-tunneller icon indicating copy to clipboard operation
mdns-tunneller copied to clipboard

ESPHome Devices

Open redstorm1 opened this issue 2 years ago • 7 comments

Tried the tunneller with ESPHome devices such as ESP8266 that utilize mDNS for discovery. Unfortunately the Home Assistant server still could not discover devices on the remote network.

Tried tunneller Server on HA network and client on device network and vice versa. Networks are connected via wireguard with routing in place and tested. 192.168.1.x HA server 192.168.2.x Remote devices.

Maybe I have missed something in my config??

redstorm1 avatar Jan 25 '22 18:01 redstorm1

Doesn't look like you've missed anything! Relative positions of server and client do not matter: once they connect to each other - they begin communicating both ways.

What's in your config? I don't know what type of packet does ESPHome send for discovery. You can find out by enabling debug mode and/or using something like Discovery (Mac) app or Bonjour Browser (Win).

Also, app logs with debug enabled would help me help you troubleshoot :)

toxuin avatar Jan 25 '22 19:01 toxuin

Debug mode, is their a config switch for enabling? debug =true

redstorm1 avatar Jan 25 '22 19:01 redstorm1

console output Started server on 192.168.2.1,eth0:42069 Client connected: ::ffff:192.168.1.12:50884

redstorm1 avatar Jan 25 '22 19:01 redstorm1

This might help, tcpdump on the client network.

192.168.2.4.5353 > 224.0.0.251.5353: 0*- [0q] 4/0/1 _services._dns-sd._udp.local. PTR _esphomelib._tcp.local., _esphomelib._tcp.local. PTR axolotl._esphomelib._tcp.local., axolotl._esphomelib._tcp.local. (Cache flush) SRV axolotl.local.:6053 0 0, axolotl._esphomelib._tcp.local. (Cache flush) TXT "board=nodemcuv2" "platform=ESP8266" "mac=e8db84974747" "address=axolotl.local" "version=2021.9.3" (270)

This is a ESP8266 with various sensors monitoring my Axolotl tank

Added this to the configs on both - '_esphomelib._tcp.local'

unfortunately still not discovering

redstorm1 avatar Jan 25 '22 20:01 redstorm1

I moved the line to the top in the serviceWhitelist and they now are discoverable but only for about 1minute then the remote ones go offline again.

`serviceWhitelist:

  • "_esphomelib._tcp.local"
  • "_homekit._tcp.local"
  • "_hap._tcp.local" ` Update, they appear to drop in and out of being discoverable, so records not persisting very long before aging out

redstorm1 avatar Jan 25 '22 20:01 redstorm1

Awesome, that's some progress! You need this setting in config on both client and server by the way. About why it drops off after 1 minute - I am not sure.

toxuin avatar Jan 25 '22 21:01 toxuin

Config applied to both

redstorm1 avatar Jan 25 '22 21:01 redstorm1