I’ll not re-iterate detail about the work on a ping tester I’ve been slaving over, using up all my spare time for the past week as it is in the previous blog entry, but here are thoughts worth showing re: the experience.
So, several things… the ESP8266, long claimed to be past it’s sell-by date is alive and well here at Bedrock. I have every imaginable variation on the ESP32 lying on my desk including the large WROOM module and the tiny C3 and S3, S6 units.. I’ve also dragged out some older ESP8266 modules, one here has been hiding in a cupboard for the past 2 or 3 years at least.
See the lead image above – this old board arrived as a generic ESP8266 4-relay board with a choice of 5v in, 9-12v in or mains power in – and 4 totally independent relay contact sets. Shame I’d not gotten a pretty box for it at the time. It’s so old I can only guess it may have come from AliExpress but as commented later – they still sell the same board.
Next time someone tells you the ESP8266 is dead, it is currently running Tasmota-display with the PING #include (more about that in a second), handling the 4 relays, a common AMD temperature/humidity sensor, the SSD1306 128*64 display and there’a a pin left for a WS2812B RGB LED strip should I need/want it – all without breaking a sweat.
Of interest here’s the webUI and the config… You can see I’ve already set up the WS2812, just not connected in the photo.
So this is standard Tasmota with one variation. The RGB control shown doesn’t really cover what this setup could do… the WS2812 control allows individual control over each RGB LED or group control including some simple effects such as RAINBOW – my favourite – I use that a lot.
But I digress – here is the config… Oh and I get that address display by using (non-volatile) SO53 1 in the Tasmota console.
Note that serial comms isn’t possible as I’ve used one of the serial lines for the AMD2301… note also that care is needed with GPIO choice as not all ESP8266 GPIOs are the same. SCL and SDA facilitate the OLED display.
Ok the ESP8266 doesn’t have Bluetooth and the ESP32 is a little faster (though remember, the clock on the ESP8266 can be doubled – I’ve not felt the need to do that since introducing the command in my now-defunct ESP-GO firmware for the ESP8266, gone in favour of Tasmota (and ESP-Home from time to time).
That 4-relay board is still floating about on AliExpress for something like 8 Euros and as an aside, ESP8266 D1 Mini boards for well under 2 Euros.
All of the above runs on standard off-the-shelf Tasmota EXCEPT for the PING command I use to check on my broadband. That needs a custom Tasmota and if you take a look at my previous blog entry you’ll see that creating a customer version needs no installs – no software in the PC and takes a couple of minutes before you can download the Tsamota you need (handy to remember to rename it – I used the tasmota-display model and renamed my download tasmota-display-ping.bin.gz) and you also need to grab Tasmota-minimal.bin.gz – don’t go for the .bin versions or skip the minimal – for fear of getting a dreaded “out of space” message. So, all easy stuff given the info I’ve put up. Really – SO easy to make a custom version – all you have to do is ermember not to OTA update it in the futuer with a standard Tasmota or you lose the additional functionality.
BUT (and here’s where the cautionary tale comes in), the ESP8266 doesn’t support the BERRY console that is readily available on the ESP32 – no big deal, I cannot make head nor tail of it. So in my previous blog and in the photo at ythe top, you’ll see that Tasmota on the ESP8266 supports variables as seen in the display – the only annoyance is that they come up in floating point (I have no use for fractions as my display shows number of successful broadband pings) – and you can’t do anything about it – the rules system simply will not do functions like INT or ROUND.
Yesterday I shortened by life by spending hours listening to Perplexity AI tell me how to get around that by further customising Tasmota to include a file system and functions like the above and more. All good except that the supremely confident, oft-repeated instructions from the AI simply did NOT work.
If the AIs were a little less confident of their own perfection I might be more forgiving but Perplexity kept giving me the wrong answers followed by detailed explanations as to why the answers were correct. Not only that but it would come up with a “solution”, I would get half way through reading it before it was deleted off screen while the AI went off to write War and Peace ending up with re-iterating the “solution”.
I finally told it to STOP giving me breakdowns – that was after I realised it was using – amongst others, my own blog as a reference – how dumb is THAT – using info from a guy who is asking the very question the AI is seeking to answer. In the end it stopped giving me all the nonsense and proceeded to give me more solutions that didn’t work. I gave up and went back to old-fashioned thinking. It could not even remember not to give me breakdowns for more than 10 minutes – “in future I will give you only concise answers until you tell me otherwise” – yeah, right. The end result of that is I’m still convinced that mathematical functions in rules on the ESP8266 are a non-starter – hence the decimal points in the image above. Oh, well. Getting that far took HOURS to get no-where. If I were doing this for a living I’d not be popular with the boss. Now if anyone has first hand, detailed experience to the contrary – please do comment. I’d love to get rid of the trailing zeroes in my display.
Incidentally, a quick hover over the Tasmota options in the FLASH Tasmota page makes it clear that neat as they aer, some of the smaller ESP32 boards do not get full support from Tasmota – a casual look and you might say – oh, just use Tasmota32-display – works on all ESP32 boards – erm, no it doesn’t and once again the AI failed to give me a working explanation as to why not.
All in, despite the difficulties – I feel I’m a lot more knowledgeable on the subject than I was a week ago – that has to be a good thing. Between these two blog entries, anyone interested should be able to duplicate anything I’ve done – should the urge take you. If not, well I hope this was of some interest,
Hi Peter
I have several of those 4 channel relay boards. I bought the first to switch my garden pond electrics and was so impressed I bought a few more – just in case! Even at their current price of £10 (Ebay) they’re a real bargain, I couldn’t build something for less!
I’m currently doing some renovation work on my house and a recent challenge was to revamp my kitchen lighting. My kitchen has one central light which I’m replacing with three lights, actually three groups of six mains powered LED downlighters but that’s not really relevant.
My house has solid brick walls and I know from bitter experience that chasing them to install new wiring isn’t fun so I was very keen to avoid this! Besides, this is 2025! I wanted something smart!
To cut a long story short I already had most of the bits I needed, the relay card & a 433MHz three gang switch:
https://www.ebay.co.uk/itm/275762015793?var=577337063088
The switch is powered by a 23A 12v battery which is easily changed when the need arises. It’s a little ‘cheap’ in construction but it’s not bad! Has excellent range! And it cost a fiver!
I originally thought I’d write the code myself but as a recent ‘convert’ to Tasmota I thought I’d give it a try:
Tasmota supports 433MHz devices using the RCSwitch library. BUT you NEED the ‘Tasmota sensors’ variant. Lesson one!
There is a very terse example of using a 433MHz receiver rule in the Tasmota documentation:
ON RfReceived#Data= DO ENDON
Easy? No! It’s easy to catch the codes from the switches in the Tasmota console. Implementing a suitable rule took hours! Like you, I find the rules slightly less than obvious! Thankfully there are people out there fluent in Tasmota!
So, an actual (working!) rule looks like this:
on rfreceived#data=0x0000000000DBE012 do power1 toggle endon
My switches use a 24 bit code (the DBE012 part) BUT apparently this is a STRING comparison which expects a 64 bit number as the string. Don’t ask me! I think it’s bizarre! I was meant to guess this?:)
I’m not about to moan about Tasmota. It’s really good, and it’s free, but not perfect!
Conclusion: This works perfectly on my living room floor! I’m fitting it very soon. Using Tasmota provides a web interface as well as MQTT.
As a complete aside, my fingers were quite sore from twisting wires for choc blocks so I bought a ferrule crimper. It’s great!
ON RfReceived#Data= DO ENDON
Your blog doesn’t like angle brackets?
Clearly not. This isn’t what I sent.
TRy sending me an email and I can get the code into a block for you. I use WordPress…. Github isn’t the easiest place to get accurate code either. the email I got from you shows on rfreceived#data do endon -ie nothing between do and endon – which incidentally is not case sensitive – I’ve done a lot of rules in the
past week 🙂
try something like this (and learn how to use raw rf data on tasmota, if you want better results):
rule1 on RfReceived#Data=86CE92 do publish cmnd/comodino/power1 toggle endon on RfReceived#Data=86CE94 do publish zigbee/3tasti/porta toggle endon on RfReceived#Data=86CE91 do websend [192.168.1.114] power2 toggle endon
it uses mqtt publish to send data elsewhere, and power toggle the second relay of an other tasmota device, by ip