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

own firmware from local webserver #70

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

imthemichi
Copy link

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
Copy link

codefaux commented Apr 3, 2023

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;

  • download appropriate release for your situation -- for me, it was mg2tasmota-Shelly25.zip
  • put it on your webserver -- for me, it was a network share in a folder titled firmware
  • navigate to your Shelly device IP, with the ota url modified to point at your webserver
  • It'll spit out something such as;
{
  "status": "updating",
  "has_update": false,
  "new_version": "20200812-091015/v1.8.0@8acf41b0",
  "old_version": "20200601-122849/v1.7.0@d7961837"
}
  • watch for Tasmota SSID to appear on your smartphone/laptop/whatever
  • Setup as specified in Tasmota instructions (in my case here

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.)

  • Download release as above, put it in a new folder
  • Open a Command Prompt in that folder.
  • Run python -m http.server 8080
  • Find/know your computer's IP.
  • Go to the Shelly device's OTA url (wget, curl, web browser, etc) using your PC's ip, on port 8080, with the release filename as its target. http://shelly_ip/ota?url=http://computer_ip/release_name.zip

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

Successfully merging this pull request may close these issues.

2 participants