feature-requests
feature-requests copied to clipboard
ESP-IDF web_server and captive_portal port (uses ESPAsyncWebServer and AsyncTCP)
Describe the problem you have/What new integration you would like
Implement web_server
and captive_portal
to the ESP-IDF framework
Please describe your use case for this integration and alternatives you've tried:
The web_server
and captive_portal
features depend on ESPAsyncWebServer
and AsyncTCP
, which are arduino libraries not yet ported to the ESP-IDF framework.
Additional context
This is a follow-up from #1414
See also #1650 for mqtt
.
This feature would be greatly appreciated. I use web_server as an important component when bulk-flashing devices.
+1. I would like to use web_server with ESP-IDF.
+1 I also really miss the web_server component with the ESP-IDF framework
+1 Also would appreciate this one.
Web server for ESP-IDF is provided by PR 3500, https://github.com/esphome/esphome/pull/3500
For about six months I have had this in my esphome yaml files, and the webserver work fine on ESP-IDF:
external_components:
- source: github://pr#3500
components:
# list all components modified by this Pull Request here
- web_server
- web_server_idf
- web_server_base
- captive_portal
No idea when it will be incorporated into a release unfortunately. It doesn't seem to be a priority at the moment.
Sounds promising! Will try that out. Thank you!
This solution worked for me up until today. now I get
Compiling /data/trapkast-light/.pioenvs/trapkast-light/src/esphome/components/web_server_idf/web_server_idf_ota.o
src/esphome/components/web_server/web_server.cpp: In lambda function:
src/esphome/components/web_server/web_server.cpp:107:40: error: 'class esphome::Application' has no member named 'get_friendly_name'
root["title"] = App.get_friendly_name().empty() ? App.get_name() : App.get_friendly_name();
^~~~~~~~~~~~~~~~~
src/esphome/components/web_server/web_server.cpp:107:91: error: 'class esphome::Application' has no member named 'get_friendly_name'
root["title"] = App.get_friendly_name().empty() ? App.get_name() : App.get_friendly_name();
^~~~~~~~~~~~~~~~~
src/esphome/components/web_server/web_server.cpp:108:42: error: 'class esphome::Application' has no member named 'get_comment'; did you mean 'get_name'?
root["comment"] = App.get_comment();
^~~~~~~~~~~
get_name
Compiling /data/trapkast-light/.pioenvs/trapkast-light/src/esphome/components/wifi/wifi_component.o
Compiling /data/trapkast-light/.pioenvs/trapkast-light/src/esphome/components/wifi/wifi_component_esp32_arduino.o
*** [/data/trapkast-light/.pioenvs/trapkast-light/src/esphome/components/web_server/web_server.o] Error 1
========================= [FAILED] Took 154.92 seconds =========================
esphome 2022.12.8 I guess some methods have been changed or renamed.
Is there another solution to get this to work?
Same for me
See the comments on https://github.com/esphome/esphome/pull/3500 for a temporary fix. Please help keep the signal/noise ratio high.
+1 would appreciate integrating this PR for next release.
`external_components:
- source: github://pr#3500
components:
- web_server
- web_server_idf
- web_server_base
- captive_portal`
Whith last esphome update i get this errors:
`INFO Reading configuration /config/esphome/refrigerateur.yaml... ERROR Unexpected exception while reading configuration: Traceback (most recent call last):
File "/usr/local/bin/esphome", line 33, in
File "/esphome/esphome/main.py", line 963, in main return run_esphome(sys.argv)
File "/esphome/esphome/main.py", line 941, in run_esphome config = read_config(dict(args.substitution) if args.substitution else {})
File "/esphome/esphome/config.py", line 986, in read_config res = load_config(command_line_substitutions)
File "/esphome/esphome/config.py", line 840, in load_config return _load_config(command_line_substitutions)
File "/esphome/esphome/config.py", line 828, in _load_config result = validate_config(config, command_line_substitutions)
File "/esphome/esphome/config.py", line 756, in validate_config result.run_validation_steps()
File "/esphome/esphome/config.py", line 125, in run_validation_steps task.step.run(self)
File "/esphome/esphome/config.py", line 308, in run for load in component.auto_load:
TypeError: 'function' object is not iterable`
Same here
Fixed in https://github.com/esphome/esphome/commit/7a551081ee5e08bf71bc52c2c30168992192bb89 and released in 2023.7.0. Thank you @dentra for your heroic efforts, and @jesserockz for helping get it over the finish line!
See also the project board for "The road to ESP-IDF for any component": https://github.com/orgs/esphome/projects/5
Hi all,
I came across this thread and i am having problems implementing the http request. I am using the seeed_ciao_esp32c3 board and framework: type esp-idf.
Can someone post a esphome code using this component and sending a post?
My error /config/esphome/windturbine-esp.yaml:52:7: error: 'http_request' was not declared in this scope
`external_components:
- source: github://pr#3500
components:
- web_server
- web_server_idf
- web_server_base
- captive_portal
# I2C setup
i2c:
sda: 6
scl: 7
frequency: 100kHz
script:
- id: send_json
then:
- lambda: |-
http_request.post:
url: http://192.168.1.5:8081/windturbine
verify_ssl: false
json: |-
root["key"] = "halkhdaih";
root["greeting"] = "Hello World";`
I really appreciate any help to find a solution
no solution, but I think your are looking for this https://github.com/esphome/issues/issues/3426
Thank you for your response.
I guess no solution at all or can it be done? Unfortunately I am not so experienced with esphome etc.
Would that be a fix? Any solution to just send 5 values will help me a lot
esphome: name: ${device_name} comment: ${device_description} platformio_options: platform_packages: - framework-arduinoespressif32 @ https://github.com/tasmota/arduino-esp32/releases/download/2.0.5/framework-arduinoespressif32-solo1.zip board_build.f_cpu: 160000000L project: name: "${project_name}" version: "${project_version}"
esp32: board: esp32doit-devkit-v1 variant: esp32 framework: type: arduino version: 2.0.5 platform_version: 5.2.0