They only have enough ram for one, maybe two TLS sessions at once; to make things worse, no one has written support for modern (secure) ciphers. The SSL stacks that come with the Espressif SDK are vulnerable to almost every attack you've probably heard of. Slightly better (but not fixed) is https://github.com/superhouse/esp-open-rtos.
I could no longer rationalise being party to the propagation of the "internet of insecure things". Instead, spend the extra $7 and use something with a bit more power, like a C.H.I.P. http://getchip.com then you can write normal programs (it's a full linux OS) and not be limited to only insecure protocols.
They don't have enough resources for an 4096 bit RSA negotiation, so they top out at 2048 bit. You may be able to use some of the newer elliptical curve stuff. I was going to try and get nacl/libsodium working on them, but gave up when I realised I can just use a more powerful board instead.
Sounds interesting. I'd love to know more about it; if you could share the details with us, it would be highly appreciated.
I'm using an amica nodemcu board paired with a sainrite water level sensor. It's powered off of a cell phone battery charger for now. The code is all in C. I use twilio to send texts.
The final thing I need to build is a way to wake the device up from sleep when water is detected. Doing so should let it run for a very long time. (year(s)) I have a few ideas for a solution, but have been swamped lately.
I used that trick to make my emergency food button (a button that orders food when you press it):
https://www.stavros.io/posts/emergency-food-button/
You won't get away with not powering the detector, though, so depending on its power draw it might be moot.
Just search for analog water sensor and you'll see a few like this labeled by different companies. There are some that are probably cheaper.