NSPanel Documentation โ—† Icon overview GitHub Deutsch

Maintain

The first tab of the instance settings: for every panel of the table it shows a card with the connection state, the Tasmota version, the TFT firmware, the Berry driver and the script version, detects differences and triggers the updates. This is also where the Panel active switch sits and the Take script over into admin button, with which an existing script configuration moves into the admin.

Contents:

1. The tab at a glance

The tab only appears once the MQTT settings are complete โ€” own server or broker IP, port and credentials (user and password, or alternatively the central credential ID with a foreign broker) โ€” and at least one panel is in the table under NSPanelsetting. If any of that is missing, the tab is not visible.

The Maintain tab with the card of a connected panel

Above the cards sit:

Element Effect
Documentation Opens this page in a new tab.
Help for adapter installation (red text button) Opens the wiki page adapter installation in a new tab.
Update scripts for all panels The same as SCRIPT UPDATE, but for every panel whose script version differs from the shipped template. Panels with the Panel uses no script checkbox are left out. The button is orange while there is something to do, and grey when nothing is pending, the instance is not running or another operation is in progress. If the update fails for individual panels, the run continues with the others and names the affected panels in the red error line at the end (The script update failed for these panels: โ€ฆ).
Note Beta version in use Appears while beta firmware is switched on in the Global Settings.
Red error line A message of the adapter about the last operation; it can be closed.

The tab fetches the data from the adapter when it opens, on every return to the browser tab, after every action and about five seconds after a change of the online state of a panel. If the instance is not running, there is no data: when opened, the tab stays empty and reports that the adapter is not running; if the instance dies while the tab is open, the cards turn grey and all controls are locked.

2. The card of a panel

The name is at the top, in brackets the short state: online, offline, flashing, while flashing the progress (Update: 42%) and Check! when something differs. Below it the status badge of the panel (the same states as in the panel overview, see PanelStatusBadge โ€” here without an icon and without a tooltip).

The colour of the card tells whether something needs doing: orange means "there is a difference" (Tasmota update available, TFT update or downgrade, developer version 0.0.0, a Berry driver other than the recommended one, newer script version), yellow means "currently flashing", grey means the instance is not running. With a difference the button that fixes it is additionally coloured a strong blue.

Control Effect
Web (label) Only on a standalone web panel, see section 6.
Icon Open web panel in a new tab Opens the panel in the browser; only visible when the web panels are switched on and the panel has a topic (see WebPanel).
Panel active Switches the panel on or off in the adapter. Takes effect immediately โ€” the switch writes the state panels.<panel>.cmd.activated and needs no saving. Off: the adapter tears the panel down, the status becomes Deactivated, info.isOnline becomes false, and a clone of the same panel open in a browser goes with it. On: the panel is built again without restarting the instance. The state survives an adapter restart.
Open Tasmota console Opens the console of the Tasmota web interface in a new tab โ€” with the IP entered in the panel table, not with the one reported by the panel. On a web panel the button is missing.

A panel switched off is no longer known to the adapter: the card stays, but the version fields only show --- or the placeholder (see section 9).

3. Updating Tasmota, TFT and Berry driver

Three buttons, one pattern: each asks for confirmation first โ€” with Tasmota and TFT mentioning the roughly 40 seconds in which the panel is unreachable, with the Berry driver naming the panel and the reported generation. All commands only go to panels the adapter is currently operating; the version fields refresh by themselves as soon as the panel reports back. The same tools โ€” plus the restart โ€” are available in the Tasmota tools tab, there via the IP instead of via the panel card. The ? in the confirmation of each button leads to its section here.

The confirmation before TFT UPDATE with the help question mark in the title

TASMOTA UPDATE

The adapter reads the recommended Tasmota version from the version list and sends the panel the OTA command for tasmota32-<LANGUAGE>.bin from ota.tasmota.com over MQTT. The language is the one of the admin (Chinese falls back to English). The panel downloads it itself and restarts.

With beta firmware switched on in the Global Settings the adapter takes the tasmota-beta entry of the version list โ€” if it is missing, the stable version; the version field of the card then compares against the beta as well.

TFT UPDATE

The adapter determines the TFT file matching the hardware model (nspanel[-model]-v<version>.tft), taking beta firmware and a version pinned in the Global Settings into account, and sends the panel the flash command. The panel downloads the file itself from the TFT server (internet access needed) and restarts; that takes a few minutes.

A firmware of your own that does not come from the TFT server can be flashed in the Developer tab โ€” the adapter then serves the file itself.

BERRY UPDATE

The card of a panel with the Berry driver field and the BERRY UPDATE button โ€” here the emulator, where the button stays grey

Since 2.3.0 the card shows the field Berry driver below the firmware fields with the generation of the driver the panel has reported (12), and next to it the button BERRY UPDATE. If the generation differs from the one recommended in the version list, the field says so โ€” 12 (Update available: 13) or (Downgrade recommended: โ€ฆ) โ€”, the card turns orange and the button a strong blue, exactly as with Tasmota and TFT.

After the confirmation the adapter tells the Tasmota via its web interface (at the IP of the card) to rename the existing autoexec.be to autoexec.old and to fetch the new file from the Berry server โ€” the panel downloads it itself from the internet; without internet access this fails. With beta firmware switched on in the Global Settings the adapter takes the berry-beta entry of the version list. Unlike the button of the same name in the Tasmota tools tab, the adapter here waits for the download confirmation of the Tasmota (ten seconds at most) and restarts Tasmota afterwards โ€” only then does the new driver run; the panel is unreachable for a few seconds. If the confirmation does not arrive, there is no restart and the red error line reports No download confirmation received from Tasmota after the Berry installation. The old driver then still runs, but only until the next restart of the Tasmota, because its file has already been renamed: repeat BERRY UPDATE as soon as the panel gets internet access.

The field is missing on web panels. On the emulator it reads Emulator (12) โ€” it has no real driver, the button stays grey, and there is no update hint.

4. Script version and SCRIPT UPDATE

The Script version field compares the version in the configuration script of the panel (script.js.nspanel-lovelace-ui_<instance>.<panel name>) with the version of the template the adapter ships. SCRIPT UPDATE creates the script or brings it up to that state โ€” and refreshes the global script globalPageConfig in the same go.

What survives a script update

The panel script has a marker line reading END STOP END STOP END - No more configuration - END STOP END STOP END. Everything below it is replaced, everything above it stays โ€” so your own additions only survive an update if they live above the marker. In the global script the line stopScript(scriptName, undefined) takes that role.

โš ๏ธ Removing the marker from the script makes it un-updatable: the update stops with an error message and the script stays unchanged. If the marker is only missing from the global script, the panel script is written all the same โ€” the error of the global script then shows up as a message in the admin, and SCRIPT UPDATE does not refresh the card in that case (up to and including 2.2.0 it appeared in the log alone). In the third step of the panel setup it remains a log line.

Furthermore:

Anyone moving from the script to the admin does not need this button but the one from section 7.

5. Panels without a script

The Panel uses no script checkbox sits on the panel card under NSPanelsetting; a web panel also does without a script (see WebPanel). All consequences and the right order when moving over are under Migration. In the Maintain tab the checkbox means:

A card without a script next to an ordinary one: "Script disabled", no SCRIPT UPDATE, grey take-over button

6. Web panels in the tab

A standalone web panel stands in the tab with a card of its own, labelled Web. It has no Tasmota firmware and no TFT display: the rows Tasmota version and TFT version and the button for the Tasmota console are missing, a blue note takes their place. What remains is the status badge, Panel active, the script row and the icon for opening it in the browser.

A browser window of a real panel, by contrast, gets no card of its own โ€” it belongs to the card of its hardware panel.

7. Taking the script over into the admin

Every panel card has the Take script over into admin button in its script row. With it the configuration that the script of the panel sent to the adapter moves into the admin configuration: pages into the PageConfig tab, the screensaver into the Screensaver tab, the hardware buttons onto the panel card under NSPanelsetting.

Which page types are taken over, what happens to the script source and how things continue afterwards is described in full under Migration. This section is about the procedure in the admin.

Prerequisites

The script object itself does not have to exist any more: then the adapter creates no backup, changes no source code and only converts the stored configuration. The error messages of the adapter appear in the dialog in English; only the note about the checkbox is translated.

The preview

The click opens the dialog Take the script over into the admin โ€“ <panel name> and asks the adapter what can be taken over. Nothing is changed in the process. The dialog shows, from top to bottom:

Block Content
Script id Which script object is meant.
Notes If the script object is missing (no backup, source code stays), if there is nothing to take over, if the admin has unsaved changes โ€” and always the note about the backup or "no backup" together with the warning that the admin has to be reloaded afterwards.
Summary One line: Pages: n are taken over (โ€ฆ new, โ€ฆ navigation only, โ€ฆ reference removed only), n skipped ยท Screensaver: โ€ฆ ยท Hardware buttons: โ€ฆ.
Pages of the global script that differ from the admin Only if there are any: per page the differing fields and the choice Keep admin version (assign panel), Take script version or Skip. If the page is assigned to further panels, the dialog warns that Take script version takes effect there as well. Every changed decision fetches a new preview; the decisions go along on taking over.
Problems and notes A skipped screensaver, skipped buttons, skipped pages โ€” each with the reason and, where possible, the field or element concerned (e.g. items[3].confirm). Plus the pages that are stored under a different name (stored in the admin as "main_<panel name>" (flagged as start page)) and those of which only the reference in the script disappears. If there is nothing to report, it says No problems โ€“ nothing is skipped.
Taken over as raw data Not a problem, just information. Items the editor has no fields for are taken over unchanged as raw data โ€” the panel behaves as before. Per page (and for the screensaver) the number of items, and per item the position, the format (native (runtime item) or script (as in the script)) and the reason. They can be edited later in the item dialog with the { } button (see PageConfig-Dialoge).
Long press dropped Information as well: items whose long press falls away. A long press only exists on the grid pages (cardGrid, cardGrid2, cardGrid3) โ€” the items are taken over without longPress/targetPageLongPress, everything else stays.
Details: n pages Collapsed, so that a script with many pages does not bury the problems. Expanded: per page the name, the page type (and the type of the admin entry if it differs), the number of items, the navigation and the action โ€” new admin entry, navigation only (entry exists) or removed from the script only. Below that the screensaver (name, version, items, notifications) and the hardware buttons with their action.

At the bottom there are Cancel and Take over. If there is nothing to take over, only Close remains.

Taking over, report, reloading

  1. Take over. The adapter first parks the admin entries in its meta object, then backs the script up and cleans it, stores the cleaned script configuration, answers the dialog and only then writes the instance configuration. That order is necessary because every write of the instance configuration restarts the adapter. If the adapter does not answer within 60 seconds, the dialog gives the request up and points out that the take-over may have run through all the same โ€” check the log first in that case. While the adapter works, the dialog cannot be closed.
  2. Report. On success it reads Taken over with the tally (n pages created, n navigations assigned, n references removed, plus screensaver and buttons). Below it the Script section: backup id, backups moved up and deleted, whether the source code was changed, and the warning list Not changed in the script source (please check by hand) with everything the adapter could not find unambiguously in the source.
  3. Reload the admin. The button in the dialog reloads the admin page. That is not optional: the instance configuration loaded in the browser is out of date after the take-over, and saving would overwrite the new entries again. While the adapter restarts, the admin may briefly show "not connected".

Other results: Nothing was changed (the run stopped before anything was written), Partially executed (one write failed after the first one had already gone through โ€” the dialog names the backup id and says whether the parked plan will be applied on the next adapter start) and Taken over with the addition that no restart was announced (the entries then apply with the next start). The individual cases are described under Migration.

IMPORTANT

Save all changes in the admin before the take-over. The adapter writes the instance configuration itself, and the reload afterwards discards unsaved changes. The dialog warns, but cannot enforce it.

A further click after the take-over shows Nothing to take over โ€” unless pages are left that the admin cannot map; those keep standing under Problems and notes and stay in the script.

8. When a button stays grey

Button Conditions
TASMOTA UPDATE A valid IP and a valid topic, complete MQTT settings (port and user/password, or with a foreign broker the central credential ID), with the own server additionally a usable internal server IP (not 127.0.0.1), and a panel that is online and not currently flashing.
TFT UPDATE A reachable panel with an IP that is not currently flashing.
BERRY UPDATE A valid IP โ€” the panel has reported its address โ€” and no flash in progress. The display may be offline: a missing or broken driver is exactly what keeps it offline. On web panels the button does not exist, on the emulator it stays grey.
SCRIPT UPDATE Panel name and topic; if the Panel uses no script checkbox is set, the button is not there at all.
Take script over into admin A topic present and the Panel uses no script checkbox not set.
all The instance is running, and no other operation is in progress for this panel.

"Online" is stricter here than in the head line: the buttons require a panel that has reported and finished its setup. So straight after an adapter start the head line can read online while the buttons are still grey.

9. What the version fields say

Display Meaning
v1.2.3 The version reported by the panel or found in the script.
(Update available) / (Downgrade recommended) The version differs from the recommended one.
(Developer version!) with TFT 0.0.0 A developer version; the adapter treats that as "update needed".
??? for Tasmota or TFT The panel has not answered yet. After an adapter start that takes a moment; if it stays that way, something is wrong with the MQTT connection, the topic or the power supply.
12 for the Berry driver The generation of the driver the panel has reported; 12 (Update available: 13) when the version list recommends a different one.
??? for the Berry driver The panel has not reported a driver version yet. Normal shortly after the start; if it stays that way, a driver is running that does not know its version, or none at all โ€” then BERRY UPDATE helps (BERRY UPDATE).
Emulator (12) The emulator with the feature set of generation 12; the old emulator reads Emulator - no Berry driver.
??? for the script version There is no script object with the name of the panel โ€” never created, or the panel was renamed. This has nothing to do with the panel.
--- The adapter is not currently operating this panel (switched off, or never connected).
Script disabled The Panel uses no script checkbox is set (section 5).

The same values are available as states under panels.<panel>.info.*, see Panelinfo.

Pitfalls


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

  Back to top