Skip to content
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

User Friendly Upload #33

Open
ALD-Models opened this issue May 28, 2024 · 23 comments
Open

User Friendly Upload #33

ALD-Models opened this issue May 28, 2024 · 23 comments
Labels
enhancement New feature or request

Comments

@ALD-Models
Copy link

To make the install process easy for users I've created a website that users can go to to easily install the firmware. It uses esp-web tools and contains a user friendly interface which also show errors and logs

This is the website: https://ald-models.github.io/Prusa-ESP32-Cam-Web-Upload/

Hopefully this should be useful!

Jake

@BugsBunny1403
Copy link

It's great, I'm going to test it right now and it's easy to upload the firmware. Just one problem, wifi management by esp web tool is apparently unavailable. I think it has something to do with an improv wifi and web serial function.

@ALD-Models
Copy link
Author

Thanks. I've not yet enabled the WiFi setup but i might play around with it tomorrow!

Jake

@johnyHV
Copy link
Collaborator

johnyHV commented May 29, 2024

Awesome! It is possible in the future added support for multiple different MCU version ? Or configuration the WiFi network, token and something else ?

@johnyHV
Copy link
Collaborator

johnyHV commented May 29, 2024

I see that currently, the binary files are stored in your GIT repository. This can raise suspicion and distrust. Would it be possible to use the binary files directly from the release?

@BugsBunny1403
Copy link

BugsBunny1403 commented May 29, 2024 via email

@ALD-Models
Copy link
Author

Yes that is a good point and I guess it would also make sense to keep with the latest update.

I'm not quite sure how to make the link

Is their a easy method to do this?

Jake

@ALD-Models
Copy link
Author

ALD-Models commented Jun 4, 2024 via email

@Anheledir
Copy link
Contributor

You should either clear the esp32 by default, or add a separate button to do so. The error that you cannot login to the AP happens usually when flashing the esp32 for the first time or some old data is not overwritten. Doing a clear before flashing should solve that issue and takes just a few more seconds.

Also, would it be viable to add that site also to this repository, so everything related is in one place? Not necessary, but would be nice 👀

@Anheledir
Copy link
Contributor

I'm not quite sure how to make the link

Is their a easy method to do this?

I'm not aware of a direct call for the latest release, but I used some script or backend-code in other projects. For example:

# Fetch the latest release information
latest_release=$(curl -s https://api.github.com/repos/prusa3d/Prusa-Firmware-ESP32-Cam/releases/latest)

# Extract the download URLs
download_urls=$(echo $latest_release | grep -oP '"browser_download_url": "\K(.*)(?=")')

# Download each asset
for url in $download_urls; do
    wget $url
done

Within the for-loop you could filter only the .bin files. Not the most elegant solution, but should work 🫣

@ALD-Models
Copy link
Author

Also, would it be viable to add that site also to this repository, so everything related is in one place? Not necessary, but would be nice 👀

That would be brilliant!

I've sorted the WIFI issues so it erases the ESP by default as you only really need to use my website once & just in the process of sorting the firmware link.

Many Thanks

@ALD-Models
Copy link
Author

I'm not quite sure how to make the link
Is their a easy method to do this?

I'm not aware of a direct call for the latest release, but I used some script or backend-code in other projects. For example:

# Fetch the latest release information
latest_release=$(curl -s https://api.github.com/repos/prusa3d/Prusa-Firmware-ESP32-Cam/releases/latest)

# Extract the download URLs
download_urls=$(echo $latest_release | grep -oP '"browser_download_url": "\K(.*)(?=")')

# Download each asset
for url in $download_urls; do
    wget $url
done

Within the for-loop you could filter only the .bin files. Not the most elegant solution, but should work 🫣

I've managed to get a workflow working so it retrieves and updates the bin files and version code on the manifest. When you release an update i'll just have to start the workflow and it should be all automated from their!

@Zero-Circle
Copy link

What a fantastic update for this project thanks for building this tool.
I tried to do it myself as I know my way around it with WLED, not a code wizard though.
This tool is fantastic hopefully this is built into this repo as the default install method. Thanks for making it @ALD-Models.

@johnyHV
Copy link
Collaborator

johnyHV commented Jun 29, 2024

Hello @ALD-Models I have new challenge. It is possible added multi board compatibility ?

@ALD-Models
Copy link
Author

Hi @johnyHV

Do you mean like different bin files for the different ESP boards?

That would definitely be possible! Might be able to get it done within a few days.

I've just got an error email from the workflow because the new releases have the bin files in zips now so i need to work on a way to unzip and extract the bin for each of the boards in the workflow. This would hopefully be resolved soon!

Jake

@johnyHV
Copy link
Collaborator

johnyHV commented Jun 30, 2024

Hello @ALD-Models

Yes, I means different bin files for the different ESP boards.

Yes, unfortunately, currently the firmware for each board is packed in a ZIP archive. This makes it more organized and easier to identify which file belongs to which board. At the same time, there aren't that many bin files in the release, so the release is more organized.

@ALD-Models
Copy link
Author

Hi @johnyHV

I would get that sorted

Would the zip file for the individual boards be named the exact same per release?

Just means that the workflow can easily identify the bin files per board

@ALD-Models
Copy link
Author

That should work now!

If anyone can test it and give me feedback that would be really appreciated!

Also just a side note that the repository automatically syncs to the latest release at 00:00 meaning that when an update has been pushed it wont be synced until that time.

@kassi
Copy link

kassi commented Jul 9, 2024

Getting:
Downlading firmware ESP32_PrusaConnectCam.ino.bootloader.bin failed: 404

@ALD-Models
Copy link
Author

Getting:
Downlading firmware ESP32_PrusaConnectCam.ino.bootloader.bin failed: 404

Apologies about that. I think I have managed to patch it up however I need to rewrite the workflow to prevent it from downloading the wrong files to the manifest. At the moment I have suspended the workflow from the automation so I can look into it further.

The installer should be working now 🤞

@kassi
Copy link

kassi commented Jul 9, 2024

Thank you. In the meantime I found and downloaded the zip with bin from the release and uploaded them via some general web tool. Worked flawlessly.

@johnyHV johnyHV added the enhancement New feature or request label Jul 31, 2024
@louisostrowski
Copy link

louisostrowski commented Sep 26, 2024

Hi @ALD-Models , your loader, what pin does it put the DHT22 data receive on?

@ALD-Models
Copy link
Author

Hi @ALD-Models , your loader, what pin does it put the DHT22 data receive on?

I'm not 100% sure I'm afraid. I'm just using the generic bin files on the latest firmware page. I'll see if I can find a DHT22 in the next few days and will come back to you.

@BugsBunny1403
Copy link

@ALD-Models & @johnyHV What do you think of the following idea:

  • take the ALD-Models project which in my opinion works very well to make a first installation, integrate it into the Prusa eco-system to validate security (if there is any doubt), credit ALD-Models of course for his work.
    I propose this because I have seen requests for simplification or tools for uploading but this one seems to me to be the best.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants