HA ESP32 Device isn't working on Windows, but will work just fine on Linux, Windows issue UPnP/IGD " Failed Setup Device not Discovered"

EDIT4:

I’m putting this at the top before my initial post, because I seemed to have tracked down what seems to be the issue. When I checked out the Device “UPnP/IGD” it says

"Needs Attention

Failed setup, will retry: Device not discovered: … :schemas-upnp-org:device:InternetGatewayDevice:1"

It seems that my router isn’t being discovered on my Windows instance??? There are no devices “Discovered” when clicking “Add Device” either. I read that I could remove and then re-add the UPnP/IGD device in HA, but it works in Linux, so I assume this isn’t a Error with the HA Device but something with my Windows Instance. Would my Firewall be doing this? why would it block access directly to my Router?

I have extremely limited experience with this sort of thing.

Thank you!

------------------Initial Post-------------
Hello all.

I have had HA setup with multiple devices/setups for 2-3 years. I hadn’t used HA for a while now, only within the last few months coming back, but my sensors did work.

I had tried updating the Device but received a bunch of errors, so I left it since it worked, and I also updated HACore/etc to update the system.

All of a sudden, at some point after all of this, now my Sensors/device wont work on my Windows machine, and I still cannot update my device, etc.

So I went to my Linux Partition where I set up the devices since I cannot directly connect to the devices to set them up on Windows, and I see the Sensors working just fine on Linux. I still cannot update though, nor can I “Factory Reset” the device to create a new HA Device in “ESPHome Builder.”

I’m not sure what’s going on, or what people would recommend me doing, especially since my Device wont reinstall to start fresh. I think I do have some other

Here is the error

WARNING Can't connect to ESPHome API for esphome-web-962998.local: Timeout while resolving IP address for ['esphome-web-962998.local'] (ResolveTimeoutAPIError)
INFO Trying to connect to esphome-web-962998.local in the background

and then hangs indefinitely when trying to pull up the Logs on Windows.

When I try to do “Update” on the device this is the log

INFO Setting CONFIG_LWIP_MAX_SOCKETS to 12 (TCP=6 [api=3, captive_portal=3], UDP=3 [captive_portal=1, mdns=2], TCP_LISTEN=3 [api=1, ota=1, web_server_base=1])
INFO Compiling app... Build path: /data/build/esphome-web-962998
Processing esphome-web-962998 (board: esp32dev; framework: espidf; platform: https://github.com/pioarduino/platform-espressif32/releases/download/55.03.37/platform-espressif32.zip)
--------------------------------------------------------------------------------
Created pioarduino Python virtual environment using uv: /root/.platformio/penv
Warning: uv installation via external uv failed, falling back to pip
Error: uv installation via pip failed with exit code 1
Error: Failed to install Python dependencies into penv

But when I get into my Linux setup I can see the Sensors working no problem, but I also cannot update, install, or try to factory-reset the device at all…

So I’m not sure what my options are at this point…

I’m not sure if it was an update to the HACore or system that did it, or what, but this situation is confusing to me why there are install issues.

I used to get other issues as well, but mostly around this “penv” install.

Why exactly wont it install? It also seems to be missing something from the install…

and why is it working on one operating system and not the other? It makes no sense why it’s an OS issue…

Unless there are some firewall concerns with my AV on Windows that is somehow blocking it…? Since I just switched AVs it makes me wonder… But I allow VMWare, which hosts my HA instance access, so unless it’s something else I don’t know what’s going on…

Any help is appreciated trying to figure this all out, because it’s annoying having to go into the Linux installation every time just to check parameters, when I’m mainly on this Windows Machine.

Thank you.

If you need more info let me know and I’ll try to get what I can.

EDIT: I just realized that I did read something about “Cleaning all Files” and “Cleaning Build Files,” and after performing that once again, it just says a few lines and then “Done”

but after trying to install again on the device, I get this.

INFO Setting CONFIG_LWIP_MAX_SOCKETS to 12 (TCP=6 [api=3, captive_portal=3], UDP=3 [captive_portal=1, mdns=2], TCP_LISTEN=3 [api=1, ota=1, web_server_base=1])
INFO Compiling app... Build path: /data/build/esphome-web-962998
********************************************************************************
If you like PlatformIO, please:
- star it on GitHub > https://github.com/platformio/platformio-core
- follow us on LinkedIn to stay up-to-date on the latest project news > https://www.linkedin.com/company/platformio/
- try PlatformIO IDE for embedded development > https://platformio.org/platformio-ide
********************************************************************************

Processing esphome-web-962998 (board: esp32dev; framework: espidf; platform: https://github.com/pioarduino/platform-espressif32/releases/download/55.03.37/platform-espressif32.zip)
--------------------------------------------------------------------------------
Platform Manager: Installing https://github.com/pioarduino/platform-espressif32/releases/download/55.03.37/platform-espressif32.zip
INFO Installing https://github.com/pioarduino/platform-espressif32/releases/download/55.03.37/platform-espressif32.zip
Platform Manager: Error: Please read https://bit.ly/package-manager-ioerror
ERROR Error: Please read https://bit.ly/package-manager-ioerror
SSLError: Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 464, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 1093, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.12/site-packages/urllib3/connection.py", line 796, in connect
    sock_and_verified = _ssl_wrap_socket_and_match_hostname(
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/urllib3/connection.py", line 975, in _ssl_wrap_socket_and_match_hostname
    ssl_sock = ssl_wrap_socket(
               ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/urllib3/util/ssl_.py", line 483, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/urllib3/util/ssl_.py", line 527, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/ssl.py", line 1041, in _create
    self.do_handshake()
  File "/usr/local/lib/python3.12/ssl.py", line 1319, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1010)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 787, in urlopen
    response = self._make_request(
               ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 488, in _make_request
    raise new_e
urllib3.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1010)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/requests/adapters.py", line 644, in send
    resp = conn.urlopen(
           ^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 841, in urlopen
    retries = retries.increment(
              ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/urllib3/util/retry.py", line 535, in increment
    raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /pioarduino/platform-espressif32/releases/download/55.03.37/platform-espressif32.zip (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1010)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/platformio/__main__.py", line 103, in main
    cli()  # pylint: disable=no-value-for-parameter
    ^^^^^
  File "/usr/local/lib/python3.12/site-packages/click/core.py", line 1485, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/click/core.py", line 1406, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/platformio/cli.py", line 85, in invoke
    return super().invoke(ctx)
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/click/core.py", line 1873, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/click/core.py", line 1269, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/click/core.py", line 824, in invoke
    return callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/click/decorators.py", line 34, in new_func
    return f(get_current_context(), *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/platformio/run/cli.py", line 147, in cli
    process_env(
  File "/usr/local/lib/python3.12/site-packages/platformio/run/cli.py", line 210, in process_env
    ).process()
      ^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/platformio/run/processor.py", line 81, in process
    install_project_env_dependencies(
  File "/usr/local/lib/python3.12/site-packages/platformio/package/commands/install.py", line 132, in install_project_env_dependencies
    _install_project_env_platform(project_env, options),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/platformio/package/commands/install.py", line 149, in _install_project_env_platform
    PlatformPackageManager().install(
  File "/usr/local/lib/python3.12/site-packages/platformio/package/manager/platform.py", line 50, in install
    pkg = super().install(spec, force=force, skip_dependencies=True)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/platformio/package/manager/_install.py", line 47, in install
    pkg = self._install(spec, skip_dependencies=skip_dependencies, force=force)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/platformio/package/manager/_install.py", line 97, in _install
    pkg = self.install_from_uri(spec.uri, spec)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/platformio/package/manager/_install.py", line 189, in install_from_uri
    dl_path = self.download(uri, checksum)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/platformio/package/manager/_download.py", line 88, in download
    raise exc
  File "/usr/local/lib/python3.12/site-packages/platformio/package/manager/_download.py", line 69, in download
    fd = FileDownloader(url)
         ^^^^^^^^^^^^^^^^^^^
  File "/esphome/esphome/platformio_api.py", line 68, in patched_init
    original_init(self, *args, **kwargs)
  File "/usr/local/lib/python3.12/site-packages/platformio/package/download.py", line 33, in __init__
    self._http_response = self._http_session.get(
                          ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 602, in get
    return self.request("GET", url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/platformio/http.py", line 64, in request
    return super().request(
           ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/requests/adapters.py", line 675, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /pioarduino/platform-espressif32/releases/download/55.03.37/platform-espressif32.zip (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1010)')))

============================================================

An unexpected error occurred. Further steps:

* Verify that you have the latest version of PlatformIO using
  `python -m pip install -U platformio` command

* Try to find answer in FAQ Troubleshooting section
  https://docs.platformio.org/page/faq/index.html

* Report this problem to the developers
  https://github.com/platformio/platformio-core/issues

============================================================

Hopefully this will be useful to someone.

EDIT2: From what I see “SSLCertVerificationError” has to do with my Internal SSL Cert for HA, and it seems there has been some issues the last number of months with changes. Am I supposed to set up my own SSL Cert or something now? It seems I’m connected with HTTP and not HTTPs

Firefox:
“Connection not Secure (Upgraded to HTTPS)”

“HTTPS-Only Mode”

“On”

and then on Chrome, I cannot even access My HA instance, because it says

" The connection to (HA IP) is not secure

You are seeing this warning because this site does not support HTTPS. [Learn more]"

Which is interesting since the Linux install uses Chromium to build the devices and such, and works fine… So it comes back to the Windows install… At the same time, I still cannot upgrade and reinstall with Linux, and I believe I get the same errors as well, but I will go and check and update again.

It’s interesting to see this error on Chrome Windows though, and not for Chromium on Linux.

EDIT3: so I was actually able to update and install everything again on the Linux Machine, so it seems like there’s some connectivity issue with my ESP32 Device. I assume there’s some firewall issue with not connecting to my device, but I’m not really sure how to set it up, or what to fix. The Firewall through my AntiVirus Application allows The VMWare Application through the Firewall, which is where I host the HA instance, but I’m not sure what “Application” would be for the device. My AV sets up firewall rules based on each application trying to access something outside, not sure specific ports, so I don’t know how I would set up The ESP32Device.

It’s both plugged into the machine and Wireless.