A lot of node-RED users are using ESP devices to provide environmental or other data for node-RED to process, so this post is vaguely on-topic
I've just replaced my router, which although has more features, is lacking in wifi power (Netgear Nighthawk), and has resulted in dodgy MQTT communications between an ESP in my greenhouse, which is about 20mts distance from the router, including 2 brick walls.
As can be seen in the image below, the s/s up to about 13:00hrs was in the region of 76db before dropping out completely at 80db.
I tried a few few different options up until 13:30hrs, before adding a ground plane to the ESP.
The ground plane was nothing more than a metal oven tray, similar to this, which was placed beneath the ESP enclosure. Not grounded, just placed down, and the ESP enclosure resting on top.
As can be seen, the s/s improved by 10db, which is the difference between a good solid signal, and no signal at all....
Difficult to see how fitting an aerial could be easier than sitting it on an oven tray. It is going to involve at least getting the wire cutters out of the draw and plugging in the soldering iron, never mind trying to find the fine solder.
Who said anything about fitting an antenna? All you do is purchase an ESP with sma connector built in. Then for about $1 purchase a ready made antenna, and ...
If I am using ESPs away from the AP (router, whatever) I always purchase the best ESP for the job (usually an ESP07s). In fact, for the price, there is really no reason to buy anything else.
Well that is certainly not easier than sitting it on a baking tray.
The sonoff TH10, acquires environmental data using 1-wire devices and allows the loop to be closed via node-red using the relay output for control of temperature or humidity. In addition many add users add 1-wire sensors to other Sonoff devices.
Interesting rabbit hole to go down, requiring a round table discussion and a pint.
But my point was there are ESP chips available on pcb that take ready made antennas. Easy and simple. The OP didn't specify it was a sonoff device he is using. Perhaps sonoff need to lift their game then and provide an external antenna.
It's a Wemos D1 mini.
This is already built and been in use for 2 years, so I'm hardly going to put it in the bin and rebuild from scratch using a different device, especially when simply adding a ground plane restores its functionality.