Gas detection for biogas