mattlongman / Hassio-Access-Point

Hass.io addon to let you create a WiFi access point, perfect for using WiFi devices on off-grid installations.
MIT License
81 stars 62 forks source link

Question: UI not loading #12

Closed Nyc0 closed 2 years ago

Nyc0 commented 2 years ago

Hello, this add on sounds great but I am unable to start the UI. I tried for following URL: http://homeassistant.local:8123 or http://192.168.99.1 or http://192.168.99.1:8123

My generated IP was 192.168.99.19. What am I missing?

Raspberry pi 3 b Home Assistant OS 6.1 Home Assistant 2021.7.4

ssid: xxxx
wpa_passphrase: yyyy
channel: '6'
address: 192.168.99.1
netmask: 255.255.255.0
broadcast: 192.168.99.255
interface: wlan0
hide_ssid: '0'
dhcp: '1'
dhcp_start_addr: 192.168.99.10
dhcp_end_addr: 192.168.99.20
allow_mac_addresses: []
deny_mac_addresses: []
debug: 1
hostapd_config_override: []
client_internet_access: '0'
client_dns_override: []

Here are my logs:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Starting Hass.io Access Point Addon
# Setup interface:
Add to /etc/network/interfaces: iface wlan0 inet static
Run command: nmcli dev set wlan0 managed no
Run command: ip link set wlan0 down
Add to /etc/network/interfaces: address 192.168.99.1
Add to /etc/network/interfaces: netmask 255.255.255.0
Add to /etc/network/interfaces: broadcast 192.168.99.255
Run command: ip link set wlan0 up
# Setup hostapd:
Add to hostapd.conf: ssid=zzzz
Add to hostapd.conf: wpa_passphrase=********
Add to hostapd.conf: channel=6
Add to hostapd.conf: ignore_broadcast_ssid=0
Add to hostapd.conf: macaddr_acl=0
Add to hostapd.conf: interface=wlan0
# DHCP enabled. Setup dnsmasq:
Add to dnsmasq.conf: dhcp-range=192.168.99.10,192.168.99.20,12h
Add to dnsmasq.conf: interface=wlan0
Couldn't get DNS servers from host. Consider setting with 'client_dns_override' config option.
## Starting dnsmasq daemon
## Starting hostapd daemon
Configuration file: /hostapd.conf
rfkill: Cannot open RFKILL control device
wlan0: Could not connect to kernel driver
Using interface wlan0 with hwaddr b8:27:eb:7e:6e:8d and ssid "Bisoufrancais"
wlan0: interface state UNINITIALIZED->ENABLED
wlan0: AP-ENABLED 
wlan0: STA 9c:b6:d9:dc:af:35 IEEE 802.11: associated
wlan0: AP-STA-CONNECTED 9c:b6:d9:dc:af:35
wlan0: STA 9c:b6:d9:dc:af:35 RADIUS: starting accounting session C8CF34D16529E1BD
wlan0: STA 9c:b6:d9:dc:af:35 WPA: pairwise key handshake completed (RSN)
mattlongman commented 2 years ago

Hi @Nyc0 - I'm not too sure. One thing I'd not considered with this is https. Do you use https for the home assistant installation?

http://192.168.99.1:8123 should be the correct address. Try changing the address to something else, either on the same .99. range, or change to something completely different (not forgetting the DHCP start/end addresses).

Nyc0 commented 2 years ago

Hi @mattlongman, thank you for your quick response. I figured it out. I was using the Raspberry Pi on wifi already, and switching to its own wifi network wasn't working. I restarted the Hass.io configuration from scratch, but this time using ethernet. Your addon worked first time. Thank you!

Here is what I had initially followed to configure the Raspberry Pi and Hass.io on my home wifi https://www.youtube.com/watch?v=SHg6fa0x7OA

mattlongman commented 2 years ago

That setup would theoretically be possible if you had a separate USB WiFi dongle, but the home assistant fix to allow the extra drivers for some common ones is currently in dev (or maybe beta). So in future, yes.

The alternative setup for a pi that is already using the onboard WiFi is to change wlan0 to whatever the ethernet is and directly connect a device to ethernet (although it's been a while since I've tested that. EDIT: won't work for internet routing at the moment. Looks like I've hard-coded 'eth0' into the iptables lines.)