ESHome throwing a PlatformIO error

This just started happening after upgrading to 2022-10-1 release. I tried upgrading to 2022-10-4 but the issue persists.

HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
 - framework-arduinoespressif8266 3.20704.0 (2.7.4) 
 - tool-esptool 1.413.0 (4.13) 
 - tool-esptoolpy 1.20800.0 (2.8.0) 
 - toolchain-xtensa 2.40802.200502 (4.8.2)
Library Manager: Installing Update
HTTPClientError: Please upgrade to the PlatformIO Core 6:
  File "/usr/local/lib/python3.7/dist-packages/platformio/builder/", line 177:
  File "/root/.platformio/packages/tool-scons/scons-local-4.1.0/SCons/Script/", line 591:
    return _SConscript(self.fs, *files, **subst_kw)
  File "/root/.platformio/packages/tool-scons/scons-local-4.1.0/SCons/Script/", line 280:
    exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
  File "/root/.platformio/platforms/espressif8266/builder/", line 238:
    target_elf = env.BuildProgram()
..........(much more but probably not necessary to post here)

My ESPHome version is 2021.8.2 which seems rather old. Does this not get updated with HA updates?

Any idea as to what to look for? It would seem my PlatformIO is outdated, but how does one update it?

You are probably have the old repository for ESPHome configured. It does not update automatically with HA versions but it will tell you when an update is available, unless you are connected to the wrong (old) repository.

See this thread, and the blog linked at the bottom of it:

This appears to be exactly correct. So I added the new repo and installed the latest version and it works great, thank you! However, I now have two versions installed. Instead of upgrading the installed version, it added another so now I have two in the side-bar. Any idea how to remove the original installed one? Again, thank you for this.

Go into System | Add-ons, find the old version and open it. Stop it if it is not already stopped and make sure the ESPHome GUI still works, then Uninstall.

And if you don’t have one already, take a backup first.

I go to System/Add-ons and only one ESPHome shows up, the latest one. Looks like I may have to manually remove this.

This doesnt look good:

$ ps -ef | grep -i esphome
root      5085  4380  0 14:23 ?        00:00:00 s6-supervise esphome
root      5087  5085  0 14:23 ?        00:03:20 /usr/bin/python3 /usr/local/bin/esphome dashboard /config/esphome --socket /var/run/esphome.sock --hassio
root      7638  7254  0 20:21 ?        00:00:00 s6-supervise esphome
root      7642  7638  0 20:21 ?        00:01:53 /usr/bin/python3 /usr/local/bin/esphome dashboard /config/esphome --socket /var/run/esphome.sock --ha-addon
root     12255  5087  1 23:49 ?        00:00:00 /usr/bin/python3 /usr/local/bin/esphome --dashboard -q vscode --ace /config/esphome

If it’s not causing issues just leave it be. Better than breaking things.

While it doesn’t seem to be causing any noticeable issues, I am sure there is some minor system hit from extra memory and CPU usage of the additional processes. I would like to get rid of it.

In the hassio/data/addons folder, I find these and it’s the one on top which is the older version:

drwxr-xr-x 6 root root 4096 Oct 17 20:40 5c53de3b_esphome
drwxr-xr-x 9 root root 4096 Oct 17 14:23 a0d7b954_esphome

I will try renaming the top folder and make the folder hidden just to see if HA ignores it and doesn’t load it. It this works, I will just delete it.

EDIT: I was able to uninstall it from it’s control panel, which I was previously unable to get to. But if you go right to it before ESPHome has a chance to start, it gives you the control panel first, with the Uninstall button. Woohoo!

1 Like

My ESPHOME is not well cannot update or anything after the recent update I get this error:

HTTPClientError: Please upgrade to the PlatformIO Core 6:
File “/usr/local/lib/python3.9/dist-packages/platformio/builder/”, line 178:
File “/root/.platformio/packages/tool-scons/scons-local-4.2.0/SCons/Script/”, line 597:
return _SConscript(self.fs, *files, **subst_kw)
File “/root/.platformio/packages/tool-scons/scons-local-4.2.0/SCons/Script/”, line 285:
exec(compile(scriptdata, scriptname, ‘exec’), call_stack[-1].globals)
File “/root/.platformio/platforms/espressif8266/builder/”, line 238:
target_elf = env.BuildProgram()
File “/root/.platformio/packages/tool-scons/scons-local-4.2.0/SCons/”, line 748:
return self.method(*nargs, **kwargs)
File “/usr/local/lib/python3.9/dist-packages/platformio/builder/tools/”, line 62:
File “/root/.platformio/packages/tool-scons/scons-local-4.2.0/SCons/”, line 748:
return self.method(*nargs, **kwargs)
File “/usr/local/lib/python3.9/dist-packages/platformio/builder/tools/”, line 141:
project_lib_builder = env.ConfigureProjectLibBuilder()
File “/root/.platformio/packages/tool-scons/scons-local-4.2.0/SCons/”, line 748:
return self.method(*nargs, **kwargs)
File “/usr/local/lib/python3.9/dist-packages/platformio/builder/tools/”, line 1089:
File “/usr/local/lib/python3.9/dist-packages/platformio/builder/tools/”, line 925:
File “/usr/local/lib/python3.9/dist-packages/platformio/package/manager/”, line 48:
pkg = self._install(
File “/usr/local/lib/python3.9/dist-packages/platformio/package/manager/”, line 83:
return super(LibraryPackageManager, self)._install(
File “/usr/local/lib/python3.9/dist-packages/platformio/package/manager/”, line 99:
pkg = self.install_from_registry(spec, search_filters, silent=silent)
File “/usr/local/lib/python3.9/dist-packages/platformio/package/manager/”, line 88:
packages = self.search_registry_packages(spec, search_filters)
File “/usr/local/lib/python3.9/dist-packages/platformio/package/manager/”, line 135:
return self.get_registry_client_instance().list_packages(filters=filters)[
File “/usr/local/lib/python3.9/dist-packages/platformio/clients/”, line 119:
return self.fetch_json_data(
File “/usr/local/lib/python3.9/dist-packages/platformio/clients/”, line 148:
data = self._parse_json_response(response)
File “/usr/local/lib/python3.9/dist-packages/platformio/clients/”, line 163:
raise HTTPClientError(message, response)
========================== [FAILED] Took 3.44 seconds ==========================

Probably the same thing, you may be using the wrong repository.

Read the linked thread - also have a look on the ESPHome issues page on Github.