Adding an Uploader to esp8066 IotaWatt firmware

Goal

We’re adding a PostgreREST uploader, to enable the iotawatt to uploader to PostgreSQL, via a RESTful API.

Another goal is support for building on linux. It’s case sensitive!

Setup

  • Get the code! Fork https://github.com/boblemaire/IoTaWatt. Ensure you’re on the right branch: git branch -a
  • We call the root folder ~/IotaWatt/ for reference
  • Using VSCode, install “platformio.platformio-ide” extension
  • In VSCode, open a window in ~/IotaWatt/Firmware (as this has platformio.ini). See screenshot below.
  • Plug in the esp8266 (i.e IotaWatt) and chgeck PlatformIO>Devices
  • Configure the ipload_port in platform.ini (or comment out for auto-detect)
  • PlatformIO>Default>General>Monitor All : this should print serial from device.
  • PlatformIO>Default>Build All
  • PlatformIO>Default>Upload All (done!)

SD Card Updates

To use the new uploader, index.html can be editted. Write that to the SD card (either manually or via Iotawatt.local/edit.