esphome / esp-web-tools

Open source tools to allow working with ESP devices in the browser
https://esphome.github.io/esp-web-tools/
Apache License 2.0
417 stars 113 forks source link

Custom Manifest creation on the fly #498

Open lost-hope opened 4 months ago

lost-hope commented 4 months ago

Hello, i am currently looking into rebuilding a webinstaller where i would like to have the user select the flash size and some other options that would result in a high number of possible combinations and thus manifest files.

While looking around in the issues, i found this reply (https://github.com/esphome/esp-web-tools/issues/469#issuecomment-1926157937 ) by @balloob.

In my opinion i would be able to craft a manifest string based on the User input, but i cant write that to a file and provide that to the install button.

Is there a way around that, or does this need more development in the install scripts?

lost-hope commented 4 months ago

i have looked into this a bit. with a small change in the install dialog script this is possible. but my implementation will break the current manifest file method. there might be a way to use a if statement to filter between them. Is there a technical reason why the code is minified? Ok can answer myself after some research. It can improve performance

velijv commented 1 month ago

https://veli.ee/esphome/ota.manifest.json?name=TX-Ultimate&chip=esp32&summary=Cool-new-colors&v=1234

ex:

{
    "name": "re5v1c",
    "version": "123",
    "home_assistant_domain": "esphome",
    "builds": [
        {
            "chipFamily": "ESP8266",
            "ota": {
                "md5": "f5fb10347f29d944897db09975b39f29",
                "path": "http://homeassistant.local:8123/local/ota/re5v1c/firmware.ota.bin",
                "release_url": "http://re5v1c.local",
                "summary": "re5v1c has a new Update"
            },
            "parts": [
                {
                    "path": "http://homeassistant.local:8123/local/ota/re5v1c/firmware.factory.bin",
                    "offset": 0
                }
            ]
        }
    ]
}