Automatic chemical dosing device