This is what I'd do for a daylight sensor...if that's what you plan. Cheap and pretty easy. The Plexiglas window is to keep the critters out. The slanted end is to keep the opening clear in rainy and snowy conditions. The photocell and cable are mounted in the end cap. Pressing the cap onto the pipe should be enough to keep it waterproof, but removable. I would also paint the edges of the window to make them opaque This is so light, perpendicular to the tube, doesn't reflect off the window's interior surfaces and into the tube.
Ken