A Constructive Tasmota Weekend

A week or so ago I was struggling to get everything I wanted in one ESP8266 running Tasmota – for example, the tasmota-sensors.bin file has lots of sensors and very little display capability while tasmota-display,bin has very few sensors. One of the guys suggested I tackle doing my own Tasmota builds – the idea of which horrified me.

Well, all of that has changed overnight and more. Let me go through this:

I’m a Windows 10 user primarily and dive into Linux only when need be to work on routers, Raspberry Pi and the likes.

So, I was pleased to discover TasmoCompiler – check the readme in that link to the left. No downloading of compilers etc, the online software instructs you to press a key to get the latest Tasmota, then lets you select from a list of tick options including various sensors, displays, IR control and more. Once that’s done it lets you download a firmware.bin (or firmware.bin.gz) file to your local machine with only the stuff you wanted in the compilation as well as your WiFi credentials.

TsamoCompiler

Add to that, ESP Flasher Windows 64 binary – and you can now flash custom ROMs on (in my case) ESP8266 (example NODEMCU with auto-reset and flashing, so no pressing buttons) or ESP32 boards. ESP-Flasher isn’t very pretty but it is VERY easy to use.

ESP Flasher

But that left me with how to do OTA as the Tasmota web interface assumes you have an http server with the ROMS sitting in it. To the rescue – HFS – you may remember I wrote about HFS some time ago. I was in the UK at the time and my friend Antonio (MrShark) helped me get it set up so I’ve downloaded it again onto my PC here in Spain. A tiny amount of HFS setup to create a virtual file system (seconds worth of work) and attach it to a real file system so that a folder (for example) c:\users\user\downloads\firmware on my PC becomes part of the HFS server – I changed the port from 80 to 81 to avoid interfering with any other web server activities on my PC and finally saved the new system as well as telling HFS to come up automatically when my PC powers up.

HFS

Click on that folder – click “open in a browser” and there it is – my very own OTA server for Tasmota – my folder names and the name firmware.bin can of course be changed.

HFS

And to use with an ESP8266 (or ESP32) that has been flashed once with the custom Tasmota firmware and ESP Flasher – after changing the software or making it use Theo’s latest dev or release version of the basic code:

Tasmota web interface

Tasmota Rules

I’ve also learned a little about Tasmota rules – a first crude attempt at diaplaying the time regularly (every 5 seconds) on an ILI9341 meant getting to grips with the Tasmota file system menu, Tasmota RULES and RULETIMER as well as DISPLAYBATCH. Note that ruletimer1 1 would not work – must be pushing it for the software.

ruletimer1 5
rule1 on rules#timer=1 do backlog displaybatch display5.bat; ruletimer1 5 endon
rule1 1

The file display5.bat contains:

displaytext [x10y30C64536][f4tS]

and the startup rule to trigger that timer and initialise the display (I didn’t know how to do this until now…)

rule2 on dimmer#boot do backlog displaybatch display.bat; displaybatch display1.bat;
displaybatch display2.bat; ruletimer1 5 endon
rule2 1

While I’m here – this link is worth a look – Tasmota Web Installer.

And now for something completely different

Also this weekend I managed to flash my first ESPHOME ESP8266 – just to check it out. I used ESPHOME stand-alone at first – then installed HOME ASSISTANT and plugged in the ESPHOME add-on – and then flashed an ESP8266 from there, at first serially on the RPI – from within the package – and subsequently OTA. All good stuff but I’m not sure it’s any better or even as good as Tasmota at this point – so just a bit of fun, really.

What I DO like about Home Assistant and ESPHOME is the map of my house – where our road is only partly detailed on Google Maps, this map even has the dirt track going over a hill behind our house. I’m impressed 🙂 But read my ESPHOME blogs – Home assistant and RPI USB ports ended up being problematic – so off I went and installed ESPHOME on the PC – as you’ll see elsewhere – that worked a treat and enabled me to flash both ESP8266 and ESP32 devices on the PC with ESPHOME fom the Windows commeand line – all good except for the ESPHOME DASHBOARD which at the time of writing does NOT work properly on Windows – so – round two – back to the Raspberry Pi – this time on Raspbian. And I’d do that for what reason? See the main ESPHOME blog entry.

Facebooktwitterpinterestlinkedin

2 thoughts on “A Constructive Tasmota Weekend

  1. You don’t need a web server to do OTA. See the box titled “Upgrade by file upload”? Select your firmware.bin and hit “Start upgrade” in the same box. If it doesn’t work, you might need to upload the firmware-minimal.bin first, and firmware.bin in a second step.

    1. Hi Michael – I’m well familiar with that file route. Usually, using the OTA route I can upgrade in a single step using the .bin.gz version. I’ve never tested that theory to the limit though, always assuming the OTA route to be the better one, once initial flashing is done.

      This up to now has always involved the standard bins – the only real difference being I can now make my first customised bins. Antonio (Mr Shark) started me on this path as I wanted platinum to get displays and sensors but as he pointed out, this slows Tasmota down, checking all the sensors regardless of use… so ir seems to make sense to include only the needed sensors – and leave out IR if not needed.

      I do still have some way to go as I can’t remember how to use the file convertor to turn PNG and JPEGs into RGB files for ILI9345. I’m hoping Gerhard Mutz who I last spoke to in February can help me out there . Right now the SCRIPT EDITOR (in Windows 10) won’t even start up. I’d also like to try getting that analog ILI9341 clock to work on one board – it needs a #define or something adding…

Leave a Reply

Your email address will not be published. Required fields are marked *

Leave the field below empty!

This site uses Akismet to reduce spam. Learn how your comment data is processed.