Nice little project @kwiek. Yes, sharing is the best way to help other to learn. Thank you posting your code, now anyone who is using same sensor has the code to make it work with Cayenne
If you want to use a DTH 11 with ESP8266, I suggest you look for the appropriate link because in this topic I am showing you how to use an ultrasonic sensor.
In the site this indicated the procedure that must follow to install, but if you have doubts please write here again.
I also do not recommend using the ESP8266 with Arduino to measure humidity and temperature because you can do this with no problem using only ESP8266 and DHT11.
See in the drawing a simple way to connect the DHT11 in ESP8266, Search here that you will find several code, search for ESP8266 + DH11, if you do not find any, please let me give you a code
I hope I can solve it but if not, we are here to help until you can.