Making an IoT-based intrusion detector