Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Nabto-ESP8266 Arduino Library

This is an example AppMyProduct device application on the ESP8266 Arduino platform simulating a heatpump. Currently supports the Heat Control Ionic starter app.

Please also refer to this article on the Nabto blog for more information.

What is needed to run the example

The example is tested on an Adafruit HUZZAH ESP8266 Breakout board connected with a standard USB to TTL Serial Cable in the following way:

USB to TTL Serial Cable wiring

To compile the example you need to install the Arduino IDE and the ESP8266 Board Package. Adafruit provides a nice tutorial on how to setup your Arduino IDE accordingly.

We also need a device name and key, both of which can be created at

Step 1: Download the ESP8266 Board Package

Follow the steps laid out here to install the ESP8266 Board Package into the Arduino IDE OR read it right here:

Open up the Arduino IDE. Click File -> Preferences and then copy this

into the Additional Boards Manager URLs input field. Click OK

Now click Tools --> Board: -> Boards Manager

Here we search for ESP8266 and click Install

The ESP8266 Board Package is now installed

Step 2: Install the uNabto SDK library

There are two ways of getting the uNabto SDK library:

Using git

git clone --recursive

then change directory to the unabto-esp8266-sdk folder and run

copy-unabto.cmd # Windows  # Linux

to copy the files from the unabto submodule into the appropriate folders. Afterwards you can create a zip library with

make-lib.cmd # Windows  # Linux


Download the latest zip library from the releases (not the Source code (zip)).

No matter which way, we can now add the library to the Arduino IDE via Sketch -> Include Library -> Add .ZIP Library... and then browse to and add the that was just created/downloaded.

Run the example

We can now open the HeatPump.ino example by going to File -> Examples -> Nabto-ESP8266 -> HeatPump

Here we need to enter the SSID and password of the wireless network we want to attach to. Furthermore we need to input the device name and key we created at

When the example is compiled you set the device into flash mode by pressing the following button combination on the Adafruit HUZZAH ESP8266 Breakout board:

  1. Hold down the GPIO0 button, the red LED will light up
  2. While holding down GPIO0, click the RESET button
  3. Release RESET, then release GPIO0
  4. When you release the RESET button, the red LED should light up dimly

Now the sketch can be uploaded to the device. When finished it automatically connects to the specified wifi network and runs uNabto.

In your serial monitor you should see the following printout:

Connecting to WiFi........done
Init Nabto...
Device id: ''
Program Release 123.456
Application event framework using SYNC model
Nabto was successfully initialized
Nabto v123.456 running
State change from IDLE to WAIT_DNS
Resolving dns:
State change from WAIT_DNS to WAIT_BS
State change from WAIT_BS to WAIT_GSP
########    U_INVITE with LARGE nonce sent, version: - URL: -
State change from WAIT_GSP to ATTACHED

Now, connect to your device using the Heat Control Ionic starter app and see the LED change its brightness according to the target heat.