Can't change WLAN settings

Can’t change WLAN settings in any way. When I go to settings/system/network/wlan0
which is disabled now and changed to DHCP has an error.
Failed to change network settings, Unknown error, see supervisor logs. Checking the supervisor log I have this.

23-04-26 09:20:04 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
  File "/usr/src/supervisor/supervisor/api/middleware/security.py", line 185, in block_bad_requests
    return await handler(request)
  File "/usr/src/supervisor/supervisor/api/middleware/security.py", line 201, in system_validation
    return await handler(request)
  File "/usr/src/supervisor/supervisor/api/middleware/security.py", line 268, in token_validation
    return await handler(request)
  File "/usr/src/supervisor/supervisor/api/middleware/security.py", line 280, in core_proxy
    return await handler(request)
  File "/usr/src/supervisor/supervisor/api/utils.py", line 62, in wrap_api
    answer = await method(api, *args, **kwargs)
  File "/usr/src/supervisor/supervisor/api/network.py", line 221, in interface_update
    await asyncio.shield(self.sys_host.network.apply_changes(interface))
  File "/usr/src/supervisor/supervisor/host/network.py", line 225, in apply_changes
    settings = get_connection_from_interface(interface)
  File "/usr/src/supervisor/supervisor/dbus/network/setting/generate.py", line 127, in get_connection_from_interface
    "ssid": Variant("ay", interface.wifi.ssid.encode("UTF-8")),
AttributeError: 'NoneType' object has no attribute 'ssid'

Some thing happens if I change to static. Doesn’t matter if I do that in GUI or CLI.
Like: ha network update wlan0 --ipv4-method static --ipv4-address 192.168.5.71/24

I found similar error in thread: Fresh install - ERROR (MainThread) [aiohttp.server] Error handling request · Issue #49009 · home-assistant/core · GitHub
but it doesn’t help.

What can I do to resolve this and have my WLAN running? Any help will be appreciated.
Thank’s
System information Version core-2023.4.6
Installation Type Home Assistant OS
Development false
Supervisor true
Docker true
User root
Virtual Environment false
Python Version 3.10.10
Operating System Family Linux
Operating System Version 6.1.21-v8
CPU Architecture aarch64
Hardware Rapsberry Pi4

It’s not recommended to run any sort of server on Wifi - let alone one that will be controlling your smart home.

I don’t want to run any server or anything else on HA. Why do you think I want to do that? Do you see that somewhere in my log?

I think you misunderstand - HA is a server of sorts - anyway it’s not recommended. Wired all the way for this sort of application.

Misunderstandings both way :slight_smile: I want to resolve my other problem with ESPHome.

I think that I resolve it with setting WLAN. After I disabled WLAN. But now when I want to enable other esp I have same symptoms. That is reason way I want to enable WLAN.

The problem is resolved by himself. I have tried many times and always have some errors. Just now, one more try and puff. It changes both static and DHCP

I have done this for years. Never had a problem. I have yet to find a private home needing so much WiFi bandwidth that it could not be supported via a standard WLAN

Ask a PS5 to download a 50GB game and watch your latency drop…:joy::rofl::joy:

I have the same bug, how is this not fixed yet? And to the complainers, why are you even running a “server” if you dont have failsave in mind?

2024-08-26 04:13:12.368 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle
    resp = await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/supervisor/supervisor/api/middleware/security.py", line 189, in block_bad_requests
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/supervisor/supervisor/api/middleware/security.py", line 205, in system_validation
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/supervisor/supervisor/api/middleware/security.py", line 272, in token_validation
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/supervisor/supervisor/api/middleware/security.py", line 283, in core_proxy
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/supervisor/supervisor/api/utils.py", line 63, in wrap_api
    answer = await method(api, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/supervisor/supervisor/api/network.py", line 222, in interface_update
    await asyncio.shield(self.sys_host.network.apply_changes(interface))
  File "/usr/src/supervisor/supervisor/host/network.py", line 221, in apply_changes
    settings = get_connection_from_interface(interface, self.sys_dbus.network)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/supervisor/supervisor/dbus/network/setting/generate.py", line 141, in get_connection_from_interface
    "ssid": Variant("ay", interface.wifi.ssid.encode("UTF-8")),
                          ^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'ssid'

You are piggy-backing on an almost year-old thread. Start a new thread and describe your issue in complete sentences.

Hi!
Also had some troubles with connecting my raspberry pi 4 with home office to my network via WLAN.
Finally I created USB stick on my Mac Book named ‘CONFIG’ that contained on folder ‘network’ with a file ‘my-network’ containing the following:

[connection]
id=my-wifi
uuid=b6e4e249-1c14-420c-bf6f-b1f6e2166022
type=802-11-wireless

[802-11-wireless]
mode=infrastructure
ssid=YOUR_WIFI_NAME

[802-11-wireless-security]
auth-alg=open
key-mgmt=wpa-psk
psk=YOUR_WIFI_PASSWORD

[ipv4]
method=auto

[ipv6]
addr-gen-mode=stable-privacy
method=auto

Of course password and ssid need to be changed.
Shut off home assistant, plug in the USB stick an start it up (w/o ethernet cable) - worked out fine, connected via WLAN!

Based on fhttps://smarthomecircle.com/how-to-connect-wifi-to-home-assistant-on-startup