<%# hmi.htm -%> <% if user ~= "user" then mod = require "luci.model.events" end ---------------------- -- Poste seleccionado ---------------------- local chp = require "luci.model.charging_points" local path = luci.dispatcher.context.requestpath local user, serialnumber, hw_model = chp.whoami(path) local fs = require "nixio.fs" local cl = path[1] local utl = require "luci.util" local mUtl = require "luci.moreUtils" local sn = mUtl.get_serialnumber() local master = mUtl.identify_pseudo_maestre(path[4] or sn) local obj local wizard if master == true then obj = "uci" wizard = "wizard" else obj = path[4].."/uci" wizard = path[4].."/wizard" end local gmod = require "luci.model.cloudmqtt_variables" local options = utl.ubus(obj, "get", {config = "cloudmqtt" }) local options_dev = {} local options_samples = {} if options and options.values and options.values.device then options_dev = options.values.device end if options and options.values and options.values.samples then options_samples = options.values.samples end local checked if options_dev.master == "on" then checked ="checked" else checked = "" end local mclass = "" local txt = "" local active_service = utl.ubus(wizard, "active_service", {service = "cloudmqtt"}) if active_service and active_service.enabled and active_service.enabled == "true" then mclass ="reset" txt = "Disable" else mclass = "save" txt = "Enable" end -%> <%+header%>

<%=translate("Ingerev Cloud Manager")%>-<%=path[4] or sn%>

<%:Configure general options%>
<%:Here you can configure Ingerev cloud manager general options.%>
<% for k , v in pairs(gmod.intValues) do %>
" />
<%end%> <% for k , v in pairs(gmod.booleanValues) do %>
/>
<%end%> <% for k , v in pairs(gmod.textValues) do %>
" />
<%end%> <%:Configure sample options%>
<%:Here you can configure data upload period. %>
<% for k , v in pairs(gmod.intValues_samples) do %>
" />
<%end%>
<%+footer%>