Latest developments

Since releasing the influx and async HTTP functionality, I’ve merged in some new functionality and done some long overdue housekeeping on a few subsystems.

First the improvements:

The units specification in the script system (outputs, Emoncms outputs, influxDB outputs) are no longer just window dressing. There are now eight unit designations supported:

  • Watts
  • Volts (rms)
  • Amps (rms)
  • VA
  • Hz
  • PF
  • Wh
  • kWh

Now that the datalog contains both Volts and Hz for voltage channels and Watts and VA for power channels, these metrics can be produced from the raw data. So now if you specify Amps for units in an output, you get Amps (rms). To the extent it makes sense, you can also do arithmetic on them.

The ecosystem for supporting the web servers has been reworked to support more dynamic control and to allow multiple web servers to be specified and run concurrently. You can run Emoncms server and influDB servers at the same time. They work independently with respect to synchronizing with the web services and uploading backlog.

The config file in a loaded system has been exceeding 3K characters. When that’s loaded and Json parsed during dynamic configuration, it was consuming several times that in heap. From time to time it failed. The config file processing has been reworked to use about 2K total and will not increase significantly as new functionality is added in the future.

All these changes have paved the way for a pvoutput server and MQTT server. I’ve been designing those services and should be able to add them to a release in the near future.

Some additional resource management has made the firmware download smoother and will prevent worst case scenarios as more services run concurrently. The ESP8266 has a finite capacity for open web sockets and active connections are a wildcard with respect to heap use, so managing open connections has gone a long way to stabilize operation with no apparent impact of performance. In fact quite the opposite - sampling is more consistently at or near maximum.

I hope to roll this out in ALPHA early next week and will work to move it along though BETA into MINOR as it matures.

Just a word about ongoing accuracy. Reports from users have been excellent, and my ongoing tests with several revenue grade meters are consistently in the 0.2% to 0.4% range.

I’ve been testing a new series of CTs that I hope to make available with IoTaWatt here in the USA. I’ll publish more about them soon.