Category Archives: Components

Introduction to a powerful single-channel WiFi relay Shelly1

Today, I want to acquaint you with an intriguing device. It’s a Wi-Fi relay based on the ESP8266 controller, which is why it will be easy to add to your smart home. In the articles on the site, you have already come across devices from other companies that use ESP32\ESP8266 (for example, Sonoff.) (  1,   2,   3  )

Shelly is a pretty new yet powerful startup from Bulgaria. The company’s devices earn a lot of European and Americal quality certificates, as well as various awards in the smart home field. Shelly has a market on AliExpress and its internet shop with prices in Euros. It has cheap delivery almost worldwide.

Today, this company has a powerful production. Shelly produces a wide range of relays, lighting devices, meters, switches and sockets, wireless buttons, and all kinds of sensors for the smart home.

The hardware part of Shelly 1

You can use Shelly 1 for both remote controlling your outlets and lighting. The advantage here is that you can control the lighting remotely (using an app) and the usual switch simultaneously.

As you can see in the photo, the device is compact. The main task in its development was to make sure that the device fits into an outlet box with an outlet or switch body. Let’s look at how engineers succeeded in this task. Below, there are two outlet boxes for plasterboard, one being deeper.

As you can see, in the first photo with a smaller outlet box, the body of an outlet or a switch will protrude about three to four millimeters. Take this into account when buying electrical before repairs. Also, find a place for wires. I must say, I used a standard outlet. There are also those whose body is slightly distant from the plane of the wall.

If you use switches, pay attention to the flex switch I already wrote about, its interior is very compact, and the switch won’t “look” out of the outlet box.
We see a deeper outlet box in use in the second photo. When using a case of similar size, there shouldn’t be any problems with free space for Shelly 1. Besides, you can place Shelly 1 in a regular mounting box.

One of Shelly 1’s wiring diagrams can be like this:

When mounting, note that the relay of the device can take up to 16A. As you already understood, you don’t need the switch to control the relay. Terminals “0” and “I” are relay outputs, and such contacts are named “dry” sometimes. It is because they don’t connect to the main logic circuit of the device. In theory, you can connect devices with a low supply voltage to such contacts and control the supply of voltage to such devices using Shelly 1. The supply voltage on the Shelly 1 relay should apply to the terminals “L” and “N.”

The device’s power supply voltage range is extreme, from 110V to 240V alternating current or 24-60V direct current. You can also change the power mode using a jumper on the case, and then the power supply voltage will be 12V DC. The jumper is under the plug, and getting to it can be quite hard.

There is a connector nearby where you can download custom firmware for Shelly 1, but I don’t think there’s much point in doing that. The fact is that Shelly allows you to unpair your devices from your cloud and enable local management. Such actions make it possible to control Shelly 1 from alternative smart home management systems, such as Home Assistant. In addition, you can control the relay even from the browser.

Configuring and managing devices in the Shelly app

Firstly, download and install the official Shelly application on your smartphone. Then register your account, which allows you to manage Shelly devices from anywhere in the world where there is access to the network.

To set up and add the device to your home, connect the wires as shown in the photo below.

Once turned on, Shelly 1 will create its Wi-Fi hotspot, and you can now connect and configure your device. To do this, select the “Add device” item in the menu. Once detected, you will see it in the list. Then you can add it to the necessary room or change the picture of the device.

To go to Shelly 1’s settings, click on its image in the “room window.” As you can see, the list of possible parameters is big. We can use the timer and schedule of the device. Below, in the “Cloud” section, we can disconnect the device from the cloud. In the “Settings” section, you will find the settings of Shelly 1 regarding the device behavior after power loss. There are four options for the status after power-on: “on”, “off”. “save state after power consumption”, and “according to the state of the switch”. In my opinion, this is a unique and quite useful feature. In addition, in the settings, there is an opportunity to indicate which switch you will use, keyboard (button, flex), or regular.

It is also interesting that we can choose what our relay will control, for example, an outlet or lighting.

In the settings, we can also reboot the device, remove it or reset it to factory settings.

Shelly 1’s web interface

To access the web interface of Shelly 1, you need to know its IP address. To do this, you can look at the address in the router settings. But, to not do it every time, you should set a static IP address for the device. The interface of the page is a bit like the interface of the application, but in my opinion, a larger computer screen will be more comfortable.

There are even more settings here than in the mobile version. One of the more interesting points in the web interface is the ability to enable and configure MQTT. But you are warned that turning it on will disable the cloud connection, which is not a huge loss when the possibility of controlling the device in alternative smart home systems appears.

Shelly 1 and Home Assistant

As soon as the Shelly device appears on your local network, Home Assistant will immediately “see” it.

All you have to do is confirm the configuration settings and choose a room for the device. By the way, the device that “flies” into Home Assistant is the same device you selected in the Shelly app. Now you can control the device with Home Assistant and the response time is almost instantaneous.

Sonoff POW Elite – power meter with relay, WiFi. Up to 20A

Approximately a week ago, in the official internet shop of a Chinese company Sonoff two devices appeared, marked as POWR316D and POWR320D. It’s the same device, with two modifications that differ only in the maximum allowable current flowing through it. And these are 16 and 20 Amps. I will review the devices as one, and the user must know the difference between the models when ordering the device.

SONOFF POW Elite features

  • Model – POWR316D/POWR320D
  • Case material – PC V0
  • Dimensions – 98x54x31 mm (DIN Rail mountable)
  • Input/Output – 100-240 В 50/60 Hz, 16A/20A Max
  • Wi-Fi – IEEE 802.11 b/g/n 2,4 GHz
  • WiSoC – Espressif ESP32 240 MHz with connection to Wi-Fi 2,4 GHz and Bluetooth 4.2

From the specifications, it is clear that the “brain” of the device is already familiar to us ESP32. Theoretically, we can change its firmware to alternatives called Tasmota or ESPhome.
The power meter has the possibility of mounting on a standard DIN rail.
You can install several such devices in an electrical switchboard and control the supply voltage, for example, outlets in your home. In this case, you should ensure a stable Wi-Fi signal between your router and the power meter in the shield. After all, its metal body can shield the passage of radio waves between devices. I will also warn readers against such a power meter at the main entrance to the apartment or house since its allowable power will not be enough for all your appliances.

Terminals for connection for both input and voltage output wires are in the lower part of the housing. There are four terminals, and you clamp the wires with screws. To access the clamping screws, remove the cover on the bottom of the housing. On the case near screws, there are markings for the corresponding wires.

At the top of the case above the display are status indicators with a single button to control the relay. This button also performs a device reset function.

eWeLink app features

The program interface is the same for almost all switches. Here’s quick access to the relay state switch from the card and the main menu. Detailed information on power consumption is also displayed here. The following information will be available to users

  • Electricity consumption for today (kWh)
  • Electricity consumed yesterday (kWh)
  • Electricity consumed per month (kWh)
  • Current (A)
  • Voltage (V)
  • Power (W)

The settings section will show the power status, we can turn on local control, and we can add schedules, timers, and cycles. Other settings allow you to add notifications based on relay status or power consumption goals for the day or month.

The values on the display and in eWeLink are updated every 5 seconds.

Smart Controls

eWeLink is compatible with smart speakers from Alexa and Google Home.
There is a possibility of integration with SmartThings. But unfortunately, you can’t control anything but turning the relay on or off. It is not possible to obtain information on electricity consumption through such integrations. There will be alternative firmware for the device. It’s probably already made. Both Tasmota and ESPHome allow you to transfer power usage statistics to Home Assistant, and from there, you can send them to Alexa or SmartThings.

What’s inside

Usually, Sonoff devices come with everything needed to tinker with the firmware, and the Sonoff POW Elite is no different. The PCB contains contacts for ESP32 (TC, RX, GND, Vcc), and something tells me that the button links to GPIO00, which enables the firmware mode.

The antenna got printed to the PCB. Unfortunately, there is no connector for connecting an external antenna, which makes another argument against a weak Wi-Fi signal.

The display controller chip is on the same side as the ESP32, with several contacts next to it to connect to the display itself. By the way – the screen has no backlight, which can be inconvenient at night. On the other hand, few control electricity consumption in the middle of the night.
ЗOn the back of the PCB, we see the elements of the power supply system (small transformer, capacitors, and filters). The large item on this side of the board is the relay.

This relay exactly controls the supply of voltage to the output of the power meter. In my opinion, the manufacturer could install a more powerful relay because, as you can see in the photo, there is more than enough space on the board. Maybe in a while, we will see an updated model of this power meter from Sonoff, but already designed for more power. It would be interesting to install one at the entrance to your home to control the electricity consumption inside your home. Logically, such a power meter would cost more, but I think the price here would differ only due to the cost of a more powerful relay.

Introduction to the Wiz smart lighting

Today you will get to know the Wiz lighting devices, for example, the filamentous (retro-styled) ST64 E27 bulb. The full name is “ST64 E27 WIZ DW FA Q”.

History of Wiz

Wiz was founded in 2017 as a startup, and in 2019 it already became a part of Signify, the world leader in the lighting industry. Signify is also the owner of Philips Hue. Wiz is the IoT platform of solutions for smart lighting. The Wiz ecosystem includes not only software solutions but also cloud features and products. Together with partners, the company offers lighting, devices, and accessories under different brands. Wiz already connected millions of devices in the market.

Unlike Philips Hue, Wiz offers smart lighting based on Wi-Fi, which is then controlled by a very handy app that connects to existing Wi-Fi networks. You don’t need a hub to control the system. The Wiz ecosystem covers more than 60 countries around the world.

Short characteristics and the Wiz ST64 E27

The light bulb is made out of glass, pear-shaped and retro-styled. The filaments are made out of rows of LEDs, that visually copy the filaments of “Edison’s lamp”. The light from such filaments is a nice white warm light with a cool temperature of 2200K. You can control the brightness of the lamp in a branded app. The max brightness of the lamp is 550 lumen, which is the equivalent of a 45W incandescent lamp.

I must say, controlling the brightness of the lamp by third-party dimmers is impossible, I recommend controlling the brightness from the original app only.

The lamp that sells in European shops has a plinth E27 and a voltage of 220-240W. That means using the device in the countries of North America would be impossible. Just as the advertisement booklet is stating, the lamp life is 22 years on the condition of work for 3 hours a day. The device has an energy-saving tier of A+.

Controlling the lamp is possible thanks to the Wi-Fi IEEE 802.11 b/g/n wireless standard with a frequency of 2.4 GHz. It is also possible to control the lamp using voice assistants or alternative smart home control systems.

The Wiz app for light control

First of all, after launching, the app will warn you that all Wiz devices added to your smart home, will only work with 2.4 GHz Wi-Fi networks.

Then you will be offered to create a Wiz account. This will help control your device in the future. If necessary, you can log onto your account using Google or Facebook.

In the settings, you can turn on local device control. This will be required to control lighting using Home Assistant. On the same screen, there is a possibility to turn on third-party integration, for example with Google and Alexa voice assistants.

We can add or change rooms in our smart home and assign smart devices to them.

Adding the lamp isn’t hard, you can just press the correlating button in the menu and choose the way to connect the device. But before that, don’t forget to turn on the lamp. Next, you will need to enter the password to your network so that this way you will save it onto your device.

It can happen if after adding the new lamp in the Wiz app you won’t be able to control it from the app. I don’t know why it happens, but everything works as it should right after relaunching the Wiz app. I could be wrong, but this bug only happens the first time you turn on the lamp after adding. Maybe this is caused by changing the network in the process of adding the device to the Wiz smart home.

So, controlling works now, and you can change the brightness from within the app. In the same app, you can set up scenes and routines for the devices. And if you added voice assistant integration, you can control the lighting using either your voice or the Google Home app.

Making it possible to control Wiz in Home Assistant

In order to control Wiz devices in Home Assistant, you need to enable local communication (Allow Using Communication) in the Wiz app. Also, don’t forget to make the lamp’s IP static in the router settings. Now we’ll go to Home Assistant settings and add the Wiz integration.

Now specify the IP address of your lamp.

If needed, set a correct room for it.

The lamp will be added to Home Assistant, every light bulb in the integration will have three essences, but currently, some of them could be disabled or unavailable. This depends on the scene or the current lamp mode. Of course, the “light” essence must be always available.

For convenience, you can add a card and control lighting from there. And if you already have a working Wiz integration you can add new automatization rules with its participation.

That’s it for today. See you!

Hardkernel launches ODROID-M1 RK3568B2 SBC

It’s been a while since we have seen new hardware from Hardkernel, but the Korean company has just launched the ODROID-M1 SBC powered by Rockchip RK3568 with up to 8GB RAM.

ODROID-M1 SBC interfaces

The single board computer is cooled with a large heatsink placed underneath, supports SATA and NVMe storage, offers HDMI and MIPI DSI video output, Gigabit Ethernet networking, as well as two USB 3.0, two USB 2.0 ports, an RTC backup battery, and a 40-pin GPIO header.

ЯThe RK3568B2 single-board core is a slightly modified version of the RK3568 designed to overcome chip shortages. According to Hardkernel, the production time of the metal case for the previous model is much longer than that of the plastic case of the RK3568B2.

Hardkernel says that the processor and graphics performance are similar to the Amlogic S905X3-based ODROID-C4 SBC. The stress test raised the CPU temperature to just over 50°C indoors.

The company will provide images of Ubuntu and Android 11, which will simultaneously support HDMI and MIPI-DSI. Support for the Panfrost open source GPU driver and mainstream Linux is expected in the next few months.

Technical characteristics of ODROID-M1

SoC – Rockchip RK3568B2 Cortex-A55 quad-core processor up to 2.0GHz with Arm Mali-G52 MP2 GPU
4 or 8 GB of RAM LPDDR4

  • 16MB SPI Flash, MicroSD card slot
  • Connector of the eMMC module
  • Built-in SATA 3.0 port
  • M.2 connector NVMe M-Key for M.2 drives.
  • Video: HDMI 2.0 port up to 4Kp60 with HDR, EDID, 4-lane connector MIPI DSI, MIPI CSI
  • Audio: 3.5 mm jack for.
  • Network: RJ45 Gigabit Ethernet port (RTL8211F)
  • USB: 2 USB 3.0 ports, 2 USB 2.0 ports, 1 Micro port USB
  • 40-pin GPIO connector
  • IR receiver, RTC battery holder.
  • Power supply – 7.5V to 15.5V via DC connector
  • Dimensions: 122 x 90 x 16 mm; radiator: 123 x 100 x 19 mm
  • Weight – 253 grams with radiator

Meeting the NSPanel switch and flashing ESPHome

Last year, the Chinese company Sonoff started crowdfunding, where they presented an interesting smart device. By the end of 2021, Sonoff introduced NSPanel. This device is a rectangular device with a colored touch display sized 3,5 inches and two physical buttons.

The touch display was also created by Sonoff, this is a Nextion model.

There are two versions of the NSPanel, and they differ only in size. One is for the US market, and the other one is for the EU countries. The power and logical parts of the devices are the same. As a “brain“, the company chose the Espressif ESP32-DOWD V3, which allowed working in Wi-Fi 4 802.11n/g/n networks. Bluetooth 4.2/5.x is only used when setting up the device.

Connecting NSPanel to the power grid

To set up and control the device you need to download the eWeLink app, it must be familiar with Sonoff devices owners. If you do not have an account yet, create it, or log onto your account. eWeLink lets you control connected devices from all around the world where the Internet connection is established.

So, to connect the NSPanel on the phone you need to turn on Bluetooth. After that, connect the device to the power grid.

Use safety precautions when working with high voltages!

In the eWeLink app press “add new device“. Then, you will see the device on the screen, tap on it to add it. Then, you may need to enter your Wi-Fi credentials. After connecting, the NSPanel most likely will ask you to update its firmware. Do it, because this update may contain bug fixes or performance improvements. The update may take a while.

The power part of the switch includes two relays that can withstand up to 16A of current. This means that you can connect two additional electric devices. It could be not only lighting devices but also, for example, a warm floor controller. Below is a switch connecting scheme.

Setting up the NSPanel in eWeLink

In the eWeLink application, you can switch one of the switch relays to thermostat mode, then the built-in thermal sensor can control the temperature in the room. For the thermostat, choose the heating or cooling mode depending on the device you want to connect (heater or cooler). Set the target temperature in the room and the device will turn off when it reaches the target temperature.

To reach the thermostat screen on the switch, swipe right on its screen. One more swipe will lead you to widgets. These are pictograms with which you can control other smart devices. This way you can control plugs or bulbs, and also their groups. In addition, you can create widgets to load a scene.

You need to create widgets in the eWeLink app. The max widget number is 8.

To control the device using voice assistants create the appropriate integration in the eWeLink app. In addition, Sonoff allows controlling the switch in a local network, which enables integrations into alternative smart home control systems. Enable the corresponding item in the device settings.

Getting ready to launch ESPHome

I think that this smart device is “smart” only when it can work independently of cloud services. NSPanel can work locally but sadly, its widgets don’t work without a network connection. Essentially, you can only control two relay devices through a local network.

Just as I stated above, the logical part of the switch is a Nextion display that is connected to the esp32 controller. Such a tandem gives us hope for the ability to easily load alternative firmware. And really, “tasmota” firmware already exists for our device, work on creating an NSPanel component for ESPhome is also in full swing.

Let’s look at the PCB of the logic unit. To take it out, lightly press the screwdriver on the groove in the center. Remember to turn off the power beforehand!

Now you need to unscrew two screws that hold the protective plate. After you carefully remove the plate, you will see the PCB with the esp32 controller microcircuit.

You will see 5 contacts in the lower corner. They are marked as 3V3, ESP_TX, ESP_RX, GND, and IO0. The last contact is a “zero” pin controller. To switch the controller to firmware mode, connect it to the neutral wire.

To flash the controller’s firmware, you will need a usb2uart (USB to TTL converter) adapter. Before you connect it to the computer, set the voltage to 3.3V, this is important!

Using Dupont wires, connect the adapter to the PCB: VCC – 3V3, GND – GND, RX – ESP_TX, TX – ESP_RX. Connect the IO0 pin on the PCB to the neutral wire on the contact pad (green wire on the picture)

Pay attention: If the Dupont wire contacts protrude beyond the contact holes on the board, they will touch the metal plate of the display. This can lead to a short circuit and both the USB adapter and NSPanel chips failure! To avoid this, disconnect the display cable and remove the PCB from the chassis.

Downloading ESPHome onto the NSPanel

Now you can confidently download the ESPHome firmware. Connect the USB adapter to the computer, and in the device manager, look what COM port it received. Now, in the ESPHome interface, you can create a new node. To be honest, downloading empty code onto esp32 and then working with the created node using Wi-Fi would be enough. To do this, select the firmware option of the ESP controller connected to the computer. Then, select the COM port in the popup. Downloading the firmware takes a few minutes. The contacts need to stay connected!

After the firmware is loaded, disconnect the wires and assemble the switch. After connecting the NSPanel to the network, you can use the switch just like a regular esp32 controller. Now let’s download an already prepared code.

After reboot, the switch will have a familiar interface. I want to warn you: There’s no official thermostat support, so I didn’t add it in the code. The thermostat, just like some widgets, could be added by JSON requests. The format which JSON should have can be read here. And here you can find another variant of the code, already bundled with some widgets and a thermostat. One thing, you will need to replace the device IDs with yours.

For an example of scene widgets, I added code that will turn off melodies on the built-in NSPanel booster (piezodynamic). You can add and load any scene with Home Assistant.

After the official release of NSPanel components for ESPHome, I plan to update the article, so check for updates. In addition, there is a way to fully change the interface and switch from the NSPanel Protocol, since onboard of the switch we have Nextion display and esp32, but that is a topic for another article.

Setting up the integration for Nest devices in Home Assistant

A little over a month ago, I made a review on the Nest Learning Thermostat. It is a handy device that will support the comfortable temperature inside your room and will save your money on heating at the same time.

As you know, Google owns Nest, and how it often happens in big companies, not all areas of production keep up with user requests. And the fact that Google has partially closed the Nest API has been sad news for independent developers. If you use the Nest app, which manages only its own devices, you may have paid attention to the fact that the app did not update for quite a while. It also does not have that many devices.

I think it will be much more convenient for anyone to control their devices from within one app. I chose Home Assistant as the system since you can integrate many devices from different brands, manage them, and add any automatization algorithm.

I must warn you: to get access to the Nest Smart Device Management API you will need to pay 5 dollars. It is a one-time payment for API access.

After finishing setup through Home Assistant, you will gain access to these essences: Climate, Sensor, Camera.

Registering device access

For this step, enable Nest API and create an account for Home Assistant to exchange info with the Nest API.

Creating and configuring Cloud Project in the Cloud Console:

  • Go to Google Cloud Console.
  • If this is your first time, you need to create a new project in Google Cloud. Click on “Create Project”, and then “New Project”.

  • Name your project and click on “Create”.
  • Go to “APIs & Services > Library”. Here you can enable the API.
  • Search for “Smart Device management” and click on “Enable”.

  • Now enter “Cloud Pub / Sub API” in the API library search box and click “Enable.”

Now you have a project ready to set up authentication with OAuth.

Setting up OAuth in Cloud Console Consent Screen

In this section, you configure the OAuth consent screen. It is needed to give Home Assistant access to your project.

  • Go to Google API Console.
  • Click on “OAuth consent screen” and start setting it up.
  • Choose “External” (this is the only option if you are not a G-Suite user), and then click on “Create”.

  • On the “App Information” screen, enter the App name and the User Support E-Mail, and then type in your E-Mail address in the “Developer contact email” section. They are displayed only during the OAuth to give Home Assistant access to your account. Click on “Save” and “Continue”. Do not add unnecessary info (for example, the logo) to avoid additional Google checks.
  • On the “Scopes” step, click on “Save and Continue”.
  • On the “Test Users” step, add your Google account (example@gmail.com) to the list. Click on “Save” in your test account and then “Save and Continue” to finish the process.

  • Go back to the OAuth consent screen and click “Publish App” to set the “In Production” status.

  • The warning states that your application will be available to any user with Google Accounts that you have entered on the application information screen. It does not compromise your Google Account or your Nest data.
  • Make sure to disable the “Testing” status since you will be logging out of your Google account every week.

Configuring OAuth client_id and client_secret in the Cloud Console

At the end of this section, you will get the client_id and client_secret you need for the next steps.

  • Go to the “Credentials” page and click on “Create Credentials”.

  • Select “OAuth client ID” in the drop-down list.

  • Choose “Desktop App” in the “Application type” type field.
  • Give an understandable name to your credentials.
  • You will now see a message created by the OAuth client. Pay attention to “Client ID” and “Client Secret”. They are crucial to the next steps.

Creating device access for project_id in the Device Access Console

Now that you have set up the authentication, create the Nest Device Access Project, which requires $5. When done, you will have device access to project_id, which is crucial for further steps.

  • Go to the “Device Access Registration” page. Click on the “Go to the Device Access Console” button.
  • Check the “Accept the Terms of Service” and click on “Continue to Payment” where you will need to pay 5 dollars.

  • The “Device Access Console” should now be displayed. Click on “Create project”.
  • Give a name to your project and click on “Next”.

  • You then are prompted to enter the OAuth client ID you created earlier in the previous section. Click on “Next”.

  • Turn on “events” by clicking on “Enable and Create project”.

  • Note the Project ID. You currently have project_id, client_id, and client_secret required for Home Assistant.

Setting up Home Assistant

Now you have everything required to set up Nest in Home Assistant. Open “configuration.yaml” and write according to the sample you see below.

# Example configuration.yaml entry
nest:
  client_id: CLIENT_ID
  client_secret: CLIENT_SECRET
  # "Project ID" in the Device Access Console (not Cloud Project ID!)
  project_id: PROJECT_ID

Be sure to restart Home Assistant in the “Server Controls” section.

Setting up devices

After you added a Nest configuration entry to “configuration.yaml” and rebooted Home Assistant, you need to add Nest integration through the user interface. To do this, you can use the “My” button:

You can do the same manually:

  1. Go to your Home Assistant interface.
  2. On the sidebar, click on “Configuration”.
  3. In the configuration menu, select “Integrations”. (in version 2021.12 Devices & Services)
  4. In the lower right corner, click the “Add Integration” button.
  5. Use the search box, select “Nest” and follow the instructions.

Setting up the Nest integration will guide you through the steps of authorizing your Home Assistant to access your account on Nest devices.

Setting up OAuth for Device Authorization

This section will allow Home Assistant to access your account by generating an OAuth token.

  • Select “OAuth or Apps”, because we created credentials for the computer programs above in the Google Cloud Console.

  • Click the “authorize your account” link.

  • A new tab will open where you can select your Google Account. It should be the same developer account you set up before.
  • The Google Nest permissions screen will allow you to choose which devices to configure and select from several of your homes. Maybe you want to turn on everything. However, you can skip any feature you do not need to use.

  • You will get redirected to another account selection page.
  • You may see a warning screen stating that Google has not tested this program because you have just set up an unverified developer workflow. Click on “Continue” to continue.

  • You will then get prompted to grant additional permissions. Click on “Allow”.
  • Confirm that you want to grant permanent access to Home Assistant.

  • Copy the token.

  • Insert the token into the Google Home Assistant Link Account dialog box.

  • The next step is to enter the Cloud Project ID to receive updates from your devices. Open the Cloud Console and copy the Project ID.

If everything is as planned, you will see a working Nest integration.

Using automation and triggers

Nest integration makes device triggers available and the ability to enable automation in Home Assistant. For complete information, see the Home Assistant Automation Guide.

You can use nest / set_away_mode to set Home or Away mode:

# Example script to set away, no structure specified so will execute for all
script:
  nest_set_away:
    sequence:
      - service: nest.set_away_mode
        data:
          away_mode: away

Controlling the thermostat

The Nest climate platform allows you to control the thermostat from Nest. However, please note that due to the limitations of the European Nest E thermostat, integration with the Home Assistant is not possible for this thermostat.

After setting up the integration and adding the thermostat card to the Lovelace interface, you will be able to control your Nest devices via Home Assistant.

Also, it is now possible to add new climate entities in triggers and automation, calling the appropriate service using previously created configuration files. You can view the templates in the Home Assistant developer tools.

Introduction to the Nest Learning Thermostat

In general, thermostats as a device class are popular in North America. Historically, this device is present in every house there. And no wonder, since this device sets the temperature almost without your interference. In winter, it will turn on the heating, and in summer, when it is hot – air conditioning or ventilation. Thirty years ago, mechanical thermostats controlled most of the climate systems in the USA.

But before you learn about the benefits of such devices, meet the company Nest, which manufactures thermostats for your smart home.

History of Nest

Nest dates back to 2010. It was then that former Apple employees Tony Fadel and Matt Rogers created a startup called Nest Labs. A year later, the company introduced its first version of the thermostat. The device became very popular, and the company’s business went up. Next year, in the wake of its success, Nest Labs will release a second version of the thermostat with an updated design and functionality. The company will later take the second version as a basis for the next generation after Google buys Nest Labs.

So, in 2014, Nest Labs was bought by Google for a whopping (for that time) 3.2 billion dollars without changing the name, is now a subsidiary. In the same year, Dropcam, a company engaged in the production of video cameras, came under the wing of Nest. We will hear about Nest Cam smart security cameras later. The company is also starting to develop a new wireless communication protocol. We will talk later about the protocol.

And so, at the end of 2016, Nest presents the third version of its smart thermostat, which is still relevant to this day.

American version of Nest Learning Thermostat (3rd Gen)

I want to say that a 24V interchanging current powers the climate systems of North America. That is not common in European countries. It can also be a problem in our country for those who bought their thermostat in the USA market and wants to mount it manually. But everything is possible. Read on if you need to learn how to do it.

The device has hardly changed, but the thermostat screen and its resolution have increased, so the operating mode and current temperature can be seen from the other end of the room. You don’t have to be close to see the thermostat. Compared to the 2nd Gen, the main changes are inside and in the software.

As for the inside, there is a presence sensor. With the help of this sensor, it “knows” whether someone is at home and adjusts the temperature accordingly. Of course, the device also has a temperature sensor. That means that the thermostat measures the temperature in the room in which it is. But it is also possible to buy remote temperature sensors and put them on the shelf or wall of the room where you want to monitor the temperature.

I stated above that Nest began developing a new wireless standard for their devices. The new thermostat already uses it. This new standard works on the 802.15.4 protocol. Are the numbers familiar? It runs at 2.4 GHz, just like ZigBee, but is a different energy-efficient standard. It is called Weave. It will later become the basis for an open communication protocol for Thread devices. But for now, Nest only uses Weave to connect their own devices. With this standard, the thermostat gets connected to the Nest temperature sensor.

There are more devices in the Nest ecosystem that use the Weave protocol. For example – a smoke and gas sensor Nest Protect. Nest Protect also has a presence sensor, just like the thermostat. Nest Connect is a device that increases the coverage area. All these devices work with a compatible smart lock – Yale Lock.

The box with the US version of the thermostat shows the device itself with the number 75. It is a comfortable temperature in Fahrenheit. The previous version (2nd Gen) displays the number 70 instead.

Let’s see what comes with the Nest Learning Thermostat. In addition to the thermostat in the box, there is a set of screws, a contact disk with ten terminals, a metal mounting plate, and a white plastic protective plate. As a bonus, Nest put a branded screwdriver in the box that is supposed to help you mount the device. You don’t need to use the white plate. It’s usually there to hide the defects on the wall after demounting the previous thermostat.

After mounting and connecting the wires to the disk, the thermostat gets connected to the appropriate connector. After that, it gets attached to its position. But, before we mount the disk to the wall, let’s check out its pinning.

As you know, a 24V interchanging current is powering the thermostat. Connect these wires to Rh and C (Comon) terminals. In the picture, the wires are red and black. C-wire will be “common” to all climate devices. W1 and W2 terminals are responsible for heating. If your home has, for example, a single-stage heater, then only the W1 terminal can be connected to it. Then, you can connect an additional heater to the W2 terminal.

So, when the thermostat decides to heat the room quickly, it gives voltage to both W1 and W2 terminals. But usually, the temperature is raised smoothly and in one circuit to save energy. The room cools down by the same logic. Terminals Y1 and Y2 are responsible for cooling, or, rather, the degree of cooling. If you set a central air conditioner in the room, then the contact of the Y1 terminal sends a signal to the relay. It will then open the ventilation latch with cold air. Meanwhile, the Y2 terminal controls an additional air conditioner.

The G terminal is usually responsible for powering the fan. O/B is rarely used, and only to control a special heating valve. You can take it as third-degree heating. The Rc terminal is used instead of Rh if you will only connect cooling (it connects to the left side). You can set up the “*” terminal in the thermostat settings. It can manage a humidifier, dehumidifier. You can even connect a third heating circuit.

You can find several connection options in the Nest Pro Installer Guide

The image below shows one of the options for connecting the thermostat to the heater using a dry contact relay. Other terminals and corresponding devices are connected similarly.

After connecting the wires to the contact ring and installing the thermostat in place, the power is turned on. The thermostat itself will “see” which wires are connected to the terminals. All you have to do is make basic settings and connect to Wi-Fi. By the way, in the settings, you can set the temperature not only in Fahrenheit but also in Celsius.

The European version of Nest Learning Thermostat (3rd Gen)

Following the acquisition of Nest Labs by Google, the company began to conquer other markets. Nest has appeared in European stores with the second Gen of the thermostat. But, as it turned out, not all functions in Europe were in demand. For example, in Europe, air conditioning or ventilation was very rarely part of a centralized climate system. The heating control also did not have 24V power as in the US.

That’s why Google decided to release a separate version of the thermostat for countries outside of North America. You will recognize the box of the European version by the number 20 on the thermostat, which is familiar to us, comfortable 20 degrees Celsius. The box with the “European” is a little bigger. The reason is that another device called Heat Link is in the kit.

Modern gas boilers often include thermostats of their brands. Such thermostats connect to the “motherboard” of the boiler with two wires. Once connected, the boiler and thermostat communicate using the OpenTherm protocol. This way, you can manage the heater remotely. OpenTherm has one significant advantage over relay control. During space heating, the boiler gradually increases the coolant temperature. So, the burner inside the boiler doesn’t get exposed to heat. Therefore it lasts longer. In addition, the gradual heating of the coolant reduces gas consumption and saves money.

The photo below shows a Heat Link with an open protective cover. Its inner part shows the scheme of connection to the corresponding contacts.

The first two contacts are the power supply terminals of the 220V device. We are interested in the last two groups of terminals. These are the contacts of the OpenTherm wires and the power contacts of the thermostat with a voltage of 12V.


By the way, you can supply the power to the thermostat via a standard USB connector. The thermostat will connect to the Heat Link device via the already familiar wireless Weave. The distance between the devices cannot exceed 30 meters. But it’s nice that you don’t have to drill the walls. So, you can install the Heat Link in the boiler room and the thermostat on the dresser on a stand.

The kit with the “European” also has a contact ring, but it differs significantly from the American version. There are only two power terminals on the contact ring marked as T1 and T2. The wires to these terminals connect to the corresponding Heat Link contacts. Do not confuse the polarity when connecting these contacts.

Let’s go back to the Heat Link. Just like I said, the advantage is support for the OpenTherm standard. But you are probably already asking the question: will a boiler without OpenTherm work with a thermostat? Jumping ahead, I would say yes, but only in the relay mode (on/off). Some boilers have two terminals on board to connect the so-called “dry” relay instead of an OpenTherm link. Usually, a jumper connects those terminals. If you disconnect the contacts – the boiler turns off, and once connected – it will turn back on. Below is a diagram connecting a dry pair of wires to the Heat Link.

Below is a diagram of the connection of the electric heater to the Heat Link. Note that the current flowing through terminals “1”, “2”, and “3” must not exceed 3A.

After installing all elements of the thermostat, it is possible to begin adjustment. After setting up and connecting to your home Wi-Fi network, you can start using your device.

Nest Learning Thermostat software

From the first day of using the thermostat, the device starts to learn about your habits. It checks how comfortable the room feels to you and remembers if you lower the temperature before sleep. In about a week, the thermostat begins to make adjustments to the climate of your house. It can be both temperature and humidity in the room. The device also turns on the “Auto Away” mode if no one is home. The thermostat will reduce the temperature to an acceptable level, saving you money. The thermostat adapts to your operating mode, and before you return from work, your home will be warm and cozy.

A stable connection to the Internet is required for the thermostat to work correctly. The device connects to the home router via Wi-Fi.

You can control your device in a few ways. The first way is physical interaction. You can always go to the thermostat and set a comfortable temperature by rotating the ring. The second way is through a web browser. You can go to the thermostat settings anywhere around the world and view device statistics or other climate information at home. The third way to control is using an application on your smartphone. Here you will see everything in the browser, but in a more convenient format. You need to log in to the account you created when you first set up the thermostat for the last method.

The fourth method is voice control using Google Nest speakers. Set up the integration once, and the thermostat will appear in the app. You can now control the thermostat using voice commands.