Loading new Lua Libraries / Modules / Packages?

I’m never quite sure of the differences between a library, a module, a package in Lua, but I’d like to play with Lua-lockbox (below) which I found online. However considering the amount of files involved, it does not looks like something I can just upload (flat) via the Vera luup files UI ?

Seeing as Vera uses Lua 5.1, can I just place them all (and maintain their required folder structure) in /usr/lib/lua/?

And then call them like this. ?

local String = require("string");
local Array = require("lockbox.util.array");
local Stream = require("lockbox.util.stream");
local CBCMode = require("lockbox.cipher.mode.cbc");
local ZeroPadding = require("lockbox.padding.zero");
local AES128Cipher = require("lockbox.cipher.aes128");

Best Home Automation shopping experience. Shop at getvera!

© 2021 Ezlo Innovation, All Rights Reserved. Terms of Use | Privacy Policy | Forum Rules