Here is a smart gadget that keeps pets out of restricted areas. The Amtek Scraminal uses heat and motion sensors to keep pets from off-limit areas in your home. It can cover an area of 10ft by 3ft.
This device trains pets to stay away from stoves, balconies, and other similar areas. It works especially well with cats.