For most of the global, A solar cell can do the same thing. It's really only in the most northern and southern regions that a solar panel becomes ineffective.
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.