Interesting problem.
Let’s see, if we have a cylinder 12 inches in diameter and 8 feet high that would be
(pi*(0.5f)^2*8f)*7.48 g/ft3=47 gallons per operation.
At 3 GPM, that would be about 15 minutes to fill the cylinder all the way.
If it were used to lift a 6780 pound weight, 8 feet up, that would be 8*6780 foot pounds of work, in 15 minutes. That would be
(8 feet*6780 pounds/(15 minutes*60 seconds/minute) = 60 foot pounds per second.
Converting that to watts, we get
60 fps*1.36w/fps=81.7 watts in 15 minutes.
Converting that to watt hours, which is how the electric company bills, we get
81.7W*0.25 hours=20.4 WH or 0.0204 KWH.
Where I live, we pay about $0.12 per KWH so you are generating
(0.0204KWH*$0.12/KWH)=$0.00254 of electricity.
To do that, you need 47 gallons of water. In my area, we pay about $0.008 per gallon of water. That comes out to
47g*$0.008/g=$0.38.
If you use this 100 times, you will use 38 dollars of water to generate 25 cents of electricity.
But what if your water is free? In that case, if you run this continuously, it will cycle 96 times in 24 hours (15 minutes per cycle*24 hours) and use 96*47, about 4500 gallons of water to produce about enough to power to run a few LED light bulbs. If you can get the equipment for free and nobody is going to notice if your water consumption goes up to like 135,000 gallons per month, go for it. In the meantime, I suggest that if you start using that much tap water, somebody is going to notice and if it was not illegal when you started, it would be after a short time.