yaourdt / mgos-to-tasmota

A minimal firmware for OTA (over the air) flashing Tasmota, HAA, or ESPurna from Mongoose OS or compatible firmware types.
GNU General Public License v3.0
418 stars 67 forks source link

own firmware from local webserver #70

Open imthemichi opened 2 years ago

imthemichi commented 2 years ago

I'm using esphome and want to directly switch to it without the need to go over tasmota.

With my changes there is a docker based way to build your own firmware to switch to any firmware which is served by an webserver in your local network. I'm using python for this job.

More details you will find in the attached readme.md.

codefaux commented 1 year ago

WARNING: I only used the Tasmota version, it still works as of March '23 because Tasmota's upstream OTA url has not changed. In the future this or any other method may fail -- verify in mos.yaml that the "External Libs" origin URL still works before attempting to continue!

To use this with my own webserver without a single modification, here's what I did;

For example, the url for converting a Shelly 2.5 at ip address 192.168.1.1 to Tasmota for an http server at 192.168.100.100 on port 8080 is http://192.168.1.1/ota?url=http://192.168.100.100:8080/firmware/mg2tasmota-Shelly25.zip

Here's a shorthand fast-easy way to do this on your own computer without a fileserver, if you have Python installed, regardless of what OS you use. Firewall rules may need to be set, etc, find a guide elsewhere this is just the situational information. Python has an http server built into it, and will serve files in the current directory by default. Ctrl-C to close, as with most software. This should work on Mac, Linux, Windows, Android, or any other OS running full Python. (Also, Python2/3 agnostic.)