Skip to content

Instantly share code, notes, and snippets.

@lordneon
Last active May 16, 2022
Embed
What would you like to do?
UK Light Wiring with Shelly 1

Intro

This is a simple guide on how to automate UK lights with a Shelly 1 by installing the shelly 1 relay into the ceiling pendant which has both permanent live, neutral and a switched live back from the wall switch.

These steps are from my own experience making my lighting "smart" but also user friendly (it works via a wall switch!). This simple guide will go through replacing an a normal ceiling pendant with one with room for a Shelly 1. If you have a ceiling light with a bigger base it's even easier.

Warning Electrical regulations must be followed by law. If you are not a competent person under the regulations do not attempt electrical work. https://www.diydoctor.org.uk/projects/electrical_safety.htm

Wiring Diagram

This diagram has been taken from here and modified to include the Shelly 1. Wiring Diagram

Parts Required

Steps

  1. First pre-wire as much as the Shelly as you can. 2. You want a two lengths of brown wire around 6cm which will be the LIVE in and the SW in (Switched live back from the light switch), a length of blue wire around 6cm for the NEUTRAL in. 3. Cut a small piece of wire to connect LIVE to I (Input). This is the power feed shelly will supply to your light. 4. It should now look something like the following, only O (output which goes to the lamp live) will be un-populated. Pre-Wired Shelly
  2. Install the shelly into the base of the new lamp and connect up the lamp wires. 3. Rember to reduce the length of the lamp wire so the pendant is at the correct height. 4. The red/brown live of the lamp should connect to the O(utput) of the Shelly 1. The shelly will only supply power when you want the light on! 5. The neutral of the lamp can be fitted into the N terminal of the shelly if there is room, otherwise you can put it into the neutral connector block you will be installing.
  3. It should look something like this: Shelly Connected in Base
  4. Time to replace the ceiling pendant. If the wiring seems strange and you don't understand it, do not go ahead and please consulate a qualified electrician.
  5. Turn off the lighting circuit you are modifying and ensure that nothing is live (ensure the light does not work and use a voltage detector around the base of the light)
  6. Once you have removed the lamp shade, bulb and unscrewed the pendant it should look like this: enter image description here
  7. Please make sure you know what wires are which, this is very important!
  8. In this instance it's a very basic ceiling rose as the room only has one light. There are two neutral wires, three permanent live wires and a switched live wire (a red sleeved neutral wire which returns from the wall switch).
  9. The ceiling rose has a built in connector block, in order to fit the shelly we are replacing this with a simply bracket which the ceiling rose cover fits to and using our own connector blocks instead of one built into a base.
  10. You need to disconnect the lamp, which connects to the switched live block and the neutral block. It should now look something like this: Ceiling Rose without Lamp
  11. Remove the base keeping the wires together, you will need 4 connector blocks (Earth, Live, Neutral, Switched Live). For each block you need support for N + 1 wires. For example, Live in the above example will need a 4 way, the switched live will need a 2 way.
  12. Install the bracket for the new ceiling rose it should look something like this (I had not put on the earth connector at this point) Bracket Installed
  13. Time to connect the lamp up. 14. Connect up the N(eutral) from the Shelly (which includes the lamp) to the Neutral connector block. 15. Connect the L(ive) from the permanent live block to the Shelly. 16. Connect the SW(switched live) input from shelly to the switched live (sleeved neutral) connector block. 17. Connect the earths of all wires AND the metal ceiling rose together.
  14. It should now look something like this, this can be very tricky as there's not much space! It's much easier with lights with large bases. Make sure all connections are secure! Wired Up Hanging
  15. Secure the cover to the bracket on the ceiling, being careful with the cables and ensuring they have room and that the cables are secure. It should now look something like this: Dangling Lamp
  16. Done! Install a bulb and time to turn the power back on.
  17. Use the Shelly 1 App to add the Light to your network, also configure the button action! I have mine set to "Edge Switch" so the wall switch will change the status of the light no matter the position.

Before and After pictures Before enter image description here

Home Assistant Integration

I use the shelly MQTT support to monitor and control the lights in real-time (no waiting on a HTTP poll). WARNING using MQTT will disable cloud functionality through the shelly app.

  1. Get the IP address of the Shelly through the Shelly App (Settings -> Device Information). Also make a note of your Device ID.
  2. In a web browser go to the IP address of the Shelly, under the "Internet Security" tab there is an "ADVANCED - DEVELOPER SETTINGS" toggle. Tick the "Enable action execution via MQTT" 3. Enter your MQTT server IP and port 4. Tick "Retain" this ensures that home assistant always knows the correct state.
  3. Hit Save!
  4. In your home-assistant configuration.yml put the following
    light:
	  - platform: mqtt
	    name: Some Light
	    command_topic: "shellies/shelly1-<DEVICEID>/relay/0/command"
	    state_topic: "shellies/shelly1-<DEVICEID>/relay/0"
	    payload_on: "on"
	    payload_off: "off"
  1. This is making the assumption that you already have your MQTT server configured. I personally use a separate MQTT instance instead of the built-in one as I have a lot of devices using MQTT.
  2. Done! restart home assistant and you should be away.
@lordneon
Copy link
Author

lordneon commented May 30, 2020

Yeah quite simple.

You want to install it by that plastic junction box (ideally get another bigger junction box).

Connect the incoming browns to L, again loop the L to the other L.
Connect the two outputs to 01 and 02 (or just to 01, splitting them allows you to control the lights individually)
For the neutral just put an extra cable in and connect it to the shelly.

Job done.

@FlashGordy85
Copy link

FlashGordy85 commented Sep 5, 2020

Hi there

Sorry for dragging up an old post, but it seemed the most relevant to what I'm looking for.

I'm looking to wire a Shelly Dimmer into a ceiling rose, however above my pendant lights I only have a three core cable with Earth, Neutral and Live. I've looked at countless shelly wiring diagrams, but for the life of me can't work out how to wire this in.

Are you able to help?

@lordneon
Copy link
Author

lordneon commented Sep 5, 2020

Hi there

Sorry for dragging up an old post, but it seemed the most relevant to what I'm looking for.

I'm looking to wire a Shelly Dimmer into a ceiling rose, however above my pendant lights I only have a three core cable with Earth, Neutral and Live. I've looked at countless shelly wiring diagrams, but for the life of me can't work out how to wire this in.

Are you able to help?

There will be a junction box before your light which has the wire going to the light switch on the wall, you will need to put the shelly in there in order to get a perm live and switched live.

See here, the final diagram on the page.
https://www.diydata.com/planning/electric_lights/electric_lights.php

@FlashGordy85
Copy link

FlashGordy85 commented Sep 5, 2020

Thank you - that makes sense.

It turns out I do have neutral wires in my switches. So I could put them in the switches if I have space.

Still not 100% on how to wire it so it's in parallel and give me with WiFi and physical switch.

I have L1, L2 and Com terminals on the switch, and all the neutral wires are connected to a single connector block.

@lordneon
Copy link
Author

lordneon commented Sep 5, 2020

Thank you - that makes sense.

It turns out I do have neutral wires in my switches. So I could put them in the switches if I have space.

Still not 100% on how to wire it so it's in parallel and give me with WiFi and physical switch.

I have L1, L2 and Com terminals on the switch, and all the neutral wires are connected to a single connector block.

Ahh neutrals in the switch, that is very handy.

What you need to do is put a terminal block in for the live feed, this will then fork off to the shelly to power that and still go to common on the light switch. Dont worry about L2 unless you have some funky two way switching on the go, just wire L1 into the switch input of the shelly.

The original cable in L1 (switched live). this is the feed to the light so connect that to the O output of the shelly.

@FlashGordy85
Copy link

FlashGordy85 commented Sep 5, 2020

Awesome thank you!

Does the neutral on the Shelly just need wired into the communal neutral connector block that's there?

One of the fittings I want to do is two way, but I'll have a bash at the one way switches first.

@lordneon
Copy link
Author

lordneon commented Sep 5, 2020

Awesome thank you!

Does the neutral on the Shelly just need wired into the communal neutral connector block that's there?

One of the fittings I want to do is two way, but I'll have a bash at the one way switches first.

Yes in summary:

Live terminal block -> Shelly (I)
-> Shelly (L)
-> Light switch (COM)
Neutral terminal block -> Shelly (N)
-> Whatever else is there

Original cable in L1 (Switched live to light) connect this to Shelly (O)
Then a new cable which goes from L1 to Shelly (SW)

For two way switching you really want to do it in the ceiling rose / potentially junction box in your case.

@FlashGordy85
Copy link

FlashGordy85 commented Sep 5, 2020

Great - thanks again for your help 👍🏻

@rdsaunders
Copy link

rdsaunders commented Jan 20, 2021

Good morning @lordneon

I've recently purchased a couple of Shelly 1's and would like to install them to switch the side lights in our reception rooms, there is just enough space to install them in our switch boxes and the wiring below is a reflection of what we see in both reception rooms. I was wondering if you'd be able to explain how i'd wire these in this situation, most diagrams online seem to show the ceiling rose example.

The brown cable covered in white paint is the constant live.

IMG_8636

The red border indicates the side lights. I should have ordered some Shelly 2.5s for these to do both side and main lights and may do so at a later date. I generally use the sidelights so not so much of an issue at the moment.

Any help you could provide would be gratefully appreciated.

@lordneon
Copy link
Author

lordneon commented Jan 20, 2021

Your lucky to have a neutral in your light switch!

So you need to put a connector block on that "constant" live.
Then connect it that to the L and I on the shelly and back to where it currently is on the light switch.

The top cable on the light switch needs to go to the O on the shelly as this is the power cable to the lights.

You will then need another cable to go from the top of the light switch(L1) to the SW input.

Obviously just connect the neutral to the N on the shelly.

Just check that the cable with the white paint is definitely the perm live with a multimeter (if you havent already done so).

@rdsaunders
Copy link

rdsaunders commented Jan 21, 2021

Thanks for your help on this. I have checked that permanent live today so that should be fine. Just ordered some WAGO connectors to terminate everything neatly so should be sorted before the weekend.

I’ll knock up a diagram once I’ve got it all together for others with a loop at switch configuration.

@SmartFarooko
Copy link

SmartFarooko commented Jan 23, 2021

Hi. I have a junction box installed somewhere underneath the floor board :(. So I have only three cables coming out to my ceiling pendant i.e neutral live and earth - so essentially my ceiling rose is in the junction box. How do you recommend I can connect Shelly 1 in this case?

@lordneon
Copy link
Author

lordneon commented Jan 23, 2021

Hi. I have a junction box installed somewhere underneath the floor board :(. So I have only three cables coming out to my ceiling pendant i.e neutral live and earth - so essentially my ceiling rose is in the junction box. How do you recommend I can connect Shelly 1 in this case?

You find the junction box and put the shelly in there. Hopefully your floor is not tiled... Otherwise look at the Shelly 1L which you can install in the light switch which can get away without having a neutral (works by leaking power through).

@SmartFarooko
Copy link

SmartFarooko commented Jan 23, 2021

Hi. I have a junction box installed somewhere underneath the floor board :(. So I have only three cables coming out to my ceiling pendant i.e neutral live and earth - so essentially my ceiling rose is in the junction box. How do you recommend I can connect Shelly 1 in this case?

You find the junction box and put the shelly in there. Hopefully your floor is not tiled... Otherwise look at the Shelly 1L which you can install in the light switch which can get away without having a neutral (works by leaking power through).

Thank you...I was hoping that Shelly 1 could be connected somehow to the three wires poking out of my ceiling :(

@lordneon
Copy link
Author

lordneon commented Jan 23, 2021

Hi. I have a junction box installed somewhere underneath the floor board :(. So I have only three cables coming out to my ceiling pendant i.e neutral live and earth - so essentially my ceiling rose is in the junction box. How do you recommend I can connect Shelly 1 in this case?

You find the junction box and put the shelly in there. Hopefully your floor is not tiled... Otherwise look at the Shelly 1L which you can install in the light switch which can get away without having a neutral (works by leaking power through).

Thank you...I was hoping that Shelly 1 could be connected somehow to the three wires poking out of my ceiling :(

You could still connect it, but you would have to leave your lightswitch on all the time. This sort of defeats the the main advantage of having a shelly over a smart bulb.

@SmartFarooko
Copy link

SmartFarooko commented Jan 23, 2021

Hi. I have a junction box installed somewhere underneath the floor board :(. So I have only three cables coming out to my ceiling pendant i.e neutral live and earth - so essentially my ceiling rose is in the junction box. How do you recommend I can connect Shelly 1 in this case?

You find the junction box and put the shelly in there. Hopefully your floor is not tiled... Otherwise look at the Shelly 1L which you can install in the light switch which can get away without having a neutral (works by leaking power through).

Thank you...I was hoping that Shelly 1 could be connected somehow to the three wires poking out of my ceiling :(

You could still connect it, but you would have to leave your lightswitch on all the time. This sort of defeats the the main advantage of having a shelly over a smart bulb.

COuld you please tell me how to wire this as I dont mind keeping the switch on. Its an led lamp anyways and I dont want to replace it with a smart bulb plus this is my first ever Shelly and I am itching badly to use it :D

@lordneon
Copy link
Author

lordneon commented Jan 23, 2021

Hi. I have a junction box installed somewhere underneath the floor board :(. So I have only three cables coming out to my ceiling pendant i.e neutral live and earth - so essentially my ceiling rose is in the junction box. How do you recommend I can connect Shelly 1 in this case?

You find the junction box and put the shelly in there. Hopefully your floor is not tiled... Otherwise look at the Shelly 1L which you can install in the light switch which can get away without having a neutral (works by leaking power through).

Thank you...I was hoping that Shelly 1 could be connected somehow to the three wires poking out of my ceiling :(

You could still connect it, but you would have to leave your lightswitch on all the time. This sort of defeats the the main advantage of having a shelly over a smart bulb.

COuld you please tell me how to wire this as I dont mind keeping the switch on. Its an led lamp anyways and I dont want to replace it with a smart bulb plus this is my first ever Shelly and I am itching badly to use it :D

It's the same wiring you just have no switch option.

So put a connector block on the live and neutral. Connect live to L and I. Unplug the lamp live from the connector and connect it to O on the Shelly. Connect up the neutral as well, job done.

@Toriniasty
Copy link

Toriniasty commented Mar 18, 2021

Would the same apply to Dimmer2? My Dimmer is flickering a lot, and I would like to check if the same would apply with N connected...

@lordneon
Copy link
Author

lordneon commented Mar 21, 2021

Would the same apply to Dimmer2? My Dimmer is flickering a lot, and I would like to check if the same would apply with N connected...

In regards to what?

Having a neutral connected for the dimmer would allow the shelly to complete it's circuit without going through the bulb which will be better. But it could just be the bulb which is the issue.

@Calzor-Suzay
Copy link

Calzor-Suzay commented Apr 25, 2021

Got to say this thread managed to help me install a Dimmer 2 into a new ceiling rose.
Took out the original rose, replaced it with a wider one along with wago connectors, Minigrid click mode momentary wall switches and hey presto Dimmable light with no drilling wall sockets out, HA integrated via MQTT.

Prior to this I was looking at putting the dimmers in the wall, having to dig out patress boxes, smart bulbs and leaving the switch on etc etc. Sorted, should of done this ages ago.

@Davidbastin
Copy link

Davidbastin commented Sep 12, 2021

Can anyone help or point me to the right direction. Want to fit a Shelly1 into a wall switch, space is good. The wiring system is simple but I can only find more complicated explanations. Many thanks.
IMG_2892
IMG_2893
IMG_2894

@lordneon
Copy link
Author

lordneon commented Sep 12, 2021

Can anyone help or point me to the right direction. Want to fit a Shelly1 into a wall switch, space is good. The wiring system is simple but I can only find more complicated explanations. Many thanks.

Check with a multimeter to be sure.

Assuming the top of the switch is the perm live loop and the bottom is switched live back to the light.

Connect shelly (N)eutral to the block of Neutrals (once you checked they are)
Put a connection block / wago in for the perm live, you will want at least 4 spots.

  • Connect the two perm live wires into this block
  • Connect one wire to the Shelly (L)ive input
  • Connect one wire to the light switch
  • Connect one wire to the (I)nput of the shelly OR put a small link from the (L)ive to the (I)nput as I did in my guide.

The switched live which was going to the light switch needs to go to the (O)utput on the shelly.

Finally, connect the remaining switch terminal to the (SW)itch input on the shelly. Remember, the switch is now an input to the shelly and no longer powers the light directly.

Good luck fitting it in! I'm renovating a house at the moment and I am install 47mm back boxes for shellies to make my life a lot easier.

https://imgur.com/a/MMqvox9 I made a terrible paint diagram if it helps.

@Davidbastin
Copy link

Davidbastin commented Sep 13, 2021

Hi. Great. So if the switch no longer powers the light would the ceiling mounting be a better option?

@lordneon
Copy link
Author

lordneon commented Sep 13, 2021

Hi. Great. So if the switch no longer powers the light would the ceiling mounting be a better option?

The switch is an input to the shelly. So it still works like a normal light switch, you can just choose how it works in the shelly app. I personally have it on edge mode, so whenever you switch the switch it will turn the light on if it's off and off if it's on.

It's exactly the same as the ceiling rose method. If you look at the first picture you can see the switch input goes to the (SW) input on the shelly.

@Davidbastin
Copy link

Davidbastin commented Sep 13, 2021

Many thanks for the help

@Alangers21
Copy link

Alangers21 commented Oct 31, 2021

Hi All. Have a Hall light that is controlled by about 5 (🙈) switches. Can't even think where a shelly1 should go so thought I'd put it at the ceiling light. Checked it today and can only see earth live and netual. I don't see any switch wire. See the pic attached. Any advice welcome? Have installed a few Shelly1 and 2.4s around the house in the past few months and this is the first one that has been a challange also the first thst is on more that a 1way switch.
IMG_20211031_164059
IMG_20211031_164040

I guess there is a junction box set up somewhere but have no idea were. It's possibly in the ceiling but can't defend pulling it down for a shelly 😂. All the switches have neutrals and space for shelly but doubt I can put it at the switch when there's so many switches to the light.

@lordneon
Copy link
Author

lordneon commented Nov 1, 2021

@Davidbastin
Copy link

Davidbastin commented Dec 10, 2021

@Captain0Kangaroo
Copy link

Captain0Kangaroo commented Mar 17, 2022

I'm looking to add a Shelly 1 into this switch. It's a garage light switch (fused) with another switch at the other end of the garage.

Any ideas how i'd wire this up?
274533159_10159647978603548_2406614357737847988_n

@lordneon
Copy link
Author

lordneon commented Mar 17, 2022

I'm looking to add a Shelly 1 into this switch. It's a garage light switch (fused) with another switch at the other end of the garage.

Any ideas how i'd wire this up? 274533159_10159647978603548_2406614357737847988_n

Assuming standard fused switch:
image

Identify the load side, this is the side going to your light. But check to see what else is on the circuit, as you will be switching it all on and off with the shelly.

You could just connect the shely inline on the load side.

Moving the existing "load" live out to the (O)utput on the shelly.
Add a new cable and connect the "load" live out to the (L)ive in on the shelly and the (I)nput.
Add an extra cable and connect the "load" neutral to the to the shelly (N)eutral.

Job done. The wall light switch wont work of course(you just need to leave it "on"), you would have to put it in a different place to have the switch work as normal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment