Firmware for automatic device registration and OTA updates based on THiNX OpenSource IoT management platform.
Provides example implementations in Arduino C, LUA and Micropython.
- This is a work in progress.
- 100% functionality is not guaranteed for all the time.
- Contents of thinx-lib-esp is not working yet.
- Arduino IDE or Platform.io
- Arduino libraries: ArduinoJSON, EAVManager, ESP8266httpUpdate (to be replaced)
- Open this folder using Atom with installed Platform.io or thinx-firmware-esp8266/thinx-firmware-esp8266.ino using Arduino IDE.
- Run prerelease.sh to bake your commit ID into the Thinx.h file.
- ESPlorer
- ESPTool
Requires following modules: wifi,websocket,uart,tmr,node,net,mqtt,http,file,cjson
• Edit config.lua, set your WiFi SSID and password • Upload config.lua, thinx.lua and init.lua • Reboot
• Not yet implemented, will be possible in future.
Tested with:
NodeMCU custom build by frightanic.com
branch: master
commit: ec265a6c21db22640795f190bdcb8a4f014cdced
SSL: false
modules: adc,bit,cjson,coap,crypto,dht,enduser_setup,file,gpio,http,i2c,mdns,mqtt,net,node,ow,pcm,pwm,struct,tmr,u8g,uart,websocket,wifi
build built on: 2016-12-04 22:54
powered by Lua 5.1.4 on SDK 1.5.4.1(39cb9a32)
- Create account on the https://rtm.thinx.cloud/ site
- Create an API Key
- Clone vanilla NodeMCU app repository
- Run the bash ./prerelease.sh to create Thinx.h file; you can edit this with your custom information but the file will be overwritten when building on the server
- You can store API Key in Thinx.h file in case your project is not stored in public repository.
- Build and upload the code to your device.
- After restart, connect with some device to WiFi AP 'AP-THiNX' with password 'PASSWORD' and enter the API Key
- Device will connect to WiFi and register itself. Check your thinx.cloud dashboard for new device.
... Then you can theoretically 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. But that's not tested at time of updating this readme.
Note: In case you'll build/upload your project (e.g. the library) using thinx.cloud, API key will be injected automatically and you should not need to set it up anymore.
Because all the traffic from ESP8266 is usually HTTP-only and not all devices can handle SSL, you can install our side-kick project THiNX-Connect. Install this proxy to your home environment and it will encrypt HTTP traffic to HTTPS and will tunnell your device communication directly to thinx.cloud.