It can either re-send trough the original task ("Send Bulk" unchecked) , or it can 'dump' it via MQTT ("Send Bulk" checked)
You can also click on the "Download as CSV" button.
When dumping to MQTT, the taskinfo will be sent to a separate MQTT topic (well at least there is a separate field to set a separate topic is you wish)
There are 2 options for sending it to MQTT:
- Send as HEX encoded binary
- Send as CSV (the same layout as on the CSV file export)
The binary HEX encoded is the same format as how it is stored on the flash and a Python decode script is present in the misc folder to give you some inspiration.
The CSV option dumping to MQTT does also include some header per message to indicate what is to be expected.
- start file nr
- start pos
- end file nr
- end pos
- Nr of CSV lines
- Length in bytes (incl. newline) of the CSV lines
Then what follows is a number of CSV lines, depending on the nr. of tasks included in the dump and the max. message size.
N.B. on ESP8266 do not use large messages due to memory.
You can set the separator and whether you only want to export tasks which have a plugin set to them.
The "Join Samples with same Timestamp" is just what is states.
This will then also be shown in the "PluginID" and "Task index" columns as those will then show which tasks/plugins were combined in the same line.
You can also set a specific timestamp when saving to the cache controller, using the new command "TaskRunAt"
Example rules set:
Code: Select all
On gps#All Do
Let,4,%unixtime%
LoopTimerSet,1,[int#2] // re-set the timer to have at least [int#2] seconds between samples.
TaskValueSet,gps1,long,[gps#long]
TaskValueSet,gps1,lat,[gps#lat]
TaskValueSet,gps1,alt,[gps#alt]
TaskValueSet,gps1,spd,[gps#spd]
TaskRunAt,gps1,[int#4]
Event,saveAllToFlash
Endon
On Rules#Timer=1 Do
Let,4,%unixtime%
Event,saveAllToFlash
Endon
On sunrise#All Do
// Copy the last measurement to the dummy task
// Since we have 2 fields left, we also keep the previous value
TaskValueSet,co2,co2_prev,[co2#co2]
TaskValueSet,co2,temp_prev,[co2#temp]
TaskValueSet,co2,co2,[sunrise#co2]
TaskValueSet,co2,temp,[sunrise#T]
TaskValueSet,error,sunrise_prev,[error#sunrise]
TaskValueSet,error,sunrise,[sunrise#err]
Endon
On saveAllToFlash Do
// Now collect other data to store into 'dummy' tasks.
// For this, we use the command TaskValueSet.
// See: https://espeasy.readthedocs.io/en/latest/Rules/Rules.html#taskvalueset
// First we get the other values from the GPS unit and store it in the dummy task called "gps2"
// See: https://espeasy.readthedocs.io/en/latest/Plugin/P082.html#access-to-all-measurement-values
// N.B. the first 2 arguments of the TaskValueSet command are resp. the task name and variable name of a dummy task
// So make sure these match with an enabled dummy task
TaskValueSet,gps2,hdop,[gps#hdop]
TaskValueSet,gps2,satvis,[gps#sat_vis]
TaskValueSet,gps2,sattracked,[gps#sat_tr]
TaskValueSet,gps2,chksumfail,[gps#chksum_fail]
// Calling TaskRun will cause the values to be sent to the controller(s) assigned to the task
TaskRunAt,gps2,[int#4]
// Now we collect the latest samples of the analog voltages
TaskValueSet,analog,carBat,[bat#Analog.avg3]
TaskValueSet,analog,backupBat,[batBackup#Analog.avg5]
// And flush them to the Cache Controller
TaskRunAt,analog,[int#4]
// Now we collect the latest samples of the BME280
TaskValueSet,bme2,Temperature,[bme280#Temperature]
TaskValueSet,bme2,Humidity,[bme280#Humidity]
TaskValueSet,bme2,Pressure,[bme280#Pressure]
// And flush them to the Cache Controller
TaskRunAt,bme2,[int#4]
// Flush current and previous CO2 value to flash
TaskRunAt,co2,[int#4]
// Store the samples from the last reading from the PMS5003
TaskRunAt,pms1,[int#4]
TaskRunAt,pms2,[int#4]
// Collect data from the (optional) Accelerometer
TaskRunAt,adxl345,[int#4]
// Collect some sysinfo
TaskRunAt,sysinfo,[int#4]
// Collect error states
TaskRunAt,error,[int#4]
Endon
This is collecting data to several dummy tasks and then flushing it to the cache controller.