Can anyone suggest ways of attaching a DS18B20 temperature sensor to a hot water cylinder with foam lagging?
Cut a hole in the lagging and poke it in, you could always use some expanding foam to plug the gap afterwards ?
With a blob of silicone grease or heatsink compound to aid thermal transfer?
And a long elastic thing around the tank to hold it firm?
I have a clamp-on 'stat too (there isn't one in the immersion heater at all!) that's fixed with a strand of copper wire ending in a spring (and copper being the same metal as the tank so minimising the risk of corrosion - my tank isn't foamed either, in 1934 they didn't think it was necessary!).
Open-source tools for energy monitoring and analysis. This project uses the GNU General Public Licence