Relays can control the on and off of lights, realize timed on and off, brightness adjustment and other functions, and can also work with sensors to realize intelligent control of lights turning on when people come and turning off when people leave. In smart home security systems, relays can be used to control the on and off of equipment such as alarms and cameras, as well as control the automatic opening and closing of doors and windows.