It’s not unusual for an old house to have an old doorbell lurking about somewhere that hasn’t worked in years. Fortunately, it’s likely a simple matter to get things back in working order. As illustrated in the above diagram, the parts of an old doorbell circuit include the bell, a button mounted at the door, and a battery somewhere in between the two.
Back at the source, the white neutral wire is spliced to the white from the fixture cable and to a pigtail, back to the receptacle neutral terminal. At the fixture the white connects to the neutral terminal on the light. The hot terminal on the light is connected to the red wire from the switch loop cable and the other end is connected to the top terminal on the switch.
Above is a wiring diagram for a standard, 3-way lamp switch. This socket is used with a three way bulb containing 2 separate elements that are energized separately and then together as the switch knob is turned, for varying degrees of light.
This wiring diagram illustrates wiring a light switch to control an existing receptacle outlet. The source is at the receptacle and a switch loop is added to a new switch. The hot source wire is removed from the receptacle and spliced to the red wire running to the switch. The black wire to the switch connects to the hot on the receptacle.