sounds like user sound settings since sudo is a different user then pi.What the heck?
if those commands work from the terminal then it should work from the python unless something else is triggering the screen to wake up and not the motion detector.
in Config.py if you set
config['flowmon.debug' ] = True
then it will log out when motion is detected.
You may want to switch dispatch.debug to false to reduce logging when looking for motion detection issues.
config['dispatch.debug' ] = False#True
i wonder if your flow is too strong, kicks are triggered slightly differently than pours. The pin has to go high-low-high in the same millisecond to count towards a kick then the kick count has to reach the threshold. Intertwined with the kicks would be pours counts which is probably why you are seeing them back to back.I was trying to find the threshold that triggers the kicks as it is way too low for Swissflow meters.
Maybe look at your old sketch to see how it counted pulses, in the new one its in pollPins, maybe just removing the check for same millisecond (~line 340) and count everything as a pour tick (since your ignoring kicks anyways).
I know the original uses interrupts to count pulses but i found that doing that would mess with the timing of doing other things like flashing the LED and RFID checking.