Metainformationen zur Seite
What's New in V1.2.4
Enhancements-Release
Konkrete Version: 1.2.4.6 (RELEASE)
Die Version führt neue Funktionen für Entwickler ein.
Für Benutzer / For users
"LoxBerry Update" Update
INFO: 14:48:53 Try 3: Checking file size of download... INFO: 14:48:54 Returned file size: INFO: 14:48:54 Try 4: Checking file size of download... INFO: 14:48:55 Returned file size: INFO: 14:48:55 Try 5: Checking file size of download... INFO: 14:48:56 Returned file size: CRITICAL: 14:48:56 Error downloading file.
Bei GitHub scheint sich etwas geändert zu haben (ich hoffe, das hat nichts mit der Microsoft-Übernahme zu tun…), jedenfalls beantwortet GitHub, von wo die LoxBerry Updates direkt geladen werden, eine Standardanfrage zur Ermittlung der Dateigröße nicht mehr. Wir wissen nicht, ob das alle betrifft, oder viele oder nur manche.
Wir haben in V1.2.4 diese Dateigrößenüberprüfung vor dem eigentlichen Download ausgebaut und verlassen uns in Zukunft auf den Integritätscheck beim Entpacken. Damit funktioniert ab V1.2.4 das LoxBerry Update wieder wie gewohnt.
Da nun natürlich betroffene LoxBerrys nicht auf V1.2.4 updaten können, haben wir hier ein LoxBerry Update FIX-Plugin bereitgestellt, das einmalig die Installationsroutine behebt:
→ Plugin "LoxBerry Update FIX"
Nach der Installation kann LoxBerry Update normal verwendet, und das Plugin wieder deinstalliert werden.
The github.com website, where the LoxBerry Updates directly come from, seems to stop to respond to a standard request to aquire the filesize. We used that information to compare it with the later downloaded update file.
With V1.2.4 we have removed this check and now trust on the integration check of the unzipping process. Therefore, from V1.2.4 the LoxBerry Update feature works as usual.
To get the installation routine without the check, please install the following LoxBerry Update FIX plugin, that one-shot replaces the installation routine.
→ Plugin "LoxBerry Update FIX"
After you have updated, you can savely uninstall the plugin.
Neues Image LoxBerry 1.2.0c / New image LoxBerry 1.2.0c
Um dieses Update-Problem für Neuinstallationen von LoxBerry zu korrigieren, haben wir das Installations-Image um diese Korrektur erweitert. Das neue Image ist ab sofort bei den Downloads als latest.zip verlinkt, sowie im raspberry-Ordner enthalten. Das Image ist weiterhin die Version 1.2.0. Mit LoxBerry Update kann damit sofort auf die neue Version aktualisiert werden.
Zusätzlich wird ab diesem Image automatisch nach dem ersten Reboot der LoxBerry auf die aktuellste Release-Version aktualisiert und das Autoupdate aktiviert.
To solve the update issue for new LoxBerry installations, we have added the fix directly to the installation image. The updated image is available as latest.zip in the Download section, and in the raspberry-Folder. The installed version is still 1.2.0, but with the fix it can directly be updated by LoxBerry Update.
Furthermore we upgrade every installation right after the first reboot to the latest release version from now on. Autoupdate is enabled by default now.
LoxBerry Update Verlauf / LoxBerry Update History
Am Tab "LoxBerry Update Verlauf" (im Widget "Updates") wird jetzt übersichtlicher dargestellt, welche Updates (auf welche Version) durchgeführt wurden, und ob es dabei Fehler, Warnungen oder sonstige Schwierigkeiten gab. Außerdem wird die Anzeige jetzt schneller aufgebaut.
Da einige der Funktionen erst nach und nach in LoxBerry integriert wurden, könnten ältere Einträge in der Übersicht nicht alle Informationen enthalten.
Im Screenshot ist auch der Unterschied bei der Logfile-Größe durch das Reduzieren der Verbosity erkennbar.
On the tab "LoxBerry Update History" (widget "Updates") we've worked to make the display more clearer. It now lists the destination version an update is going to, and signals in colors any errors or warnings during the installation process. Moreover, the history now opens faster.
As some of the used features for logging came into LoxBerry gradually, for older entries the overview may be incomplete.
In the screenshot, also the difference in filesize is visible, after reducing the verbosity level of LoxBerry Update.
Loxone CloudDNS
Loxone hat kürzlich die Webseite von CloudDNS angepasst, weshalb die LoxBerry-Funktionen zum Auslesen von CloudDNS nicht mehr funktioniert haben. Dies ist mit dieser Version korrigiert.
Für Entwickler nochmal der Hinweis, dass die Funktion get_miniservers immer die richtigen IP und Port zurückliefert, egal ob es sich um einen lokalen oder einen CloudDNS-Miniserver handelt. Ein Plugin muss das nicht speziell berücksichtigen.
Loxone shortly changed their website for CloudDNS, therefore the LoxBerry functions to fetch the CloudDNS address did not work anymore. This was corrected in the current version.
For delevopers a hint: The function get_miniservers always delivers the correct address, independent of the setting of the user (local host/ip or CloudDNS), as the function automatically requests the correct ip and port, if CloudDNS is enabled in the LoxBerry Miniserver widget by the user. You don't need to care about the users setting.
LoxBerry-Start ohne Internetverbindung
Aufgrund von Rückmeldungen von Plugin-Entwicklern bei LoxBerry 0.2.3, dass deren Dienste (Daemons) abbrechen, weil die Netzwerkverbindung noch nicht online ist, hatten wir in LoxBerry 1.x vor dem Plugin-Daemon-Start eine Internet-Überprüfung eingebaut. Diese hat http://google.com abgerufen, und den Start der Plugin-Daemons erst freigegeben, wenn dies funktioniert hat.
Nicht berücksichtigt haben wir dabei - damit haben wir echt nicht gerechnet - unsere chinesischen Benutzer! Leider ist google.com in China nicht verfügbar, was beim LoxBerry-Boot zu Problemen geführt hat.
Wir haben jetzt eine saubere Lösung auf Basis der Netzwerkdienste des Startmanagers (systemd) implementiert. Ist nach 90 Sekunden das Netzwerk nicht verfügbar, wird der Start ohne Netzwerk fortgesetzt.
Empfehlung an die Plugin-Entwickler: Bei den Daemons bei einem Verbindungsfehler den Dienst nicht sterben lassen, sondern einfach immer wieder probieren.
?????google.com?????LoxBerry??????
Manuelle Netzwerk-Shares in /etc/fstab
Manuell hinzugefügte Netzwerk-Shares in /etc/fstab werden jetzt bei jedem Reboot automatisch gemountet.
SWAP-Datei
Der LoxBerry verwendet jetzt - sollte das RAM voll sein - wieder ein SWAP-File, wo Teile des Hauptspeichers auf die SD-Karte ausgelagert werden. Das war zur Schonung der SD-Karte zuvor abgeschaltet worden. Wenn der Hauptspeicher allerdings knapp wurde, hat das zu Problemen (bis zum Einfrieren des Systems) geführt. Die SWAP-Datei wird jetzt wieder verwendet, aber nur im "äußersten Notfall" durch den Kernel verwendet (swappiness = 1). Eine Schädigung der SD-Karte sollte daurch nicht auftreten.
For plugin developers
Use own JS libraries and CSS files (Perl, PHP)
As of LoxBerry V1.2.4 you can "inject" your plugin to the html <head> to include own CSS files and JavaScript helper libraries. See Include own JS libraries and CSS files.
Perl module LoxBerry::IO
The new Perl module LoxBerry::IO simplifies communication to the configured Miniservers. Currently it provides the functions mshttp_send and mshttp_get, and msudp_send to send webservice REST requests and UDP messages.
Additionally, to reduce Miniserver load, there are functions LoxBerry::IO::mshttp_send_mem and LoxBerry::IO::msudp_send_mem. They are equal to the non-mem variants, but automatically keep track of your sent parameters, and only send incrementals to the Miniserver. Your smart Pi manages to avoid stress in your Smart Home - see the documentation of the functions, how LoxBerry keeps track about the incremental transmission.
The "raw" feature LoxBerry::IO::mshttp_call allows you to send the "raw" Loxone webservice paths (e.g. /dev/sps/io…) using the LoxBerry-configured Miniservers. Besides http code and value, it returns a readily parsed datastructure of the response.
We will add further functions in the future to improve network communication to the Miniserver and in general.
Logging Modules LoxBerry::Log (Perl) and loxberry_log.php (PHP)
We did some improvements on the logging code, to make it more funny and less demotivating
Improvements:
- You now can use the logging shortcuts (LOGINF, LOGERR etc.) without initializing a logging object. If so, it behaves like printing/writing to STDERR. No file is generated, but output is sent to STDERR. The loglevel automatically is taken from the user setting in the plugin management widget, or, if it cannot get a loglevel there, it is set to 7 (Debug).
- There were constellations, that required parameters (mandatory) that later weren't used at all. That lead to unhappy error messages. As the "mandatoriness" of parameters depends on other parameters, the parameter evaluation now is better.
- The logging feature now stores the message sent with LOGSTART and shows this in the log list.
- The logging feature also now stores the highest severity you've logged. Therefore, in the loglist the severity of your logfiles is shown in colors, for the user to find logs with errors more easily.
- When the user has set the loglevel "Off" in the plugin management, the logging modules really do not write any files anymore. Before, at least a LOGSTART and LOGEND was written to the logfile everytime.
- Using the addtime parameter, the layout of logging entries was messed up. The timestamp now is added at the front of every line, except to the LOGSTART end LOGEND event (that implicitely includes the time).
- A debug message was removed, that created the impression of an error, put it wasn't.
Review the LoxBerry logging features: Usage of the logging module (Perl) and LBLog::newLog (logging constructor PHP).
mslist_select_html: A small gimmick for faster UI development (Perl, PHP)
The tiny function LoxBerry::Web::mslist_select_html (Perl) and LBWeb::mslist_select_html (PHP) creates a ready-to-use HTML with a Miniserver selection dropdown. Just print/echo it to your Web-UI. With parameters you can pre-select a Miniserver number, e.g. the currently selected Miniserver from the config file. Also change the label (read it from your language file), or use multiple of these dropdowns with different form names.
Testing plugin installations with unreleased LoxBerry versions
As you know, in your plugin.cfg you can limit the LoxBerry minimum and maximum versions that are requested by your plugin (LB_MINIMUM and LB_MAXIMUM). If your plugin uses new SDK functions that are not yet in a LoxBerry release, but in the latest commit, you could not set LB_MINIMUM to this future version, because the plugin installation will be canceled ("Never LB version required").
Starting with LoxBerry 1.2.4, if you have set LoxBerry Update to Latest commit, the plugin installation now ignores the minimum and maximum version in the plugin.cfg and warns you about what you are doing here.
This is useful to prevent users to install your plugin, but give testers the possibility to use the latest LoxBerry commit together with your plugin.
Last enhancement/feature release is 1.2.5
The LoxBerry-Core team agreed that the next release, 1.2.5.x, will be the last feature/enhancement release of the 1.2 series.
It will bring some final improvements to the RAM-disk problems, and follow-ups of functions in the PHP library, that are missing compared to the Perl SDK.
We will further publish hotfix releases, but will concentrate to support plugin developers to use the current SDK features, and finish own plugin projects that were delayed due to LoxBerry 1.x development.
Developers, or upcoming developers, please contact us for backing you on your work. Use the PM function in LoxForum to exchange contact infos for the WhatsApp Plugin Developer group.
Weitere Verbesserungen und Korrekturen
- Das Logfile von LoxBerry Update wurde durch das Zurückschrauben des Verbosity-Levels verkleinert.
- Werden bei einer Plugininstallation weitere Pakete per apt nachinstalliert, werden jetzt die "empfohlenen weiteren Pakete" von apt nicht automatisch mit installiert (–no-install-recommends). Das spart Platz auf der SD-Karte.
- Ein Problem bei get_localip (Perl, PHP) wurde behoben, dass die Ermittlung der eigenen Netzwerkadresse nicht in jedem Fall funktioniert hat.
- Das Update korrigiert Einträge in der Logfile-Datenbank, die durch einen Bug sehr groß ist bzw. wurde. Das hat dazu geführt, dass durch das Logging regelmäßig die RAM-Disks voll wurden und Plugins ausgefallen sind. Beim Update werden fehlerhafte Einträge korrigiert und die LogDB hat dann wieder ihre normale Größe.