How I Built A Deck With Built In Home Assistant Controlled Lighting

Date: October 2, 2019

As part of the deck that we built in the house that I live in I wanted to have built in LED Strips that I could control from Home Assistant, the deck is in between the house and some retaining walls so I planned on putting a strip of LED’s between each post off the wall, a strip underneath the breakfast bar and a strip on each step. My plan for controlling the leds was to run 240v ac cables to near the start of each strip of leds and switch the high voltage with a 4 channel sonoff wifi switch I bought the Led Strips from AliExpress and most of the other supplies came from the local hardware store

I bought 3 of these Led Strips at 5 Meter lengths, as it was cheaper than buying 1 meter strips, in white with IP67 water resistance. Deckimage18

The Eletrical Conduit Tubes and Conduit Corners along with other mounting hardware to run the 240V cables underneath the deck were just bought from the local Mitre10 in roughly estimated lengths. Deckimage1

To connect the Leds up we used lots of speaker wire (I belive this is the right product) and terminal strips Deckimage19

I bought two of these Small Power Supplies because the led strips pull 3.84 Watts/m meaning 30 Watts is sufficent for the stairs and under the breakfast bar and a Large Power Supply to power the long strip on the retaining wall, To switch the wall power I bought a Sonoff 4ch R2 which in hindsight I could have got an esp8266 and a relay board for much cheaper but this was much easier to install as it is all in one package, I didn’t want to use the default firmware that the sonoff comes with so I bought a USB to TTL adaptor to flash it with these instructions which after powering it up with wall power was still showing the factory firmware hotspot so i did a factory reset by holding down channel 4 for 40 seconds and from there it was a normal tasmota setup

First we ran a conduit from below the outdoor powerpoint already on the exterior of the house into a t-junction on the retaining wall. Deckimage Deckimage

From the t-junction we ran conduit to both ends of the retaining wall. Deckimage Deckimage

We then ran a second conduit from the outdoor powerpoint to where the breakfast bar is. Deckimage Deckimage Deckimage Deckimage

We pulled all four of the cables up into an enclosure with the Sonoff switch in it Deckimage

The Aluminium profile was mounted to the underside of the bar and retaining wall with the clips that came with them, on the retaining wall at each end we drilled holes to run the wires through. Deckimage Deckimage Deckimage

On the stairs the strips were mounted by just putting screws through the back of the profile into the steps Deckimage

As I bought the led strips in three long rolls of five meters each I had to cut up the strips to the right lengths to fit in between the bays and on the stairs which was a challenge as the strips of leds that I bought were divided up into about 5 cm sections that can only be cut at certain points and solder on wires to the pads to be able to connect by scraping back the rear of the lights, I tried to keep the connections watertight by putting heatshrink over them Deckimage Deckimage

Test fitting and running the leds before clipping the profile back on Deckimage

Leds in place being powered by a old 12v landline powersupply which was grossly underrated if we were to run the whole strip off of it Deckimage

The power supplies for the Wall and Stairs all wired in Deckimage

Uh Oh.. I hit a majour snag here by making a stupid mistake, can you see it? Deckimage

As I was putting boards on the bar I put screws through the conduit and cable from both sides connecting live and ground with one and ground with neutral, this was only discovered when using a multimeter to test continuity between the cores to see which wire ran where, luckily the copper wasn’t broken and it was wrapped up with eletrical tape. Deckimage

The aftermath, due to having to take the bar off and breaking several screw heads in the process Deckimage

The powersupply for the bar properly mounted without putting screws through the conduit Deckimage

Wiring up mains into the sonoff enclosure, we took power from the outdoor switch, ran it back up the wall to a switch and back down into the enclosure Deckimage

We added a manual override with a extra light switch we had left over incase we needed to reboot the sonoff or cut the power for safety without having to kill everything else on the breakers circuit Deckimage

The final wiring of the sonoff before the lid was put on Deckimage

Here are the photos of the glorious completed product Deckimage Deckimage Deckimage Deckimage

Here is how they are configured in home Assistant Deckimage