Metainformationen zur Seite
Whats New in V2.2.0
Minor Image Release "Pippin" - der beste Freund von Meriadoc Brandybock und Frodo Beutlin
Für Benutzer | For users
Unterstützung für Miniserver Gen2 HTTPS | Support for Miniserver Gen2 HTTPS
Ab LoxBerry V2.2.0 wird die HTTPS-Verbindung vom LoxBerry zum Miniserver Gen2 unterstützt. Unterstützt wird HTTPS zu lokalen und Remote-Miniservern sowie auch via CloudDNS.
Die Einrichtung erfolgt im Miniserver Widget:
- Dafür die Schaltfläche "HTTPS bevorzugen" auswählen, und darunter den lokalen SSL-Port 443 eintragen. Bei Remote-Verbindungen kann ein anderer SSL-Port angegeben werden.
- Für Loxone CloudDNS kann ebenfalls "HTTPS bevorzugen" ausgewählt werden. Den korrekten HTTPS-Port bezieht LoxBerry dann direkt vom Loxone CloudDNS-Server.
Bei der Authentifizierungsprüfung (siehe oranges Feld im Bild) werden oben nun beide Protokolle, HTTP und HTTPS, in rot oder grün angezeigt. Ist "HTTPS bevorzugen" nicht aktiv, wird dort nur HTTP angezeigt.
Wir haben bei CloudDNS außerdem noch die Infos vom CloudDNS-Server hinzugefügt, damit kannst du die bei Loxone gerade hinterlegten Verbindungsdaten überprüfen.
Folgendes gilt es zu beachten!
- Der Miniserver Gen1 und der Miniserver Go unterstützen kein HTTPS.
- Plugins müssen HTTPS explizit unterstützen. Alle Plugins, die die Funktionen von LoxBerry's eigenen IO-Komponenten verwenden, unterstützen automatisch HTTPS. Wir werden die Plugin-Entwickler bitten, die Unterstützung von HTTPS in die Plugin-Beschreibung aufzunehmen.
- Plugins, die nicht für HTTPS umgebaut wurden, werden weiterhin HTTP verwenden. Deswegen solltest du dennoch den HTTP-Port am Miniserver aktiviert lassen (aber nicht ins Internet durchschalten).
- Wenn "HTTPS bevorzugen" aktiviert und von LoxBerry bzw. dem Plugin berücksichtigt wird, und die HTTPS-Verbindung nicht funktioniert, gibt es keinen Fallback auf HTTP.
- Die LoxBerry-eigenen Funktionen haben die Prüfung des Stammzertifikats sowie des Hostnamens deaktiviert. Wir möchten keinen Support leisten, wenn ein LoxBerry-Benutzer Probleme bei der Einrichtung von CAs und DNS hat.
- Andere Übertragungsmethoden (TCP, UDP) sind generell nicht verschlüsselt. HTTP von Miniserver zu LoxBerry bleibt ebenso unverschlüsselt.
From LoxBerry V2.2.0 https is supported from LoxBerry to Miniserver Gen2. Local Miniservers, remote Miniservers and CloudDNS Miniservers.
Configure HTTPS in the Miniserver widget:
- Enable the checkbox "Prefer HTTPS", and enter the https/ssl port 443 (for local Miniservers), or the remote https port for remote Miniservers routed through a port-forwarding.
- For Loxone CloudDNS simply enable "Prefer HTTPS". LoxBerry automatically aquires the correct port from the Loxone CloudDNS-Server.
The authentication check (see orange mark on the picture) now responds with both HTTP and HTTPS, if "Prefer HTTPS" is enabled. Without, only HTTP is displayed.
We also have added some information from the Loxone CloudDNS server if CloudDNS is used. So you can double-check what connection information Loxone currently knows about your Miniserver.
Please keep attention on this!
- Miniserver Gen1 and Miniserver Go do not support HTTPS.
- Plugins need to explicitely support HTTPS. All plugins using LoxBerry-own io libraries automatically support HTTPS. We invite our plugin developers to do a clear statement in their plugin description if https is supported.
- Plugins that aren't changed to support HTTPS will further use HTTP. Therefore, you should keep HTTP enabled on your Miniserver (but not routed to the Internet!).
- When "Prefer HTTPS" is enabled and used by LoxBerry or a plugin, and your HTTPS connection fails, there is no fallback to HTTP.
- LoxBerry's own functions and libraries (Perl, PHP) have disabled the CA and hostname checks. We don't like to do certificate and dns support.
- All other transports (TCP, UDP), and Miniserver to LoxBerry, stay unencrypted.
Unterstützung von Miniserver Gen2 IPv6 | Support for Miniserver Gen2 IPv6
LoxBerry und alle LoxBerry SDK Bibliotheken unterstützen nun vollständig die Verbindung zu einem Miniserver mit IPv6. Dies gilt für lokale Miniserver als auch über Loxone CloudDNS.
Bei lokalen Miniservern kann die IPv6-Adresse einfach ins IP-Adresse-Feld im Miniserver-Widget eingetragen werden. Für CloudDNS ist gar keine Konfiguration notwendig.
Wichtig!
Plugins unterstützen IPv6 möglicherweise noch nicht. Wenn keine Notwendigkeit besteht, den Miniserver ausschließlich auf IPv6 einzurichten, sollte weiterhin eine IPv4-Verbindung genutzt werden.
LoxBerry and all LoxBerry libraries now also fully support Miniservers configured with IPv6. This is valid for local installations and for Miniservers connected via Loxone CloudDNS.
For local Miniservers, simply set the IPv6 address to the IP address field in the Miniserver widget. For Miniservers via CloudDNS, no setting at all is required.
Attention!
Plugins may not be compatible with IPv6. If there is no requirement for an IPv6 connection, you may still want to use IPv4.
Unterstützung für Raspberry Pi 4 mit 8 GB | Support for Raspberry Pi 4 with 8 GB
LoxBerry 2.x unterstützt bereits alle Raspberry Pi 4-Modelle bis 4 GB RAM. Die letzte Neuerscheinung, der Raspberry Pi 4 mit 8 GB RAM war bisher nicht unterstützt. Dieses Update aktualisiert den Kernel von LoxBerry, um Raspberry Pi 4 mit 8 GB RAM zu unterstützen.
LoxBerry 2.x already supports Raspberry Pi 4 up to 4 GB RAM. The latest Raspberry 4 with 8 GB RAM was not supported. This version updates the kernel to support Raspberry Pi 4 with 8 GB.
Ländereinstellung in Mein LoxBerry | Country selection in My LoxBerry
Zusätzlich zur Sprache kann in Mein LoxBerry jetzt auch das Land eingestellt werden. Die Liste ist nach dem zweizeichigen Ländercode sortiert (at, de usw.), wie er in der Regel auch für Domänen genutzt wird. Die Einstellung ist optional. Plugins können damit in Zukunft länderspezifische Informationen anzeigen.
Additionally to the language, also the country now can be defined in the My LoxBerry widget. The list is sorted by the two-character country code (at, de etc.) as that usually used in internet domains. The setting is optional. In future, plugins can show country-specific information if set.
Selbsttest: Übermittlung per MQTT | Healthcheck: Submission by MQTT
Der LoxBerry Selbsttest, der einmal täglich automatisch läuft, wird nun auch per MQTT übermittelt, und kann per MQTT Gateway Plugin am Miniserver ausgewertet werden. Per MQTT wird dabei eine Zusammenfassung aller Checks, sowie die Ergebnisse der Einzelchecks übermittelt. Welche Daten übermittelt werden sollen, kann über die Subscriptions im MQTT Gateway Plugin eingestellt werden. Das Basistopic der Subscription ist <hostname>/healthcheck/# . Siehe dazu Healthcheck.
Loxberry's Healthcheck, that runs automatically once a day, now also submits it's results by MQTT, when the MQTT Gateway plugin is installed. The healthcheck submits a summary of all checks, and the results of every single check. By the subscription, you can define what you want to be submitted to the Miniserver. The base topic for the subscription is <hostname>/healthcheck/#.See Healthcheck for details.
Selbsttest: Plugins können sich in den Selbsttest integrieren | Healthcheck: Plugins can integrate to LoxBerry's Healthcheck
Ab LoxBerry 2.2 können sich Plugins in den Selbsttest integrieren. Der Selbsttest ist erreichbar mit dem Widget Mein LoxBerry / Selbsttest. Plugins werden unten dargestellt und das Ergebnis angezeigt. Die Routinen zur Prüfung bestimmen die Pluginentwickler selbst. Das Ergebnis des Healthchecks inklusive der Plugin-Prüfungen wird auch per MQTT übertragen.
From LoxBerry 2.2 plugins can integrate into LoxBerry's Healthcheck. You reach the Healthcheck by the widget My LoxBerry / Healthcheck. Plugins are listed below including their check result. The check routines are defined by the plugin developers themselfs. The result of the Healthcheck including the plugin results is also submitted to MQTT.
Log Manager: PHP Log
Das PHP-Log ist jetzt direkt in der Navigationsleiste des Log Managers erreichbar.
The PHP logfile now is accessible directly from the Log Manager navigation bar.
Systemzeit → LoxBerry Dienste | Timeserver → LoxBerry Services
Wir haben das Systemzeit-Widget ins LoxBerry Dienste Widget verschoben.
In der Zeitserver-Einstellung hast du jetzt auch die Möglichkeit, bei der Übernahme der Zeit vom Miniserver, den gewünschten Miniserver auszuwählen.
Außerdem wurde das Logging von der Zeitübernahme verbessert (Log Manager → Core → Setdatetime).
We've moved the Timeserver widget into the LoxBerry Services widget.
In the Timeserver settings, if you syncrhonize time from Miniserver, you now can select the prefered Miniserver.
Besides, the logging of time sync was enhanced (Log Manager → Core → Setdatetime).
Further fixes and improvements
- LoxBerry Usage Statistics (https://stats.loxberry.de): Implemented a serverside logic to blacklist statistic data from LoxBerry's that use duplicate LoxBerry id's (e.g. a VM is used with the same loxberry id on many clients). New clientside implementation to automatically generate a new loxberry id if the current id is blacklisted. This should make usage counter more accurate in case that vm creators do not consider LoxBerry's image creation documentation.
- We updated the certificate of Yarn (a package installer for Node.js) and therefore fixed a warning/an error appearing about Yarn on every plugin installation.
- We removed translations of interim status of the plugin installation process. Only the final messages stay in the user language, all other phrases are now in English. This reduces overhead for our LoxBerry translators, and simplifies searching for a code location from a logfile for developers.
- As the used Raspbian download mirror sometimes was offline, we added some alternative mirrors as fallback.
- The DHCP leases files are now backuped and restored during system restart, preventing to get a new ip assigned on reboot.
- We improved a function that was propably responsible for loosing the fstab file, leading to "Filesystem is read-only". We hopefully have now addressed this bug.
- Added LoxBerry XL to usage statistic (like a plugin) - just to see if it is worth to further improve!
- We have added a tool to clone your LoxBerry SD card from the running system to a new SD card (also a smaller card is possible). The script implicitely expands the /boot partition of the clone to 256 MB. See clone_sd.pl - Clone SD card
- Updated translation NL (thanks to gmkey!)
LoxBerry XL - EXtended Logic
XL-Logo-Version-2.png?version=1&modificationDate=1583261899000&api=v2
In LoxBerry 2.2 präsentieren wir LoxBerry XL - EXtended Logic. Diese Funktionsbibliothek ist für Anwender von LoxBerry mit Scripting-Skills. LoxBerry XL stellt für PHP eine einfache Möglichkeit bereit, Daten mit dem Loxone Miniserver auszutauschen, ebenso mit dem MQTT Gateway Plugin. Zudem stellt es eine Reihe von einfachen Script-Funktionen bereit, um einfache Logiken aufzubauen, die mit dem Miniserver viel Klick-Arbeit wären. Beispielsweise stehen Zeit- und Sonnenstandsfunktionen bereit.
Wir werden nach euren Wünschen und Ideen den Funktionsumfang weiter ausbauen.
Schau dir LoxBerry XL an → LoxBerry XL - EXtended Logic
With LoxBerry 2.2 we present: LoxBerry XL - EXtended Logic. This function libraty is thought to be used by LoxBerry users with scripting skills. LoxBerry XL provides functions for PHP to easily communicate with the Miniserver, and also to the MQTT Gateway plugin. It also provides simple functions to create easy script logics, that are more funny then to click together in the Miniserver. For example, there are time and solar altitute functions.
From your wishes and requests, we will further improve LoxBerry XL with new functions.
Check out LoxBerry XL → LoxBerry XL - EXtended Logic (sorry, currently German documentation only)
For developers
Plugin support matrix HTTPS and IPv6
First of all: All interfaces and config files stay fully compatible to earlier LoxBerry versions. Therefore: Your plugin users using IPv4, and/or http to connect to their Miniserver, will have no difficulties to further use your plugin.
This tables show interfaces/libs and if they will work with HTTPS and IPv6 WITHOUT CHANGES of your Plugin.
Normal: HTTP IPv4 | Prefer HTTPS | IPv6 address | Prefer HTTPS IPv6 address | CloudDNS Prefer HTTPS | CloudDNS IPv6 address | CloudDNS Prefer HTTPS IPv6 address |
|
Using MQTT Gateway interfaces | YES | YES | YES | YES | YES | YES | YES |
Using LoxBerry::IO (Perl) | YES | YES | YES | YES | YES | YES | YES |
Using loxberry_io.php (PHP) | YES | YES | YES | YES | YES | YES | YES |
Using get_miniservers (Perl / PHP) | YES | FALLBACK | DEPENDS | NO | FALLBACK | DEPENDS | NO |
Reading general.cfg file | YES | FALLBACK | DEPENDS | NO | FALLBACK | DEPENDS | NO |
What the labels mean
YES Your plugin requires no change and is compatible with https and ipv6.
FALLBACK The Miniserver widget asks for both http and https ports if "Prefer https" is enabled. CloudDNS aquires both http and https ports. If your plugin reads the "Port" setting from get_miniservers or general.cfg, it will still connect with http. In the CloudDNS case, the user must have the http port open on the router/firewall.
DEPENDS The Miniserver widget stores the IPv6 address from the user, or a hostname, that may be resolved to an IPv6 address by the DNS. It depends on the library you use to connect to the Miniserver, if IPv6 is supported in general, and the library can handle the address format
NO Without changes, the connection will fail. We introduced new fields in get_miniservers with LB2.2 to support you using https and ipv6. Your plugin requires adaptions for that.
Changes in LoxBerry::IO (Perl), loxberry_io.php (PHP)
All functions for http and udp were updated to support https and ipv6. No changes are required in your plugin.
Changes in get_miniservers (Perl, PHP)
See LoxBerry::System::get_miniservers (Perl) or LBSystem::get_miniservers (PHP) for a full description of all properties.
IPAddress
: The field now may contain: An IPv4 address (like before), an IPv6 address (new) or a hostname (like before) that may resolve to an IPv4 or IPv6 (new) address by DNS.IPv6Format
: The lib returns1
, ifIPAddress
is an IPv6 format. It does not check if a hostname will resolve to an IPv6 address! In some libraries that requires ahost:port
connection string, an IPv6 address must be escaped in [ square brackets ], e.g. "[ipv6]:port
". Use theIPv6Format
flag to easier identify if you require square brackets for theIPAddress
.FullURI
andFullURI_RAW
: This is the most exciting new implementation in LoxBerry 2.2: For http/https calls to the Miniserver, this property always returns the correct full URI to the Miniserver, including escaped (or RAW) credentials, with the correct transport (http or https), correct IPAddress format (IPv4 or IPv6), and resolving CloudDNS if used.PreferHttps
: This flag is 1, if the user has set "Prefer HTTPS" in the Miniserver widget. For http connections, this flag indicates that your plugin should consider thePortHttps
andTransport
.PortHttps
: This is the https port the user entered, or CloudDNS returned. IfPreferHttps
is 1, use this port instead ofPort
.Transport
: This property returns "http
" if "Prefer HTTPS" is disabled, and "https
" if "Prefer HTTPS" is enabled. You directly can use theTransport
property to build your URI.
If the user has Loxone CloudDNS set in the Miniserver widget, get_miniservers
always resolves IPAddress
, Port
, PortHttps
, and all other fields depending to them, so your plugin does not require to do own decisions "Is CloudDNS or not".
Changes in general.cfg
IPADDRESS
: The field now may contain: An IPv4 address (like before), an IPv6 address (new) or a hostname (like before) that may resolve to an IPv4 or IPv6 (new) address by DNS.
general.cfg → general.json migration
As the last of LoxBerry's main configuration files, the general.cfg is migrated to general.json in LoxBerry 2.2. All LoxBerry-Core widgets will use general.json as base configuration files from now.
The general.cfg will still be maintained automatically by LoxBerry for legacy. It is not intended to let general.cfg completely die, so your plugins stay running. But new features (like MSv2 https/ipv6) will not be maintained in the general.cfg anymore. To use new features of LoxBerry in your plugins, we recommend
- Perl: Switch to the LoxBerry libraries LoxBerry::System, LoxBerry::Web, LoxBerry::IO, for config files LoxBerry::JSON
- PHP: Switch to the LoxBerry libraries loxberry_system.php, loxberry_web.php, loxberry_io.php. Maintain config files in PHP's native json functions.
- Node.js, Python, Bash…: Use LoxBerry's environment variables, and our json configuration files: general.json, plugindatabase.json to get data from the user configuration.
Since LoxBerry 1.4, we have begun step-by-step to migrate LoxBerry's configuration files from the INI file format (most famous from MS-DOS and Windows) to JSON. Actually, JSON is not a config file format (as e.g. YAML or TOML is), but the format is a defined Internet (RFC8259) and worldwide (ISO/IEC21778) standard, and is defacto standard for data transfer between webservers and webbrowsers. That means, every computer in every county, with every language and programming language, will read JSON in the same way. In contrast, we already had massive problems with reading and writing the ini file format between Perl and PHP.
For your own plugins, especially if you use different coding languages for the program and the webif (e.g. Node.js script with LoxBerry PHP webif), we recommend to try json instead of an ini file.
Integrate your plugin to LoxBerry's Healthcheck
LoxBerry's Healthcheck (Widget My LoxBerry / Healthcheck ) can be run by the user manually, and additionally it is executed once a day to check the health of LoxBerry. On any error, a notification and email notification is triggered.
From LB 2.2, you can integrate your plugin to LoxBerry's healthcheck. To integrate a check script for your plugin, simply place a file healthcheck
into your plugin's bin
directory. The script language is freely choosable and evaluated by the shebang of your script. The script needs to accept fixed parameters, and return fixed output that can be parsed by the healthcheck. Your healthcheck script can do any tests on your plugin (e.g. check if your service or process is running, check a status file, etc.). See our documentation, including sample snippets for Perl, PHP, and Bash: Integrate your plugin to LoxBerry's healthcheck.
PHP: Helper class for json file handling
We introduced a small helper class LBJSON to support with opening, reading, editing and writing json files, including change detection (only really write if a change occured). See PHP Module loxberry_json.php.
Perl/PHP: Function lbcountry()
You can access the two-char country code of the user by LoxBerry::System::lbcountry() (Perl) respectively LBSystem::lbcountry() (PHP).
Further corrections and changes
- jQuery: We fixed the jQuery Mobile Slider and Flipswitch to show correct colors for on/off respectively the left and right side of the slider.
- Perl: LoxBerry::JSON: Method
write
now returns 1 on success, orundef
on failure - to check if write was successful (before, always returnedundef
). - Perl/PHP: LoxBerry::IO / loxberry_io.php: On different Loxone Config blocks, the Loxone API does not return the current block state. Adapted mshttp_get to use API's
/all
state that always returns the current block state. - Perl: Updated the MQTT::Simple library to v1.24 with an additional fix by LoxBerry-Core team (see https://github.com/Juerd/Net-MQTT-Simple/issues/11)
- Logviewer: The Logviewer didn't correctly show the & symbol in some situations.
- Upgrade Raspbian Distribution
- Upgrade to Kernel 4.19.118 (for Pi4 8GB)
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!)
Commit Log: https://github.com/mschlenstedt/Loxberry/compare/2.0.1.3...2.2.0.3