mirror of
https://github.com/letscontrolit/ESPEasy.git
synced 2026-07-27 19:57:38 +00:00
94 lines
2.5 KiB
ReStructuredText
94 lines
2.5 KiB
ReStructuredText
.. include:: _controller_substitutions.repl
|
|
|
|
.. _C016_page:
|
|
|
|
|C016_typename|
|
|
==================================================
|
|
|
|
|C016_shortinfo|
|
|
|
|
Controller details
|
|
------------------
|
|
|
|
Type: |C016_type|
|
|
|
|
Name: |C016_name|
|
|
|
|
Status ESP32: |C016_status|
|
|
|
|
Status ESP8266: |C016_status_lb|
|
|
|
|
GitHub: |C016_github|_
|
|
|
|
Maintainer: |C016_maintainer|
|
|
|
|
Change log
|
|
----------
|
|
|
|
.. versionchanged:: 2.0
|
|
...
|
|
|
|
|added| 2019/04/05
|
|
Initial pre-alpha version of this plugin.
|
|
|
|
Description
|
|
-----------
|
|
|
|
This controller is a cache layer to collect data while not connected to a network.
|
|
|
|
The data will first be stored in RTC memory, which will survive a crash/reboot and even an OTA update.
|
|
|
|
If this RTC buffer is full, it will be flushed to whatever is set here as storage.
|
|
|
|
Data Format
|
|
-----------
|
|
|
|
Each time a plugin sends data to this controller, a sample set is stored.
|
|
|
|
A typical sample set contains:
|
|
|
|
- Timestamp (Default: Unix Time, but can be switched to "local time" in the controller settings with the "Use Local System Time" checkbox)
|
|
- task index delivering the data
|
|
- 4 float values
|
|
|
|
Storage
|
|
-------
|
|
|
|
The controller can save the samples from RTC memory to several places on the flash:
|
|
|
|
- Files on SPIFFS
|
|
- Part reserved for OTA update (TODO)
|
|
- Unused flash after the partitioned space (TODO)
|
|
|
|
Data Delivery
|
|
-------------
|
|
|
|
The controller can deliver the data to:
|
|
|
|
- JavaScript to process the data inside the browser. See the ``dump6.htm`` file in the ``misc`` folder.
|
|
- Upload bin files to some server (HTTP post?) (TODO)
|
|
- Provide a sample to any connected controller (TODO)
|
|
- Do nothing and let some extern host pull the data from the node. (TODO)
|
|
- Feed it to some plugin (e.g. a display to show a chart) (TODO)
|
|
|
|
|
|
Fetch and Decode data in the browser
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
The ``dump6.htm`` (in ``misc`` directory) file should be uploaded to the file system of the ESP.
|
|
When there are cache controller bin files present on the file system,
|
|
open this htm file from the file browser in ESPEasy into a new tab in your browser.
|
|
|
|
This presents a large button "Fetch cache files".
|
|
When pressed, the JavaScript in this htm file will fetch JSON information from
|
|
ESPEasy describing the column names and the binary cache files present on the file system.
|
|
|
|
Those bin files will be fetched and decoded in the browser.
|
|
When done, a "Download" button will be presented which generates and downloads a new CSV file.
|
|
|
|
This file can be opened in any spreadsheet program.
|
|
LibreNMS has proven to be the easiest to parse the column separators and make the best guess on the data types in each cell.
|
|
|
|
|
|
|