NSPanel Documentation โ—† Icon overview GitHub Deutsch

Timer popup

This page explains timers on the panel: first in plain words what a timer is and which kind to take for what, then two step-by-step guides and an example. From Reference on follow the details โ€“ states, buttons, limits and finally the timers and alarms of an Echo device.

Contents:

What is a timer on the panel?

A timer is an entry on a page that shows a remaining time โ€“ for example Egg timer 00:04:30. A tap on it opens the timer popup: two fields for minutes and seconds and up to three buttons such as Start, Pause, Cancel or Finish. With it you set the time, start and stop the timer.

When the time is up, the entry shows 00:00:00 until Finish is pressed. A script can react to that, for example play a sound.

In addition the screensaver can show the remaining time instead of the clock, in orange, and in red once it has run out. That is set in the screensaver, see Timer instead of the clock.

Four timers in the list of a page: internal, external, alarm clock and the timer of the screensaver

Two words come up again and again on this page:

Term Meaning
Channel An object in ioBroker that bundles states belonging together. Its role (common.role) tells the adapter what it is โ€“ for a timer level.timer. Usually you create an alias for it, see alias table.
Page item An entry on a page of the panel, created in the PageConfig tab through the Pageitem Configuration.

Which kind do I need?

All kinds look the same on the panel. They differ in who counts the time and in what you have to create in the admin:

I want to โ€ฆ take โ€ฆ who counts what I create in the admin typical example
set a time on the panel and let it run down Internal the adapter a channel with the role level.timer โ€“ it needs no states egg timer in the kitchen
show the remaining time a script of my own or another adapter counts External the script a channel level.timer with ACTUAL (remaining time in seconds), plus STATUS and SET so that there are buttons remaining time of the washing machine; a script timer set by a voice control of your own
show a fixed wake-up time and switch it on and off Alarm clock nobody, it is a clock time a channel level.timer with ACTUAL of the role date, plus SET and STATUS alarm at 6:30
show the same timer on a page as the screensaver From the screensaver like the screensaver a channel level.timer and the checkbox Use the timer of the screensaver the screensaver shows the remaining time, the page adds Start and Stop

If in doubt: for a simple egg timer Internal is enough. The exact rules are under Operating modes.

The kinds can be combined. A typical example: a script of your own counts a timer, it is set through a voice control of your own, and the screensaver shows the remaining time โ€“ how that works is under Example: script timer on the screensaver.

Timers and alarms of an Echo device (alexa2 adapter) need no channel; they have a section of their own: Alexa timer (alexa2).

Quick start: egg timer (internal timer)

  1. Create a channel. In the Objects tab of ioBroker below 0_userdata.0 (or below alias.0) create an object of the type channel, e.g. 0_userdata.0.EggTimer, and enter the role level.timer in its properties. No states are needed below it. โ€“ Result: an empty channel the adapter recognises as a timer.

    The Objects tab with the channel 0_userdata.0.Eieruhr (here with the German name) of the type channel and the role level.timer, without states below it

  2. Create a page item. In the PageConfig tab open a page with page items (e.g. a cardEntities or cardGrid) and click on a free place. โ€“ Result: the Pageitem Configuration is open.

  3. Choose the channel. Kind of item stays at Standard. In the field ioBroker Channel choose the channel 0_userdata.0.EggTimer. โ€“ Result: next to the title it says (level.timer), below the field "ok (role=level.timer)".

    That the channel has no states is not an error here: no state of level.timer is mandatory, so there is no warning sign at the field and the button at the bottom reads Apply (see check marks).

    The Pageitem Configuration with the channel 0_userdata.0.Eieruhr: title (level.timer), ok (role=level.timer), no warning sign at the field although the channel has no states, and the button Apply

  4. Enter a name (optional), e.g. Egg timer. Without a name the adapter takes the name of the channel, as a last resort Timer. โ€“ Result: that is the name of the entry in the list and in the popup.

  5. Apply (the adapter checks the item and takes it over), then Save in the tab. โ€“ Result: the adapter restarts, the page shows the entry with 00:00:00.

  6. Try it on the panel: tap the entry, set 5 minutes in the popup, Start. โ€“ Result: the time runs down; at 0 00:00:00 stays until Finish is pressed.

If a script should learn about the end, create STATE in the channel as well (boolean, role button, writable): it becomes true when the time runs out and when Finish is pressed.

Quick start: remaining time on the screensaver

The screensaver takes its timer from one source. Easiest is a timer page item (e.g. the egg timer from above); if a script of your own counts, take its states.

  1. In the Screensaver tab open the screensaver of the panel and click on the time in the panel picture. โ€“ Result: the dialog of the time is open.

  2. Tick Show timer. โ€“ Result: the field Source of the timer appears.

  3. Choose the source:

    • Page item with timer popup and in the field Page item the egg timer. If it says Some timers can only be selected after a page has been changed and saved., change the page of the egg timer once and save it.
    • or Data points or slot patterns and below it the On/off state and the Data state of the script (formats under Source: two states).
    • The third source, Alexa timer (alexa2), is described under Alexa timer.

    โ€“ Result: the warning below the field disappears.

  4. Apply, then Save. โ€“ Result: the adapter restarts.

  5. Try it: start a timer (on the panel or through the script). โ€“ Result: instead of the clock the screensaver shows the remaining time in minutes, e.g. 2.5; a tap on it switches back to the clock.

All details of the display are under Timer instead of the clock.

Example: script timer on the screensaver

A script of your own counts a timer; it is set through a voice control of your own (the script evaluates the voice command). On the panel the screensaver should show the remaining time, and a page should offer Start and Cancel.

  1. States of the script: the script keeps an on/off state (true while the timer runs) and a data state with the end time, e.g. as a timestamp in milliseconds. Which formats work is under Source: two states. โ€“ Result: voice command and script set the timer, without the panel at all.
  2. Screensaver: in the quick start above choose the source Data points or slot patterns with these two states. โ€“ Result: while the timer runs, the screensaver shows the remaining time instead of the clock.
  3. Page (optional): create a page item with a channel level.timer and tick Use the timer of the screensaver. โ€“ Result: the item shows the same timer; Start writes data and on/off, Cancel sets on/off to false (details in section 5).

The script needs nothing special for this: it reads on/off and data, no matter whether the voice control or the panel wrote them. Whoever prefers to keep a channel level.timer with ACTUAL and STATUS instead of the two states (mode External, see States) takes the source Page item with timer popup in the screensaver and chooses that item.

Reference

The following sections describe every kind in detail. Whoever only wants an egg timer does not need them.

A page item with a channel of the role level.timer is a timer: in the list of a page it shows its name and its time, a tap on it opens the timer popup with the fields for minutes and seconds and up to three buttons. Depending on the channel the counting is done by the adapter, by a script of your own, by nobody (an alarm clock with a fixed time) โ€“ or the item shows the timer of the screensaver.

The item is created like any other through the Pageitem Configuration: pick a channel with the role level.timer as the ioBroker Channel. Which states the channel may have is listed in the alias table. The name in the list and in the popup is the Name of the dialog, otherwise the name of the channel, and as a last resort Timer. The timers of an Echo device do without a channel, see section 7.

1. Operating modes

The operating mode says who counts the time. It is not set anywhere โ€“ the adapter reads it from the states of the channel:

Mode How the adapter recognises it Who counts
Internal no ACTUAL the adapter
External ACTUAL with the role value.timer or level.timer, or with the unit s, sec or ms a script of your own
Alarm clock ACTUAL with the role date, or with another role without a unit of time nobody โ€“ a fixed clock time
From the screensaver checkbox Use the timer of the screensaver in the item dialog like the screensaver, see section 5

A channel with a SET only is an internal timer โ€“ unless SET carries the role date, then it is an alarm clock. An external timer or alarm clock with nothing writable and no STATUS is a plain time display: the popup shows the time but has no buttons.

An item of the kind Alexa timer has no channel; there the Echo device counts, see section 7.

2. States

A channel of the role level.timer can have up to four states โ€“ none of them is mandatory. A channel without any states is an internal timer. The names are suggestions: the adapter also finds the states by their role (table in ALIAS).

State Meaning
ACTUAL The value that is shown. For an external timer the remaining time in seconds, with the unit ms in milliseconds. For an alarm clock a timestamp in milliseconds, shown as the clock time HH:MM in local time.
SET The adapter writes a time set in the popup here, in the same unit as ACTUAL. Without SET it writes into ACTUAL if that one is writable. For an alarm clock SET holds the next point in time of that clock time as a timestamp in milliseconds.
STATUS 0 = off, 1 = pause, 2 = running. Needed for an external timer and an alarm clock so that the buttons Start, Pause and On/Off exist โ€“ without it the script cannot know that it should count.
STATE Becomes true when an internal timer runs out and when Finish is pressed โ€“ never with Cancel or Clear.

Values written from outside only count when they are confirmed (ack = the value is a reported state, not a command) or the state lies below 0_userdata.0 or alias.0.

3. Buttons

Which buttons the popup shows and whether the time can be edited depends on the mode and the state (the buttons of the Alexa timer are in section 7):

The popup of a running internal timer

Mode and state Buttons Time editable
Internal, no time Start yes
Internal, time set, not started Start, Cancel yes
Internal, running Pause, Cancel, Finish no
Internal, paused Continue, Cancel (after editing: Start) yes
Internal, expired Finish, display 00:00 no
External, STATUS 0 Start, Clear if writable
External, STATUS 1 Continue, Clear if writable
External, STATUS 2, time left > 0 Pause, Cancel, Finish no
External, STATUS 2, time left 0 Finish, display 00:00 no
External without STATUS Clear, if something is writable if writable
Alarm clock, off On (writes STATUS 2) if writable
Alarm clock, on Off (writes STATUS 1) no
Alarm clock without STATUS none if writable
From the screensaver, no timer Start, if a free slot is writable yes, if a start is possible
From the screensaver, running or paused Cancel no
From the screensaver, expired Finish no
From the screensaver, not writable none no

Closing the time fields starts nothing. For an external timer and an alarm clock the adapter writes the time to SET (or ACTUAL) at once; for an internal timer it remembers it and writes it to SET as well, if there is one; with From the screensaver it only remembers it. Counting begins with Start only.

Cancel and Clear set STATUS to 0 and, for an external timer, SET and ACTUAL to 0; STATE is left alone. Finish does the same and sets STATE to true in addition.

The popup of an alarm clock โ€“ the button switches it off

4. Controlling the internal timer from outside

Only needed if a script or another adapter should also set or start the timer of the panel. The internal timer runs inside the adapter, also while its page has never been opened. Through SET and STATUS it can be controlled from a script:

Writing Effect
SET > 0, timer standing or paused sets the time, does not start
SET > 0, timer running new remaining time, keeps running
SET = 0 like Cancel
STATUS = 2 Start or Continue; with the counter at 0 it takes the time from SET
STATUS = 1 Pause, if it is running
STATUS = 0 Cancel, without STATE

The adapter mirrors every change of its state into STATUS. When the time is over, STATUS stays at 2 until Finish is pressed โ€“ like an external timer standing at ACTUAL 0 with STATUS 2. The remaining time of an internal timer cannot be read from outside. After a restart of the adapter an internal timer is gone; a STATUS left over from before is corrected then.

5. Use the timer of the screensaver

With this a page item shows exactly the timer the screensaver shows โ€“ handy to see, start or stop it on a page. Where the screensaver takes its timer from (states, another page item or an Echo device) is set in the screensaver, not here.

The checkbox Use the timer of the screensaver stands in the Pageitem Configuration for a channel of the role level.timer only. Below it says: The item and its popup show the timer of the screensaver of this panel (time dialog). The states of this channel are not used for it. Meant is the timer that is set up through the time in the screensaver editor.

The checkbox "Use the timer of the screensaver" in the item dialog

Start writes the data state of the screensaver timer first and then its on/off state. Which value goes into the data depends on the state: the remaining time with the unit s, sec or ms or the role value.timer or level.timer, an ISO date for a text state, otherwise the end as a timestamp in milliseconds. With slot patterns Start takes the lowest slot whose on/off is not true โ€“ without one no start is possible. Cancel and Finish set the on/off state of the shown slot to false. There is no pause here. If the source of the screensaver is a page item, the checkbox item starts and stops that page item.

If the screensaver of the panel has no complete timer, the log warns once per panel and the item stays without buttons.

6. Display and limits

What list and popup can show โ€“ the same for all kinds:

7. Alexa timer (alexa2)

Instead of a channel, a timer item can show the timers of an Echo device โ€“ or one of its alarms (see Alarms of an Echo device). Both come from the alexa2 adapter, which maps the Echo devices into ioBroker. No channel is needed. The screensaver knows the timers only, no alarms; its source Alexa timer (alexa2) is under Source: Alexa timer (alexa2).

Quick start: Alexa timer as a page item

Requirement: the alexa2 adapter is running, and in its instance the option Automatically query activity on device interaction is switched on (why: see Requirements).

  1. In the PageConfig tab open a page with page items and click on a free place. โ€“ Result: the Pageitem Configuration is open.
  2. At the top, at Kind of item, choose Alexa timer. โ€“ Result: instead of the channel field there are alexa2 instance and Echo device.
  3. Choose the alexa2 instance and the Echo device. Only devices that can do timers are offered. โ€“ Result: without a warning below, everything is ready.
  4. Enter a Name (optional), e.g. Kitchen. โ€“ Result: that is the name of the entry; without a name Timer.
  5. Apply and Save in the tab. โ€“ Result: the page shows the entry.
  6. Try it: say "Alexa, set a timer for 3 minutes" to the chosen Echo. โ€“ Result: after about 10 seconds the entry shows the remaining time. In the popup Cancel stops it; while no timer is active, Start starts a new one on the Echo.

Requirements

What Why
a running alexa2 instance It reads the timers from the Amazon account and takes the commands.
an Echo device that can do timers The dialog only offers devices whose Info.capabilities contains TIMERS_AND_ALARMS โ€“ groups and plain speakers are missing.
in the alexa2 instance the option Automatically query activity on device interaction (autoQueryActivityOnTrigger) Without it alexa2 does not ask what changed after a voice command: timers set by voice never show up in alexa2 and so never on the panel. If it is off, the dialog warns.

Creating it in the admin

At the top of the Pageitem Configuration there is the Kind of item: Standard (channel, custom button, navigation) or Alexa timer. The choice exists on all pages with page items (cardGrid, cardGrid2, cardGrid3, cardEntities, cardSchedule, cardThermo2, cardMedia). With Is a navigation ticked, Alexa timer is locked โ€“ a navigation cannot be a timer.

With Alexa timer the dialog shows these fields:

The Pageitem Configuration with the kind Alexa timer: alexa2 instance, Echo device and Show Timer

Field Meaning
alexa2 instance The alexa2 instance with the Echo device. All installed instances are offered.
Echo device The device whose timers or alarms the item shows. Only devices whose Info.capabilities contains TIMERS_AND_ALARMS are offered, labelled with Info.name and the serial number. After changing instance or device a specific alarm has to be chosen again.
Show Timer (default) or Alarm. What the alarm shows is under Alarms of an Echo device.
Which alarm With Alarm only: Next active alarm (default) or A specific alarm.
Alarm of the device With A specific alarm only: one of the alarms of the Echo, labelled with time and repetition.
Name Name in list and popup; empty = Timer.
Condition is true / Condition is false Icon and colour while a timer is active or the alarm is switched on, and otherwise. Empty = defaults timer / timer-off, for an alarm alarm / alarm-off.

Apply stays disabled until instance and device are chosen โ€“ with A specific alarm also the alarm.

Messages of the dialog:

Message Meaning
In this alexa2 instance the option "Automatically query activity on device interaction" is off: timers set by voice never show up. Switch it on in the settings of the alexa2 instance. Switch the option on in the settings of the alexa2 instance.
No alexa2 instance is installed. Install and set up alexa2.
This instance has no Echo device with timers. Choose another instance, or alexa2 has not read the devices yet.
The chosen device is no longer found in this instance or has no timers. Choose another device.
This device has no alarms. With A specific alarm: the Echo has no alarm that could be chosen.
The chosen alarm no longer exists. On the panel the item stays without buttons until another one is chosen. The alarm was deleted; choose another one.

Switching between the two kinds in the open dialog keeps the fields of the other kind until the dialog closes; only the chosen kind is saved.

What happens on the panel

Situation What you see
timer set by voice After about 10 seconds the entry shows the remaining time โ€“ that is how long alexa2 takes to know the timer.
Start in the popup The adapter sends the text stelle einen Timer auf 5 Minuten (whole minutes, for exactly one 1 Minute) or stelle einen Timer auf 90 Sekunden to the Echo. The Echo speaks the confirmation. 5 seconds after the text the adapter has alexa2 query the activities again; so the timer appears on the panel about 6 seconds after Start.
Cancel (running) or Finish (ringing) The timer disappears from the panel at once; at Amazon it is deleted in the background (confirmed within a fraction of a second) โ€“ also while it rings. alexa2 then reports the ringing as over about 2.5 seconds later.
time is up 00:00:00, only Finish in the popup, until the timer is stopped.

The web panel with three Alexa items: a timer without a running timer, a specific alarm and the next active alarm, both at 15:40

Buttons of the Alexa timer

Kind and state Buttons Time editable
Alexa timer, no timer Start yes
Alexa timer, running Cancel no
Alexa timer, ringing Finish no
Alexa alarm (specific), off On yes
Alexa alarm (specific), on Off no
Alexa alarm (specific), single and past none no
Alexa alarm (next active), one is active Off no
Alexa alarm (next active), none active none, display 00:00 no
Alexa alarm, chosen alarm no longer exists none, display 00:00 no

Several timers

An Echo can have several timers at the same time. Shown is a ringing one, otherwise the running one with the shortest remaining time. Cancel and Finish affect exactly this shown timer; afterwards the entry shows the next one.

One Echo device can be the source of the screensaver timer and of several items at the same time; all show the same state. If the timer is stopped through one of them, it disappears everywhere.

Alarms of an Echo device

With Show Alarm the item shows an alarm of the Echo device like the alarm clock mode of a channel: the alarm time as HH:MM in local time, the icon on while the alarm is switched on, and in the popup the buttons On and Off. The default icons are alarm and alarm-off.

Below follows the choice Which alarm:

The Pageitem Configuration with Show Alarm and a specific alarm of the Echo device

Choice What the item shows What you can do
Next active alarm (default) the switched-on alarm that rings next Off switches exactly this alarm off. Afterwards the item shows the next switched-on one โ€“ another press on Off would switch that one off as well. The time cannot be changed here. With none switched on: 00:00, icon off, no buttons.
A specific alarm always the same alarm, also while it is off On and Off; while it is off, the time can be changed in the popup โ€“ that switches it on again at Amazon.

The field Alarm of the device labels each alarm with time and repetition, e.g. 07:30 ยท MO,TU,WE,TH,FR or 06:00 ยท once 2026-11-13; an alarm with a name has it in front. If the chosen alarm no longer exists, the dialog warns, the item shows 00:00 without buttons on the panel, and the log warns once.

The Pageitem Configuration with the warning that the chosen alarm no longer exists

What the adapter writes:

Action state of alexa2 written
On / Off Alarm.<id>.enabled = true / false
time changed in the popup (specific alarm only, only while off) Alarm.<id>.time = hh:mm:00 โ€“ the two fields of the popup are hour and minute. Amazon switches the alarm on again with it: alexa2 reports it back with enabled = true.

Pitfalls of the Alexa timer

Pitfalls


Source of this page: doc/en/popupTimer.md ยท Project on GitHub

  Back to top