Première tentative pour compiler sr mon PC…
J’ai installé Python,wheel, Esphome
Fichier yaml très simple :
esp32:
board: esp32dev
framework:
type: esp-idf
# Enable logging
logger:
# Enable Home Assistant API
api:
# Allow Over-The-Air updates
ota:
- platform: esphome
wifi:
ssid: xxxxxxxxxxxxx
password: xxxxxxxxxxxxxxx
captive_portal:
web_server:
port: 80
switch:
- platform: gpio
name: "LEDG"
pin: 13
id: ledG
- platform: gpio
name: "LEDY"
pin: 12
id: ledY
- platform: gpio
name: "LedR"
pin: 14
id: ledR
Logs dans l’invite de commande après lancement run (désolé c’est un peu long…) :
*C:\Users\gauvr>esphome run testesphome.yaml*
*INFO ESPHome 2025.5.1*
*INFO Reading configuration testesphome.yaml...*
*WARNING GPIO12 is a strapping PIN and should only be used for I/O with care.*
*Attaching external pullup/down resistors to strapping pins can cause unexpected failures.*
*See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins*
*INFO Generating C++ source...*
*INFO Core config, version or integrations changed, cleaning build files...*
*INFO Cloning https://github.com/espressif/esp-protocols.git@mdns-v1.8.2*
*Traceback (most recent call last):*
* File "C:\Users\gauvr\AppData\Local\Programs\Python\Python313\Lib\site-packages\esphome\git.py", line 20, in run_git_command*
* ret = subprocess.run(cmd, cwd=cwd, capture_output=True, check=False)*
* File "C:\Users\gauvr\AppData\Local\Programs\Python\Python313\Lib\subprocess.py", line 554, in run*
* with Popen(*popenargs, **kwargs) as process:*
* ~~~~~^^^^^^^^^^^^^^^^^^^^^^*
* File "C:\Users\gauvr\AppData\Local\Programs\Python\Python313\Lib\subprocess.py", line 1039, in __init__*
* self._execute_child(args, executable, preexec_fn, close_fds,*
* ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*
* pass_fds, cwd, env,*
* ^^^^^^^^^^^^^^^^^^^*
* ...<5 lines>...*
* gid, gids, uid, umask,*
* ^^^^^^^^^^^^^^^^^^^^^^*
* start_new_session, process_group)*
* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*
* File "C:\Users\gauvr\AppData\Local\Programs\Python\Python313\Lib\subprocess.py", line 1551, in _execute_child*
* hp, ht, pid, tid = _winapi.CreateProcess(executable, args,*
* ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^*
* # no special security*
* ^^^^^^^^^^^^^^^^^^^^^*
* ...<4 lines>...*
* cwd,*
* ^^^^*
* startupinfo)*
* ^^^^^^^^^^^^*
*FileNotFoundError: [WinError 2] Le fichier spécifié est introuvable*
*The above exception was the direct cause of the following exception:*
*Traceback (most recent call last):*
* File "<frozen runpy>", line 198, in _run_module_as_main*
* File "<frozen runpy>", line 88, in _run_code*
* File "C:\Users\gauvr\AppData\Local\Programs\Python\Python313\Scripts\esphome.exe\__main__.py", line 7, in <module>*
* sys.exit(main())*
* ~~~~^^*
* File "C:\Users\gauvr\AppData\Local\Programs\Python\Python313\Lib\site-packages\esphome\__main__.py", line 1083, in main*
* return run_esphome(sys.argv)*
* File "C:\Users\gauvr\AppData\Local\Programs\Python\Python313\Lib\site-packages\esphome\__main__.py", line 1070, in run_esphome*
* rc = POST_CONFIG_ACTIONS[args.command](args, config)*
* File "C:\Users\gauvr\AppData\Local\Programs\Python\Python313\Lib\site-packages\esphome\__main__.py", line 513, in command_run*
* exit_code = write_cpp(config)*
* File "C:\Users\gauvr\AppData\Local\Programs\Python\Python313\Lib\site-packages\esphome\__main__.py", line 214, in write_cpp*
* return write_cpp_file()*
* File "C:\Users\gauvr\AppData\Local\Programs\Python\Python313\Lib\site-packages\esphome\__main__.py", line 232, in write_cpp_file*
* writer.write_cpp(code_s)*
* ~~~~~~~~~~~~~~~~^^^^^^^^*
* File "C:\Users\gauvr\AppData\Local\Programs\Python\Python313\Lib\site-packages\esphome\writer.py", line 339, in write_cpp*
* copy_src_tree()*
* ~~~~~~~~~~~~~^^*
* File "C:\Users\gauvr\AppData\Local\Programs\Python\Python313\Lib\site-packages\esphome\writer.py", line 305, in copy_src_tree*
* copy_files()*
* ~~~~~~~~~~^^*
* File "C:\Users\gauvr\AppData\Local\Programs\Python\Python313\Lib\site-packages\esphome\components\esp32\__init__.py", line 869, in copy_files*
* repo_dir, _ = git.clone_or_update(*
* ~~~~~~~~~~~~~~~~~~~^*
* url=component[KEY_REPO],*
* ^^^^^^^^^^^^^^^^^^^^^^^^*
* ...<3 lines>...*
* submodules=component[KEY_SUBMODULES],*
* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*
* )*
* ^*
* File "C:\Users\gauvr\AppData\Local\Programs\Python\Python313\Lib\site-packages\esphome\git.py", line 67, in clone_or_update*
* run_git_command(cmd)*
* ~~~~~~~~~~~~~~~^^^^^*
* File "C:\Users\gauvr\AppData\Local\Programs\Python\Python313\Lib\site-packages\esphome\git.py", line 22, in run_git_command*
* raise cv.Invalid(*
* ...<2 lines>...*
* ) from err*
*voluptuous.error.Invalid: git is not installed but required for external_components.*
*Please see https://git-scm.com/book/en/v2/Getting-Started-Installing-Git for installing git*
*C:\Users\gauvr>*
J’ai fait quoi comme erreur ? 