I need to measure the temperature in a terrarium and use that as an input to a temperature controller. The terrarium is quite humid, e.g. above 80%. Also the packaging should have minimal thermal mass, in order not to hinder the temperature controller, causing overshoots.

The sensor is a [1-wire IC](http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf) 

![enter image description here](https://i.stack.imgur.com/fXBiw.jpg)

I have solved this problem by the means of hot silicone - first I solder the 3 leads of the chip to the wire, then I pour liquid silicon until no cavities are visible.

To my surprise, this does not work. The mean time between failures is 1 month. The microcontroller just begins reading a different, fixed temperature. I have another sensor, mounted in a dry box, that I use for sanity check. Therefore, I am sure that exactly the sensor fails.

How should I handle this in a DIY environment (i.e. not industrial)? Is there a more clever approach or just a correct technique to apply glue for waterproofing individual ICs?