Skip to main content

Enapter Cloud

enapter library implements an interface to Enapter Cloud.

Sending Data#

enapter.log#

-- @param text string
-- @param severity string Log severity: debug, info, warning, error. Default: info.
function enapter.log(text, severity)
end

Sends one log entry to Enapter Cloud. These log entries can be viewed in Rules Web IDE.

Use severity argument to distinguish log entry between debug, info, warning, error. Different severities may be shown differently in UI. Default severity is info.

Examples#

enapter.log("Modbus connection established")
enapter.log("CAN data frame received: "..table.concat(bytes), "debug")
local data, err = read_device_telemetry()
if not data then
enapter.log("Reading data failed: "..err, "error")
end
Hardware diversity is welcome. Integrate any device into a unified energy network.
© 2021 Enapter
Developer toolkit
DocumentationReference
Community
GithubTindie