everything-presence-one icon indicating copy to clipboard operation
everything-presence-one copied to clipboard

Cannot flash Beta firmware from Home Assistant ESPHome

Open liquidbrains opened this issue 2 years ago • 19 comments

Hi.

I think I might not be using the correct method, but when I try to flash the beta firmware using ... packages: Everything_Smart_Technology.Everything_Presence_One: github://everythingsmarthome/presence-one/everything-presence-one-beta.yaml@main ...

I get the following error: Could not find file '/config/esphome/SEN0395_distance.h'. Please make sure it exists (full path: /config/esphome/SEN0395_distance.h).

Is ESPHome perhaps misguided in the path of the header file?

liquidbrains avatar Aug 01 '23 13:08 liquidbrains

I would flash via the cable first using the user guide and delete and re-adopt the config in ESPHome before trying OTA

EverythingSmartHome avatar Aug 01 '23 14:08 EverythingSmartHome

Adopting step after flashing the beta via https://everythingsmarthome.github.io/everything-presence-one/updating.html still tries to "install" the firmware again, which fails with the above error message.

Copying the header from /config/esphome/.esphome/packages/***/ directory to /config/esphome/ does resolve the issue.

liquidbrains avatar Aug 02 '23 09:08 liquidbrains

Adopting step after flashing the beta via https://everythingsmarthome.github.io/everything-presence-one/updating.html still tries to "install" the firmware again, which fails with the above error message.

Copying the header from /config/esphome/.esphome/packages/***/ directory to /config/esphome/ does resolve the issue.

This fixed it for me as I reference the YAML via ESPHome.

pyrodex avatar Aug 02 '23 22:08 pyrodex

This is a bit of a tricky one because the firmware from the user guide compiles the header file fine and that works, however when you import the config into the ESPHome add-on (to do OTA updates etc) it won't work because it can't find that file.

I messed around with it a little bit earlier and don't have a great solution yet. There is a couple of ways to download files remotely but didn't get any of them to work yet - "includes" can't include a remote .h file I don't think, remote packages can include remote files but they have to be YAML files, and external components would work but I'd need to transform it into a proper component which will take time (and probably Dev skills I don't have).

I'll keep trying and would be grateful for any suggestions!

EverythingSmartHome avatar Aug 02 '23 22:08 EverythingSmartHome

Look at https://esphome.io/components/external_components.html for reference on how to do that with packages. You could build your own component package and import those in at build time.


From: Everything Smart Home @.> Sent: Wednesday, August 2, 2023 6:10 PM To: EverythingSmartHome/everything-presence-one @.> Cc: Richie Crews @.>; Comment @.> Subject: Re: [EverythingSmartHome/everything-presence-one] Cannot flash Beta firmware from Home Assistant ESPHome (Issue #96)

This is a bit of a tricky one because the firmware from the user guide compiles the header file fine and that works, however when you import the config into the ESPHome add-on (to do OTA updates etc) it won't work because it can't find that file.

I messed around with it a little bit earlier and don't have a great solution yet. There is a couple of ways to download files remotely but didn't get any of them to work yet - "includes" can't include a remote .h file I don't think, remote packages can include remote files but they have to be YAML files, and external components would work but I'd need to transform it into a proper component which will take time (and probably Dev skills I don't have).

I'll keep trying and would be grateful for any suggestions!

— Reply to this email directly, view it on GitHubhttps://github.com/EverythingSmartHome/everything-presence-one/issues/96#issuecomment-1663040696, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAA2RHYDUFQ43K5RT4HEDIDXTLF7FANCNFSM6AAAAAA27Z57RI. You are receiving this because you commented.Message ID: @.***>

pyrodex avatar Aug 02 '23 22:08 pyrodex

That's the bit I was referring to above when I said it was probably beyond my skill haha. I can give it a crack though

EverythingSmartHome avatar Aug 02 '23 22:08 EverythingSmartHome

Awesome, thanks all. I was concerned that I missed some documentation somewhere or that I was just being dim. Now I just need to figure out how to do the multi-zone configuration and what that "Set Distance" button does.

liquidbrains avatar Aug 03 '23 07:08 liquidbrains

It's mentioned in the Home Assistant Entities section of the docs

EverythingSmartHome avatar Aug 03 '23 07:08 EverythingSmartHome

Adopting step after flashing the beta via https://everythingsmarthome.github.io/everything-presence-one/updating.html still tries to "install" the firmware again, which fails with the above error message.

Copying the header from /config/esphome/.esphome/packages/***/ directory to /config/esphome/ does resolve the issue.

OKay I was able to do this as well and have it work. However the target 1 active is unknown

a-bianucci avatar Aug 16 '23 17:08 a-bianucci

Adopting step after flashing the beta via https://everythingsmarthome.github.io/everything-presence-one/updating.html still tries to "install" the firmware again, which fails with the above error message.

Copying the header from /config/esphome/.esphome/packages/***/ directory to /config/esphome/ does resolve the issue.

Sorry to ask the nube question here but are you saying you added a copy command into the ESPHome YAML file? If so what does the syntax look like and where in the YAML does it go? If not, are you grabbing the zipped content with the code and doing it locally? If so how do you then disable the compile an install that happens from ESPHome?

jbrown9100 avatar Oct 05 '23 02:10 jbrown9100

I actually copied the file to the directory using the Terminal plug-in on HASS. The *** part is unknown as it is probably different on your end. The issue is the header file is not in the correct place to be picked up by the compiler.

Op do 5 okt 2023 om 02:40 schreef Joe Brown @.***>:

Adopting step after flashing the beta via https://everythingsmarthome.github.io/everything-presence-one/updating.html still tries to "install" the firmware again, which fails with the above error message.

Copying the header from /config/esphome/.esphome/packages/***/ directory to /config/esphome/ does resolve the issue.

Sorry to ask the nube question here but are you saying you added a copy command into the ESPHome YAML file? If so what does the syntax look like and where in the YAML does it go. If not, are you grabbing the zipped content with the code and doing it locally? If so how do you then disable the compile an install that happens from ESPHome?

— Reply to this email directly, view it on GitHub https://github.com/EverythingSmartHome/everything-presence-one/issues/96#issuecomment-1747950618, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATFZLVXOAWTZK77WUDHBWLX5YM2XAVCNFSM6AAAAAA27Z57RKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBXHE2TANRRHA . You are receiving this because you authored the thread.Message ID: @.*** com>

liquidbrains avatar Oct 05 '23 07:10 liquidbrains

Please try the new 1.3.0b firmware, hopefully that will resolve it by merging the code from the header file, into the main yaml. Bit of a workaround but I lack the skills (and time I guess) to do a proper custom component and it seems to work OK

EverythingSmartHome avatar Oct 24 '23 16:10 EverythingSmartHome

I'm having trouble finding the local git repo to do a git pull so that it'll flash the v1.3.0b firmware. Do you know if ESPHome changed it recently?

liquidbrains avatar Oct 25 '23 07:10 liquidbrains

You should be able to just flash from the user guide here: https://everythingsmarthome.github.io/everything-presence-one/updating.html

EverythingSmartHome avatar Oct 25 '23 09:10 EverythingSmartHome

OK, after a few flashes (adopting in ESPHome is not always clear when you have two devices, then changing the name of the wrong device, not figuring out what you did wrong, deleting everything, installing again, realising you installed the non-beta), I've got it working. No issues with headers.

I've picked up that the LED on the mmWave does not always turn off and I have to reload the config or restart the UART for the light to go out. I have a log for it, not certain if that'd be useful.

liquidbrains avatar Oct 25 '23 14:10 liquidbrains

Please try the new 1.3.0b firmware, hopefully that will resolve it by merging the code from the header file, into the main yaml. Bit of a workaround but I lack the skills (and time I guess) to do a proper custom component and it seems to work OK

This seems to have worked for me - I was able to update to the new 1.3.0b firmware directly from ESPHome in Home Assistant by changing the "package" in the yaml via "Edit" on the device, then "Install" (Wirelessly after restarting the EP1 in "Safe mode" via "Press" in the device page in Home Assistant):

packages:
  Everything_Smart_Technology.Everything_Presence_One: github://everythingsmarthome/presence-one/everything-presence-one-beta.yaml@main

Now I just need to work out how to use all the new features ("zones" and "targets"). :)

alexhk90 avatar Dec 18 '23 22:12 alexhk90

latest beta did not compile for me.

fatal: not a git repository (or any parent up to mount point /) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). CMake Error at /data/cache/platformio/packages/tool-cmake/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message): The C compiler

"/data/cache/platformio/packages/[email protected]+2021r2-patch5/bin/xtensa-esp32-elf-gcc"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: /data/build/kitchen-ep1/.pioenvs/kitchen-ep1/CMakeFiles/CMakeTmp

Run Build Command(s):/data/cache/platformio/packages/tool-ninja/ninja cmTC_f0b0c && [1/2] Building C object CMakeFiles/cmTC_f0b0c.dir/testCCompiler.c.obj
[2/2] Linking C executable cmTC_f0b0c
FAILED: cmTC_f0b0c 
: && /data/cache/platformio/packages/[email protected]+2021r2-patch5/bin/xtensa-esp32-elf-gcc -mlongcalls -Wno-frame-address   CMakeFiles/cmTC_f0b0c.dir/testCCompiler.c.obj  -o cmTC_f0b0c   && :
/data/cache/platformio/packages/[email protected]+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /data/cache/platformio/packages/[email protected]+2021r2-patch5/bin/../libexec/gcc/xtensa-esp32-elf/8.4.0/liblto_plugin.so: error loading plugin: /data/cache/platformio/packages/[email protected]+2021r2-patch5/bin/../libexec/gcc/xtensa-esp32-elf/8.4.0/liblto_plugin.so: cannot open shared object file: No such file or directory
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

CMake will not be able to correctly generate this project. Call Stack (most recent call first): /data/cache/platformio/packages/framework-espidf/tools/cmake/project.cmake:298 (__project) CMakeLists.txt:3 (project)

Ragingfire105 avatar Jan 23 '24 08:01 Ragingfire105

I just did the ESPHome 2023.12.9 update for my EP1 with beta firmware (github://everythingsmarthome/presence-one/everything-presence-one-beta.yaml@main) and it seemed to compile and install successfully for me as usual.

alexhk90 avatar Jan 23 '24 08:01 alexhk90

@Ragingfire105 Tried clearing cache?

EverythingSmartHome avatar Jan 23 '24 09:01 EverythingSmartHome