-
Notifications
You must be signed in to change notification settings - Fork 669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Boot Loop after OTA Update #3443
Comments
can you please provide the config file? |
sure, there you go: [TakeImage]
;RawImagesLocation = /log/source
WaitBeforeTakingPicture = 5
;RawImagesRetention = 15
Demo = false
Brightness = 1
Contrast = 2
Saturation = 2
;Sharpness =
LEDIntensity = 15
ImageQuality = 12
ImageSize = VGA
;Zoom = false
;ZoomMode = 0
;ZoomOffsetX =
;ZoomOffsetY =
;Grayscale = false
;Negative = false
;Aec2 = false
;AutoExposureLevel =
FixedExposure = false
[Alignment]
InitialRotate = 184.5
InitialMirror = false
SearchFieldX = 20
SearchFieldY = 20
AlignmentAlgo = default
FlipImageSize = false
/config/ref0.jpg 102 188
/config/ref1.jpg 383 144
[Digits]
Model = /config/dig-cont_0611_s3.tflite
CNNGoodThreshold = 0.5
;ROIImagesLocation = /log/digit
;ROIImagesRetention = 3
main.dig1 183 131 30 54 false
main.dig2 222 131 30 54 false
main.dig3 261 131 30 54 false
main.dig4 300 131 30 54 0
main.dig5 339 131 30 54 0
[Analog]
Model = /config/ana-cont_1208_s2_q.tflite
;ROIImagesLocation = /log/analog
;ROIImagesRetention = 3
main.ana1 374 215 80 80 false
main.ana2 332 299 80 80 false
main.ana3 251 335 80 80 false
main.ana4 146 299 80 80 false
[PostProcessing]
main.DecimalShift = 3
main.AnalogDigitalTransitionStart = 9.2
PreValueUse = true
PreValueAgeStartup = 720
main.AllowNegativeRates = false
main.MaxRateValue = 1000
;main.MaxRateType = AbsoluteChange
main.ExtendedResolution = false
main.IgnoreLeadingNaN = false
ErrorMessage = true
CheckDigitIncreaseConsistency = false
[MQTT]
Uri = mqtt://masked:1883
MainTopic = sensors/tele/esp-watermeter
ClientID = watermeter
user = masked
password = masked
RetainMessages = true
HomeassistantDiscovery = false
;MeterType = other
;CACert = undefined
;ClientCert = undefined
;ClientKey = undefined
;[InfluxDB]
;Uri = undefined
;Database = undefined
;user = undefined
;password = undefined
;main.Measurement = undefined
;main.Field = undefined
[InfluxDBv2]
Uri = http://masked:8086
Bucket = smarthome
Org = myHome
Token = masked
main.Measurement = watermeter
main.Field = absoluteValue
[GPIO]
;IO0 = input disabled 10 false false
;IO1 = input disabled 10 false false
;IO3 = input disabled 10 false false
;IO4 = built-in-led disabled 10 false false
IO12 = external-flash-ws281x disabled 10 false false
;IO13 = input-pullup disabled 10 false false
LEDType = WS2812B
LEDNumbers = 3
LEDColor = 4 12 15
[AutoTimer]
AutoStart = true
Interval = 5
[DataLogging]
DataLogActive = true
DataFilesRetention = 3
[Debug]
LogLevel = 1
LogfilesRetention = 3
[System]
TimeZone = CET-1CEST,M3.5.0,M10.5.0/3
;TimeServer = pool.ntp.org
;Hostname = undefined
;RSSIThreshold = 0
CPUFrequency = 160
SetupMode = false |
In the meantime, I deleted the entire contents of the SD and copied the contents of the |
I also have the same issue. |
Thanks for providing the config. |
Thank you |
If you haven't configured the device yet, it would be the easiest to replace the Alternatively you can try to replace just the following parameters:
with those:
Note that I did not test this variant! |
Did I read it correctly that CamZoom settings are causing a bootloop? If it would be like this, I could update the settings trough the webinterface. Now I have to disassemble the case, take the ESP32 out, take out the SD, edit the file, put everything back, and rerun the setup for the camera/alignment/etc... because the camera moved. I know for a developer this is "just the config.ini", but for a user this can really be a hassle. |
A bootlop is generally caused when a variable has no value behind it, such as "Zoom =" or "Zoom" instead of "Zoom = false" |
🤣 It is not the parameters which cause the endless boot loops. We have precautions to prevent against endless boot loops during normal operations. How ever here the migration scripts to update the configuration from It is great that you and @danube reported this issue, so we could fix it. I hope you are fully aware that you installed a Pre-Release, it is even marked as Please also keep in mind that you are allowed to use the software free of charge. On the opposite, we developers invested (and still do) hundred of hours into it, all in our free time. Now, it would also be great to give something back -> check the the donation link on https://github.com/jomjol/AI-on-the-edge-device?tab=readme-ov-file#donate- |
No, here it indeed was a broken migration. The migration lost the last part of the string and when we split it we had an out-of-index access. |
@caco3 it's what I can do 😉
@phulstaert, feel free to contribute with whatever skills you have. 🤟 |
I am a developer myself (PHP/NodeJS) and know what RC means. But on the other hand, in my field is is easy to test, and I have no idea how it works to test something that runs on a ESP32. I don't know if there are emulation environments for this. Every ESP32 project I have written in the past was for personal use, was in the Arduino suite for use with a single sensor and only a hardcoded MQTT client. So just saying "test better" is easy to say, but maybe not that easy to do; so everything I say is with the upmost respect and meaning to help to make this project better and more robust. On the other hand, there are 2 issues at play here.
|
This error does not occur when updating from version 15.7.0 to 16.0.0 (which was just tested), but if you update from eg. 15.4.0 to 15.7.0 and then to 16.0.0 it may possibly happen. |
That is strange. |
The logfile kept repeating this:
|
Did you follow one of my in #3443 (comment) proposed ways? |
I copied the version from github and adjusted what needed to be adjusted; now it works. The logfile was 23MB from bootlooping. Earlier was said that there are systems in place to ensure there is no bootlooping. I would argue that this failsafe was not working... :-) You can also see that it was migrating the configfile, but while it was writable, it dit not write anything. (except for the logfile) |
No that is not exactly right. The fail safe mechanism works as intended, how ever due to the complexity of the system, it only gets active after the migration.
If you would have used the latest Since you say you are a developer I would have expected that you interpret this right: |
There were no empty parameters in my config.ini nor in my config.bak.
I don't know what you mean by this.
By the way, the reason I updated to a newer version was because the LED (flash) would not turn on a second time. Only a first time and then I needed to reboot. This issue is not present anymore in the RC5 - so I am happy with it. |
That's what he meant: https://github.com/jomjol/AI-on-the-edge-device/actions/runs/12457667210 I'm starting to get the feeling that you don't really know what migration does. Brightness = 1 is changed to CamBrightness = 1
Your config.ini is not from version 15.7.0, so you had an earlier version on the SD. |
Ok, so in the migration, you are also parsing comment lines. I skipped those when going through the file, because comments are comments in my mind. This does however explain the "empty parameters" issue. When I -personally- do migrations, I create a function to create a new configfile and fill it with known values; the unknown keys are always filled with default values when they are required. Doing it like this, I skip commented lines. My screenshot of the config however is really from a 15.7 version. Wat parameters are triggering you to say this is not a 15.7 version? I have a few ESP32-CAM's, so I am willing to try to reproduce what I had. But knowing what to search for is rather valuable information when trying to reproduce something. I hope it is only a language barrier thing, but I sense a sort of hostility and condescending attitude . To be clear; I really want to help. There is no other project like this and I want to help create a stable and useful product for the world to use. You know as much as me that a product that does not work from the first try, people often abandon. I am trying to identify and rectify such an error. |
I always use a translator because my English isn't that good^^ |
Ok, I'll leave it at that regarding the "language" issues. I know that when translating Dutch (this is my native language), it also doesn't always relay the message with the same 'finesse' a native English speaker can write it. Because of this, I try to write my English directly, but as you might have noticed, I do sometimes make spelling or grammar mistakes... Tonight, I will try to reproduce the error on a new ESP32-CAM and a new SD card. (or is there an open source/free emulator available that I can use to speed this up?) Is this project open for new Collaborators? Or are you a more closed set of people? |
@phulstaert The project is in need for more contributors who are willing to deep-dive into the legacy code. The project has grown a lot over the time and as you might know, this never is good for clean code. Also keep in mind that there are only a few automated tests for the algorithm but not for the overall software. In my paid job, I do DevOps and implement testsystems for such hardware-near software projects. And believe me, it would be a huge job to implement tests. Especially since there are no clear concepts written down and the APIs sadly are inconsistent (again due to the growth over the time). I invest my time because I use the system myself, want to learn/try out new things and help other to get it working. But I am not investing months of time to refactor the software just for fun. The best way would be to start from scratch, write a good concept and implement it with proper APIs and guidelines. But unless somebody provides me a years salary, I am not going to do it as it works-for-me as is. |
If you are ok with it, I will start with a bit of cleanup in the sense of "consistency". And while I am going through the files, I can get a sense of how everything is structured. I will try to do it in small pull requests per topic. This is a nice opportunity to refresh the language a bit; I have been using Javascript/PHP exclusively for a while now, so some refreshing is needed... Next I will suggest to update things in a certain order so we can make it better one part at a time. - But this does indeed depends on how it is build. I would be nice if I did cleanup of code, it would not be an unending job, but new code and changes by others are up to the same standards and conventions. |
The Problem
Installed 15.7.0 with web installer and then updated to 16.0.0RC5 via OTA update. Resulted in a boot loop.
esp-web-tools-logs.txt
Version
16.0.0 RC5
Logfile
Expected Behavior
No response
Screenshots
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: