njh / sonoff-ota-flash-cli

Bash script to perform an OTA (Over the Air) firmware update for Sonoff 'DIY Mode' device on the command line
http://sonoff-ota.aelius.com/
MIT License
134 stars 20 forks source link

Improve hosting of sonoff-ota.aelius.com #10

Closed njh closed 2 years ago

njh commented 2 years ago
njh commented 2 years ago

Per year:

njh commented 2 years ago

I doubt I will find better hosting than VMHaus for the price.

I might add a sponsorship button to help with the hosting costs.

francoismassart commented 2 years ago

Question: why not simply « leech » the firmware from the source: http://ota.tasmota.com/tasmota/release-9.5.0/tasmota-lite.bin ? I know there is no sha256 next to the file but we could ask for Tasmota team to add them?

francoismassart commented 2 years ago

I’m reading this article https://cgomesu.com/blog/ota-tasmota-sonoff/ and I see this note:

The webserver has a few peculiar requirements (e.g., needs to accept the Ranges header, run in http instead of https) that does not allow us to point to Tasmota’s OTA website, Github releases, or any other official source of the Tasmota firmware binary

francoismassart commented 2 years ago

I'll try using the npm package http-server to quickly host the firmware locally...

njh commented 2 years ago

I think most web servers will support range requests these days.

However the main requirement is that the web server needs to respond to requests with the Host HTTP header set to dl.itead.cn. This either means setting up a VirtualHost or not be hosting anything else on that IP address. Commercial providers typically won't let you respond to requests for hostnames that you don't own.

That is why ota.tasmota.com and github.com can't be used.

njh commented 2 years ago

I have just updated DNS, so that sonoff-ota.aelius.com now points to aristides.aelius.com. This is a new dedicated virtual machine, hosted by VMHaus.

It has been configured using an ansible playbook: https://github.com/njh/sonoff-ota-flash-cli/tree/main/website/ansible

Everything should behave as before (and hopefully better!), but let me know if there are any issues.

It is only costing me $3 per month, but any small donations to help with the running costs, would be appreciated: Donate

TomaxMe commented 2 years ago

What's the download alternative for this link: (http://sonoff-ota.aelius.com/tasmota-latest-lite.bin) ?

I followed this procedure from Windows 11 but doesn't work anymore: (https://lindevs.com/flash-the-tasmota-firmware-on-sonoff-minir2-switch/#write-comment)

njh commented 2 years ago

The VMHaus pre-pay account has run out of money - so the server has been taken offline.

I have not received any donations to keep the VM running - I will probably move the service back to my home server when I get a chance.

TomaxMe commented 2 years ago

Thanks!

4-ev3r commented 2 years ago

The VMHaus pre-pay account has run out of money - so the server has been taken offline.

I have not received any donations to keep the VM running - I will probably move the service back to my home server when I get a chance.

Just donated your yearly cost

njh commented 2 years ago

Wow! Thank you so much @4-ev3r! Very kind!

I have transferred the money over to VMHaus and the server has sprung back to life! 🎉 (I was slightly concerned that I would have to rebuild it)

4-ev3r commented 2 years ago

Meanwhile already flashed four of my mini's. Thanks

TomaxMe commented 2 years ago

Meanwhile already flashed four of my mini's. Thanks

Thanks too, 4-ev3r ! I will flash mine few.

stukerr commented 1 year ago

I'm guessing as a year has passed the server has run out of money :( I've just tried to send a donation for another month's hosting but I received a "e.data is undefined" error on Paypal.

4-ev3r commented 1 year ago

@njh how do we keep the server up?

njh commented 1 year ago

I don't have access to my PayPal today but I will take a look tonight and send some more money over to the hosting company. I will see if I can see what is wrong with the Donate button too.

4-ev3r commented 1 year ago

When the donate button is back up can you also give the value you need to keep the server running for another year.

stukerr commented 1 year ago

I tried setting up a local web server using python but was getting some errors, however I followed this guide and managed to flash them locally https://cgomesu.com/blog/ota-tasmota-sonoff/

njh commented 1 year ago

I have topped up the hosting account: the server is back online again.

I have created a new donation link: Donate

4-ev3r commented 1 year ago

Donated you the $36 for another year

njh commented 1 year ago

Donated you the $36 for another year

❤️ Thank you so much for your generosity @4-ev3r! I was hoping that lots of people would pay a small amount, rather than one person pay for the whole thing!

I have just transferred the money over to the VMHaus hosting account. With the money I paid yesterday, we should have another 18 months of hosting now 👍