diff --git a/fhem/FHEM/99_Utils.pm b/fhem/FHEM/99_Utils.pm
index 80f48eca6..ab5cfae4e 100644
--- a/fhem/FHEM/99_Utils.pm
+++ b/fhem/FHEM/99_Utils.pm
@@ -317,67 +317,71 @@ WriteFile($$)
Utils
- This is a collection of functions that can be used module-independant
- in all your own development
-
- Defined functions
+ This is a collection of functions that can be used module-independent
+ in all your own development
+
+ Defined functions
- abstime2rel("HH:MM:SS")
tells you the difference as HH:MM:SS
- between now and the argument
+ between now and the argument
+
+ - IsInt("string")
returns 1 if the argument is an integer,
+ otherwise an empty string (which evaluates to false).
+
- ltrim("string")
returns string without leading
- spaces
+ spaces
- max(str1, str2, ...)
returns the highest value from a given
- list (sorted alphanumeric)
+ list (sorted alphanumeric)
- maxNum(num1, num2, ...)
returns the highest value from a
- given list (sorted numeric)
+ given list (sorted numeric)
- min(str1, str2, ...)
returns the lowest value from a given
- list (sorted alphanumeric)
+ list (sorted alphanumeric)
- minNum(num1, num2, ...)
returns the lowest value from a given
- list (sorted numeric)
+ list (sorted numeric)
- rtrim("string")
returns string without trailing
- spaces
+ spaces
- time_str2num("YYYY-MM-DD HH:MM:SS")
convert a time string to
- number of seconds since 1970
+ number of seconds since 1970
- trim("string")
returns string without leading and without
- trailing spaces
+ trailing spaces
- UntoggleDirect("deviceName")
For devices paired directly,
- converts state 'toggle' into 'on' or 'off'
+ converts state 'toggle' into 'on' or 'off'
- UntoggleIndirect()
For devices paired indirectly, switches
the target device 'on' or 'off', also when a 'toggle' was sent from the
- source device
+ source device
- defInfo("devspec", "internal")
return an array with the
internal values of all devices found with devspec, e.g.
- defInfo("TYPE=SVG", "GPLOTFILE").
+ defInfo("TYPE=SVG", "GPLOTFILE").
- SVG_time_to_sec("YYYY-MM-DD_HH:MM:SS")
converts the argument
to the number of seconds since 1970. Optimized for repeated use of similar
- timestamps.
+ timestamps.
- fhemNc("host:port", "textToSend", waitForReturn)
sends textToSend to host:port, and if waitForReturn is set, then read
the answer (wait up to 5 seconds) and return it. Intended as small
nc replacement.
-
+
- round(value, digits)
round <value> to given digits behind comma
-
+
- getUniqueId()
return the FHEM uniqueID used by the fheminfo command. Uses the
getKeyValue / setKeyValue functions.
-
+
- setKeyValue(keyName, value)
store the value in the file $modpath/FHEM/FhemUtils/uniqueID (the name is
@@ -386,18 +390,18 @@ WriteFile($$)
The file/database entry will be written immediately, no explicit save is
required. If the value is undef, the entry will be deleted.
Returns an error-string or undef.
-
+
- getKeyValue(keyName)
return ($error, $value), stored previously by setKeyValue.
$error is set if there was an error. Both are undef, if there is no
value yet for this key.
-
+
- sortTopicNum("asc"|"desc",<list of numbers>)
sort an array of numbers like x.x.x
(Forum #98578)
-
+
- Svn_GetFile(from, to, [finishFn])
Retrieve a file diretly from the fhem.de SVN server.
@@ -408,7 +412,7 @@ WriteFile($$)
{ Svn_GetFile("contrib/86_FS10.pm", "FHEM/86_FS10.pm") }
{ Svn_GetFile("contrib/86_FS10.pm", "FHEM/86_FS10.pm", sub(){CommandReload(undef, "86_FS10")}) }
-
+
- WriteFile(file, content)
Write a file in/below the curent directory.
@@ -418,7 +422,7 @@ WriteFile($$)
attr m2d devStateIcon { '<img src="fhem/images/map.png" style="max-width:256;;max-height:256;;">' }
-
+