Invisibly making a lamp smart

A Shelly smart relay can be used to upgrade an existing light without sacrificing the original toggle switch. This is a great feature, which lets me add lights into my smart home system, and still be able to use the traditional controls. I think it is important for the smart integration to be invisible, so for example my young daughter doesn't have to understand or be aware of my smart home setup. This project is about achieving the same thing with a lamp. A lamp with a typical physical switch control, and hidden remote capabilities.

  1. Lamp
  2. Shelly Smart Relay (e.g. Shelly 1 or Shelly 1 Mini)
  3. In-line torpedo style switch
  4. Multi-core cable

In the above video it appears that the lamp has an in-line torpedo style switch which controls the power to the bulb, but this can't be true, as we can still turn it back on remotely using a Shelly button! The secret here is that there is a Shelly relay hidden in the lamp's base, and that the switch isn't really wired up to be in-line.

Switch wiring (standard)
Switch wiring (standard)
Switch wiring (for Shelly relay)
Switch wiring (for Shelly relay)
Lamp wiring
Lamp wiring

The left diagram above show the typical wiring scheme for a single pole in-line switch using three core cable. In this case the switch housing can accomodate a ground wire, but this isn't always needed, as many lamps are fully insulated. On the right hand diagram I have discarded the ground wire, and used used a 4 core cable into the top of the switch. This makes it possible for the live and neutral wires to pass straight through the switch housing, while leaving another two wires to connect the switch into a circuit which loops back into the lamp's base. A Shelly relay can then be wired up in the lamp's base in the standard way.

Inside the switch
Inside the switch
Inside the lamp
Inside the lamp

This design is simple to put together, but requires careful selection of components:

  1. The plastic housing of the switch must have enough space in it to allow two wires to by-pass the switch mechanism in addition to the two wires connected to the switch. I have found both single and double pole switches where this is possible. If a switch has space for a ground wire to one side, and has also been designed to look symmetrical it will probably work. I used an ElekTek switch from Buy It Better.
  2. The multicore cable needs to have at least four cores, and needs to be thin enough to fit into the switch, while being thick enough to cope with the potential loading of the circuit. I used a 0.5mm2 multi-core cable which worked perfectly.
  3. This design can only be used on fully insulated lamps as it won't be possible to ground it. The lamp must also be switched on the wire, and have some kind of void in it to hide the relay.