Automatic detection in controlling methods of washing or rinsing machines for crockery or tableware