"potty training". Sorry.
Anyway a chemical or biological sensor in the bowl might be more useful.
Optical could be useful if it's doing spectrographic analysis: the color of poo and urine is sometimes informative.