For cables shorter then 3 meters the internal pull-up is enough. Not for the Mega though, you still need a 4k7 resistor. I think that the best place for the resistor is near the sensor. One thing I noticed is when the resistor is on the circuit board that a disconnected supply wire will make the sensor read a fixed temperature of 85 C.
Ed
After several changes I made to my setup like :
output sensor into smt172
boiler pressure sensor added
Boiler temp sensor into the liquid instead into the vapor pad.
Today the first run with this new setup,and after 2 minits vapor temp 2 alarm occured,after a reset a few minutes later again the same alarm,and I kept resetting this alarm over and over again.
There was no temperature as reson the run just started so no reson for alarm.
Than I skipped the sensor,still the same vent 2 alarm after a few minutes ,sometimes after only 20 seconds.
I did not know what to do next,break off the run ? or keep resetting,I chosed the last option,after a few hours I was getting nuts from this alarm,Than I kept the alarm menu on for a while,HEALTY that was shown,together with the boiler pressure and both vent temperatures.
After again alarm suddenly I realized what was wrong , for just a small moment there where lines on the display where normaly the vapor2 alarm temp should be ,and I realised the connection vapor sensor 2 to eparrot was a short time gone.
I remembered the discussion about to adding a resistor 4,7 kilo ohm or not,I spoke to Edwin and he confirmed he had this problem before.
So I stopped the run added a 4,7 kilo ohm resistor from +5 volt to data from the vapor2 sensor and started the kettle again,gues what NO more alarm.
So if you ever have this problem add the resistor.
Just as extra info I have a home network for years with this ds sensors with lines up to 20 meters with no resistors and never ever had this problem.
By the way the boiler pressure sensor worked fantastic no false alarm at all,and I can advise to add it for extra safety.
Cheers K3