Preface

Firstly, this isn’t a guide and if you don’t know how to be safe with mains electronics then I do not recommend trying this your self. Electric is dangerous and if dealt with improperly can hurt or even kill you.

If you missed the previous post about this topic, you can find it HERE.

Ok, this took me a little longer to get to than I wanted, but I have now completed my desk lamp and my partner’s desk lamp. While small victories, it can be really useful. I no longer have to get up to turn off my desk lamp when I am on the couch, nor do I have to reach round the back of my desk to turn it off. When I don’t want to open home assistant to turn on a light, though, it is supper easy to use the switch as normal. With my partner’s lamp, I had to make two custom models which I will go into a little more detain on.

Part Two!

Starting with my desk lamp, this is how I wired it: image of shelly device with mains power cable pluged in. The device is enclosed in a black 3d printed case.

You will notice that I didn’t use a Wago and there is a very good reason for that… It just wouldn’t F*&“ing fit. I hate trying to get stranded wire into the Shellys, and it is made even worse when you are trying to get two in the same hole… I did manage, and I made it a little easier by using solid core wire for the switch. I fed the live from input to the switch and a wire from the live terminal to the input, meaning there were only two solid core cables to deal with. The switch wire was also solid core, but there was only that cable in the switch port anyway. The live in had to share with the cable going to input, but that wasn’t too bad. The worse one was the natural wires, two stranded cables going into this small hole. I ended up soldering the two wires together and then using heat shrink to keep them tight together. That worked but wasn’t the easiest thing in the world. I probably need to get some cable crimps so I can join two wires more easily.

While it might look like a bit of a mess, it is fairly well organised and works well.

My Partner’s Desk Lamp

image of shelly device with mains power cable pluged in. The device is enclosed in a black 3d printed case.

My partner’s one was a little different and required a little bit of 3D modelling. Instead of having the switch on the cable, this lamp has the switch in the base! Seems like a nice idea, right? Well, yes, but it was a bit more of a pain. Firstly, the base is made of metal with a metal bottom plate. Wi-Fi and a full metal case don’t really go well together. I wasn’t in the mood to remodel the whole lamp’s base, so I tried just the bottom plate. To my delight, that seemed to be enough. There were only a few revisions of the model. One was just me trying to get the hole positions right. The main change I had to make though was the little hole in the bottom, as the shelly was just a little too big for that to be a solid plate. I also ended up adding pocket holes, so the screws didn’t sit proud.

image of shelly device with mains power cable pluged in. The device is enclosed in a black 3d printed case.

The next issue to deal with was the switch. The original plan was to use the one already in the lamp, but that kind of got destroyed in the process of disassembly. It was all shrink wrapped up and the plastic was really fragile. If I had just used the wires of it, I probably could have used it, but it would have ment extending them and I don’t really trust my self to extend wires as I am not the best at that. Instead, I designed a little model that just slots into the base that has space for a little switch. It isn’t the best model in the world, but it works. Instead of having to use glue, I made sure that everything was just friction fit. Tbh, I made the switch a little too friction fit and when I installed it I put a little too much pressure on the switch. The switch still works but just feels a little lose when turning it one way and a little stiff turning it the other way. Though, it has eased as it has been used.

image of shelly device with mains power cable pluged in. The device is enclosed in a black 3d printed case.

This lamp also used stranded wire, but thankfully it was a little thinner. That made the process much easier than my lamp. Instead of having to do all these weird cable runs, I managed just to put all the cables in their normal holes. Also, there was a good amount of space in the bottom, which made cabling a little easier. image of shelly device with mains power cable pluged in. The device is enclosed in a black 3d printed case.

Conclusion

While a lot of this project isn’t directly applicable to your exact lamps, I wanted to illustrate that there is a lot you can do with the electrics you already have and some small purcheses. You don’t have to buy completely new lamps for a smart home, you can buy one of these smart relays and modify your existing devices. It is a really fun project and can save you a bunch of money on smart devices.

Also, while I used shelly devices for my lamps, there are lots of others to chose from and I would have a look around for what best suits you.