--[[ LuCI - Lua Configuration Interface ]]-- local taskd = require "luci.model.tasks" local motioneye_model = require "luci.model.motioneye" local m, s, o m = taskd.docker_map("motioneye", "motioneye", "/usr/libexec/apps/motioneye/motioneye.sh", translate("motioneye"), translate("motionEye is an open source web-frontend for the motion daemon, used to centralize the management and visualization of multiple types of cameras.") .. translate("Official website:") .. ' https://github.com/hassio-addons/addon-motioneye/') s = m:section(SimpleSection, translate("Service Status"), translate("motioneye status:")) s:append(Template("motioneye/status")) s = m:section(TypedSection, "motioneye", translate("Setup"), translate("The following parameters will only take effect during installation or upgrade:")) s.addremove=false s.anonymous=true o = s:option(Value, "port", translate("Port").."*") o.rmempty = false o.default = "8808" o.datatype = "port" o = s:option(Value, "image_name", translate("Image").."*") o.rmempty = false o.datatype = "string" o:value("ccrisan/motioneye:master-amd64", "ccrisan/motioneye:master-amd64") o:value("ccrisan/motioneye:master-armhf", "ccrisan/motioneye:master-armhf") o.default = "ccrisan/motioneye:master-amd64" local blocks = motioneye_model.blocks() local home = motioneye_model.home() o = s:option(Value, "config_path", translate("Config path").."*") o.rmempty = false o.datatype = "string" o:value("/opt/docker2/compose/Config", "/opt/docker2/compose/Config") o:value("/dev/video0", "/dev/video0") o.default = "/dev/video0" local paths, default_path = motioneye_model.find_paths(blocks, home, "Configs") for _, val in pairs(paths) do o:value(val, val) end o.default = default_path return m