[off topic] Need advice getting started with D1/ESP/PI type "thing" projects

I am using a simple 433Mhz doorbell and a sonoff RF bridge flashed with tasmota, which captures the signal and sends out mqtt, node-red sends both a telegram and homekit notification, works nicely. When searching google, there are even 433Mhz doorbell versions without a battery (kinetic). Time for a replacement :slight_smile:

1 Like

A few little things I like to add:

  • skip Arduino as an IDE. Start with vscode and install platformIO. You can still use the Arduino framework for ESPs (and many others) and have a powerful ide including in circuit debugging. Even if it looks overwhelming especially for beginners vscode is so helpful. And you have no limits when you are getting a pro.
  • a WEMOS d1 mini 4 dupond wires and a bmp280 (or whatever i2c sensor you like) as a shield or a module is enough to get started. In parallel order your stuff from china and wait the 4-8 weeks.
  • depending on your C/C++ skills or if you plan to improve them if necessary, skip the firmwares (ESPEasy, Tasmota ....). A Swiss Army knife is handy but preparing a meal with a decent knife is better in the long rund. The hardware thing is normaly not a big deal - all is in the software.
  • for MQTT communications take a look into the homie convention. It is so convenient when all your devices talk the same language: homie (not only using the same media: mqtt) I use a very simple library dooing all the heavy liftinf for WiFi/MQTT/OTA so I can concentrate on my code doing useful stuff.

The documentation also give you a kickstart for vscode and platformio too.

1 Like

Now that is interesting & just the kinda thing I'm looking for.

I wonder if there is 433MHz kit for Wemos D1?

Hi @Christian-Me, excellent info -

I wasn't aware we could stay in VSCode - I will definitely go this route. I am very comfortable with it (use it on an almost daily basis). Happy days.

As for firmware, if not ESPEasy/Tasmota, what would you recommend?

Re: homie conversation, I can definitely see that being useful and definitely a good call. At work, I try to stick to a conversation loosely based on homie (not always easy/suitable/possible) when MQTTifying PLCs and other hardware.

Cheers.

With a wemos that is also possible, but it will make it bigger than you can get a doorbell from a random store and the wemos with transmitter might even become more expensive

No. Was thinking of the std bell push as transmitter and a Wemos+receiver for sending MQTT.

I only have experience with ESPEasy, and I contributed the homie plugins (which need an urgent update but I messed up my git repository).
I love it. And it comes with a nice script engine so you can do low level automation directly on the ESP.
But it comes with limitations. Especially

  • memory ROM: a one fits all system needs a lot. Many of the shelf products only have 1MB of flash. So OTA takes 50% some settings 10% and you quickly ran out of flash and the hole plugin concept is doomed
  • memory RAM: taking care of many (even unused) plugins eats your RAM.
  • timing: ESP Easy only knows a constant period of reading sensors. I like more the dynamic send value on change.

This all brought me to the conclusion to build my individual purpose firmware with the ESP homie library as a foundation. See my Christmas Tree project I posted here where I had to do some pwm modulation in sync with polarity changes. Firmware (including getting familiar with the library) done in two hours.

1 Like

I cannot add anything to the wonderful hardware info but I suggest you look at MicroPython too:

It is much easier to test routines using MicroPython on the device, even have different versions on the board at the same time.

2 Likes

One quick question: Does it work on 1MB flash devices? Or are all ESP8285 out of the game?

I don't think ESP8285's are supported! [MicroPython]

...1MByte or larger should be fine, according to the docs: https://docs.micropython.org/en/latest/esp8266/tutorial/filesystem.html

I think, even an ESP-01 with 512MB will work with older versions, should the binary fit into it....
The standard ESP-01 is the 01S nowadays, which has 1MB...even re-soldering a 4MB flash chip (25ct each) is an option.

Ii thought so. Putting a high level interpreter language and a complete framework on a micro even on a powerful one like the ESP is a challenge and questionable.
The genius idea behind the Arduino ecosystem is to bring people into coding in C/C++ without actually telling them, If you say "oh you have to learn C++ to program an micro controller and to setup you environment you need with 5+ tools you never heard of and have no idea what they are good for." many would have step back. Instead they made a ecosystem which does the heavy lifting (build in compiler, upload tools, library manager ...) and after installing one app by clicking on next several times you can start to code and after 4 lines of code you have your led blink. Now you can progress from here ...

2 Likes

Oh, just found this on the download page:

"The following are daily builds of the ESP8266 firmware tailored for modules with only 512kbytes of flash. Certain features are disabled to get the firmware down to this size."

Thatā€™s cool and as you upload your code to the FS donā€™t have to reflash the complete firmware (unless you upgrade) that should work.
But again as for all other OS (ESPEasy) you have to work with that what the OS provide. There might be a situation where you have an exotic sensor or task where you could do it in C but not with an OS sitting on top of your micro.

Precisely and who decides what get dropped over board?
I spend hours (days?) working on precompiler scripts to get ESPEasy to a decent size questioning myself what if I wrote the code from scratch myself.
These are all thoughts and experience form my side. With the knowledge I have today (and that definitely improved a lot) I would started with my own code in the beginning. Simply as when I started with all that stuff in the 1980th I just wanted a pacman clone on the school Commodore CBM 8032. So I started with basic and switched to some assembler and in the end managed to clone pacman - the most difficult part was getting the information not learning how to code. BTW: 32k Ram 1MHz not 100+KB + up to 16MB flash for your code and 80MHz/160MHz hmmm how we did this? :thinking:

1 Like

Ah yes ofcourse - misunderstanding , i have a dvb-t to capture signals as well (in case you have one), in the end a sonoff bridge works great too, also for wall switches, all dirt cheap.

https://www.startpage.com/do/dsearch?query=esp8266+433mhz+bridge&cat=web&pl=opensearch&language=english

Personally, though I do everything else in VScode, I'm just not good enough with C/C++ to use it for Arduino/ESP8266. The Arduino IDE is so simple to use and well integrated, I've never really had the incentive to try to power though the friction of getting started with PlatformIO. The libraries are all integrated as well and they come with lots of useful, integrated examples which makes using them a breeze.

Nothing. If you don't want to use one of those, just hand-code, it isn't at all hard.

Yep, good if a little complex.

That's cool, certainly going to try that. Looks like I'll be ditching ESPeasy if this library works as advertised. I much prefer rolling my own but the ease of having OTA and easy configuration was getting in the way.

I've also one of my sensor platforms that always plays up with ESPeasy and I've never been able to find out why. So hand-coding should let me do that and maybe get a more stable platform.

Haha, I took a similar approach to learning to program on the BBC Micro (8-bit 6502 processor based). Quickly learned the BBC Basic and gradually learned assembler which thankfully was particularly easy on the 6502. Even better, BBC basic included a feature that let you integrate assembler right into your BASIC code simply by using an open square bracket notation. Man, that was a great architecture.

2 Likes

Right and you had control over every single byte, lucky there were not many :crazy_face:
I actually started with a Z80 single board computer, the raspberry of the time - hdmi=7 segment display / keyboard = hex keypad / sd = cassette recorder. I controlled my ā€œfischertechnikā€ models with an 2x8bit I/O chip with 4 registers.

Thatā€™s why I started again with micro controllers a few years ago after 20 years of being sober.

2 Likes

No! It was awful, there was always some barrier: memory, speed, resolution, colors, i/o, OS, money ....
Today the only limit is our own imagination and knowledge. Memory, speed, 6k video, gigabit everywhere for pocket money.
Having all this and being 15 again what great things would I do? The same as my son: I would play video games! :stuck_out_tongue_closed_eyes:
We had none so we had to code them ourself.