THiNX ESP8266 Vanilla Firmware for Platform.io
Clone or download
Matěj Sychra
Latest commit bd37420 Jun 18, 2018

README.md

thinx-esp8266-firmware-pio

Codacy Badge

Arduino firmware for THiNX providing device management and automatic (webhook-based) OTA (over-the-air) firmware builds and updates.

Provides example implementations for ESP8266 with PlatformIO.

  • This is a work in progress.
  • 100% functionality is not guaranteed for all the time.

Requirements

IDE

  • Platform.io
  • Open this folder using Atom with installed Platform.io

Installation

Arduino IDE

Search for THiNXLib in Arduino Library Manager and install all other dependencies... or you can just copy then from the lib folder if you prefer tested versions before the latest.

PlatformIO Library Manager

Library Review in progress at: http://images.thinx.cloud/platformio/library.json

Usage

  1. Create account on the http://rtm.thinx.cloud/ site
  2. Create an API Key
  3. Clone ESP8266 app repository
  4. You can store Owner ID and API Key in Thinx.h file in case your project is NOT stored in public repository. Otherwise insert API key using WiFiManager AP portal and owner will be fetched from backend.
  5. Build and upload the code to your device.
  6. After restart, connect with some device to WiFi AP 'AP-THiNX' and copy-paste the API Key and Owner ID, if you haven't hardcoded it in step 4
  7. Device will connect to WiFi and register itself. Check your thinx.cloud dashboard for new device.

... Then you can add own git source, add ssh-keys to access those sources if not public, attach the source to device to dashboard and click the last icon in row to build/update the device.

Note: In case you'll build/upload your project (e.g. the library) using thinx.cloud, API key will be injected automatically by THiNX CI and you should not need to set it up anymore.

More Examples

THiNX Device API Wiki

Environment Variable Support

You provide callback receiving String using setPushConfigCallback() method. Whenever device receives MQTT update with configuration key, it will provide all environment variables to you.

This may be also used for the WiFi Migration procedure.