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 the 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

💬 Need Help?

Have a question or hit a roadblock? Join the Enapter Discord community to get quick support, exchange ideas, and collaborate with other developers and energy experts.

All Rights Reserved © 2025 Enapter AG.