Hassio-Access-Point icon indicating copy to clipboard operation
Hassio-Access-Point copied to clipboard

[Feature request] mDNS for wlan0

Open kotyara75 opened this issue 4 years ago • 4 comments

Hi, thanks for making this plugin, for me it turned out to be the only way of enabling AP on HA OS.

I miss connecting to HA by .local name over AP connection though. I can see that in HA core it's implemented for eth0 using Network Manager, and I'm struggling to enable it for unmanaged wlan0 interface controlled by the plugin.

Should we add avahi daemon to this plugin? Or, anybody has better ideas? I'm happy to help with coding once we agreed on the approach.

kotyara75 avatar Oct 18 '21 07:10 kotyara75

@CarlosGS How did you manage to get your ESPHome devices to connect to your hassio instance? I've been trying to flash an ESP8266 I had lying around to connect to the HASSIO instance I have, but It cannot seem to register in the ESPHome gui nor in Homeassistant. Wierdly enough I can see it connect in the logs for this access point add on, which tells me it should work. Any pointers you can give me or articles I can read? Been trying to google this with no progress.

Here's what I flash my espdevice with, if that helps? I can connect to the AP with an android phone and access homeassistant so it can't be that either.


esphome:
  name: wrist-device

esp8266:
  board: esp01_1m

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "xxxxxxxxxxxxxxxx"

ota:
  password: "xxxxxxxxxxxxxxxxxxx"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Wrist-Device Fallback Hotspot"
    password: "xxxxxxxxxx"

captive_portal:
    
output:
- id: onboard_light
  platform: gpio
  pin: GPIO2
  inverted: true

Trakt0r22 avatar Nov 29 '22 20:11 Trakt0r22

Hi! In the end I've set a fixed IP for each device. It simply needs an IP outside the DHCP range.

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  manual_ip:
    static_ip: 192.168.99.2 # (.3, .4, etc)
    gateway: 192.168.99.1
    subnet: 255.255.255.0

Then you need to manually connect them to Home Assistant (Devices->Add->Esphome->type node's IP). In your case, try doing that and typing "wrist-device.local" instead of an IP. Maybe it will resolve the address and allow you to use it without needing a fixed IP.

Also, for ESPHome nodes, I've noticed we MUST set power_save_mode: none, otherwise the connection was very unreliable with the Raspberry 3B+ onboard wifi. It seems the RPi doesn't respect wifi timings for power saving.

CarlosGS avatar Nov 30 '22 22:11 CarlosGS