If you don’t put USB on your project, you have to decide on a programming header to use. But everyone does it their own way: Sonoff has theirs, wESP32 has another, many projects have them and they’re all different!
That sucks, so let’s fix it by deciding what we think should be the conventional programming header format for our projects.
My goals are:
- Define a convention for programming headers on ESP8285, ESP8266, and ESP32 boards.
- Use that header in our own projects, so that it becomes common and interchangeable.
- Lobby ITEAD to use the same header in future Sonoff models.
And the stretch goal: Convince Espressif to document it as a recommended header format for new ESPxx projects.
If we’re super-lucky, maybe we can convince ITEAD to fix the incomplete Sonoff programming header by adding RESET and GPIO0, and make all our lives easier in future.
Places to discuss this
- Sonoff programming header usage guide
- wESP32-Prog by Patrick Van Oosterwijck
- ESProg by iohippo
- ESProg by me
- ESP32 Programmer by Mike Rankin
- A different ESP32 / ESP8266 Programmer by Mike Rankin
- ESP Prog by Espressif
We need to decide on a physical format, and also whether to supply 3.3V or 5V to the target board from the programmer. The pins we need are:
Physical format options include:
- 1×6 0.1″ header
- 2×3 0.1″ header
- 1×6 2mm header
- 2×3 2mm header
- Something else? Ideas please!
The design considerations for the physical format include:
- Similarity to existing designs including Sonoff, wESP32, ESProg, and ESP32 Programmer
- Cheap and easy to use, with easy to source connectors
- Small footprint on the target device
- Perhaps leverage some existing standard such as P-MOD
- Ability to mount permanently as a sub-board in the project if required
Considerations for the choice of 3.3V or 5V include:
- Sonoff already requires 3.3V on the header
- 5V can be useful in some cases
- Switchable voltage would be possible, but could be dangerous and would lead to fragmentation of the convention
- Connection of programmer directly to VCC on target, compared to input of onboard 3.3V VREG
This has the advantage that it’s well documented, and many people have made adapters for it.
Already implemented on the wEPS32. 5V supply means the input can be diode-isolated from other supply sources on the board. 4 of the pins match the Sonoff header, except that Sonoff requires 3.3V so it’s not a perfect match.
wESP32-Prog header, but with 3.3V
This is the closest we could have to matching the Sonoff header while extending it to add the GPIO0 and RESET lines.
Documented by Espressif. Uses a 2×3 header, which is nice in terms of compact size. Unfortunately there’s no useful overlap with the ESP-01 header.
Doesn’t seem to match up with anything else in terms of pin order, but is perhaps the closest match electrically in a 1×6 format: all the necessary pins, with 3.3V supplied.
ESP32 Programmer by Mike Rankin
Nice 2×3 format header. If power was added this would be a nice format, but it doesn’t have anything to differentiate it from the ESP-Prog format from Espressif.
Other ESP32 Programmer by Mike Rankin
This one has a 1×5 header, which has all the pins we want except power.
The new Sonoff T4EU1C no-neutral touch switch seems to defy the laws of physics. It works with just a live wire, and doesn’t need a neutral wire.
How can that possibly work? And can we install Tasmota on it?
Let’s find out.
- View directly on YouTube
- Discuss on the SuperHouse forum
- Discuss on the SuperHouse Discord
- Sonoff T4EU1C: product page | buy online
- Tasmota firmware
- CoolTerm serial terminal for Mac, Linux, and Windows
- Sonoff Programming Adapter
- USB-to-Serial adapter with true 3.3V mode and built-in voltage regulator
No-neutral power connections
Traditional house wiring has an active and a neutral that meander around the ceiling to each light location, with the neutral connected directly to the light. The active comes down through the wall to the light switch, and then the output from the switch goes back up the wall to the active side of the light fitting.
This works well with passive switches, but most smart light switches need a neutral connection to power their own electronics. With only the active wiring going to the light switch, it can be very difficult to replace existing switches with smart switches.
Building codes in many countries now require that all light switches must have a neutral connection, but this is a recent change so most existing houses don’t have a neutral wire at the switches.
Smart light switches that are designed to be installed in place of existing switches and don’t require a neutral connection are generally called “no-neutral” switches.
The Sonoff T4EU1C is a no-neutral smart light switch with WiFi, so it only needs the active-in and active-out connections that are already found at most light switch locations. It operates by drawing a small amount of power through the light even when the light is turned off, so that it can run its own electronics.
The T4EU1C consists of two PCBs joined together by an 8-way header. The top PCB is the low-voltage logic board, which includes the processor, WiFi antenna, 3.3V voltage regulator, touch sensor pad and driver IC, and the programming header:
The bottom PCB is the high-voltage mains board, which includes a 12V-output mains power supply, and a relay and Triac for controlling the active output to the load:
Re-flashing the firmware with Tasmota
WARNING: There are problems running Tasmota on this particular model. It worked for me, but many other people have problems with the touch switch even when Tasmota is installed correctly. The rest of the Sonoff operates properly and it can be controlled by WiFi, but the touch sensor doesn’t work. There are a few people collaborating right now to figure out why this happens. If you’re feeling lucky, you can give it a try. However, it’s possible that you won’t be able to use the touch sensor until this problem is solved. There is ongoing discussion about it on the SuperHouse Discord server so please join in.
Just like all other Sonoff models so far, the firmware on the T4EU1C can be replaced with alternative open-source firmware to add new features such as local-network operation, MQTT, etc.
However, out of all the Sonoff models that have been released this is perhaps the most difficult one to re-flash. It can be done if you have the equipment and ability to make soldered connections to very tiny parts on the PCB, and this particular board also seems to have some strange requirements to force it into bootloader mode.
The common process for putting a Sonoff into bootloader mode is to hold the GPIO0 pin low (ie: to GND) while powering-up the board. In my testing, I found that this would result in the Sonoff appearing to accept the upload of the new firmware, but a strange checksum error would occur in the flash memory and it wouldn’t boot properly afterwards.
The process that I’ve found to work requires making a connection to the RESET pin as well as GPIO0, so that it can be put into bootloader mode after it has already been powered-up and connected to the programming adapter.
Re-flashing the firmware on the T4EU1C requires the usual connections to the programming header found on the logic board as shown in the picture above, plus connections to GPIO0 and RESET to force it into bootloader mode. Connection to the programming header is easy, because it’s exposed on the logic board in the same format as almost all other Sonoff models.
The difficulty is gaining access to GPIO0 and RESET, because neither of these lines are brought out onto pads for easy connections.
The most convenient place to make a connection to GPIO0 is the very thin track that runs diagonally on the top side of the logic board. Use a scalpel to carefully scrape away some of the green solder mask along the track. Be very careful that you don’t cut the track, and don’t scrape away the solder mask from the surrounding copper areas. If you do, it will be much harder to connect a wire to the track without causing a short circuit to the surrounding copper.
RESET is even harder. The only place it is exposed is on the end of a tiny resistor labelled “R3”, with a very small gap to an adjacent resistor. The connection must be made very carefully and quickly. If the resistor is allowed to heat up for more than about one second, the solder on the other end will also melt, and the resistor will move.
To control the GPIO0 and RESET pins, I soldered a pair of momentary buttons together and connected 3 lengths of very thin wire-wrap wire to them:
- The common (blue) wire is soldered to GND on the logic board.
- One switched wire (yellow, in my example) is soldered to the GPIO0 track after scraping off the soldermask.
- One switched wire (red, in my example) is soldered to the RESET line by attaching it to the bottom end of the resistor marked R3.
Be extremely careful when making these connections to the PCB. It’s very easy to damage the tracks or the parts, and if you don’t have the necessary equipment and skill to rework the board you may destroy your Sonoff.
Programming header connections
Use a USB-to-Serial adapter and jumper wires to connect the Sonoff to your computer. Make sure the USB-to-Serial adapter supports 3.3V mode, because the ESP8285 can be damaged if you connect 5V to it. The connections are the same as explained in previous videos:
In this case the power switch doesn’t matter, because we will use GPIO0 and the RESET line to force the Sonoff into bootloader mode.
The connections can be made with loose jumper wire, or you can use my Sonoff Programming Adapter which does the same thing.
The T4EU1C has the same pin assignments as a Sonoff Basic, so download the generic pre-compiled Tasmota binary.
Install the “Esptool” program, and open a terminal in the same directory as the Tasmota binary.
With the Sonoff connected to your computer as described above, and the buttons ready to assert GPIO0 and RESET, run Esptool as below:
esptool.py -p /dev/tty.SLAB_USBtoUART write_flash -fm dout 0x0 sonoff.bin
You may need to adjust the serial port address to match your computer.
Immediately after you press “enter”, follow this sequence:
- Press and hold both buttons that you have attached to the Sonoff.
- Wait about 2 seconds.
- Release the RESET button.
- Wait about 2 seconds.
- Release the GPIO0 button.
You should see Esptool immediately identify the processor on the Sonoff and begin uploading Tasmota. This entire process will take about 30 seconds. You should see output similar to this:
esptool.py v2.6 Serial port /dev/tty.SLAB_USBtoUART Connecting…….._ Detecting chip type… ESP8266 Chip is ESP8285 Features: WiFi, Embedded Flash MAC: 2c:f4:32:a8:18:8b Uploading stub… Running stub… Stub running… Configuring flash size… Auto-detected Flash size: 1MB Compressed 515872 bytes to 355877… Wrote 515872 bytes (355877 compressed) at 0x00000000 in 31.3 seconds (effective 131.7 kbit/s)… Hash of data verified. Leaving… Hard resetting via RTS pin…
At the end of the upload, Esptool will report 100% completion and say that it is resetting the board. However, it can’t actually reset the board because it doesn’t have any connection to the RESET line. You can press the reset button yourself, or disconnect the Sonoff from the programmer and re-connect it to cycle the power.
The Sonoff will then begin the normal Tasmota setup process, creating a WiFi network and opening a serial connection through the programming header. Follow the usual steps as shown in the Tasmota documentation to set it up, selecting “Sonoff Basic” as the module type.
The T4EU1C should then behave as expected, with control using the touch sensor on the front panel and also via WiFi.
ESP8266 / ESP8285 boot messages
If the ESP8285 didn’t enter bootloader mode properly, the Tasmota upload may have appeared to work in the previous step but the Sonoff still won’t boot. Esptool can show its normal upload progress, ending with the message saying it is 100% complete and resetting the board. But then when you power cycle or reset the board, it never comes online and you can’t tell why.
While booting, the ESP8285 outputs debug information to the programming header at the unusual baud rate of 74880bps. Most serial terminal programs can’t operate at that speed, because it’s not a standard baud rate.
The “CoolTerm” serial console is available for Mac, Linux, and Windows, and can be configured to support 74880bps.
Download and install CoolTerm following the instructions on its site.
After it has been installed, find where the binary is located on your computer. On a Mac, it’s typically inside the “/Applications” directory.
In that same directory, make a text file called “baudrates.ini” and put in the number “74880” without quotes or any other characters. Save the file, then start up CoolTerm.
You should now find 74880bps listed as a supported baud rate in the “Options” menu.
Select 74880 as the baud rate, select the serial port for your programming adapter, and click “OK”:
Click the “Connect” button to open the connection to your Sonoff, and then press the reset button on the Sonoff to force it to reboot.
If the ESP8285 has failed to boot, it will display an error similar to this:
ets Jan 8 2013,rst cause:1, boot mode:(3,0) load 0x40100000, len 27144, room 16 tail 8 chksum 0xef load 0x00000000, len 0, room 0 tail 0 chksum 0xef load 0x00000000, len 0, room 8 tail 0 chksum 0xef csum 0xef csum err ets_main.c
It will then hang, and won’t proceed any further.
If you see this message, there is an error with the program stored in flash memory and you should try following the steps above to flash the Sonoff again.
The new Sonoff Mini DIY and Sonoff S55 are (so far) the best Sonoff devices that ITEAD has made. Flash them with Tasmota, and they get even better.
- View directly on YouTube
- Discuss on the SuperHouse forum
- Discuss on the SuperHouse Discord
- Sonoff Mini: product page | buy online
- Sonoff S55: product page | buy online
- Tasmota firmware
- Tasmota templates site
- Sonoff Programming Adapter
- USB-to-Serial adapter with true 3.3V mode and built-in voltage regulator
- Sonoff Mini Programming Jig on Thingiverse
The original Sonoff Basic didn’t have any provision for an external button or switch. One of the most common hacks is to add a switch, so ITEAD decided to make it easy and put screw terminals right there on the Mini.
The Mini is also the smallest Sonoff model so far, which makes it ideal for retrofitting behind an existing switch. Combined with the screw terminals to connect the switch, the Mini is probably the best general-purpose Sonoff for anyone wanting to retrofit home automation to an existing home.
The S55 is an exterior-rated GPO (General Purpose Outlet) or power point. It allows you to have both local control of the power point using a button, and also control from your home automation system.
Both are nice devices, but they become even better when the amazing Open Source Tasmota firmware is installed on them.
Over the years there have been many methods developed to do OTA (Over The Air) replacement of the existing Sonoff firmware with an alternative such as Tasmota. However, I’ve found that these methods are either frustratingly complex or just stop working because ITEAD change things with new releases. I don’t even bother trying these methods anymore: I just go straight to connecting a USB-to-Serial adapter to the programming pins on the Sonoff’s processor. It can be tricky to get the connections sometimes, but it’s guaranteed to work every time single time.
Warning: Do not attempt to connect a programming adapter to any Sonoff model while mains power is connected. ALWAYS disconnect the Sonoff and power it ONLY through the 3.3V connection.
Install Tasmota on Sonoff Mini
The programming connections for the Sonoff Mini are provided on tiny flat pads on the bottom of the PCB:
The button on the top of the PCB is connected to GPIO0, so if you connect to GND, 3.3V, TX, and RX, you can put the Sonoff Mini into programming mode by holding down the button while connecting power from the programmer.
Unfortunately the pads on the PCB are very small, so soldering jumper wires onto them is tricky. If you have a small soldering iron and good eyesight (or magnification) you can solder wires directly onto the pads.
Just be careful you don’t apply too much heat, because the pads can come away from the PCB!
To get around that problem I used my 3D printer to make a programming jig using a design published on Thingiverse. This programming jig uses “pogo pins”, which are spring-loaded pins that can make temporary connections to a PCB. Pogo pins come in a variety of sizes and shapes. I used P75-B1 pins, which means they have a 0.75mm diameter pin with a simple conical point:
This design has 3 parts: a base that holds 4 pogo pins, a small spacer that slips over the pins to help keep them aligned, and a top that goes over the pins and then provides alignment guides for the Sonoff Mini.
I used super-glue to attach the top to the base, once I’d checked everything was aligned:
The Sonoff Mini can be attached using an elastic band:
The pogo pins push against the pads on the PCB:
Hold down the button on the PCB while plugging in the programming adapter to force the Sonoff to go into programming mode, then you can use Esptool or whatever other method you prefer to load the Tasmota binary. In my case I used Esptool, and the command looked like this:
esptool.py -p /dev/tty.usbmodem141101 write_flash -fm dout 0x0 sonoff-6_6_0.bin
However, this command is specific to the USB port that I used on my computer. You may need to adjust the command to suit your needs. This is all documented well on the Tasmota site.
Because the Sonoff Mini has different pin arrangements to a normal Sonoff Basic, and it’s designed to use a normal switch instead of a button, you need to load a special configuration for it.
After you’ve been through the normal Tasmota setup process and connected it to your WiFi as described in the Tasmota docs, go to the Tasmota templates site at blakadder.github.io/templates/ and search for “Mini”. You’ll find a template that looks like this:
In the Tasmota interface, go to Configuration -> Configure Other and paste the template into the “Template” field.
Make sure the “Activate” check-box is ON, then click “Save”.
Your Sonoff Mini will now operate as expected, with the external switch operating in the normal way.
Install Tasmota on Sonoff S55
The Sonoff S55 doesn’t have a “DIY mode” jumper, so that’s not an option. Luckily, the usual programming header is provided on the PCB ready for you to solder on wires, solder on a header, or just press connections against it. The button for external control is linked to GPIO0, so it’s very easy to put it into programming mode.
The header is in the normal 0.1″ pitch so it’s large enough to solder on a header directly. There’s no need to use a complex pogo pin programming jig.
Solder some hookup wires directly onto the pads, or solder on a header:
I soldered a 4-way 0.1″ header socket onto the pads, with the pins bent a little sideways to make the head sit almost horizontal with the PCB. This makes it easy to plug in a Sonoff Programming Adapter, or use jumper wires to your own USB-to-serial converter.
Hold down the GPIO0 button while you connect the programming header to put it into programming mode, then follow the normal instructions for installing Tasmota. This is very well documented on the Tasmota site.
There’s no specific device profile for the S55 in Tasmota, but it uses the same pinouts as the Sonoff S26 and other mains-plug adapters. Simply select “Sonoff S2x” as the module type in the configuration interface, and it will work as expected.
I’ve resisted for ages, so viewer Lorenzo took matters into his own hands and set up a Discord server for SuperHouse 🙂
Within 24 hours of being announced, there are now more than 200 people on the server! To join the discussion about SuperHouse projects, home automation, MQTT, Home Assistant, OpenHAB, Tasmota, and many other things, go to this link for an invitation:
Livestreams are back! My new Internet connection is working, so it’s time to warm up the camera and get back into live-streaming.
EAGLE’s “managed libraries” feature and its Fusion 360 integration are two of the biggest and most important changes to EAGLE in years, but they’re still very frustrating to use and a bit rough around the edges. The first time I tried using managed libraries I almost rage-quit in frustration, but now that I’ve figured out the magic workflow I’ve come to love them.
To demonstrate both managed libraries and Fusion 360 integration, I’m going to take one of my older designs (the Freetronics EtherTen) which hasn’t been touched in years, and give it a major makeover:
- Replace all the parts in the design with parts in managed libraries
- Make sure all the parts have associated 3D models
- Sync the design with Fusion 360 so it can be used as the basis of a 3D design
Come and join me at 9am Saturday morning (Melbourne time, GMT+10) to see how badly I can stuff this up! Subscribe and click the bell icon on my channel to be notified when the livestream starts:
My original design for the Sonoff Programming Adapter had a power switch on it, but the switches turned out to be rubbish quality so I put on pin headers instead.
Now I’ve updated the design based on feedback in the forum, so they’ll have a normally-closed button in the power line and will ship with both a socket and a pin header so that you can decide which one you want to install.
The Sonoff Programming Adapter page will be updated soon with the new model.
Colin Hickey has an interesting YouTube channel that features some of his cool home automation projects. What I like about his videos is that he doesn’t just show the end result: he goes through his setup step by step so that you can do the same thing yourself.
If you go back through his videos you’ll find plenty of fascinating information about his home-made PowerWall and battery management system.
His latest video should be interesting to anyone who has an iLife robot vacuum cleaner, so check it out and make sure you subscribe to his channel:
WiFi is a critical part of most home automation systems, but many people simply install the WiFi router that came with their Internet plan and forget about it. However, setting up a good home WiFi network that will handle dozens of IoT devices and still keep your home secure takes a bit more work.
- View directly on YouTube
- Discuss on the SuperHouse forum
- UniFi Network Controller software download page
- “Ubiquiti all the things: how I finally fixed my dodgy wifi” by Troy Hunt
- “Wiring a home network from the ground-up with Ubiquiti” by Troy Hunt
- J1900 nano-ITX motherboard (available from many sellers, both with and without a case)
Planning your network
The typical home network uses an all-in-one router to provide many different network services, including:
- WiFi access point
- Ethernet switch
- Media streaming
- VPN server
- DNS resolution
- DHCP server
- Printer sharing
- File serving
- … and more
This usually results in a network topology that looks like this:
All-in-one WiFi routers try to do too much, so they end up being terrible at everything.
Well structured networks generally separate critical services into different devices that are optimised to do that job, and do it well. Access points don’t try to be file servers, and DHCP servers aren’t Ethernet switches.
Learning from the way that small corporate networks are structured is a great way to improve your home network and improve its reliability, performance, and security.
A better way to structure a home network is like this:
To convert the typical network into the improved network, we’re going to make changes in a series of steps.
For this tutorial I’m using parts from the UniFi range from Ubiquiti Networks, which is a range of networking products designed to be installed across small to medium corporate networks. It uses a management system that provides a single interface to control all your devices, even if they’re installed in physically separate locations.
The specific devices that I installed included:
- 1 x UniFi Security Gateway
- 2 x UniFi UAP-AC-Pro access points (probably should have got Nano HD though)
- 1 x Raspberry Pi 3 B+ (or you can use a UniFi Cloud Key)
- 1 x UniFi US-8-60W 8-port managed Ethernet switches (not shown in this episode: will feature in Part 2)
- 2 x UniFi US-24 24-port managed Ethernet switches (not shown in this episode: will feature in Part 2)
Step 1: Set up management system
Ubiquiti Networks provides management software called UniFi Network Controller. It has a web interface, so you run the UniFi Network Controller software on a computer somewhere on your network (or even outside your network) and then access it using a web browser.
The UniFi Network Controller can be run in three different ways:
- On your local computer. You can download the software and run it on your Mac, Windows, or Linux computer. This is a great way to test it out and see how it works, but if your computer is turned off the management software will also stop running. If you have a computer that you leave on all the time, such as a home media server, you can run the UniFi Network Controller on it. Download it for your computer from Ubiquiti Networks.
- On a UniFi Cloud Key. This is a tiny embedded computer a bit like a Raspberry Pi, which comes with the UniFi Network Controller software preinstalled. You just plug it into your network, open a web browser on your own computer, and log into it. The Cloud Key is a low-power device so you can leave it running continuously.
- On a Raspberry Pi or other low power computer. This is what I’m doing. A board such as a Raspberry Pi B+ has plenty of power to run the UniFi Network Controller and still do other things as well, such as run PiHole or other services. Effectively this is just like a DIY version of the Cloud Key, but it’s cheaper and you can do other things with it.
Step 1a: Install Raspbian on a Raspberry Pi
Start with a standard installation of Raspbian, and update all the packages in the usual way. I won’t go into detail of this because it’s very well documented elsewhere. You can either follow the official guide to installing OS images, or use NOOBS to install Raspbian.
Step 1b: Change network settings and password
After installation, make sure your Raspberry Pi is connected to wired Ethernet (not just to WiFi) and log in to the Raspberry Pi as the default “pi” user. The default password is “raspberry”.
Set a static IP address so that the Raspberry Pi will always boot up with the same address, to make it easier for you to log into it in future. Do this by editing the file /etc/dhcpcd.conf:
sudo nano /etc/dhcpcd.conf
Go to the bottom of the file, and add lines similar to this:
Those particular settings suit my network, which has the gateway running at 192.168.1.1 and also providing DNS resolution. You may need to change the values to suit your network.
Press Control-X to exit, then save the file.
Now run the “raspi-config” utility:
Use the menu system to select “Change User Password”, and set a strong password.
Then go into the “Hostname” section, and change the hostname from “raspberrypi” to something more specific. I changed mine to “controller“.
Exit from raspi-config, and allow it to reboot.
A minute or so later your Raspberry Pi should come back up on the network. Now it will be at the IP address you specified above, it will have hostname you set, and the password will have changed.
Step 1c: Install UniFi Network Controller software
Install the haveged daemon to provide a good source of entropy. This isn’t essential, but it will help the UniFi Network Controller boot up faster, because it will be able to generate cryptographic keys more quickly:
sudo apt install haveged -y
Install a version of Java that works nicely with the Controller:
sudo apt install openjdk-8-jre-headless -y
Add the Ubiquiti Networks software repository and GPG key:
echo 'deb http://www.ubnt.com/downloads/unifi/debian stable ubiquiti' | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.list
sudo wget https://dl.ubnt.com/unifi/unifi-repo.gpg -O /etc/apt/trusted.gpg.d/unifi-repo.gpg
Those lines above may have wrapped in the browser. It should be 2 lines, with the second line starting with “sudo”.
Now update the list of available packages, and install the UniFi Network Controller package:
sudo apt update
sudo apt install unifi -y
In future you can update the Controller package just like you would with any other Raspbian package. If you regularly update your Raspberry Pi using the following commands, it will stay up to date along with all the other packages:
sudo apt update
sudo apt dist-upgrade
Step 1d: Log in to Controller software
After the installation finishes and the Controller software has finished booting, you can log in using a web browser. Use your browser to open the IP address you configured for your Controller, but make sure you prefix it with “https” and use port 8443. With the example configuration I gave above, the URL is:
Your browser will complain because it doesn’t trust the SSL certificate being used by the Controller. You can click through and load it anyway.
Step through the setup wizard and answer each question. There aren’t many questions and they’re fairly simple to work out. You can skip the WiFi configuration and do it later, as I show in the video.
Click around and explore the Controller interface if you like. There won’t be anything much happening in it because there aren’t any devices configured.
Step 1e: Plan your access point placement
The UniFi Network Controller has an interesting feature that lets you create a plan of the physical layout of your house, and place network devices on the plan. It can then use obstructions such as walls to do estimates of the signal strength in different parts of your house.
Go to the “MAP” menu item on the left, and you’ll see an example map. Edit the example or create a new map and upload a plan of your house, then use the Map Designer tool to draw lines where all your walls are located. Place access points, turn on coverage display in the “Layers” menu, and experiment with different locations for your APs.
Step 2: Replace all-in-one router with dedicated router
If your Internet connection uses a technology such as ADSL, or Cable, or optical fibre, you need to have it terminated in a way that gives you a simple Ethernet connection. A device that does this is called a Network Termination Unit, or NTU. The NTU is specific to the type of connection that your ISP provides.
In some cases, your ISP will have provided an NTU so that you can simply plug your new router straight into it. If that’s the case, you can skip ahead to installing your dedicated router. I’m going to use a UniFi Security Gateway (USG) as my new dedicated router for the rest of this example.
I have a Cable internet connection that comes in on coaxial cable, so it needs a device to convert the coaxial connection into an Ethernet connection. Instead of using an NTU, I used the original Telstra Gateway Max that was provided by my provider, and changed its configuration to put it into “bridge” mode.
Bridge mode is a simplified mode that turns off almost all the features of your existing router and turns it into a dumb adapter that just passes data through without trying to manage it. Effectively this is like taking a router and giving it a lobotomy to turn it into an NTU. This will also disable any WiFi functionality, so it won’t be useful as an access point anymore.
The specifics of how to do this depend entirely on your ISP setup and your existing router, so I can’t provide instructions here.
Once you have converted your ISP’s router into a bridge or replaced it with an NTU, it won’t provide any of the normal services that you need such as routing and DHCP. That will now by done by your dedicated router.
Disconnect everything from your existing router except the ISP connection.
Use an Ethernet cable to connect the “WAN” port of your new router to one of the “LAN” ports of the old router. The connection will then go:
Your ISP -> Your NTU / bridge -> New router [REPLACE WITH IMAGE]
Connect from the “LAN” port of your new router to an Ethernet switch, so that you have somewhere to connect wired devices to your network. This will include the Raspberry Pi that is now running the UniFi Network Controller software!
ADD IMAGE HERE
Turn on the new router, wait for it to start up, and then go back into the management interface on the Controller. If you’re using a UniFi compatible router such as the UniFi Security Gateway (USG) that I show in the video, the Controller should now see that you have a new device on the network. You can “adopt” the new device, which sets up a secure communication link between the Controller and the USG.
The rest of the setup of the gateway is done through the Controller interface. There’s no need to log in directly to the USG itself, because it receives its configuration from the Controller.
Step 3: Install dedicated access points
Ubiquity specialise in WiFi, so they have a huge range of access points available. In my case I stuck to the UniFi range because I wanted APs that could be managed using the UniFi Network Controller. I chose UAP-AC-Pro models because they seemed the best for my needs, but I’ve been told that I probably should have got the nanoHD model instead.
The particular APs that I got use PoE (Power-over-Ethernet) instead of plugging in a power supply directly. This means you can run a single Ethernet cable from your Ethernet switch to your AP, and the AP will take its power from the cable.
If you have a PoE Ethernet switch, there’s nothing else you need to do. Just plug in the cable, and the AP will receive power.
If you have a non-PoE switch, you can use a POE injector mounted near the Ethernet switch as an intermediary, to provide the power source. My APs came with PoE injectors included in the box, but some models of UniFi AP can be bought both with and without the injector in case you already have a PoE switch.
If you want a bit more background on Power-over-Ethernet, I did an introduction to it way back in episode #3! Check it out here:
I also wrote a tutorial about it on the Freetronics site:
Once your APs are plugged in and powered up, go back into the UniFi Network Controller interface to find them listed as new devices. You can then adopt them, just like you did with the Security Gateway.
However, don’t configure them directly unless you want to achieve something specific. The simplest thing is to leave them on default settings, which allows them to inherit the settings that you can apply to the entire site. In this context, “site” means your physical premises. The UniFi Network Controller is designed to scale up to installations with many devices across many physical sites, such as a group of remote branch offices, all managed through one central interface. For domestic use, you’ll probably only have one site.
To create a WiFi network that will be advertised through your fancy new access points, go to the “SETTINGS” menu item in the very bottom left of the Controller screen, then select “Wireless Networks“.
Click “CREATE NEW WIRELESS NETWORK“, and enter the details:
- Set “Name/SSID” for the WiFi name that you want.
- Leave the “Enabled” box ticked. Obviously!
- Change the “Security” setting to “WPA Personal“. This is the common authentication type that most domestic WiFi networks use, with a single shared password for all devices.
- Type the WiFi password that you want to use in the “Security Key” box.
- Leave “Guest Policy” un-ticked, unless you’re specifically creating a guest network. Your first WiFi network will almost certainly be a normal network, not a guest network.
You don’t need to worry about the ADVANCED OPTIONS section for now. We’ll be coming back here in Part 2, when we look at more advanced things that you can do to improve the security of your network and provide compartmentalisation for troublesome devices.
Click the green SAVE button, and your new WiFi network will be created. This will also be automatically applied to all the access points that you have linked to your Controller, so it will become visible and you’ll be able to connect devices to the new network.
That’s all for now, but come back for Part 2 where I’ll show you how to apply more advanced concepts to really make your home network the best it can be.
Defeat package thieves with a combination of technology and steel!
Having packages stolen from your doorstep can be a big problem in a normal suburban neighbourhood, but when your front gate is at the end of a very long driveway in a remote area it’s even worse. Your packages could sit exposed by the side of the road for hours when you don’t even know they’ve been delivered.
SuperHouse forum member Guru_Of_Nothing was sick of package thieves taking his deliveries, so he’s started building a super-strong, high tech package vault:
The design is very clever because it covers various contingencies, including being able to open the box mechanically if there is a power failure, and handling multiple deliveries in a single day.
This is just the start of the project, so follow Guru’s progress on the forum at https://discourse.superhouse.tv/t/a-new-item-to-automate-the-mailbox/245/9
I’m treating myself to a looooong weekend, so I won’t be shipping any orders for the SuperHouse and Freetronics online stores for a few days.
I’ll be shipping again from next Wednesday, so if you place an order now I’ll ship it then.