If you like BoxMatrix then please contribute Supportdata, Supportdata2, Firmware and/or Hardware (get in touch).
My metamonk@yahoo.com is not reachable by me since years. Please use hippie2000@webnmail.de instead.

0
U

Property:timermix.lua

From BoxMatrix


BoxMatrix >> Webinterface >> timermix.lua @ BoxMatrix   -   IRC-Chat   -   Translate: de es fr it nl pl
News Selectors Models Accessories Components Environment Config Commands System Webif Software Develop Lexicon Community Project Media

UI-Structure UI-Modules HTML-Files XML-Files REST-API Lua-Scripts Javascript Browser SSI-Files SSI-Directives HTML-Text Event-Text Help-Pages CSS-Files Graphics Research

RESTAPI-Script

Goto:   Functions  -  Dependencies   -   Model-Matrix   -   SMW-Browser

Details

timermix.lua is the REST-API Plugin for XML timers. It is the glue to the timer ui-module.

XML timers are used for timed switching of WLAN, Call-Diversion, the TAM and Parental-Control, but not for Smarthome.

timermix.lua is auto-included by api.lua, like all /usr/rest_api/plugins/*.lua scripts, and supports:

# Gets the data requested by params and the http query-parameters
GET /api/v0/timermix/WLANTimer/...
GET /api/v0/timermix/DiversionTimer/...
GET /api/v0/timermix/KidsTimer/...
GET /api/v0/timermix/TamTimer/...

# Writes the data described by params and the http query-parameters
PUT /api/v0/timermix/WLANTimer/...
PUT /api/v0/timermix/DiversionTimer/...
PUT /api/v0/timermix/KidsTimer/...
PUT /api/v0/timermix/TamTimer/...

# Writes the data described by params and the http query-parameters
POST /api/v0/timermix/WLANTimer/...
POST /api/v0/timermix/DiversionTimer/...
POST /api/v0/timermix/KidsTimer/...
POST /api/v0/timermix/TamTimer/...

REST-API:

Functions

The function names of scripts often help to understand function blocks (and show gaps in the docs). fw 8.00 functions:

$ grep -e '^function' -e '^local function' /usr/rest_api/plugins/timermix.lua

# fill item onOff or answeringMachine params from XML-format
local function fill_action(item, ruleEndpointName)

# get xml-rule action from item PUT-format
local function get_action(item)

# calculates time(in mins) from old time "hhmm" string format, day for minutes in week calculation
local function get_old_format_item_time(old_format_item, day)

# converts xml webvar rule format(with day bitmask..) to relative to week time format
# because of the day-bitmask multiple relative items may be created
# all other not time related oldformat attributes are cloned
local function get_weekly_items(old_format_item, ruleEndpointName)

# converts xml webvar rule format(with day bitmask..) to relative to day time format
# if day-bitmask == 127 (all day bits set)
# all other not time related oldformat attributes are cloned
local function get_daily_items(old_format_item, ruleEndpointName)

# get "hhmm" time of day string(hour:minute) from day relative min(minute of day)
local function get_min_to_hh_mm(min)

# are all rule-items configured for all weekdays(day-bitmask == 127)
# then the config can be shown as relative to day
local function is_daily(items)

# creates a lua-table representation from the parsed timer-Webvar xml-string
local function xml_to_rule(xml_rule, ruleEndpointName)

# creates a timer-Webvar xml-string from the timer lua-table representation
local function json_to_xml(rule)

# searches for the UID timer in the timer-list
local function find_rule(rule_list, uid)

# handles all GET-requests of the plugin
function timermix.get_data(params)

# handles all PUT-requests of the plugin
function timermix.put_data(params)

# handles all POST-requests of the plugin
function timermix.post_data(params) 

Dependencies

Daily updated index of all dependencies of this script. Last update: GMT.
A * in the Mod column marks info from Supportdata-Probes, which will always stay incomplete.
If an Object includes itself then this is a file with the same name but another Path and the dependencies are merged.

Relation Typ Object Mod Firmware Info Origin
Requires lib libluaxml.so 25 7.90 - 8.00 Lua-Library for processing XML data AVM
Requires rest array.lua 25 7.90 - 8.00 REST-API common collection of array-functions AVM
Requires rest func.lua 25 7.90 - 8.00 REST-API common collection of higher order functions AVM
Requires rest response.lua 25 7.90 - 8.00 REST-API Response API AVM
Requires rest rest_api_const.lua 25 7.90 - 8.00 REST-API Const Tables AVM
Requires rest table.lua 25 7.90 - 8.00 REST-API common extension of the Lua table module AVM
Requires rest uimod.lua (restapi) 25 7.90 - 8.00 REST-API UI-Modules API AVM
7 dependencies for this script

Model-Matrix

Daily updated index of the presence, path and size of this script for each model. Last update: GMT.
Showing all models using this script. Click any column header (click-wait-click) to sort the list by the respective data.
The (main/scrpn/boot/arm/prx/atom/rtl) label in the Model column shows which CPU is meant for Multi-Linux models.
Note that this list is merged from Firmware-Probes of all known AVM firmware for a model, including Recovery.exe and Labor-Files.

Model Firmware Path Size/Bytes
FRITZ!Box 4040 7.90 - 8.00 /usr/rest_api/plugins 14.9k
FRITZ!Box 4050 7.90 /usr/rest_api/plugins 14.9k
FRITZ!Box 4060 7.90 /usr/rest_api/plugins 14.9k
FRITZ!Box 5530 Fiber (main) 8.00 /usr/rest_api/plugins 14.9k
FRITZ!Box 5590 Fiber (main) 7.90 - 8.00 /usr/rest_api/plugins 14.9k
FRITZ!Box 5590 Fiber (prx) 7.90 - 8.00 /usr/rest_api/plugins 14.9k
FRITZ!Box 6591 Cable (arm) 8.00 /usr/rest_api/plugins 14.9k
FRITZ!Box 6591 Cable (atom) 7.90 /usr/rest_api/plugins 14.9k - 15.0k
FRITZ!Box 6660 Cable (arm) 7.90 - 8.00 /usr/rest_api/plugins 14.9k
FRITZ!Box 6660 Cable (atom) 7.90 /usr/rest_api/plugins 14.9k
FRITZ!Box 6670 Cable (arm) 7.90 /usr/rest_api/plugins 14.9k
FRITZ!Box 6670 Cable (atom) 7.90 /usr/rest_api/plugins 14.9k
FRITZ!Box 6690 Cable (arm) 7.90 /usr/rest_api/plugins 14.9k
FRITZ!Box 6690 Cable (atom) 7.90 /usr/rest_api/plugins 14.9k
FRITZ!Box 6850 5G 7.90 /usr/rest_api/plugins 14.9k
FRITZ!Box 6850 LTE 7.90 /usr/rest_api/plugins 14.9k
FRITZ!Box 7510 7.90 - 8.00 /usr/rest_api/plugins 14.9k
FRITZ!Box 7520 8.00 /usr/rest_api/plugins 14.9k
FRITZ!Box 7520 v2 (main) 7.90 - 8.00 /usr/rest_api/plugins 14.9k
FRITZ!Box 7530 7.90 - 8.00 /usr/rest_api/plugins 14.9k
FRITZ!Box 7530 AX 8.00 /usr/rest_api/plugins 14.9k
FRITZ!Box 7583 VDSL (main) 8.00 /usr/rest_api/plugins 14.9k
FRITZ!Box 7590 (main) 7.90 - 8.00 /usr/rest_api/plugins 14.9k - 15.0k
FRITZ!Box 7590 AX (main) 8.00 /usr/rest_api/plugins 14.9k
FRITZ!Box 7690 7.90 /usr/rest_api/plugins 14.9k
25 models use this script

SMW-Browser

Information is currently being retrieved from the backend.
 

Synonyms

Showing 1 related property.

t