@Tony, yes, I am planning on “showing my work”! I would be glad to contribute to the official doc if @overeasy thinks it appropriate to put this level of esoteric detail in there. (I am a little familiar with git but not at all familiar with the ReStructuredText documentation format.)
Important note: These low-level API calls may be firmware specific and are not guaranteed to work from release to release. The officially supported method of accessing this data is via the IoTaWatt GUI.
So far I have examined the HTML output from my IoTaWatt and discovered these (firmware 02_05_12.bin):
To check wifi status:
curl http://iotawatt.localdomain/status?wifi
{“wifi”:{“connecttime”:1612045117,“SSID”:“xxxxx”,“IP”:“192.168.x.x”,“channel”:6,“RSSI”:-47,“mac”:“8C:AA:B5:xx:xx:xx”}}
(connecttime in UNIX epoch time)
Reset wifi (to change SSID):
curl http://iotawatt.localdomain/command?disconnect=yes
(then power cycle the IoTaWatt and reconnect as new for wifi)
Datalog info:
curl http://iotawatt.localdomain/status?datalogs
{“datalogs”:{“currlog”:{“firstkey”:1590619710,“lastkey”:1616557920,“size”:1327178752,“interval”:5},“histlog”:{“firstkey”:1590619740,“lastkey”:1616557920,“size”:110669824,“interval”:60}}}
(times in UNIX epoch time)
config.txt download (e.g., for scripting an automated backup):
curl http://iotawatt.localdomain/config.txt
{
“format”: 2,
“timezone”: “-5”,
“update”: “MINOR”,
“device”: {
[…]
messages file download (for sort of syslog’ing, the last 10,000 lines):
curl http://iotawatt.localdomain/iotawatt/iotamsgs.txt\?textpos=-10000 > iotamsgs-10000.txt
(redirected to the file “iotamsgs-10000.txt”)
Footnotes:
UNIX epoch time converter example