I am trying to use thingsboard to allow users to request log files from devices. When requested, the devices send the log files to my TB server as telemetry. First, the logs are compressed with gzip and then base64 encoded. I want to have the rule chain decompress these logs and email to the requestor. I've found code to convert the base64 string to a byte array, but I haven't found a way to decompress the resulting byte array. I tried to invoke zlib using:
var zlib = require('zlib');
but it results in an message that 'require' is not defined.
Any hints? What language exactly is the TB rule node environment?
We send it to S3 and then have a link to it available on the TB gui - the user can request a log file(s) on the UX and then a few minutes later can click on the logfile and it downloads to their computer/device as a zip file. Device is linux based.