I'll try and provide the brief version. I'm working with what is essentially this hardware. I'm publishing the temperatures via MQTT to a broker I have running locally on a Raspberry Pi.
I testing 2 different examples and looking to modify them.
Example 1 uses the ESPAsync TCP library.
Example 2 uses the PubSub client library.
Both examples work out of the box. But I need deep sleep mode both to help prevent the DH11 from getting heat soaked, and to maximize battery life of the device.
I've managed to get example 1 working via a bad hack that contains a race condition waiting to happen (but hasn't manifested yet on my hardware).
So I'm looking into example 2 to see about modifying it. Before just hacking on the code, I was trying to read up on the PubSub client library to see if it has any similar 'gotchyas' I should be aware of before I start hacking at things.