Whats New in V3.0.0

Major Image Release "Arwen" - die Tochter von Elrond, dem Halbelf, die ihre Unsterblichkeit für ihren Geliebten Aragorn aufgab.

Konkrete Version: 3.0.0.6

Für Benutzer

Überarbeitetes User Interface

LoxBerry 3.0 zeigt sich in schlankerem und aufgeräumteren Kleid mit allen notwendigen Infos in der Titelleiste. Die Fußzeile ist komplett entfallen.

  • Mit dem Home-Symbol kommst du immer zurück auf die Startseite mit den Plugins, und das Menü-Symbol listet Dir alle verfügbaren Widgets als Schnellzugriff auf.
  • Das neue Benachrichtigungen-Symbol zeigt dir in blau oder rot, wenn von LoxBerry oder einem Plugin Benachrichtigungen anstehen. Mit einem Klick kannst du alle Benachrichtigungen sehen und dort auch direkt löschen. Neben dem Hilfe-Symbol, das dich zur Hilfe und Wiki-Links von LoxBerry und den Plugins führt, findest du den Power-Knopf, der dann rot leuchtet, wenn ein Neustart erforderlich ist.
  • Das neue Menü, das von LoxBerry und den Plugins genutzt wird, ist direkt integriert und benötigt weniger Platz. Außerdem sind jetzt auch Untermenüs möglich.
  • Die neue Oberfläche ist durch einige Optimierungen jetzt schneller - auch auf einem Raspberry Pi 1. Ehrlich! Kein Marketing-Schmäh!

Betriebssystem-Update Debian 11 Bullseye

LoxBerry 3.0 verwendet die neueste Betriebssystem-Version Raspberry Pi OS Bullseye und die aktualisierte Version der Raspberry Pi Firmware. Bestehende LoxBerry’s werden auf das neue Betriebssystem aktualisiert. Der Vorgang dauert je nach Raspberry-Modell zwischen 60 und 180 (Single-Core Modelle) Minuten. Während des Updates sind die LoxBerry- und Plugin-Dienste nicht verfügbar.

Größe der Bootpartition

Für das Upgrade auf LoxBerry 3.0 muss Deine Bootpartition mindestens eine Größe von 256 MB haben. Bei sehr alten LoxBerrys ist die Bootpartition zu klein. Hier findest Du eine Anleitung, wie Du das Problem beheben kannst: Your boot partition is too small for LoxBerry 3.0

Neue Hardware Plattformen

LoxBerry 3.0 basiert bei frischen Image-Installationen nun auf der DietPi Distribution! Damit werden nun neben der gesamten Raspberry Familie zahlreiche weitere Single Board Computer (Rock Pi, Odroid, usw.) unterstützt und zudem nun auch offiziell Virtuelle Maschinen (z. B. Virtual Box)! Eine vollständige Liste findet ihr auf der DietPi Homepage.

MQTT ist Standard-Ausstattung bei LoxBerry 3.0

MQTT ist ein offenes, standardisiertes Datenübertragungsprotokoll zum beiderseitigem Austausch von Daten und Befehlen. Dieses Protokoll wird von einer Reihe von Geräten und Programmen verwendet, auch viele LoxBerry-Plugins verwenden MQTT zum Datenaustausch.

LoxBerry ist ab Version 3.0 standardmäßig mit dem MQTT Server 'Mosquitto' sowie der MQTT Gateway-Funktion ausgestattet. Die Funktionalität des MQTT Gateway Plugins wird dabei vollständig in LoxBerry übernommen. Wenn auf deinem LoxBerry bisher das MQTT Gateway Plugin installiert ist, werden beim Update automatisch alle Einstellungen, Anmeldedaten, Subscriptions und Conversions, Transformer usw. übernommen. Das MQTT Gateway Plugin wird im Zuge des Updates automatisch entfernt und ist nicht mehr installierbar. Das LoxBerry MQTT Gateway erlaubt auch wie bisher, einen eigenen MQTT Server auf einem anderen Server zu verwenden und den lokalen Mosquitto abzuschalten. Installierte Plugins greifen dann auf den von dir eingestellten MQTT Server zu.

Alle bisher dokumentierten Schnittstellen des MQTT Gateway Plugins bleiben unter den gleichen Pfaden bzw. URLs erhalten.

Wenn du Mosquitto selbst konfiguriert hast, könnte deine Konfiguration überschrieben werden. Die letzte Konfiguration vor dem Update wird gesichert unter /opt/backup.mqttgateway/.

MQTT Finder

Der MQTT Finder ist der LoxBerry MQTT-Spion: Du kannst dir darin alle Datensätze ansehen, die an deinem konfigurierten MQTT Server übertragen werden. Der MQTT Finder läuft permanent und sammelt die Daten des MQTT Servers. Beachte: Hier werden alle Daten des MQTT Servers angezeigt - im Vergleich dazu zeigt die Incoming Overview des MQTT Gateways nur jene Daten, die an den Miniserver übertragen werden. 

Mit der "Subscription syntax" checkbox kannst du MQTT Subscriptions überprüfen - es wird dann genau das angezeigt, was eine MQTT Subscription mit deiner Sucheingabe abonnieren würde.

Den MQTT Finder findest du im LoxBerry MQTT Gateway, außerdem kann er in Plugins mit MQTT-Anbindung aufgerufen werden. Um ihn direkt zu öffnen: http://loxberry/admin/system/tools/mqttfinder.cgi

Alle Infos zum MQTT Finder

LoxBerry Backup

Wir haben jetzt ein LoxBerry Backup Widget in den LoxBerry integriert. Du kannst Deinen LoxBerry (genauer gesagt die SD-Karte) nun in ein Imagefile sichern, welches Du später bei Bedarf neu auf eine SDKarte flashen kannst. Du kannst direkt manuell ein neues Backup anlegen oder Backups zeitgesteuert automatisch durchführen lassen. Die Funktionalität ist ziemlich identisch zum LoxBerry Backup Plugin, wir nutzen aber entgegen dem Plugin eine eigene Cloning-Routine für die SD-Karte.

Um Speicherplatz zu sparen kannst Du unter verschiedenen Komprimierungsformaten wählen (7-Zip, Zip, GZip, XZ) oder auch ohne Komprimierung speichern.

Das LoxBerry Backup Widget ist auch in LoxBerry 2.2.2 verfügbar, um damit deine Boot-Partition für LoxBerry 3.0 auf 256MB zu vergrößern.

HTTPS/SSL Support

Für LoxBerry kann jetzt HTTPS/SSL eingeschaltet werden. Damit ist LoxBerry und alle http-Schnittstellen der Plugins dann auch per https erreichbar. Du kannst dann beispielsweise verschlüsselt auf https://loxberry zugreifen, oder die http-Schnittstellen von Plugins verschlüsselt mit https aufrufen.

HTTPS ist standardmäßig ausgeschaltet. Du findest die Einstellung unter LoxBerry-Dienste / Webserver. Im Wiki findest du Anleitungen, wie du für verschiedene Geräte das Stammzertifikat importieren kannst, damit es keine Sicherheitswarnung im Webbrowser gibt.

Plugin Verwaltung und Plugin AutoUpdate

Wir haben in der Plugin-Verwaltung kleinere Modifikationen vorgenommen, um besser über neue Plugin-Versionen zu informieren:

  • LoxBerry überprüft jetzt auf neue Versionen bei den Plugins auch dann, wenn Automatische Updates beim Plugin ausgeschaltet ist. Es wird ggf. eine neue Versionsnummer in der Plugin-Verwaltung angezeigt. Natürlich wird keine automatische Installation durchgeführt, wenn Automatische Updates nicht aktiv ist. Bei der Einstellung "Nur Benachrichtigen" ("Notify Only") wird eine Benachrichtigung entsprechend deiner Benachrichtigungseinstellungen verschickt, bei deaktiviertem Automatischen Update nicht.
  • Die Plugin-Verwaltung zeigt jetzt bei jedem Plugin an, ob es neue Versionen gibt, oder die aktuelle Version aktuell ist ("Up-To-Date"), oder aber, dass dieses Plugin keine automatischen Updates unterstützt ("No AutoUpdate").

USB Storage mit Ext4 Filesystem

Im USB Storage Widget können nun auch Laufwerke oder einzelne Partitionen mit Linux' nativem Dateisystem Ext4 formatiert werden. Da dieses Dateisystem nativ von Linux unterstützt wird, läuft es deutlich schneller und stabiler als die Windwos-Dateisysteme (exFAT/NTFS). Insbesondere bei starker Beanspruchung des Datenträgers wird empfohlen diesen mit Ext4 zu formatieren.

Terminal im Browser

Ab LoxBerry 3.0 haben wir einen Terminal Emulator mit an Bord, der direkt im Browser läuft. Ihr benötigt nicht unbedingt ein externes SSH-Programm wie Putty, um Euch an der Konsole des LoxBerrys anzumelden (aber das geht natürlich weiterhin). Um schnell mal etwas nachzuschauen könnt ihr direkt in der WebUI des LoxBerrys nun ein Terminalfenster öffnen.

Weitere Fixes und Verbesserungen

  • Der LoxBerry wechselt nun bei Problemen mit einem Apt-Mirror (um Pakete nachzuinstallieren) automatisch den Server, wenn der aktuell verwendete Server ein Problem hat
  • Der Filemanager kann nun auch mit großen Dateien (z. B. ein 16 GB Archiv aus LoxBerry Backup) umgehen
  • Der EmergencyWebserver ist entfallen (dafür haben wir jetzt den Terminalemulator an Bord)
  • Unter der Haube wurde die Plugin-Installation verbessert
  • Der alte Wizard ist entfallen. Passwörter werden jetzt direkt per Zufallsgenerator gesetzt oder (auf Wunsch) auf "loxberry" belassen. Der LoxBerry ist danach sofort startklar.
  • Alle Wiki-URLs sind nach Abstellung/Umzug des altes Wikis auf unser neues Wiki umgestellt worden und sollten wieder funktionieren
  • Unter der Haube wurde das Passwort-Management (zum Beispiel beim Setzen des SSH-Passworts) stabilisiert und verbessert
  • In /boot/config.txt wurden einige Verbesserungen für den Pi4 ergänzt (Performance)
  • Unter der Haube wurde das Erzeugen des SWAP-Files verbessert
  • Das Einbinden von USB-Geräten wurde verbessert (u. A. bei Labeln mit Leerzeichen oder kaputten Partitionstabellen auf USB-Geräten)
  • Der Linuxkernel wurde auf die letzte stabile Version angehoben und verbessert auf dem Pi u.a. das Lüfterhandling und unterstützt die neueren Boards des Pi4
  • Verbesserungen bei den Notifications (u. a. schnelleres Löschen bei vielen Notifys)
  • Unter der Haube Verbesserungen in der zentralen Konfigurationsdatei des Loxberry (Umstellung auf JSON)

For developers (english only)

Introducing new Javascript library Vue3

LoxBerry 3.0 introduces a new JavaScript library to easify building your plugin user interface. The Javascript Framework Vue3 allows modern clientside JavaScript interaction in your forms by directly connect data (received e.g. by an ajax call) to form fields and vice versa.

JQuery and JQuery Mobile will stay on LoxBerry, so your plugins will be working without modification on LoxBerry 3.0.

MQTT Gateway plugin migration

If your plugin currently reads MQTT connection details directly from MQTT Gateway's config/plugins/mqttgateway/mqtt.json and config/plugins/mqttgateway/cred.json file, you need to change your code as explained here.

The following procedures to check the existance of MQTT Gateway plugin, and read the MQTT Server credentials, do not work anymore:

  • Using Perls/PHPs plugindata('mqttgateway'); function to check if MQTT Gateway is installed (on LB3.0 will return: Not installed)
  • Reading/Checking LoxBerry's plugindatabase.json to check if the MQTT Gateway record is present (on LB3.0 will return: Not installed)
  • Reading the config/plugin/mqttgateway/mqtt.json and config/plugin/mqttgateway/cred.json (on LB3.0 will return: Files do not exist)

Since MQTT Gateway 2.0.4 (since about 2 years, therefore almost every user is using MQTT Gateway 2.x), the MQTT Gateway stores the MQTT Server credentials in LoxBerry's general.json. If you do any of the above things in your code, change it to the procedure explained in this artice: https://wiki.loxberry.de/plugins/mqtt_gateway/mqtt_gateway_for_plugin_developers Summarized, it explains how to aquire the MQTT credentials with Perl and PHP with library functions, and for other languages how to read them from general.json.

This is a non-complete list of features that will continue to work without changes with MQTT Gateway from LoxBerry 3.0:

MQTT Gateway on LoxBerry 3.0 is "always-on". It is not required anymore to check for existance of MQTT in your plugin.

MQTT Finder Userinterface

The MQTT Finder user interface explained above can directly be opened from your plugin. With query parameters q=<yourSearch> and - if requested - &e für Subscription syntax you can predefine the query and filter checkbox. 

Try http://loxberry/admin/system/tools/mqttfinder.cgi?e&q=%2B%2Fmqttgateway%2F%23

Documentation: MQTT Finder

MQTT Finder Data

MQTT Finder also is a service that runs permanently from boot time, and collects all data of the broker (exactly it does a # subscription). The users broker is used from MQTT Gateway settings.

MQTT Finder stores all the data in the ramdisk file /dev/shm/mqttfinder.json that is updated every second. Your plugin can read this json data file as required to get the latest data. 

See the documentation of the json data structure and behaviour:  MQTT Finder

For really rapid updates you still should create your own MQTT listener (as the mqttfinder.json file is only updated every second). 

Node.js Update to V18.x

Node.js will be updated from V12 (LTS ended in April 2022) to the current Active LTS release of Node.js, V18. If you use Node.js code in your plugins, please verify the compatibility with Node V18. At this time (Dec. 2022), the specific version Node V18.12.1 is installed. The minor version may change by Node security updates, but LoxBerry has fixed version 18 set in it's source file.

PHP update to 7.4

PHP is updated from PHP 7.3 to PHP 7.4. A fast review of the migration guide did not show up major changes to core functionality.

Migration Guide PHP 7.3 → PHP 7.4 https://www.php.net/manual/de/migration74.php

Plugin Interface 1.0 is now depreciated

The very old Plugin Interface 1.0 (known from LoxBerry 0.2.3 from around 2015) is now depreciated and not supported anymore. Plugins with this old Interface will not be installed anymore. There should be nearly no maintained plugins out there anymore…

Further fixes and improvements

  • Plugininstall now fully uses the log library of LoxBerry
  • Plugininstall now uses the LoxBerry::Update library for package installation via apt
  • Post- and Preinstall-Scripts (e. g. postinstall.sh, preupgrade.sh) now must not be bash-scripts anymore. You can use whatever you like. Use the scriptname without extension (e. g. “postinstall”) and use a correct shebang (e. g. “#!/usr/bin/perl").
  • You can now install different additional software with apt depending on LoxBerrys major version number. Each major version number stands for a different Debian OS version (e. g. LoxBerry 2.0 was Debian Buster, LoxBerry 3.0 is Debian Bullseye). If you need to install different packages with apt depending on the OS version, you can now use the file “apt2”, “apt3” and so on in your plugin’s dpkg folder. If LoxBerry find these files, it will install the packages from this file and ignore the general “apt” file.
  • LBPHTMLAUTH/LBSHTMLAUTH are now available in Apache Config
  • We do not overwrite file oownerships in Plugin folders anymore (formerly we set all files to loxberry:loxberry)
  • Generic Ajax Client Server Communication: We now have a generic ajax script onboard, which can be used to handle your config file in your WebUI: Client Server Communication (ajax-generic.php)

Pre-Announcement for deprecation

  • In some of the next LoxBerry minor releases, the Perl LoxBerry::System library will not auto-use Config::Simple anymore. If you use Config::Simple in your Perl code, and it does not explicitly have a use Config::Simple; on the top, please add this line. (The Config::Simple library itself will stay on LoxBerry of course!)
  • In some of the next LoxBerry minor releases, the old “legacy” headers (e. g. the files in “~/templates/system/en”) will not be created automatically anymore. We do not use these headers since LoxBerry 0.2.3 anymore (arround 2015). This is more than 6 years ago. If your plugin still uses these old files instead of the LoxBerry::Web library for header creation, your plugin may not work anymore.
  • In some of the next LoxBerry minor releases, the obsolete gerneral.cfg config file of Loxberry (in INI format) will be removed. If you read this file directly in your plugin (you shouldn't do at all…), please move over to the general.json config file.
  • Python2 will not be available in LoxBerry 4.0 anymore, as Python2 is removed by RaspberryOS/Debian 12 ("Bookworm"). Use the time until the next major release to update your Python code to Python3.
  • PHP7.x will not be available in LoxBerry 4.0 anymore, as LoxBerry with Debian 12 („Bookworm“) will update to PHP8.1.

Deprecation notices

  • Plugin Interface 1.0 in plugin.cfg (used in LoxBerry 0.2.3) is not supported anymore. Plugins with that version will not install.
  • The LoxBerry-Core Team decided to stop support for LoxBerry 1.x, and LoxBerry's that directly update from LoxBerry 1.x to 3.0. Several years have gone since development on the 1.x versions. If issues arise with LoxBerry 1.x, we recommend to reinstall your LoxBerry with version 3.0, or "Never Touch a Running System".

Commit Log: https://github.com/mschlenstedt/Loxberry/compare/2.2.2.2...3.0.0.0