Closed martijn-brant closed 1 month ago
Another log. Flashed it via wiki, joined wifi, added to hass, seeing values in hass (sensor working), load up logs via usb via wiki page, press reboot .. get stuck in bootloop?
Thanks for the details, I'm not able to replicate this issue currently. Do you know if its happening on more than one unit?
Just tried another. My exact steps:
Exact same result
Thanks for confirming! Does it only happen with the logs open out of interest?
When I just power the units, the LED sometimes blinks (which it only does during boot i'm guessing?) and it pops up and drops from wifi, HA can't find it.
I've also tried this ESPHome code rather than using the wiki, same results
substitutions:
name: "ep-lite-f1b3e8"
friendly_name: "ep-lite-f1b3e8"
illuminance_update_interval: "2s"
hidden_ssid: "false"
log_level: VERBOSE
packages:
# Git repo examples
everything-presence-lite-ha:
url: https://github.com/EverythingSmartHome/everything-presence-lite/
ref: main # optional
files: [everything-presence-lite-ha.yaml]
refresh: 1d # optional
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
To add to this: ESPHome 2024.6.6
OK, so I think Wifi is part of the problem. When Googling into that exact error, I found some references to Wifi. I was connecting this to an isolated vlan, with no access to internet or LAN.. only to HA itself. When I supply my main wifi creds (without any restrictions), it seems to work just fine. This is very weird to me.
The reboot of the device seems to be related to wifi not being able to find clients/HA(?) and thus it throws a reboot it seems. Searching for
Hmm I don't think it's wifi.. it seems to be firewall related. When I change my isolation rule for the "Network of Things" wifi network (aka no internet, no LAN, only access to HA) to Allow instead of Drop, the boot loop goes away and the sensor works just fine. However when I block it again, it goes into bootloop. I saw in the firewall logging it's trying to access 185.199.110.153 which resolves to GitHub Pages. Could it be trying to parse an update manifest and when it can't access that, it fails?
Just tested with this ESPHome template (basically taking the external URLs out if it) and now it works just fine even with the firewall blocking everything.
substitutions:
name: "ep-lite-f1b3e8"
friendly_name: "ep-lite-f1b3e8"
illuminance_update_interval: "2s"
hidden_ssid: "false"
log_level: DEBUG
# packages:
# # Git repo examples
# everything-presence-lite-ha:
# url: https://github.com/EverythingSmartHome/everything-presence-lite/
# ref: main # optional
# files: [everything-presence-lite-ha-no-ble.yaml]
# refresh: 1d # optional
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
#power_save_mode: NONE
#fast_connect: TRUE
# update:
# - platform: http_request
# id: update_http_request
# name: Firmware
# source: https://everythingsmarthome.github.io/everything-presence-lite/everything-presence-lite-ha-manifest.json
dashboard_import:
package_import_url: github://everythingsmarthome/everything-presence-lite/everything-presence-lite-ha.yaml@main
import_full_config: false # or true
packages:
device_base:
url: https://github.com/EverythingSmartHome/everything-presence-lite/
file: common/everything-presence-lite-base.yaml
ld2450_base:
url: https://github.com/EverythingSmartHome/everything-presence-lite/
file: common/ld2450-base.yaml
# bluetooth_base:
# url: https://github.com/EverythingSmartHome/everything-presence-lite/
# file: common/bluetooth-base.yaml
Is this an ESPHome bug for update: or dashboard_import: components?
Edit: Simplified code with package references.
The dashboard_import sections seems the have no effect on anything. The update: section triggers the bootloops. I've been looking into the esphome docs on update: but can't find anything on debug logging for it or for it to fail gracefully.
Thanks for the updates and investigation. I would suspect from what you describe it's possibly a bug in relation to the new update mechanism in ESPHome, the http_request component.
This would really need to be reported upstream to ESPHome as this isn't related to hardware or anything specific with custom EP1 code (from what you described)
I've the same issue and have a similarly configured network. An interim option people can do, so they don't have to copy/paste the entire source YAML from @EverythingSmartHome into their own projects is to use the !remove
functionality of ESPHome.
update
has no spaces before it on the line)
update:
- platform: http_request
id: !remove update_http_request
Clean Build Files
Disclaimer: I've not played around with the http_request
update component so I'm not sure what impact this will have. I presume it'll still grab the latest on a rebuild but you'll lose update notifications of any upstream EverythingSmartHome changes.
Confirming I also have the same issue, with an EPL flashed with the non-BLE firmware. For me it really only happened when I attempted to update. I did get a notification to update, attempted it, and then the bootloop occurred. Had to open the case and reinstall fresh while pressing the boot button as it was continued to bootloop via USB - the serial connection would appear and then disappear over and over.
When you did the update, was that from your own ESPHome addon?
Also, this issue is related to when internet is blocked, is internet blocked on your device?
When you did the update, was that from your own ESPHome addon?
Also, this issue is related to when internet is blocked, is internet blocked on your device?
Hi there,
Yes it was via the update notification:
It appears the update goes through, but then connection drops. I then am unable to even connect via USB unless I crack the case and hold the boot button.
The device is on a separate VLAN but is not restricted from the internet.
Can you please check the logs over USB when this occurs? You should be able to do this without opening the case.
Confirming I also have the same issue, with an EPL flashed with the non-BLE firmware. For me it really only happened when I attempted to update. I did get a notification to update, attempted it, and then the bootloop occurred. Had to open the case and reinstall fresh while pressing the boot button as it was continued to bootloop via USB - the serial connection would appear and then disappear over and over.
Exactly the same situation here
This should now be resolved in https://github.com/EverythingSmartHome/everything-presence-lite/pull/122, please update to version 1.0.7. A fix is coming in ESPHome 2024.7.2 but this workaround does the same thing for now.
I am experiencing the same issue as described here, I installed your version 1.0.7 and it doesn't resolve it. It still bootloops all the time.
I'll try martjin's suggested workaround.
Update: His workaround works.
I just hit the same problem, even with ESPHome 2024.7.2 the device does not work without giving it internet access. This is very confusing to me, are there only a few people denying internet access to their ESPHome devices? I could not find anything in their issue tracker.
Didn't spend too much time on the issue because it seems obvious, but maybe I am missing something https://github.com/esphome/issues/issues/6104
I just got a pair of these today, it worked ok out of the box but when I imported the config into esphome and flashed it the boot loop started.
I am also running an isolated network with internet access blocked.
martijn's workaround works for me too :)
I just received a pair of these as well and I'm also suffering from the bootloop issue, in case I connect them to my NoT (Network of Things, i.e. only local access/no internet access) network . The bootloop also persists on my IoT network The device only works on my main network and my guest network. Disabling my firewall rules for my NoT and IoT networks on my router don't seem to help, so I'm a bit puzzled, especially since the device is running the latest firmware: 1.0.8 (ESPHome 2024.7.3).
Anybody has any clue how to get this device working on a NoT network?
@mlauweri Take a look at my post here to have a short code snippet that takes out the update check and dashboard referrence. This makes it 100% local, no issues: https://github.com/EverythingSmartHome/everything-presence-lite/issues/114#issuecomment-2226585094
@mlauweri Take a look at my post here to have a short code snippet that takes out the update check and dashboard referrence. This makes it 100% local, no issues: #114 (comment)
Thanks Martijn, somehow I was expecting the new firmware to be fixing the issue. Anyway I can confirm that applying your template as a workaround has fixed the issue. :)
Just received my batch of Lite's, thanks for that. However, I'm having some issues with it getting stable into Hass. My Hass doesnt have bluetooth so I used the manual installation guide on the wiki. Used the website to load a non-BLE fw on the device and have it join to my wifi. It works, I can join it into Hass.
Later I tried adopting it into the ESPHome dashboard, causing it to reinstall the fw. Have been getting really weird results so I wiped the device again using the wiki page, starting fresh. However, when I reboot the device after flashing, it seems to go into bootloop. I was able to get the logs via USB:
The most important being:
So again, when flashing fresh FW via the wiki, the sensor works and I can add it to Hass. When opening the logs via USB, it still works. The moment you reboot the device (via the reboot button in the UI), it goes into this bootloop.
Also having a lot of issues trying to get this natively into esphome dash on my hass install but I'm guessing this bootloop is more important and could be the cause of all this.