The battery is the weakest link here and should be the first place to look for trouble. The battery can be replaced with a large flashlight-type dry cell rated at 12 to 16 volts and if the wires are still intact and the contacts clean, the doorbell should come back to life.
Here a switch has been added to control an existing receptacle. The switch takes the hot from the middle receptacles. With this arrangement, all the other receptacles are wired directly to the hot source and the switch controls the middle outlet.
This drawing shows the wiring for adding a new light fixture using an always-hot receptacle outlet as the source. New cable is run from the receptacle to the new fixture location and a switch loop cable is run from there to the new switch location.
If you’re installing a new doorbell, a remote controlled device makes for the simplest installation and doesn’t require any of the circuitry illustrated on this page. All that’s required is to mount the button near an exterior door and the chimes in a convenient, central location inside the house. No need to run wires or splice into household circuits, fresh batteries are all that’s required.