diff --git a/fhem/contrib/DS_Starter/93_DbRep.pm b/fhem/contrib/DS_Starter/93_DbRep.pm
index 3aba0dcae..144e718e9 100644
--- a/fhem/contrib/DS_Starter/93_DbRep.pm
+++ b/fhem/contrib/DS_Starter/93_DbRep.pm
@@ -472,6 +472,7 @@ sub DbRep_Initialize {
"showTableInfo ".
"sqlCmdHistoryLength:slider,0,1,200 ".
"sqlCmdVars ".
+ "sqlFormatService:https://sqlformat.org,none ".
"sqlResultFormat:separated,mline,sline,table,json ".
"sqlResultFieldSep:|,:,\/ ".
"timeYearPeriod ".
@@ -1198,9 +1199,9 @@ sub _DbRep_sqlFormOnline {
my $sqlcmd = shift;
my $name = $hash->{NAME};
- my $fs = AttrVal($name, 'sqlFormatService', '');
- $fs = 'https://sqlformat.org';
- return $sqlcmd if(!$fs);
+ my $fs = AttrVal ($name, 'sqlFormatService', 'none');
+
+ return $sqlcmd if($fs eq 'none');
if ($fs eq 'https://sqlformat.org') {
$fs .= '/api/v1/format';
@@ -15899,16 +15900,18 @@ sub bdump {
-
showTableInfo - Determine the tablenames which are selected by command "get <name> tableinfo". SQL-Wildcard
- (%) can be used.
-
+ showTableInfo
+
+ Limits the result set of the command "get <name> tableinfo". SQL wildcard (%) can be used.
+
-
- Example:
- attr <name> showTableInfo current,history
- # Only informations about tables "current" and "history" will be shown
-
-
+
+ Example:
+ attr <name> showTableInfo current,history
+ # Only information from the "current" and "history" tables is displayed.
+
+
+
sqlCmdHistoryLength
@@ -15934,9 +15937,27 @@ sub bdump {
+
+
+ sqlFormatService
+
+ Automated formatting of SQL statements can be activated via an online service.
+ This option is especially useful for complex SQL statements of the setters sqlCmd, sqlCmdHistory, and sqlSpecial
+ to improve structuring and readability.
+ An Internet connection is required.
+ (default: none)
+
+
+
- sqlResultFieldSep - determines the used field separator (default: "|") in the result of some sql-commands.
+ sqlResultFieldSep
+
+ Sets the used field separator in the result of the command "set ... sqlCmd".
+ (default: "|")
+
+
+
sqlResultFormat - determines the formatting of the "set <name> sqlCmd" command result.
@@ -18787,16 +18808,18 @@ sub bdump {
- showTableInfo - grenzt die Ergebnismenge des Befehls "get <name> tableinfo" ein. Es können
- SQL-Wildcard (%) verwendet werden.
-
+ showTableInfo
+
+ Grenzt die Ergebnismenge des Befehls "get <name> tableinfo" ein. Es können SQL-Wildcard (%) verwendet werden.
+
-
- Bespiel:
- attr <name> showTableInfo current,history
- # Es werden nur Information der Tabellen "current" und "history" angezeigt
-
-
+
+ Bespiel:
+ attr <name> showTableInfo current,history
+ # Es werden nur Information der Tabellen "current" und "history" angezeigt
+
+
+
sqlCmdHistoryLength
@@ -18822,10 +18845,27 @@ sub bdump {
+
+
+ sqlFormatService
+
+ Über einen Online-Dienst kann eine automatisierte Formatierung von SQL-Statements aktiviert werden.
+ Diese Möglichkeit ist insbesondere für komplexe SQL-Statements der Setter sqlCmd, sqlCmdHistory und sqlSpecial
+ hilfreich um die Strukturierung und Lesbarkeit zu verbessern.
+ Eine Internetverbindung wird benötigt.
+ (default: none)
+
+
+
- sqlResultFieldSep - legt den verwendeten Feldseparator (default: "|") im Ergebnis des Kommandos
- "set ... sqlCmd" fest.
+ sqlResultFieldSep
+
+ Legt den verwendeten Feldseparator im Ergebnis des Kommandos "set ... sqlCmd" fest.
+ (default: "|")
+
+
+
sqlResultFormat - legt die Formatierung des Ergebnisses des Kommandos "set <name> sqlCmd" fest.
@@ -18846,6 +18886,7 @@ sub bdump {
des Datensatzes (Key) und dessen Wert zusammen.
Die Weiterverarbeitung des Ergebnisses kann z.B. mit der folgenden userExitFn in 99_myUtils.pm erfolgen:
+
sub resfromjson {
my ($name,$reading,$value) = @_;