New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Web Server not working on AP mode when a WiFi network is configured #3956
Comments
Currently, I try similar things (with an ESP8266) and want to have access to the web server while in AP mode. The main issue here is the setup priority of the web server. According to In contrast to this, the Anyway, changing the setup priority does resolve the issue, BUT there are other issues as well: While in AP mode, the ESP tries to constantly scan for WiFi networks (if Related issue #3253 |
Awesome thank you for the insights! I was looking through the code but couldn't quite piece that part together. |
@Conclusio this does not seem to work for me btw. I only get boot loops when changing the Webserver to ?
|
This could be ESP32-specific, but honestly I don't know. The wifi component has platform-specific implementations (ESP32, ESP8266, ...). If you don't configure a WiFi network at all does the same error occur? |
In my case, thats exactly what it was. Once I removed the wifi config, it started working ok. This still sounds like a bug, but if it is a hardware limitation we should note that in the WebServer docs. Maybe near the I was using a D1 mini. |
I don't have anything technical to add, but I have been experiencing the same today. |
Hi, 1st one clarification: webserver already runs with AP if either the device is first started with wifi available or "sta" wifi ssid is not defined. It just does not start if wifi is defined and a reset occurs when wifi if not available. My use case is a bluetooth enabled battery in my RV. When I'm home, I want to see the status of the RV in Homeassistant. When traveling, I use separate Android apps to monitor the things -I'm not planning setting up a HA node that would travel with the RV. With these I seem to have an (nearly) allways on webserver and HA updated with the sensors when the RV is in home wifi range. |
How did you do that? I really need this too. I had to hang a router where there is no Internet and HA, just so that the device works normally at home and in the country. Tell me where and what is possible to fix. Unable to use because of these new ( |
Sorry, but I believe I kind of already did that in the above post. A good C++ coder should be able turn that list of changes to working code in rather short time, utilizing the references I made to Captive portal. I changed only three files, web_server.h, web_server.cpp and wifi_component.cpp. |
Why do you have the captive portal configured if you don't want to use it? Remove it from the config and the web server will work fine. |
My captive portal is turned off, but the web-server starts working only after connecting to the SSID, or by removing SSID from the firmware ( |
That is not true. Read the explanations. |
I missed that part. |
Try that PR. |
The problem
The web server does not seem to be started on AP mode when there is a WiFi network configured but out of reach. When not configuring a WiFi network and only AP mode the server is normally started.
My use case is a portable heater that can be used with home assistant when in reach of the network but can still be used with the build in web server if not. This does not seem possible right now and I would have to choose to either only allow home assistant access or only access via the build in AP.
As the web server does indeed work over the AP when no network is configured this seems like a bug and not like an intended limitation?
Which version of ESPHome has the issue?
v2022.12.3
What type of installation are you using?
Docker
Which version of Home Assistant has the issue?
2022.12.8
What platform are you using?
ESP32
Board
No response
Component causing the issue
Web Server
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: