KaufHA/PLF10

Option to disable web server?

Opened this issue · 4 comments

Thanks for making this plug and open sourcing the ESPHome configs!

I like everything about the default config except for the web server being enabled by default. I do not want other devices on my network to have access to configuration settings via insecure http URL.

web_server:

Could we add an option to disable the web server completely? I am happy to submit a PR if needed

Try substitution disable_webserver: "true". You'll may need to delete the .esphome/packages folder to get the latest yaml config from github.

For now, the web_server component is still compiled in, but just prevented from initializing. Once ESPHome finishes its scripting in yaml feature I should be able to keep the webserver from being compiled in based on the same substitution.

Awesome, works great! Just curious, where is the ESPHome documentation for the disable config?

disable: $disable_webserver

The tiny nit is that ESPHome dashboard still shows the Visit button for the web server, which ends up linking to a URL that isn't served by the ESP.

Screen Shot 2022-11-23 at 6 10 03 PM

Obviously this is a bug in ESPHome and not in this repo. Just curious what component of ESPHome supports this disable key so I can find the proper fix.

I just wrote the disable feature this morning specifically for our products. There is no ESPHome documentation since it's not in stock ESPHome.

I believe the issue is with the ESPHome dashboard. It sees web_server in the configuration and so it links to it, not realizing that I invented a disable feature. I don't know if this is really fixable. Hopefully once I can implement this via ESPHome's jinja templates they are working on, then this will go away.

What is the visit button linking to? It should just try to connect to the device and time out.

I see, no big deal then.

It just opens a new tab to http://${name}:80/. You are right, it times out.