Depends on how accessible the pipe is. Consider that such a sensor needs to report data. If it's isolated enough then you need to run a transmission line anyways just to get at that data.
If we are talking about a basement with pipes, then power isn't likely too far away.