Lest we forget our current state of affairs wrt privacy, note:
If the police can access the data, they can use it to determine lots of things about you. For example, they can probably detect if there's a meth lab upstream from the current location, and use this as a guide for the placement of more sensors. Eventually they'll narrow it down to a single household, and know where the meth lab is.
They could do this with drug use as well. They could find evidence of, say, cocaine use in the stream and use this to place more sensors, then narrow it down to an individual household. Then see if the household member is in a critical job, such as ambulance driver or surgeon.
...or any job, really. They could just alert your employer to the fact that "someone in your household" uses drugs.
They could determine the ethnic profile of individual homes from the food eaten.
They could determine the health of individuals living in individual homes in several ways - detecting diabetes, or obesity, or diet for example. Insurance companies would probably want this information.
And legally, their response would probably be "you have no right to privacy for anything that you flush into the public sewers", or "just as with driving or flying, you can choose not to do it" or some such.
I can see a lot of benefit from doing this (sewer monitoring in India is being used to show that polio has been eradicated), but we really need to get a handle on the privacy implications from the start, before the big abuses begin.
This will be like video cameras: expensive at first, then ubiquitous. Look to see a sensor at the outlet from each home in a couple of decades.