Influx version 2, HTTPS

Nothing like a Covid winter to spur development. Have more projects going than I can keep up with, but things are coming together and here are a few ruminations on some of those developments.

The ESP32, while inactive for the past few weeks, is moving along as the enclosure mold is being modified to accommodate the larger nodemcu 3. The status is that the prototype is running well with 14 or expanded 28 inputs, and it supports HTTPS for secure uploading. Still need to add WiFi provisioning and expand the datalog to handle things like import/export and VARh, as well as other potential input types down the road.

Been working on a comprehensive set of changes to the ESP8266 firmware:

The drivers to upload to influx and Emoncms are being reimplemented as c++ classes. This is part of an effort to clean up the code, make the interface to the status app more functional and consistent, and to allow for use of a HTTPS proxy.

influxDB will have two drivers - one for the current influxDB version 1.x and one for the newer influxDB version 2. These drivers are now called “uploaders” and the uploaders for both are working. Emoncms will be ported this week. The uploaders now use a base-class for the core logic and incorporate a case specific derived class for each unique server. This will greatly simplify adding other uploaders, consolidates the HTTP code in the base-class and will allow for multiple instances of any particular uploader when resources permit.

I’ve added the ability to upload to the internet using a HTTPS proxy on the local LAN. I’ll be describing how to make one using a RPi or other host running nginx. It’s really pretty simple, and one instance can handle any number of IoTaWatt on a given LAN.

With the HTTPS proxy, I’m able to upload to the influxcloud 2.0. So far it’s very fast and of course reliable. Looking at the usage statistics, I’m estimating a paid account with influxData would be just a few $/month for one IoTaWatt and can aggregate any number of IoTaWatt Their user interface is very nice and has dashboards and ad-hoc visualization using flux-query.

There is an OSS version of influx v2 as well. I haven’t installed it yet, but should work fine with the new uploader and doesn’t require the HTPPS proxy.

I’m looking at an alternate way to upload data to influx v2 using annotated CSV. That has the potential to upload much more data with less overhead. I’m investigating schemes to simply upload the bulk of the data currently available in the IoTaWatt datalog (Watts, Amps, Volts) for all or selected inputs and outputs. With something like that, a Graph+ like app could run from a cloud data store.

The current 02_05_12 release has been rock-solid. There are no significant outstanding issues. These ESP8266 changes are extensive and will probably change that. I’ll be posting a separate warning to ALPHA auto-update users to be sure they understand the risks of being on the bleeding edge. If you are not interested in these new features, consider switching to BETA or MINOR auto-update class.

2 Likes