as soon as we close the door the lights and fan gets off and it can be made as a choice that whether the light should be in on or off condition even after closing the door this can be controlled using iot. Through iot we can activate the relay connected to fan or light.
Components
1×
relay
Power Supplies / Uninterruptible Power Supplies (UPS)