GetWired

A complete solution for easy-to-use and affordable wired home automation

Feb 17, 2020

Project update 5 of 13

Quick Launch Guide

by Sławomir Kiwała

Despite the fact that our description of GetWired is quite long (though hopefully not too boring), it is nonetheless missing certain practical details about how to use the various GetWired modules. We believe that many of our backers and potential backers are curious about those details, and this update seeks to provide them. To that end, we have produced a Quick Launch Guide for the GetWired Basic Bundle.

Necessary tools and equipment

Contents of the GetWired Basic Bundle

The Basic Bundle gives you the opportunity to test all current GetWired designs for the reasonable price of $130, which makes it a good entry-level proposition for anyone who wants to get acquainted with our affordable, open source, wired home-automation system. We strongly recommend adding a Programmer, Adapter, and Wires purchase to your basket as well. It will greatly facilitate your GetWired experience.

To the point, then. A Basic Bundle provides:

Contents of the GetWired Basic Bundle

The Programmer, Adapter, and Wires will add the following to your collection:

GetWired Programmer & Adapter

Other Important Gear

While our bundle includes all of the GetWired-specific products you will need to test our hardware, doing so will certainly require a few additional items. Fortunately, you can find most of this equipment online or in your local electronics shop or hardware store.

What we can do is provide a shopping list. So let’s have a look.

Making Enclosures

As mentioned in our previous update, we decided not to offer enclosures through the campaign, but to provide 3D-printable designs instead. You can now download those designs from our GitHub repository.

If you are following along at home, please download all of the .stl files and 3D print them as follows:

That will give you an enclosure for each board in the Basic Bundle. For the Gateway enclosure, you will need some hardware. We use:

We also recommend gluing the Gateway’s LED Panel to the top half of the enclosure.

Various 3D-printed GetWired enclosures

Buying Supplies

You will also need to find a few things at your local electronics shop or hardware store (or buy them online).

Power Supplies & Wires

Receivers

For the RGBW Module

You will need:

For the 2SSR Module:

You can use any AC light bulb or any roller shutter that does not exceed the 2SSR Shield’s maximum load. You will be working with AC power here, which can be dangerous. If you are not confident with that kind of voltage, please ask a qualified electrician for help!

Items you will need from an electronics shop or hardware store

The following tools will be exremely helpful during the assembly process, so you might also want to pick up:

Helpful tools

Wiring Things Up

Now that you have everything you need, let’s get down to it. This is where the real fun begins! (Though, if we’re honest, it’s all quite straightfoward. If you’re looking for more of a challenge, feel free to work in the dark until you get those LEDs working.)

Connecting GetWired Hardware…

Let’s start with the bus cable. You will need two pieces of wire, one for each module in the Basic Bundle. After cutting the wire into pieces (if this is a test run, try to keep the pieces short for your convenience), you should remove the jacket from both ends and strip the cores with your wire stripper. We only need four wires, so you can leave the rest as they are.

Now that the cable is ready, it’s time to connect your GetWired modules to one another and to your Ethernet Gateway. Not a big deal: connect A to A, B to B, +12V to +12V and GND to GND. Be careful not to swap the wires, though. Choose a color for each signal and be consistent.

GetWired Basic Bundle, all wired up

…and Some Receivers

Now that your GetWired network is ready, it’s high time we gave it some receivers to play with. Let’s start with the RGBW Shield.

Connecting Receivers to the RGBW Shield

Connect R, G, B, W, and Supply wires to the module as shown below. (See the RGBW Shield pinout diagram for reference.) To preserve full galvanic insulation between the bus and the LED strip, you should use a separate power supply. There are special screw terminals for this: LED+ & LED-.

Connecting Receivers to the 2SSR Shield

Let’s move to the 2SSR Shield. As mentioned previously, we are working with AC power here, and AC power is dangerous. If you do not feel confident with this voltage, ask a qualified electrician for help.

The 2SSR Shield needs only a live wire to work. Neutral wires should be connected outside the module with a quick splice or an external screw terminal. The 2SSR Shield works with a switch by default. It is the best to use normally-open switches, which should be connected to D2 and D3 as shown below. (See the 2SSR Shield pinout diagram for reference.)

Connecting a light bulb to a GetWired 2SSR module
Connecting a button to a GetWired MCU

Programming Your MCUs

After wiring it all up, we can move on to programming our modules. First, download the code from here. Once you have the code, all you need to do to get it working is edit an easy-to-use Configuration.h file. We’ll take a look at a few lines of that file below. Lines that are not mentioned are not relevant for the purposes of this tutorial and should be left unaltered.

Identification

The first edits you will make to the configuration file serve to identify the module:

// Identification
#define MY_NODE_ID 1
#define SN "GetWired 2SSR Module"
#define SV "1.0"

Definitions

We also need to set a few general definitions:

// Power Sensor
#define MAX_CURRENT 3          // 2SSR - 3; RGBW, 4RelayDin - 10 [A]
#define MVPERAMP 185           // ACS7125A: 185 mV/A; ACS71220A: 100 mV/A
#define RECEIVER_VOLTAGE 230   // 230V, 24V, 12V - values for power usage calculation

// Dimmer
#define DIMMING_STEP 1
#define DIMMING_INTERVAL 10

// Roller Shutter
//#define RS_AUTO_CALIBRATION
#ifdef RS_AUTO_CALIBRATION
  #define CALIBRATION_SAMPLES 2
  #define PS_OFFSET 0.5
#else
  #define UP_TIME 21
  #define DOWN_TIME 20
#endif        

Output Config

This one is actually quite important. This is where you will configure your output modes. Note that only one output mode can be active at a time.

// 2SSR
#define DOUBLE_RELAY

//#define ROLLER_SHUTTER

// Dimmer / RGB / RGBW
//#define DIMMER

//#define RGB

//#define RGBW

Input Config

The parameters in this section allow you to configure the inputs your module will handle. Many of these input modes can be active simultaneously.

Important: For proper compilation of RGBW code, at least one digital input (such as INPUT_1) must be active.

// Digital input
#define INPUT_1
#ifdef INPUT_1
  #define INPUT_ID_1 4
  #define PIN_1 INPUT_PIN_3
  #define PULLUP_1
  #define NUMBER_OF_INPUTS 1
#endif

// ACS712 Power Sensor
#define POWER_SENSOR

// Analog Internal Thermometer
#define INTERNAL_TEMP

// 1wire external thermometer (e.g. DHT22)
//#define EXTERNAL_TEMP

Programming the Gateway

You can download the GetWired Ethernet Gateway code from our GitHub repository. It requires only a few minor tweaks:

#define MY_IP_ADDRESS 192,168,0,10   // Gateway IP address
#define MY_PORT 5003                 // The port to keep open on node server 
                                     // mode / or port to contact in client mode

Flashing the Firmware With a Programmer

Now that you have your firmware ready, let’s flash it. The first thing you’ll have to do is add ATmega328PB controllers to the Arduino IDE. You can do this with MiniCore. Full instructions are available here.

A few things to keep in mind:

(Click to Expand) Arduino configuration
Board SettingsMCUGateway
BoardATmega328ATmega328
Clock8 MHz external8 MHz external
Variant328PB328PB
BootloaderYesNo

Now that it has been flashed, your MCU is ready to be assembled with a shield. You should do this while power is cut off from the bus. To cut power, press the CONF button on the Gateway’s enclosure panel. The CONF LED should light up. Press the same button again, after assembly, to bring the power back (and turn off the the CONF LED).

Conclusion

After you complete this tutorial, your Basic Bundle should look similar to the one shown below.

GetWired Basic Bundle connected to a switch, a bulb, an LED strip, and power supplies
With bulb illuminated
With LEDs illuminated

Despite all the information contained in this guide, we still have a lot more to cover in the future. Please consider this a place to start. Subsequent updates will go into greater detail on:

Thank you for reading. Please let us know if anything is unclear. And stay tuned for our next update!

Meanwhile, keep calm and support GetWired!


Sign up to receive future updates for GetWired.

Subscribe to the Crowd Supply newsletter, highlighting the latest creators and projects