NSPanel Documentation โ—† Icon overview GitHub Deutsch

Page Thermo2 โ€“ configuration in the admin

The thermostat page cardThermo2 is created in the admin: tab PageConfig, page type Thermostat (Thermo2). The editor draws the page the way the panel shows it โ€“ every spot of the card can be clicked and opens the matching settings. In the adapter the admin page runs through the same code as a page taken over from a script (PageThermo2.getPage), so the result on the panel is identical.

The page manages several heat circuits, shows three value lines per circuit (actual temperature, set temperature in the ring, humidity) plus a mode display, and takes nine slots for page items around the ring โ€“ four on the left, four on the right and one between โˆ’ and +. Whoever only needs a single thermostat without own slots takes Page Thermo (classic).

Which states a heat circuit needs โ€“ this applies no matter how the page is created:

Alternatively a heat circuit can be assembled from single data points (set, actual, humidity, mode). The adapter then generates no buttons.

Contents:

1. Creating the page

  1. Open the instance settings โ†’ tab PageConfig.
  2. In the list Pages on the left click the PLUS, choose the type Thermostat (Thermo2) and enter a Unique ID (the page name the navigation refers to).
  3. The new page appears in the list; the editor opens on the right. A new page has no heat circuit yet โ€“ the editor says "At least one heat circuit with a channel is required, otherwise the page shows nothing" and offers the button Heat circuit (see section 3).

The fields Panel Filter and Page Type above the list only filter what the list shows. The general handling of the page list is described under PageConfig โ€“ Overview.

2. The editor at a glance

The Thermo2 editor with preview, heat circuit tabs and the nine slots
Field Effect
Unique ID Page name; read-only, fixed once the page exists. On the start page its own note stands there ("Start page - published under the id 'main' โ€ฆ").
Tabs above the preview One tab per heat circuit, the way the panel counts them: an airCondition channel gives two tabs (heating and cooling, the second one with the suffix (cooling)). The + on the right adds a heat circuit; from eight stored data sources on it is locked ("At most 8 heat circuits (an airCondition counts twice)").
Headline in the preview Click โ†’ dialog Heat circuit (data source, headline, order, remove).
Line 1 (thermometer, actual temperature) and line 3 (drop, humidity) Click โ†’ dialog Value display (icon, color, unit).
Big number in the ring Click โ†’ dialog Set temperature (minimum / maximum temperature, step).
Mode text below the ring Click โ†’ dialog Mode display (mode texts).
The nine slots The page items in the order of the panel: four on the left, four on the right, the ninth between โˆ’ and +. Dashed = free, lock = taken by the adapter, green border = item for this heat circuit only, blue border = item for all heat circuits.
Page x with arrows If the nine slots are not enough, the editor spreads the slots over several pages.
Order of the slots The order in which the adapter fills the slots, see section 10.
Add page item New item for the selected heat circuit โ€“ the same as clicking a free slot.
Circuit icon Dialog for icon and colors of the heat circuit selector slots.

The hint text below the preview says the same: "Click the headline, the values or the mode to open the settings; the nine slots are the page items (the ninth between - and +) โ€ฆ An airCondition channel gives two heat circuits."

The slots are filled in this order โ€“ which is exactly the order the adapter fills them in at runtime:

  1. with more than one heat circuit, one selector slot per circuit (โ‘ , โ‘ก โ€ฆ) โ€“ they appear in every circuit,
  2. the buttons the adapter generates from the states of the alias โ€“ only at the circuit concerned,
  3. the own page items in their stored order.

To the right of it, as on all pages, is the column Navigation/Panel (panel assignment, navigation targets, page details), see section 12.

3. Heat circuit: data source and headline

A click on the Headline opens the dialog of the selected circuit, the + above the preview the dialog for a new one.

Dialog Heat circuit with data source, role and generated buttons

Data source is a radio group with Alias channel and Single data points.

Alias channel: field Thermostat channel (role thermostat or airCondition). The ID can be typed in or picked from the object tree with โ€ฆ; the tree shows channels, devices and folders with a matching role.

Object selection for the thermostat channel

Right after the selection the editor checks the object and shows Role: โ€ฆ and generated buttons: โ€ฆ below it โ€“ the list of buttons the adapter builds from the states it found. If the object is missing or has another role, a warning appears ("The object %s was not found" or "The channel %s has the role '%s' - expected thermostat or airCondition"):

Warning for a wrong role of the channel

Single data points

Instead of an alias, four data points are given directly โ€“ Set temperature (writable), Actual temperature, Humidity (optional) and Mode (optional, number or text). Set and actual are required, a heat circuit without both is not stored. In this mode the adapter generates no buttons; on/off is derived from the mode data point (0 = off).

Headline of the heat circuit

Headline (empty = name of the channel): this headline is shown by the panel above the ring. With an airCondition channel there is an additional Headline cooling (airCondition) for the second tab (empty = COOLING).

Order, removing, applying

Move left / Move right changes the order of the heat circuits โ€“ and thus the numbers of the selector slots; the items move along. Remove heat circuit deletes it together with the items bound to it only.

Apply is possible only once the data source is plausible; otherwise the dialog says "Apply needs a data source: an alias channel with the role thermostat or airCondition, or the set and actual temperature data points". A new heat circuit is created with Apply only โ€“ Cancel leaves nothing behind.

Dialog for a new heat circuit

If an older configuration contains heat circuits without a data source, the editor reports that above the tabs ("%s heat circuit(s) without data source - the adapter skips them") and offers Remove; when removing, the items keep their heat circuits.

4. The buttons from the alias

What is listed under generated buttons is not configured: the adapter looks below the channel for common.role and common.type (the names of the states are arbitrary apart from the exceptions named below) and creates one slot per state found โ€“ each of them uses up one of the nine places, in this order:

State Slot on the panel Role
MODESET selection list of the operating mode; the icon follows the value (0 power-off, 1 heat-wave, 2 snowflake, 3 refresh-auto), the headline of the popup is the common.name of the state both
POWER power-standby, on/off both
BOOST fast-forward-60, on/off both
WINDOWOPEN window-open-variant / window-closed-variant thermostat only
PARTY party-popper thermostat only
MAINTAIN account-wrench both
UNREACH wifi-off / wifi both
LOWBAT battery-low / battery-high thermostat only
ERROR alert-circle both
VACATION palm-tree thermostat only
WORKING briefcase-check thermostat only

These slots are marked with a lock in the preview and cannot be edited. With only one heat circuit the selector slot falls away and the buttons start at place 1.

For VACATION and USERICON (with airCondition also for SET and SET2) the adapter does not search by role but for the state with exactly that name below the channel โ€“ โ€ฆ.VACATION, not โ€ฆ.Vacation.

5. Set temperature: minimum, maximum, step

Click the big number in the ring.

Dialog Set temperature with minimum, maximum and step
Field Effect
Minimum temperature Lower end of the ring. Empty = 15.
Maximum temperature Upper end. Empty = 28.
Step Step of the โˆ’ and + keys. Empty = 0.5.

The hint in the dialog names both points: "Empty limits = adapter defaults (15 / 28 / 0.5). With the option 'Values in tenths' in the NSPanel settings the values are given in tenths (25 = 2.5 ยฐC)." The option Values in tenths applies to the whole instance and to cardThermo2 only; it affects these three numbers exclusively. The adapter rounds the step up to one tenth of a degree and limits the set point it reads to the configured window.

6. Value display: icon, color, unit

Click line 1 (actual temperature) or line 3 (humidity). The dialog contains both lines one below the other, headed Line 1: actual temperature (the unit is used for the set temperature too) and Line 3: humidity.

Dialog Value display with icon, color and unit per line
Field Effect
Icon Icon in front of the value, from the icon list. Default thermometer (line 1) or water-percent (line 3).
Color Color of icon and value. Default green (line 1) or magenta (line 3); Back to default resets it.
Unit (line 1) Text behind the value. The field applies to line 1 and to the big number in the ring (the set temperature). Empty = ยฐC.
Unit (line 3) Text behind the humidity. Empty = %.

The unit next to the big number in the ring comes from the Unit field of line 1 โ€“ so the note in the dialog heading is correct.

7. Mode display

Click the mode text below the ring.

Dialog Mode display with the list of mode texts

Mode texts, one per line (line = value of the data point, starting at 0). The hint below it names the precedence: "Empty = common.states of the mode data point, otherwise the list of the adapter: OFF, AUTO, COOL, HEAT, ECO, FAN_ONLY, DRY". The texts are translated as far as the adapter knows them.

The adapter reads the text from MODE; if that state is missing, MODESET takes its place. On the Single data points path the mode data point given there applies, and the same list determines the text; a value other than 0 means "on" there.

8. Circuit icon

Button Circuit icon below the preview.

Dialog Circuit icon with icon and the two colors

The hint in the dialog: "With more than one heat circuit the selector slots take the first places around the ring; the default is the numeral icon of the circuit."

Field Effect
Icon on the selector slot Default is the numeral of the heat circuit (numeric-1-circle-outline, numeric-2-circle-outline โ€ฆ).
Color active Color while this heat circuit is selected. Default green.
Color inactive Color of the other selector slots. Default grey.
For the cooling circuit (airCondition) With an airCondition channel icon and both colors appear a second time for the cooling circuit; there blue and a dark blue-grey are the defaults.

9. Page items: adding, moving, free slots

Second page of the slots with own items
Action Effect
Click on a free slot or Add page item Opens the item dialog. If a slot further back is clicked, the item lands exactly there; the slots before it stay free as reserved gaps.
Click on an item Opens the item dialog for editing.
Arrows on hover Move the item one slot to the left or to the right.
Dragging onto a taken slot The two swap places.
Dragging onto a free slot further back The item lands there, the slots in between stay free.
Trash Deletes the item; its slot stays free as a reserved gap, the other items keep their places. A second click on the same gap removes it.

The hint below the preview says the same: "Items can be moved with the arrows or by dragging - also onto a free slot further back; the slots in between stay free. A deleted item leaves a free slot." Reserved gaps between items are stored, gaps at the end are dropped by the adapter.

An item is dragged onto another slot

The item dialog is the general page item dialog, described under Recurring dialogs. Three things are special on this card:

Item dialog with the field Heat circuit

Items for all heat circuits can sit on different slots per circuit, because every circuit has a different number of generated buttons in front of it. The editor always shows the layout of the selected circuit.

10. Order of the slots

Select box Order of the slots below the preview:

Select box Order of the slots
Value Label in the admin Layout
V vertical (left 1โ€“4, right 5โ€“8) Default. On the left from top to bottom 1โ€“4, on the right 5โ€“8, the ninth slot between โˆ’ and + is sent along.
H horizontal (left/right alternating) 1 top left, 2 top right, 3 left, 4 right โ€ฆ
HM horizontal, middle first like H, but starts in the second row.
VM vertical, middle first like V, but starts in the second row.
HB horizontal, bottom first
VB vertical, bottom first

The editor draws the slots in the chosen order. Only with V does the adapter fill all nine slots. With every other order it merely re-sorts the eight side slots, the ninth stays empty โ€“ the editor then shows it greyed out with a lock and the hint "Sort order %s: the adapter fills only the eight side slots - this slot stays empty, an item here is not shown on the panel".

11. Paging of the slots

More than nine slots are spread over several pages by the adapter. How the paging works is not set in the editor but on the right in the column Navigation/Panel under the page details (see PageConfig โ€“ Overview).

Paging of the page items in the page details

Paging of the page items:

Choice Effect
Classic "More items than places: the arrows of the panel page through them." โ€“ the default. The navigation arrows at the top of the panel become paging arrows as long as there is another page.
Arrow "More items than places: the last place shows an arrow that pages on." โ€“ here that is the ninth slot between โˆ’ and +; eight places remain for slots. The arrow only appears once more than nine slots come together, and on the last page it pages back to the first.
Automatic "Like classic, the page also advances by itself after the set time." โ€“ with the field Seconds until the next page (empty = 15).

Scroll by (Full page / Half page) appears on this card because it is in the list of half-page-capable cards. The choice is, however, without effect: when building the page the adapter resets the value to Full page in both directions.

12. Panel assignment, navigation, saving

13. Take-over from a script

A cardThermo2 page from a configuration script can be taken over into the admin completely, see Migration. In the process thermoItems become heat circuits, sortOrder becomes the Order of the slots, items become the page items and filter becomes the field Heat circuit; id yields the data source Alias channel, set/thermoId1/thermoId2/modeId the data source Single data points.

One field stops the take-over: power on the heat circuit โ€“ for an own on/off state the admin has no field (the admin has no power state). In the admin the on/off condition comes from MODESET or from the mode data point. Likewise rejected are unknown fields on the heat circuit, an empty or faulty modeList and an unknown sortOrder.

Pitfalls


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

  Back to top