No modem(s) found! Check the modem connections. \
+
Supported modems: "
+ for modem_name, modem_data in pairs(modems) do
+ nfound = nfound .. "
" .. modem_name .. ' '
+ for _, modem in pairs(modem_data) do
+ nfound = nfound .. modem .. ", "
+ end
+ nfound = nfound:sub(1, -3)
+ end
+ nfound = nfound .. "
"
+ return translate(nfound)
+ end
+ o.rawhtml = true
+else
+ if device_port then
+ for node in device_port do
+ o:value(node, node)
+ end
+ end
+end
+
+-- Add TimeZone
+o = s:option(ListValue, "timezone", translate("Timezone:"))
+for _, zone in pairs(timezone) do
+ o:value(zone[2], zone[1])
+end
+
+
+-- Remote Server
+s = m:section(TypedSection, "server_settings", translate("Remote Server"), translate("Configuration of the remote navigation server"))
+s.addremove = false
+s.anonymous = true
+
+o = s:option(Flag, "server_enable", translate("Enable server:"), translate("Enabling Remote Server service"))
+
+o = s:option(ListValue, "proto", translate(" "), translate("Navigation data transmission protocol"))
+o.widget = "radio"
+o:value("traccar", " Traccar Client") -- Key and value pairs
+o:value("wialon", " Wialon IPS")
+o.default = "trackcar"
+
+o = s:option(Value, "server_frequency", translate("Frequency:"), translate("Frequency of sending data to the Remote Server"))
+o.placeholder = "In seconds"
+o.datatype = "range(5, 600)"
+
+o = s:option(Value, "server_ip", translate("Address:"))
+o.datatype = "host"
+o.placeholder = '172.0.0.1'
+
+o = s:option(Value, "server_port", translate("Port:"))
+o.datatype = "port"
+o.placeholder = '80'
+
+o = s:option(Value, "server_login", translate("Login:"))
+o.placeholder = "Device login (ID)"
+
+o = s:option(Value, "server_password", translate("Password:"), translate("If you don't use Password, leave the field empty"))
+o.password = true
+o.placeholder = "Device password"
+
+o = s:option(Flag, "blackbox_enable", translate("BlackBox enable:"),
+ translate("Blackbox makes it possible to record and store data even in the absence of a cellular signal"))
+o:depends("proto","wialon")
+
+o = s:option(Flag, "blackbox_cycle", translate("BlackBox cycle:"), translate("Cyclic overwriting of data stored in the BlackBox"))
+o:depends("proto", "wialon")
+
+o = s:option(Value, "blackbox_max_size", translate("BlackBox size:"), translate("Number of sentences in the BlackBox"))
+o.placeholder = "default: 1000 sentence"
+o.datatype = "range(1000, 5000)"
+o:depends("proto","wialon")
+
+o = s:option(DummyValue, "_dummy", translate(" "))
+o.template = packageName .. "/blackbox"
+o:depends("proto","wialon")
+
+o = s:option(Button, "clear", translate("Clear BlackBox"), translate("Warning! After clearing the BlackBox, GNSS data will be destroyed!"))
+o.inputstyle = "remove"
+o:depends("proto", "wialon")
+function o.write(self, section)
+ local file = io.open("/usr/share/gpoint/tmp/blackbox.json", 'w')
+ file:write(json.stringify({["size"]=0,["max"]=1000,["data"]={}}))
+ file:close()
+end
+
+
+-- Tab menu settings
+s = m:section(TypedSection, "service_settings")
+s.addremove = false
+s.anonymous = true
+
+
+----------------------------------------------------------------------------------------------------------------
+s:tab("ya", translate("Yandex Locator"), translate("Determines the location of the mobile \
+ device by the nearest Wi-Fi access points and \
+ cellular base stations — without using satellite navigation systems."))
+s:tab("gpoint_filter", translate("GeoHash Filter"), translate("Filters \"DRIFT\" and \"JUMPS\" of navigation 3G/LTE dongles"))
+s:tab("kalman", translate("Kalman Filter"), translate("Designed to make the route smoother. Removes \"jumps\" of navigation 3G/LTE dongles"))
+
+----------------------------------------------------------------------------------------------------------------
+
+-- API Yandex locator
+o = s:taboption("ya", Flag, "ya_enable", translate("Enable:"), translate("Enabling the Yandex locator"))
+o.optional = true
+
+o = s:taboption("ya", ListValue, "ya_wifi", translate("Interface:"), translate("Select the Wi-Fi interface for Yandex locator"))
+local iwinfo = sys.exec("iwinfo")
+no_device = true
+for device in string.gmatch(iwinfo, "(%S+)(%s%s%s%s%s)(%S+)") do
+ o:value(device, device)
+ no_device = false
+end
+
+if no_device then
+ o:value('wnf', translate("-- Wifi not found --"))
+end
+
+o = s:taboption("ya", Value, "ya_key", translate("API Key:"), translate("To work with the Yandex locator must use an API key"))
+o.password = true
+o.placeholder = "Yandex API key"
+
+o = s:taboption("ya", DummyValue, "ya_href")
+ function o.cfgvalue(self, section)
+ local h = "