<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
	<id>http://wiki.fhem.de/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jophb</id>
	<title>FHEMWiki - Benutzerbeiträge [de]</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.fhem.de/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jophb"/>
	<link rel="alternate" type="text/html" href="http://wiki.fhem.de/wiki/Spezial:Beitr%C3%A4ge/Jophb"/>
	<updated>2026-04-10T21:07:32Z</updated>
	<subtitle>Benutzerbeiträge</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>http://wiki.fhem.de/w/index.php?title=HTTPMOD&amp;diff=39054</id>
		<title>HTTPMOD</title>
		<link rel="alternate" type="text/html" href="http://wiki.fhem.de/w/index.php?title=HTTPMOD&amp;diff=39054"/>
		<updated>2024-01-28T20:58:05Z</updated>

		<summary type="html">&lt;p&gt;Jophb: Rechtschreibfehler korrigiert Wiesemann&amp;amp;Theis&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox Modul&lt;br /&gt;
|ModPurpose=Extract information from devices with an HTTP interface (or, more generic, from any URL) or send information to such devices &lt;br /&gt;
|ModType=d&lt;br /&gt;
|ModCmdRef=HTTPMOD&lt;br /&gt;
|ModForumArea=Sonstiges&lt;br /&gt;
|ModTechName=98_HTTPMOD.pm&lt;br /&gt;
|ModOwner=StefanStrobel ({{Link2FU|3960|Forum}} / [[Benutzer:StefanStrobel|Wiki]])&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
HTTPMOD provides a generic way to retrieve information from devices with an HTTP Interface and store them in Readings or send information to such devices. It queries a given URL with Headers and data defined by attributes. &lt;br /&gt;
&lt;br /&gt;
From the HTTP response it extracts readings named in attributes using Regexes, JSON or XPath parsing also defined by attributes.&lt;br /&gt;
&lt;br /&gt;
In an advanced [[Konfiguration|configuration]] the module can also send information to devices. To do this, a generic &amp;lt;code&amp;gt;set&amp;lt;/code&amp;gt; option can be configured using attributes. &lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
With the help of HTTPMOD you can automatically access websites, retrieve information and send data. In the simplest case, an http call is started regularly and the content of a page, for example, is read and processed further. The URL and the time interval in which the call is to be made must then be specified when the call is made. In order to read information from the called web pages, readings are required. In this readings one specifies Regex, which reads the necessary information. Here is an example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
define PM HTTPMOD  http://www.klack.de/fernsehprogramm/was-laeuft-gerade/0/-1/free.html 20000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This creates a device that accesses the http://www.klack.de/fernsehprogramm/was-laeuft-gerade/0/-1/free.html website with the TV program every 20000 seconds. If neither readings nor other attributes are defined, then only the call of the website takes place and FHEM receives no further data from the web access.&lt;br /&gt;
&lt;br /&gt;
But now a television program is returned when you call the website, which you might want to read out. In order to save the contents in FHEM, which are related to the ARD, you need a reading. This reading must contain a name (so that FHEM knows under which name the information is stored) and a regex (so that you know where the information is stored on the website). Since usually not one, but many readings are defined, these readings are numbered consecutively. This is done by numbers that are given immediately after the word reading. In our example this would be for example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr PM reading1Name ARD &lt;br /&gt;
attr PM reading1Regex &amp;lt;span class=&amp;quot;stationName&amp;quot;&amp;gt;ARD&amp;lt;\/span&amp;gt;[\w\W]*?&amp;lt;div class=&amp;quot;content&amp;quot;&amp;gt;\s*&amp;lt;a[\w\W]*?&amp;gt;\s*(.*?)\s*&amp;lt;\/a&amp;gt; &lt;br /&gt;
attr PM reading2Name ARD_time &lt;br /&gt;
attr PM reading2Regex &amp;lt;span class=&amp;quot;stationName&amp;quot;&amp;gt;ARD&amp;lt;\/span&amp;gt;[\w\W]*?&amp;lt;td class=&amp;quot;time&amp;quot;&amp;gt;\s*(.*?)\s*&amp;lt; &lt;br /&gt;
attr PM reading3Name ARD_details &lt;br /&gt;
attr PM reading3Regex &amp;lt;span class=&amp;quot;stationName&amp;quot;&amp;gt;ARD&amp;lt;\/span&amp;gt;[\w\W]*?&amp;lt;div class=&amp;quot;content&amp;quot;&amp;gt;\s*&amp;lt;a[\w\W]*?&amp;gt;[\w\W]*?&amp;lt;\/a&amp;gt;\s*&amp;lt;br\/&amp;gt;\s*(.*?)(&amp;lt;img|&amp;lt;\/div) &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reading1 contains the programme, reading2 the time and reading3 further details.  The Regex result from the structure of the website and may have to be designed in painstaking detail.&lt;br /&gt;
&lt;br /&gt;
There are cases where this is not enough. For example, it could be the case that the information from the web access is not automated, but manually received. Then a 0 must first be entered at the top of the duration. But how does HTTPMOD then know when the data should be retrieved? This is done with get-commands. If a get-command is executed, HTTPMOD accesses the website, fetches the information and fills the corresponding readings. &lt;br /&gt;
&lt;br /&gt;
Again, it is possible to create not one but several get-commands. Therefore, get is always followed by (at least) one number with which the get commands are numbered.  Here is another example. The TV program should be called manually and not time-controlled. To do this we first change the definition to &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
define PM HTTPMOD  http://www.klack.de/fernsehprogramm/was-laeuft-gerade/0/-1/free.html 0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
and add the following to the attributes&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr PM get1Name ARDHolen &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
With the command &amp;quot;get PM ARDHolen&amp;quot; the above readings are filled. In order for FHEM to know that the other reading2, reading3, etc. are to be read as well as reading1, the (user) attribute  &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr PM get1CheckAllReadings 1 &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
needs to be defined.&lt;br /&gt;
&lt;br /&gt;
If the URL is not sufficient when the web page is called, but a special header is to be sent with it, this can be done with the get1Header attribute. If the header is multiline, the individual lines can be entered with get1Header1, get1Header2, and so on.    &lt;br /&gt;
&lt;br /&gt;
If you want to evaluate or control different URLs, you can define several get commands (get1, get2, etc.) and provide them with your own URLs. get1 usually reads only the reading1, get2 reads only the reading2 and so on. With CheckAllReadings all readings are evaluated simultaneously.&lt;br /&gt;
&lt;br /&gt;
If only data is to be sent on the web page, but not read, the set command is recommended. It has the same structure as the get-command.&lt;br /&gt;
&lt;br /&gt;
It becomes a bit more complex if the website requires a login check. The sid attributes are used for this purpose.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Availability, prerequisites and definition ==&lt;br /&gt;
This module is part of the regular FHEM distribution and uses the non blocking HTTP function &amp;lt;code&amp;gt;HttpUtils_NonblockingGet&amp;lt;/code&amp;gt; provided by FHEM&#039;s [[HttpUtils]] in a new version published in December 2013.&lt;br /&gt;
If not already installed in your environment, please [[update]] FHEM or install it manually using appropriate commands from your environment.&lt;br /&gt;
Please also note that FHEM HttpUtils need the global attribute dnsServer to be set in order to work really non blocking even when dns requests can not be answered.&lt;br /&gt;
&lt;br /&gt;
The device is defined as follows&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
define &amp;lt;name&amp;gt; HTTPMOD &amp;lt;URL&amp;gt; &amp;lt;Interval&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The module connects to the given &amp;lt;code&amp;gt;URL&amp;lt;/code&amp;gt; every &amp;lt;code&amp;gt;Interval&amp;lt;/code&amp;gt; seconds, sends optional headers and data and then parses the response with regular expressions, xpath or json to set readings.&lt;br /&gt;
&lt;br /&gt;
URL can be &amp;quot;none&amp;quot; and Interval can be 0 if you prefer to only query data with a get command and not in a defined interval.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
define PM HTTPMOD http://MyPoolManager/cgi-bin/webgui.fcgi 60&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Set-Commands ==&lt;br /&gt;
can be defined using attributes, see advanced configuration&lt;br /&gt;
&lt;br /&gt;
If you set the attribute enableControlSet to 1, the following additional built in set commands are available:&lt;br /&gt;
;interval&lt;br /&gt;
:set new interval time in seconds and restart the timer&lt;br /&gt;
;reread&lt;br /&gt;
:request the defined URL and try to parse it just like the automatic update would do it every Interval seconds without modifying the running timer.&lt;br /&gt;
;stop&lt;br /&gt;
:stop interval timer.&lt;br /&gt;
;start&lt;br /&gt;
:restart interval timer to call GetUpdate after interval seconds&lt;br /&gt;
;upgradeAttributes&lt;br /&gt;
:convert outdated attributes for older HTTPMOD-Versions that are still defined for this device from the old syntax to the new one.&lt;br /&gt;
:attributes with the description &amp;quot;this attribute should not be used anymore&amp;quot; or similar will be translated to the new syntax, e.g. readingsName1 to reading01Name.&lt;br /&gt;
;storeKeyValue&lt;br /&gt;
:stores a key value pair in an obfuscated form in the file system. Such values can then be used in replacements where the mode is &amp;quot;key&amp;quot; e.g. to avoid storing passwords in the configuration in clear text&lt;br /&gt;
&lt;br /&gt;
== Get-Commands ==&lt;br /&gt;
can be defined using attributes, see advanced configuration&lt;br /&gt;
&lt;br /&gt;
== simple Attributes ==&lt;br /&gt;
;enableControlSet&lt;br /&gt;
:enables the built in set commands &#039;&#039;interval&#039;&#039;, &#039;&#039;stop&#039;&#039;, &#039;&#039;start&#039;&#039;, &#039;&#039;reread&#039;&#039;, &#039;&#039;upgradeAttributes&#039;&#039;, &#039;&#039;storeKeyValue&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;enableCookies&lt;br /&gt;
:enables the cookie handling inside HTTPMOD. It is advisable to always set this attribute and allow HTTPMOD to track the state of cookies and set them for following HTTP-requests&lt;br /&gt;
&lt;br /&gt;
;enforceGoodReadingNames&lt;br /&gt;
:makes sure that HTTPMOD only creates readings that are allowd for Fhem (especially if reading names are dynamically created from JSON object names with extractAllJSON. It is advisable to always set this attribute.&lt;br /&gt;
&lt;br /&gt;
;handleRedirects&lt;br /&gt;
:enables the redirect handling inside HTTPMOD which should be used together with the cookie handling of HTTPMOD. HTTPMOD will then automatically follow redirects from a web server and keep track of cookies at the same time. It is advisable to always set this attribute.&lt;br /&gt;
&lt;br /&gt;
;requestHeader.* &lt;br /&gt;
:Define an additional HTTP Header to set in the HTTP request&lt;br /&gt;
&lt;br /&gt;
;requestData&lt;br /&gt;
:POST Data to be sent in the request. If not defined, it will be a GET request as defined in HttpUtils used by this module&lt;br /&gt;
&lt;br /&gt;
;reading[0-9]+(-[0-9]+)?Name&lt;br /&gt;
:the name of a reading to extract with the corresponding readingRegex&lt;br /&gt;
&lt;br /&gt;
;reading[0-9]*(-[0-9]+)?OExpr&lt;br /&gt;
:defines an expression that is used in an eval to compute the readings value. The raw value will be in the variable $val.&lt;br /&gt;
&lt;br /&gt;
;reading[0-9]*(-[0-9]+)?OMap&lt;br /&gt;
:Output Map. Defines a mapping from raw to visible values like &amp;quot;0:mittig, 1:oberhalb, 2:unterhalb&amp;quot;. If specified as readingOMap then the attribute value is a default for all other readings that don&#039;t specify an explicit reading[0-9]*OMap.&lt;br /&gt;
&lt;br /&gt;
;reading[0-9]*(-[0-9]+)?Format&lt;br /&gt;
:Defines a format string that will be used in sprintf to format a reading value. If specified as readingFormat then the attribute value is a default for all other readings that don&#039;t specify an explicit reading[0-9]*Format.&lt;br /&gt;
&lt;br /&gt;
;reading[0-9]*(-[0-9]+)?Decode&lt;br /&gt;
:defines an encoding to be used in a call to the perl function decode to convert the raw data string read from the device to a reading. This can be used if the device delivers strings in an encoding like cp850 instead of utf8.&lt;br /&gt;
&lt;br /&gt;
;reading[0-9]*(-[0-9]+)?Encode&lt;br /&gt;
:defines an encoding to be used in a call to the perl function encode to convert the raw data string read from the device to a reading. This can be used if the device delivers strings in an encoding like cp850 and after decoding it you want to reencode it to e.g. utf8.&lt;br /&gt;
&lt;br /&gt;
;reading[0-9]+Regex&lt;br /&gt;
:defines the regex to be used for extracting the reading. The value to extract should be in a capture group / sub expression &lt;br /&gt;
:e.g. ([\d\.]+) in the above example. Multiple capture groups will create multiple readings (see explanation above)&lt;br /&gt;
&lt;br /&gt;
;reading[0-9]+XPath&lt;br /&gt;
:defines an xpath to one or more readings when parsing HTML data (see examples below)&lt;br /&gt;
&lt;br /&gt;
;reading[0-9]+XPath-Strict&lt;br /&gt;
:defines an xpath to one or more readings when parsing XML data (see examples below)&lt;br /&gt;
&lt;br /&gt;
;reading[0-9]+JSON&lt;br /&gt;
:defines a path to the JSON object wanted by concatenating the object names with an underscore as delimiter (see the example below)&lt;br /&gt;
&lt;br /&gt;
;noShutdown&lt;br /&gt;
:pass the noshutdown flag to HTTPUtils for webservers that need it (some embedded webservers only deliver empty pages otherwise)&lt;br /&gt;
&lt;br /&gt;
;disable&lt;br /&gt;
:stop doing automatic HTTP requests while this attribute is set to 1&lt;br /&gt;
&lt;br /&gt;
;timeout&lt;br /&gt;
:time in seconds to wait for an answer. Default value is 2&lt;br /&gt;
&lt;br /&gt;
;do_not_notify&lt;br /&gt;
&lt;br /&gt;
;readingFnAttributes&lt;br /&gt;
&lt;br /&gt;
== Simple Configuration of HTTP Devices ==&lt;br /&gt;
If your device expects special HTTP-headers then specify them as &amp;lt;code&amp;gt;attr requestHeader1&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;attr requestHeaderX&amp;lt;/code&amp;gt;.&lt;br /&gt;
If your Device expects an HTTP POST instead of HTTP GET then the POST-data can be specified as &amp;lt;code&amp;gt;attr requestData&amp;lt;/code&amp;gt;.&lt;br /&gt;
To get the readings, specify pairs of &amp;lt;code&amp;gt;attr readingXName&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;attr readingXRegex&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;attr readingXXPath&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;attr readingXXPath-Strict&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;attr readingXJSON&amp;lt;/code&amp;gt; to define which readings you want to extract from the HTTP response and how to extract them. (The old syntax &amp;lt;code&amp;gt;attr readingsNameX&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;attr readingsRegexX&amp;lt;/code&amp;gt; is still supported but the new one with &amp;lt;code&amp;gt;attr readingXName&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;attr readingXRegex&amp;lt;/code&amp;gt; should be preferred. The actual values to be extracted have to be sub expressions within () in the regex (see example below)&lt;br /&gt;
&lt;br /&gt;
=== Example for a PoolManager 5: ===&lt;br /&gt;
The PoolManager Web GUI can be queried with HTTP POST Requests like this one:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
POST /cgi-bin/webgui.fcgi HTTP/1.1&lt;br /&gt;
Host: 192.168.70.90&lt;br /&gt;
Accept: */*&lt;br /&gt;
Content-Type: application/json;charset=UTF-8&lt;br /&gt;
Content-Length: 60&lt;br /&gt;
&lt;br /&gt;
{&amp;quot;get&amp;quot; :[&amp;quot;34.4001.value&amp;quot; ,&amp;quot;34.4008.value&amp;quot; ,&amp;quot;34.4033.value&amp;quot;]}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The resulting HTTP Response would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
HTTP/1.1 200 OK&lt;br /&gt;
Content-type: application/json; charset=UTF-8&lt;br /&gt;
Expires: 0&lt;br /&gt;
Cache-Control: no-cache&lt;br /&gt;
Date: Sun, 12 Jan 2014 12:23:11 GMT&lt;br /&gt;
Server: lighttpd/1.4.26&lt;br /&gt;
Content-Length: 179&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;data&amp;quot;:	{&lt;br /&gt;
		&amp;quot;34.4001.value&amp;quot;:	&amp;quot;7.00&amp;quot;,&lt;br /&gt;
		&amp;quot;34.4008.value&amp;quot;:	&amp;quot;0.52&amp;quot;,&lt;br /&gt;
		&amp;quot;34.4033.value&amp;quot;:	&amp;quot;24.8&amp;quot;&lt;br /&gt;
	},&lt;br /&gt;
	&amp;quot;status&amp;quot;:	{&lt;br /&gt;
		&amp;quot;code&amp;quot;:	0&lt;br /&gt;
	},&lt;br /&gt;
	&amp;quot;event&amp;quot;:	{&lt;br /&gt;
		&amp;quot;type&amp;quot;:	1,&lt;br /&gt;
		&amp;quot;data&amp;quot;:	&amp;quot;48.30000.0&amp;quot;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To configure HTTPMOD for a PoolManager one would first define a PoolManager device with e.g. the name PM, the URL and an interval of e.g. 60 seconds. &lt;br /&gt;
&lt;br /&gt;
Then the data to be sent in the request needs to be defined because in this example the device expects a POST request so the query is not contained in the URL but in the request data.&lt;br /&gt;
&lt;br /&gt;
Also as seen above the device expects special HTTP headers in the request so these headers also need to be defined as &amp;lt;code&amp;gt;attr PM requestHeader1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;attr PM requestHeader2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the names of the readings to be extracted would be set with attributes&lt;br /&gt;
&lt;br /&gt;
Then for each reading value to be extracted a regular expression needs to be set that will match the value in question within ().&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
define PM HTTPMOD http://MyPoolManager/cgi-bin/webgui.fcgi 60&lt;br /&gt;
&lt;br /&gt;
attr PM enableControlSet 1&lt;br /&gt;
attr PM enableCookies 1&lt;br /&gt;
attr PM enforceGoodReadingNames 1&lt;br /&gt;
attr PM handleRedirects 1&lt;br /&gt;
&lt;br /&gt;
attr PM reading01Name PH&lt;br /&gt;
attr PM reading01Regex 34.4001.value&amp;quot;:[ \t]+&amp;quot;([\d\.]+)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
attr PM reading02Name CL&lt;br /&gt;
attr PM reading02Regex 34.4008.value&amp;quot;:[ \t]+&amp;quot;([\d\.]+)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
attr PM reading03Name3TEMP&lt;br /&gt;
attr PM reading03Regex 34.4033.value&amp;quot;:[ \t]+&amp;quot;([\d\.]+)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
attr PM requestData {&amp;quot;get&amp;quot; :[&amp;quot;34.4001.value&amp;quot; ,&amp;quot;34.4008.value&amp;quot; ,&amp;quot;34.4033.value&amp;quot;, &amp;quot;14.16601.value&amp;quot;, &amp;quot;14.16602.value&amp;quot;]}&lt;br /&gt;
attr PM requestHeader1 Content-Type: application/json&lt;br /&gt;
attr PM requestHeader2 Accept: */*&lt;br /&gt;
attr PM stateFormat {sprintf(&amp;quot;%.1f Grad, PH %.1f, %.1f mg/l Chlor&amp;quot;, ReadingsVal($name,&amp;quot;TEMP&amp;quot;,0), ReadingsVal($name,&amp;quot;PH&amp;quot;,0), ReadingsVal($name,&amp;quot;CL&amp;quot;,0))}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example for AmbientMonitor ===&lt;br /&gt;
AmbientMonitor is a webbased visualisation for sensors connected to an Arduino device. Its web interface can also be queried with HTTMOD to grab the data into readings.&lt;br /&gt;
&lt;br /&gt;
This example was provided by locutus. The hardware configuration is an Arduino + Ethercard with ENC28J60 Controller + DHT22 Sensor and software can be downloaded from https://github.com/lucadentella/AmbientMonitor&lt;br /&gt;
&lt;br /&gt;
In this example an HTTP GET is sufficent, so no &amp;lt;code&amp;gt;requestData&amp;lt;/code&amp;gt; is needed. The device provides temperature and humidity readings in an HTTP response that looks like:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
HTTP/1.0 200 OK &lt;br /&gt;
Content-Type: text/html &lt;br /&gt;
&lt;br /&gt;
myCB({&#039;temperature&#039;:22.00,&#039;humidity&#039;:46.00})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the definition could be:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
define AmbientMonitor HTTPMOD http://192.168.1.221/?callback=? 300&lt;br /&gt;
&lt;br /&gt;
attr AmbientMonitor enableControlSet 1&lt;br /&gt;
attr AmbientMonitor enableCookies 1&lt;br /&gt;
attr AmbientMonitor enforceGoodReadingNames 1&lt;br /&gt;
attr AmbientMonitor handleRedirects 1&lt;br /&gt;
&lt;br /&gt;
attr AmbientMonitor requestHeader Content-Type: application/json&lt;br /&gt;
attr AmbientMonitor reading1Name Temperatur&lt;br /&gt;
attr AmbientMonitor reading1Regex temperature&#039;:([\d\.]+)&lt;br /&gt;
attr AmbientMonitor reading2Name Feuchtigkeit&lt;br /&gt;
attr AmbientMonitor reading2Regex humidity&#039;:([\d\.]+)&lt;br /&gt;
attr AmbientMonitor stateFormat {sprintf(&amp;quot;Temperatur %.1f C, Feuchtigkeit %.1f %&amp;quot;, ReadingsVal($name,&amp;quot;Temperatur&amp;quot;,0), ReadingsVal($name,&amp;quot;Feuchtigkeit&amp;quot;,0))}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== formatting and manipulating values / readings ==&lt;br /&gt;
Values that are parsed from an HTTP response can be further treated or formatted with the following attributes:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;(reading|get)[0-9]*(-[0-9]+)?OExpr&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;(reading|get)[0-9]*(-[0-9]+)?OMap&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;(reading|get)[0-9]*(-[0-9]+)?Format&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;(reading|get)[0-9]*(-[0-9]+)?Decode&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;(reading|get)[0-9]*(-[0-9]+)?Encode&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
They can all be specified for an individual reading, for all readings in one match (e.g. if a regular expression has several capture groups) or for all readings in a get command (defined by getXX) or for all readings in the main reading list (defined by readingXX):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
reading01Format %.1f&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will format the reading with the name specified by the attribute reading01Name to be numerical with one digit after the decimal point.&lt;br /&gt;
If the attribute reading01Regex is used and contains several capture groups then the format will be applied to all readings parsed by this regex unless these readings have their own format specified by reading01-1Format, reading01-2Format and so on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
reading01-2Format %.1f&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used in cases where a regular expression specified as reading01regex contains several capture groups or an xpath specified as reading01XPath creates several readings. &lt;br /&gt;
In this case reading01-2Format specifies the format to be applied to the second match.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
readingFormat %.1f&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
applies to all readings defined by a reading-Attribute that have no more specific format.&lt;br /&gt;
&lt;br /&gt;
If you need to do some calculation on a raw value before it is used as a reading, you can define the attribute &amp;lt;code&amp;gt;readingOExpr&amp;lt;/code&amp;gt;.&lt;br /&gt;
It defines a Perl expression that is used in an eval to compute the readings value. The raw value will be in the variable $val.&lt;br /&gt;
&lt;br /&gt;
Example for an expression:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr PM reading03OExpr $val * 10&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Just like in the above example of the readingFormat attributes, readingOExpr and the other following attributes can be applied on several levels.&lt;br /&gt;
&lt;br /&gt;
To map a numerical value to a name, you can use the readingOMap attribute. &lt;br /&gt;
It defines a mapping from raw to visible values like &amp;quot;0:mittig, 1:oberhalb, 2:unterhalb&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Example for a map:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr PM reading02-3OMap 0:kalt, 1:warm, 2:sehr warm&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To convert character sets, the module can first decode a string read from the device and then encode it again. For example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr PM getDecode UTF-8&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This applies to all readings defined for Get-Commands.&lt;br /&gt;
&lt;br /&gt;
== Some help with Regular Expressions ==&lt;br /&gt;
{{Randnotiz|RNTyp=y|RNText=Starting with version &#039;&#039;2018-02-10&#039;&#039; the internal that holds the HTTP response is no longer called &#039;&#039;&#039;&#039;&#039;buf&#039;&#039;&#039;&#039;&#039; but rather &#039;&#039;&#039;&#039;&#039;httpbody&#039;&#039;&#039;&#039;&#039;, and it is only displayed when attribute &#039;&#039;&#039;&#039;&#039;showBody&#039;&#039;&#039;&#039;&#039; is set to &amp;quot;1&amp;quot;.}}&lt;br /&gt;
If HTTPMOD seems not to work and the FHEM Logfile contains a message like  &lt;br /&gt;
:&amp;lt;code&amp;gt;HTTPMOD: Response didn&#039;t match Reading ...&amp;lt;/code&amp;gt;&lt;br /&gt;
then you should check if the value you want to extract is read into the internal with the name buf. Internals are visible when you click on the defined HTTPMOD Device. buf is an internal variable that contains the HTTP Response read. If the value is there and you get the mentioned message then probably something is wrong with your regular expression. Please note that buf might contain special characters like newlines but they are not shown in fhemweb. If you are new to regular expressions then the introduction at http://perldoc.perl.org/perlretut.html might be helpful. &lt;br /&gt;
&lt;br /&gt;
For a typical HTTPMOD use case where you want to extract a number out of a HTTP-Response you can use something like &amp;lt;code&amp;gt;[\d\.]+&amp;lt;/code&amp;gt; to match the number itself. The expression matches the number characters (&amp;lt;code&amp;gt;\d&amp;lt;/code&amp;gt;) or a &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; if one of these characters occurs at least once. &lt;br /&gt;
&lt;br /&gt;
To tell HTTPMOD that the number is what you want to use for the reading, you have to put the expression in between &amp;lt;code&amp;gt;()&amp;lt;/code&amp;gt;. A &amp;lt;code&amp;gt;([\d\.]+)&amp;lt;/code&amp;gt; alone would match the longest number in the HTTP Response which is very likely not the number you are looking for so you need to add something to the expression to give it a context and define how to find the number that you are looking for.&lt;br /&gt;
&lt;br /&gt;
If there is a title text before the number or a special text after the number you can put this in the regex. In one of the examples above &amp;lt;code&amp;gt;humidity&#039;:([\d\.]+)&amp;lt;/code&amp;gt; is looking for the number that immediately follows the text &amp;lt;code&amp;gt;humidity&#039;:&amp;lt;/code&amp;gt; without any blanks in between.&lt;br /&gt;
Be careful if the text you are getting from your device contains special characters like newline. You don&#039;t see such special characters in the fhem webinterface as contents of the internal buf but they might cause your regular expression to fail. &lt;br /&gt;
&lt;br /&gt;
If you have trouble defining a regular expression that matches a certain name, then many complicated characters and then a number, it might be helpful to use a negation in matching like &amp;lt;code&amp;gt;temp[^\d]+([\d\.]).*&amp;lt;/code&amp;gt;. In this examle &amp;lt;code&amp;gt;[^\d]+&amp;lt;/code&amp;gt; means any character that is not a numerical digit, more than once.&lt;br /&gt;
&lt;br /&gt;
=== Regular Expressions with multiple capture Groups ===&lt;br /&gt;
The regular expressions used in the above example for a Poolmanager will take the value that matches one capture group. This is the part of the regular expression inside (). In the above example &amp;quot;([\d\.]+)&amp;quot; refers to numerical digits or points between double quotation marks. Only the string consiting of digits and points will match inside (). This piece is assigned to the reading.&lt;br /&gt;
        &lt;br /&gt;
You can also use regular expressions that have several capture groups which might be helpful when parsing tables. In this case an attribute like &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
reading02Regex something[ \t]+([\d\.]+)[ \t]+([\d\.]+)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
could match two numbers. When you specify only one reading02Name like &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
reading02Name Temp&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the name Temp will be used with the extension -1 and -2 thus giving a reading Temp-1 for the first number and Temp-2 for the second. You can also specify individual names for several readings that get parsed from one regular expression with several capture groups by defining attributes &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
reading02-1Name&lt;br /&gt;
reading02-2Name&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The same notation can be used for formatting attributes like readingXOMap, readingXFormat and so on.&lt;br /&gt;
&lt;br /&gt;
The usual way to define readings is however to have an individual regular expression with just one capture group per reading as shown in the above example.&lt;br /&gt;
&lt;br /&gt;
== Parsing JSON ==&lt;br /&gt;
    &lt;br /&gt;
If a webservice delivers data in JSON format, HTTPMOD can directly parse JSON which might be easier in this case than definig regular expressions.&lt;br /&gt;
The next example shows the data that can be requested from a Poolmanager with the following partial configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
define test2 HTTPMOD none 0&lt;br /&gt;
attr test2 get01Name Chlor&lt;br /&gt;
attr test2 getURL http://192.168.70.90/cgi-bin/webgui.fcgi&lt;br /&gt;
attr test2 getHeader1 Content-Type: application/json&lt;br /&gt;
attr test2 getHeader2 Accept: */*&lt;br /&gt;
attr test2 getData {&amp;quot;get&amp;quot; :[&amp;quot;34.4008.value&amp;quot;]}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The data in the HTTP response looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;data&amp;quot;: {&lt;br /&gt;
			&amp;quot;34.4008.value&amp;quot;: &amp;quot;0.25&amp;quot;&lt;br /&gt;
	},&lt;br /&gt;
	&amp;quot;status&amp;quot;:       {&lt;br /&gt;
			&amp;quot;code&amp;quot;: 0&lt;br /&gt;
	},&lt;br /&gt;
	&amp;quot;event&amp;quot;:        {&lt;br /&gt;
			&amp;quot;type&amp;quot;: 1,&lt;br /&gt;
			&amp;quot;data&amp;quot;: &amp;quot;48.30000.0&amp;quot;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the classic way to extract the value 0.25 into a reading with the name Chlor with a regex would have been&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr test2 get01Regex 34.4008.value&amp;quot;:[ \t]+&amp;quot;([\d\.]+)&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
with JSON you can write &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr test2 get01JSON data_34.4008.value &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
which will create a reading with the Name &amp;quot;Chlor&amp;quot; (as shown above) and take the value 0.25 from the JSON string.&lt;br /&gt;
&lt;br /&gt;
or if you don&#039;t care about the naming of your readings, you can simply extract all JSON data with &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr test2 extractAllJSON&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which would apply to all data read from this device and create the following readings out of the HTTP response shown above:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| data_34.4008.value || 0.25&lt;br /&gt;
|-&lt;br /&gt;
| event_data || 48.30000.0&lt;br /&gt;
|-&lt;br /&gt;
| event_type || 1&lt;br /&gt;
|-&lt;br /&gt;
| status_code || 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
or you can specify&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr test2 get01ExtractAllJSON&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
which would only apply to all data read as response to the get command defined as get01.        &lt;br /&gt;
&lt;br /&gt;
It might seem very simple at first sight to use extractAllJSON but if you prefer readings with a meaningful name you should instead define these readings with readingXXName and readingXXJSON or getXXName and getXXJSON individually. Of Course it would be possible to create additional user readings outside HTTPMOD but doing calculations, naming and formatting inside HTTPMOD is more efficient.&lt;br /&gt;
&lt;br /&gt;
=== JSON Lists ===&lt;br /&gt;
&lt;br /&gt;
imagine the HTTP Response contains:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
{ &amp;quot;power&amp;quot;:&amp;quot;0&amp;quot;,&lt;br /&gt;
  &amp;quot;modes&amp;quot;:[&amp;quot;Off&amp;quot;,&amp;quot;SimpleColor&amp;quot;,&amp;quot;RainbowChase&amp;quot;],&lt;br /&gt;
  &amp;quot;code1&amp;quot;:3,&lt;br /&gt;
  &amp;quot;code2&amp;quot;:4&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then a configuration like &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr device reading01JSON modes &lt;br /&gt;
attr device reading01Name Mode &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will create a list of Subreadings just like a regex with multiple matches can create multiple subreadings:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| Mode-1 || Off&lt;br /&gt;
|-&lt;br /&gt;
| Mode-2  || SimpleColor&lt;br /&gt;
|-&lt;br /&gt;
| Mode-3 || RainbowChase &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
if you don&#039;t want several subreadings but one reading that contains the list of modes, you can specify a recombine expression:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr device reading01Name Modes &lt;br /&gt;
attr device reading01RecombineExpr join &amp;quot;,&amp;quot;, @matchlist &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which will create one reading containing a list:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| Modes || Off,SimpleColor,RainbowChase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
JSON parsing specifications also don&#039;t Need to match exactly. If there is no exact match for a defined reading, the HTTPMOD will try to Interpret the specification as a regex and look for json object paths that match the specification as a regex. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr device reading01Name CodeElem&lt;br /&gt;
attr device reading01JSON code&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which will create a list of readings:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| CodeElem-1|| 3&lt;br /&gt;
|-&lt;br /&gt;
| CodeElem-2  || 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
and of course they could also be recombined into one reading with a RecombineExpr Attribute.&lt;br /&gt;
&lt;br /&gt;
== Parsing http / XML using xpath ==&lt;br /&gt;
Another alternative to regex parsing is the use of XPath to extract values from HTTP responses.&lt;br /&gt;
The following example shows how XML data can be parsed with XPath-Strict or HTML Data can be parsed with XPath.&lt;br /&gt;
Both work similar and the example uses XML Data parsed with the XPath-Strict option:&lt;br /&gt;
&lt;br /&gt;
If The XML data in the HTTP response looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;root xmlns:foo=&amp;quot;http://www.foo.org/&amp;quot; xmlns:bar=&amp;quot;http://www.bar.org&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;actors&amp;gt;&lt;br /&gt;
		&amp;lt;actor id=&amp;quot;1&amp;quot;&amp;gt;Peter X&amp;lt;/actor&amp;gt;&lt;br /&gt;
		&amp;lt;actor id=&amp;quot;2&amp;quot;&amp;gt;Charles Y&amp;lt;/actor&amp;gt;&lt;br /&gt;
		&amp;lt;actor id=&amp;quot;3&amp;quot;&amp;gt;John Doe&amp;lt;/actor&amp;gt;&lt;br /&gt;
	&amp;lt;/actor&amp;gt;&lt;br /&gt;
&amp;lt;/root&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
with XPath you can write        &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr htest reading01Name Actor&lt;br /&gt;
attr htest reading01XPath-Strict //actor[2]/text()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will create a reading with the Name &amp;quot;Actor&amp;quot; and the value &amp;quot;Charles Y&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Since XPath specifications can define several values / matches, HTTPMOD can also interpret these and store them in multiple readings:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr htest reading01Name Actor&lt;br /&gt;
attr htest reading01XPath-Strict //actor/text()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will create the readings &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| Actor-1 || Peter X&lt;br /&gt;
|-&lt;br /&gt;
| Actor-2 || Charles Y&lt;br /&gt;
|-&lt;br /&gt;
| Actor-3 || John Doe&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Further replacements of URL, header or post data ==&lt;br /&gt;
sometimes it might be helpful to dynamically change parts of a URL, HTTP header or post data depending on existing readings, internals or &lt;br /&gt;
perl expressions at runtime. This might be needed to pass further variables to a server, a current date or other things. &lt;br /&gt;
&lt;br /&gt;
To support this HTTPMOD offers generic replacements that are applied to a request before it is sent to the server. A replacement can be defined with the attributes &lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;replacement[0-9]*Regex&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;replacement[0-9]*Mode&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;replacement[0-9]*Value&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[gs]et[0-9]*Replacement[0-9]*Value&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a replacement always replaces a match of a regular expression. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;replacement[0-9]*Mode:&#039;&#039;&#039;&lt;br /&gt;
The way the replacement value is defined can be specified with the replacement mode.&lt;br /&gt;
* If the &amp;lt;code&amp;gt;replacement[0-9]*Mode&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;reading&amp;lt;/code&amp;gt;, then the corresponding &amp;lt;code&amp;gt;replacement[0-9]*Value&amp;lt;/code&amp;gt; is interpreted as the name of a &#039;&#039;reading&#039;&#039; of the same device or as &#039;&#039;device:reading&#039;&#039; to refer to another device.&lt;br /&gt;
* If the &amp;lt;code&amp;gt;replacement[0-9]*Mode&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;internal&amp;lt;/code&amp;gt;, then the corresponding &amp;lt;code&amp;gt;replacement[0-9]*Value&amp;lt;/code&amp;gt; is interpreted as the name of an &#039;&#039;internal&#039;&#039; of the same device or as &#039;&#039;device:internal&#039;&#039; to refer to another device.&lt;br /&gt;
* If the &amp;lt;code&amp;gt;replacement[0-9]*Mode&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;text&amp;lt;/code&amp;gt;, then the corresponding &amp;lt;code&amp;gt;replacement[0-9]*Value&amp;lt;/code&amp;gt; is interpreted as a static text&lt;br /&gt;
* If the &amp;lt;code&amp;gt;replacement[0-9]*Mode&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;expression&amp;lt;/code&amp;gt;, then the corresponding &amp;lt;code&amp;gt;replacement[0-9]*Value&amp;lt;/code&amp;gt; is evaluated as a perl expression to compute the replacement. Inside such a replacement expression it is possible to refer to capture groups of the replacement regex.&lt;br /&gt;
* If the &amp;lt;code&amp;gt;replacement[0-9]*Mode&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;key&amp;lt;/code&amp;gt;, then the module will use a value from a key / value pair that is stored in an obfuscated form in the file system with the set storeKeyValue command. This might be useful for storing passwords.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
attr mydevice getData {&amp;quot;get&amp;quot; :[&amp;quot;%%value%%.value&amp;quot;]}&lt;br /&gt;
attr mydevice replacement01Mode text&lt;br /&gt;
attr mydevice replacement01Regex %%value%%&lt;br /&gt;
&lt;br /&gt;
attr mydevice get01Name Chlor&lt;br /&gt;
attr mydevice get01Replacement01Value 34.4008&lt;br /&gt;
&lt;br /&gt;
attr mydevice get02Name Something&lt;br /&gt;
attr mydevice get02Replacement01Value 31.4024&lt;br /&gt;
&lt;br /&gt;
attr mydevice get05Name profile&lt;br /&gt;
attr mydevice get05URL http://www.mydevice.local/getprofile?password=%%password%%&lt;br /&gt;
attr mydevice replacement02Mode key&lt;br /&gt;
attr mydevice replacement02Regex %%password%%&lt;br /&gt;
attr mydevice replacement02Value password&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;        &lt;br /&gt;
&lt;br /&gt;
defines that &amp;lt;code&amp;gt;%%value%%&amp;lt;/code&amp;gt; will be replaced by a static text.&lt;br /&gt;
&lt;br /&gt;
All Get commands will be HTTP post requests of a similar form. Only the &amp;lt;code&amp;gt;%%value%%&amp;lt;/code&amp;gt; will be different from get to get.&lt;br /&gt;
The first get will set the reading named Chlor and for the request it will take the generic getData and replace %%value%% with 34.4008.&lt;br /&gt;
&lt;br /&gt;
A second get will look the same except a different name and replacement value.&lt;br /&gt;
&lt;br /&gt;
With the command &amp;lt;code&amp;gt;set mydevice storeKeyValue password geheim&amp;lt;/code&amp;gt; you can store the password geheim in an obfuscated form in the file system. &lt;br /&gt;
To use this password and send it in a request you can use the above replacement with mode key. The value password will then refer to the ofuscated string stored with the key password.&lt;br /&gt;
&lt;br /&gt;
The mode &amp;lt;code&amp;gt;expression&amp;lt;/code&amp;gt; allows you to define your own replacement syntax:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;        &lt;br /&gt;
attr mydevice replacement01Mode expression&lt;br /&gt;
attr mydevice replacement01Regex {{([^}]+)}}&lt;br /&gt;
attr mydevice replacement01Value ReadingsVal(&amp;quot;mydevice&amp;quot;, $1, &amp;quot;&amp;quot;)&lt;br /&gt;
attr mydevice getData {&amp;quot;get&amp;quot; :[&amp;quot;{{temp}}.value&amp;quot;]}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;      &lt;br /&gt;
&lt;br /&gt;
In this example any &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{name}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; in a URL, header or post data will be passed on to the perl function ReadingsVal &lt;br /&gt;
which uses the string between &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; as second parameter. This way one defined replacement can be used for many different&lt;br /&gt;
readings.&lt;br /&gt;
&lt;br /&gt;
HTTPMOD has two built in replacements: One for session Ids and another one for the input value in a set command.&lt;br /&gt;
The placeholder $sid is always replaced with the internal &amp;lt;code&amp;gt;$hash-&amp;gt;{sid}&amp;lt;/code&amp;gt; which contains the session id after it is extracted from a previous HTTP response. &lt;br /&gt;
If you don&#039;t like to use the placeholder $sid then you can define your own replacement for example like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr mydevice replacement01Mode internal&lt;br /&gt;
attr mydevice replacement01Regex %session%&lt;br /&gt;
attr mydevice replacement01Value sid&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;      &lt;br /&gt;
&lt;br /&gt;
Now the internal &amp;lt;code&amp;gt;$hash-&amp;gt;{sid}&amp;lt;/code&amp;gt; will be used as a replacement for the placeholder %session%.&lt;br /&gt;
&lt;br /&gt;
In the same way a value that is passed to a set-command can be put into a request with a user defined replacement. &lt;br /&gt;
In this case the internal &amp;lt;code&amp;gt;$hash-&amp;gt;{value}&amp;lt;/code&amp;gt; will contain the value passed to the set command. &lt;br /&gt;
&amp;lt;code&amp;gt;$hash-&amp;gt;{value}&amp;lt;/code&amp;gt; might even be a string containing several values that could be put into several different positions in a request by using user defined replacements.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Other example : steering a pellet stove from Rika&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The stove API of Rika on https://www.rika-firenet.com/web/ delivers a JSON string with all settings and values, and can be piloted with a data string containing all the &amp;quot;set&amp;quot; values at once.&lt;br /&gt;
&lt;br /&gt;
Delivered JSON on get https://www.rika-firenet.com/api/client/xxxxxxxx/status : (xxxxxxxx must be replaced with the unique stove ID)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;Vorzimmer&amp;quot;,&lt;br /&gt;
    &amp;quot;stoveID&amp;quot;: &amp;quot;xxxxxxxxx&amp;quot;,&lt;br /&gt;
    &amp;quot;lastSeenMinutes&amp;quot;: 1,&lt;br /&gt;
    &amp;quot;lastConfirmedRevision&amp;quot;: 1504385700,&lt;br /&gt;
    &amp;quot;controls&amp;quot;: {&lt;br /&gt;
        &amp;quot;revision&amp;quot;: 1504385700,&lt;br /&gt;
        &amp;quot;onOff&amp;quot;: true,&lt;br /&gt;
        &amp;quot;operatingMode&amp;quot;: 2,&lt;br /&gt;
        &amp;quot;heatingPower&amp;quot;: 65,&lt;br /&gt;
        &amp;quot;targetTemperature&amp;quot;: 24,&lt;br /&gt;
        &amp;quot;heatingTimesActive&amp;quot;: false,&lt;br /&gt;
        &amp;quot;heatingTimesActiveForComfort&amp;quot;: true,&lt;br /&gt;
        &amp;quot;setBackTemperature&amp;quot;: 18,&lt;br /&gt;
        &amp;quot;convectionFan1Active&amp;quot;: false,&lt;br /&gt;
        &amp;quot;convectionFan1Level&amp;quot;: 0,&lt;br /&gt;
        &amp;quot;convectionFan1Area&amp;quot;: 0,&lt;br /&gt;
        &amp;quot;convectionFan2Active&amp;quot;: false,&lt;br /&gt;
        &amp;quot;convectionFan2Level&amp;quot;: 0,&lt;br /&gt;
        &amp;quot;convectionFan2Area&amp;quot;: 0,&lt;br /&gt;
        &amp;quot;frostProtectionActive&amp;quot;: false,&lt;br /&gt;
        &amp;quot;frostProtectionTemperature&amp;quot;: 5&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;sensors&amp;quot;: {&lt;br /&gt;
        &amp;quot;statusError&amp;quot;: 0,&lt;br /&gt;
        &amp;quot;statusWarning&amp;quot;: 0,&lt;br /&gt;
        &amp;quot;statusService&amp;quot;: 0,&lt;br /&gt;
        &amp;quot;statusMainState&amp;quot;: 1,&lt;br /&gt;
        &amp;quot;statusSubState&amp;quot;: 3,&lt;br /&gt;
        &amp;quot;statusFrostStarted&amp;quot;: false,&lt;br /&gt;
        &amp;quot;inputFlameTemperature&amp;quot;: 21,&lt;br /&gt;
        &amp;quot;inputRoomTemperature&amp;quot;: 21,&lt;br /&gt;
        &amp;quot;inputExternalRequest&amp;quot;: true,&lt;br /&gt;
        &amp;quot;outputDischargeMotor&amp;quot;: 0,&lt;br /&gt;
        &amp;quot;outputInsertionMotor&amp;quot;: 0,&lt;br /&gt;
        &amp;quot;outputIDFan&amp;quot;: 0,&lt;br /&gt;
        &amp;quot;outputAirFlaps&amp;quot;: 0,&lt;br /&gt;
        &amp;quot;outputIgnition&amp;quot;: false,&lt;br /&gt;
        &amp;quot;parameterStoveTypeNumber&amp;quot;: 13,&lt;br /&gt;
        &amp;quot;parameterVersionMainBoard&amp;quot;: 223,&lt;br /&gt;
        &amp;quot;parameterVersionTFT&amp;quot;: 223,&lt;br /&gt;
        &amp;quot;parameterRuntimePellets&amp;quot;: 11,&lt;br /&gt;
        &amp;quot;parameterRuntimeLogs&amp;quot;: 0,&lt;br /&gt;
        &amp;quot;parameterFeedRateTotal&amp;quot;: 17,&lt;br /&gt;
        &amp;quot;parameterFeedRateService&amp;quot;: 683,&lt;br /&gt;
        &amp;quot;parameterOnOffCycles&amp;quot;: 2&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;stoveType&amp;quot;: &amp;quot;DOMO MultiAir&amp;quot;,&lt;br /&gt;
    &amp;quot;stoveFeatures&amp;quot;: {&lt;br /&gt;
        &amp;quot;multiAir1&amp;quot;: true,&lt;br /&gt;
        &amp;quot;multiAir2&amp;quot;: true,&lt;br /&gt;
        &amp;quot;insertionMotor&amp;quot;: false,&lt;br /&gt;
        &amp;quot;airFlaps&amp;quot;: false,&lt;br /&gt;
        &amp;quot;logRuntime&amp;quot;: false&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Data string to send to https://www.rika-firenet.com/api/client/xxxxxxxx/controls in order to set values:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
heatingTimesActiveForComfort=true&amp;amp;frostProtectionTemperature=3&amp;amp;setBackTemperature=18&amp;amp;targetTemperature=24&amp;amp;convectionFan2Level=0&amp;amp;convectionFan2Active=false&amp;amp;convectionFan1Level=0&amp;amp;onOff=true&amp;amp;convectionFan1Active=false&amp;amp;convectionFan2Area=0&amp;amp;revision=1505550101&amp;amp;heatingTimesActive=false&amp;amp;convectionFan1Area=0&amp;amp;frostProtectionActive=false&amp;amp;operatingMode=2&amp;amp;heatingPower=65&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Code in 99_myUtils.pm:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
use JSON;&lt;br /&gt;
...&lt;br /&gt;
sub&lt;br /&gt;
replaceJSON ($$) {&lt;br /&gt;
   my ($valToReplace, $value) = @_;&lt;br /&gt;
&lt;br /&gt;
   #$value in the parameters is a default value&lt;br /&gt;
   #It has to be replaced through the real value nnn passed in the set command &amp;quot;set &amp;lt;device&amp;gt; valToset nnn&amp;quot;&lt;br /&gt;
   $value = InternalVal(&amp;quot;Ofen&amp;quot;, &amp;quot;value&amp;quot;, $value);&lt;br /&gt;
   Log3 (&amp;quot;Ofen&amp;quot;, 3, &amp;quot;replaceJSON Internalvalue: $value&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
   #Force an update to avoid outdated revision number&lt;br /&gt;
   fhem (&amp;quot;get Ofen revision&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
   #Get all the controls as json&lt;br /&gt;
   my $json = ReadingsVal(&amp;quot;Ofen&amp;quot;, &amp;quot;controlsJSON&amp;quot;,&amp;quot;&amp;quot;);&lt;br /&gt;
   Log3 (&amp;quot;Ofen&amp;quot;, 3, &amp;quot;replaceJSON configsJSON: $json&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
   # When starting FHEM or rereading config, the reading controlsJSON is empty&lt;br /&gt;
   return if ($json eq &amp;quot;&amp;quot;); &lt;br /&gt;
&lt;br /&gt;
   my $decoded = decode_json($json);&lt;br /&gt;
   my $result;&lt;br /&gt;
   for my $key ( keys %$decoded ) {&lt;br /&gt;
      $result .= &amp;quot;$key=&amp;quot;;&lt;br /&gt;
      if ($key eq $valToReplace) {&lt;br /&gt;
         $result .= $value.&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
      } else {&lt;br /&gt;
         $result .= $decoded-&amp;gt;{$key}.&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
   chop($result); #remove last &amp;amp;&lt;br /&gt;
   Log3(&amp;quot;Ofen&amp;quot;, 3, &amp;quot;replaceJSON Result: $result&amp;quot;);&lt;br /&gt;
   return $result;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Define stove in fhem:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
defmod Ofen HTTPMOD https://www.rika-firenet.com/api/client/xxxxxxxx/status 60&lt;br /&gt;
&lt;br /&gt;
attr Ofen enableCookies 1&lt;br /&gt;
attr Ofen reAuthRegex id=&amp;quot;login&amp;quot;|Unauthorized&lt;br /&gt;
attr Ofen sid01Data email=xx@xx&amp;amp;password=xx&lt;br /&gt;
attr Ofen sid01URL https://www.rika-firenet.com/web/login&lt;br /&gt;
&lt;br /&gt;
attr Ofen reading01JSON sensors_inputRoomTemperature&lt;br /&gt;
attr Ofen reading01Name RaumTemp&lt;br /&gt;
attr Ofen reading02JSON controls_setBackTemperature&lt;br /&gt;
attr Ofen reading02Name Absenkung&lt;br /&gt;
attr Ofen reading03JSON controls_frostProtectionTemperature&lt;br /&gt;
attr Ofen reading03Name Frostschutz&lt;br /&gt;
attr Ofen reading10Name controlsJSON&lt;br /&gt;
attr Ofen reading10Regex (?s)controls.*?({.*?})&lt;br /&gt;
&lt;br /&gt;
attr Ofen get09Name revision&lt;br /&gt;
attr Ofen get09URL https://www.rika-firenet.com/api/client/xxxxxxxx/status&lt;br /&gt;
&lt;br /&gt;
attr Ofen setURL https://www.rika-firenet.com/api/client/xxxxxxxx/controls&lt;br /&gt;
attr Ofen setData {{data}}&lt;br /&gt;
attr Ofen replacement01Mode expression&lt;br /&gt;
attr Ofen replacement01Regex {{data}}&lt;br /&gt;
&lt;br /&gt;
attr Ofen set11Name frostProtectionTemperature&lt;br /&gt;
attr Ofen set11Replacement01Value replaceJSON(&amp;quot;frostProtectionTemperature&amp;quot;, 2)&lt;br /&gt;
&lt;br /&gt;
attr Ofen set12Name targetTemperature&lt;br /&gt;
attr Ofen set12Replacement01Value replaceJSON(&amp;quot;targetTemperature&amp;quot;, 24)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A detailed explanation (in german) of the login process can be found here: [https://forum.fhem.de/index.php/topic,76220.msg682514.html#msg682514]&lt;br /&gt;
and the explanation of the other parameters here: [https://forum.fhem.de/index.php/topic,76220.msg685710.html#msg685710]&lt;br /&gt;
&lt;br /&gt;
== replacing reading values when they have not been updated / the device did not respond ==&lt;br /&gt;
If a device does not respond then the values stored in readings will keep the same and only their timestamp shows that they are outdated. &lt;br /&gt;
If you want to modify reading values that have not been updated for a number of seconds, you can use the attributes&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;(reading|get)[0-9]*(-[0-9]+)?MaxAge&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;(reading|get)[0-9]*(-[0-9]+)?MaxAgeReplacementMode&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;(reading|get)[0-9]*(-[0-9]+)?MaxAgeReplacement&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every time the module tries to read from a device, it will also check if readings have not been updated &lt;br /&gt;
for longer than the &amp;lt;code&amp;gt;MaxAge&amp;lt;/code&amp;gt; attributes allow. If readings are outdated, the &amp;lt;code&amp;gt;MaxAgeReplacementMode&amp;lt;/code&amp;gt; defines how the affected&lt;br /&gt;
reading values should be replaced. &amp;lt;code&amp;gt;MaxAgeReplacementMode&amp;lt;/code&amp;gt; can be &amp;lt;code&amp;gt;text&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;reading&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;internal&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;expression&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;delete&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MaxAge&amp;lt;/code&amp;gt; specifies the number of seconds that a reading should remain untouched before it is replaced. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MaxAgeReplacement&amp;lt;/code&amp;gt; contains either a static text that is used as replacement value or a Perl expression that is evaluated to &lt;br /&gt;
give the replacement value. This can be used for example to replace a temperature that has not bee updated for more than 5 minutes &lt;br /&gt;
with the string &amp;quot;outdated - was 12&amp;quot;:        &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr PM readingMaxAge 300&lt;br /&gt;
attr PM readingMaxAgeReplacement &amp;quot;outdated - was &amp;quot; . $val&lt;br /&gt;
attr PM readingMaxAgeReplacementMode expression&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The variable &amp;lt;code&amp;gt;$val&amp;lt;/code&amp;gt; contains the value of the reading before it became outdated.&lt;br /&gt;
&lt;br /&gt;
Or to show that a device was offline:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr MyLight reading01Name color&lt;br /&gt;
attr MyLight reading01JSON result_02_color&lt;br /&gt;
attr MyLight reading01MaxAge 300&lt;br /&gt;
attr MyLight reading01MaxAgeReplacement &amp;quot;offline&amp;quot;&lt;br /&gt;
attr MyLight reading01MaxAgeReplacementMode text&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Note on determining how to send requests to a special device ==&lt;br /&gt;
If you don&#039;t know which URLs, headers or POST data your web GUI uses, you might try a local proxy like BurpSuite [http://portswigger.net/burp/ BurpSuite] to track requests and responses. This is a tedious task but probably the best way to achieve a successful result. &lt;br /&gt;
&lt;br /&gt;
Let us consider an example. The Telekom Speedport W724V has a login-site that is famous for being cumbersome. Burp allows to monitor each step in the login procedure. In the case of a speedport the following steps occur:&lt;br /&gt;
&lt;br /&gt;
First burp shows that a get command is issued&lt;br /&gt;
 ################################################################################################## &lt;br /&gt;
 GET / HTTP/1.1&lt;br /&gt;
 Host: speedport.ip&lt;br /&gt;
 Cache-Control: max-age=0&lt;br /&gt;
 Upgrade-Insecure-Requests: 1&lt;br /&gt;
 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36&lt;br /&gt;
 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8&lt;br /&gt;
 Accept-Language: de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4&lt;br /&gt;
 Cookie: lang=de&lt;br /&gt;
 Connection: close  &lt;br /&gt;
In order to mimic the behavior of a real person calling the website HTTPMOD should copy all necessary steps. Host, Cookie and the GET-command are usually necessary. The same cannot be said of the User-Agent because the website can be called from any mobile or desktop computer. &lt;br /&gt;
&lt;br /&gt;
Then, the speedport will answer with a command that consists of several lines. By going through every line for every step in the login procedure one will finally arrive at the information that is necessary to successfully enter the login of the speedport (in case of the W724V, for example, it is necessary to copy a token called _httoken and to include the referer).&lt;br /&gt;
&lt;br /&gt;
== Advanced configuration to define a &amp;lt;code&amp;gt;set&amp;lt;/code&amp;gt; command and send data to a device ==&lt;br /&gt;
       &lt;br /&gt;
When a set option is defined by attributes, the module will use the value given to the set command and integrate it into an HTTP-Request that sends the value to the device. The definitions for URL, headers and post data can contain the placeholder $val which will be replaced by the (numerical) value given to the set command.&lt;br /&gt;
&lt;br /&gt;
This can be as simple as:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
# No cyclic requests and no main URL needed in this example&lt;br /&gt;
define MyDevice HTTPMOD none 0&lt;br /&gt;
&lt;br /&gt;
attr MyDevice set01Name Licht&lt;br /&gt;
attr MyDevice set01URL http://192.168.1.22/switch=$val&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A user command &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
set MyDevice Licht 1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will be translated into the http GET request&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
http://192.168.1.22/switch=1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example a map would also be helpful, that translates on / off to 0 or 1 and allows the user to select on/of in fhemweb:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr MyDevive set01IMap 0:off, 1:on&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This also provides input validation to make sure that only on and off can be used with the set command.&lt;br /&gt;
&lt;br /&gt;
In more complex Scenarios you might need to login before sending a command and the Login might create a session id that has to be part of further requests either in the URL, in headers or in the post data.&lt;br /&gt;
&lt;br /&gt;
Extension to the above example for a PoolManager 5 where a set needs a session id in the URL and the values have to be passed in JSON strings as post data:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr PM set01Name HeizungSoll&lt;br /&gt;
attr PM set01URL http://MyPoolManager/cgi-bin/webgui.fcgi?sid=$sid&lt;br /&gt;
attr PM set01Hint 6,10,20,30&lt;br /&gt;
attr PM set01Min 6&lt;br /&gt;
attr PM set01Max 30&lt;br /&gt;
attr PM setHeader1 Content-Type: application/json&lt;br /&gt;
attr PM set01Data {&amp;quot;set&amp;quot; :{&amp;quot;34.3118.value&amp;quot; :&amp;quot;$val&amp;quot; }}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example defines a set option with the name HeizungSoll.&lt;br /&gt;
By issuing &amp;lt;code&amp;gt;set PM HeizungSoll 10&amp;lt;/code&amp;gt; in FHEM, the value 10 will be sent in the defined HTTP&lt;br /&gt;
Post to URL &amp;lt;code&amp;gt;http://MyPoolManager/cgi-bin/webgui.fcgi&amp;lt;/code&amp;gt; in the Post Data as&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
{&amp;quot;set&amp;quot; :{&amp;quot;34.3118.value&amp;quot; :&amp;quot;10&amp;quot; }}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The optional attributes set01Min and set01Max define input validations that will be checked in the set function. &lt;br /&gt;
The optional attribute set01Hint will define a selection list for the FHEMweb GUI.&lt;br /&gt;
&lt;br /&gt;
The HTTP response to such a request will be ignored unless you specify the attribute &amp;lt;code&amp;gt;setParseResponse&amp;lt;/code&amp;gt; &lt;br /&gt;
for all set commands or &amp;lt;code&amp;gt;set01ParseResponse&amp;lt;/code&amp;gt; for the set command with number 01.&lt;br /&gt;
If the HTTP response to a set command is parsed then this is done like the parsing of responses to get commands and you can use the attributes ending e.g. on Format, Encode, Decode, OMap and OExpr to manipulate / format the values read.&lt;br /&gt;
&lt;br /&gt;
If a parameter to a set command is not numeric but should be passed on to the device as text, then you can specify the attribute setTextArg. For example: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr PM set01TextArg&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a set command should not require a parameter at all, then you can specify the attribute NoArg. For example: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr PM set03Name On&lt;br /&gt;
attr PM set03NoArg&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This example defines the set of parameters for Wiesemann&amp;amp;Theiss Web-IO Analog 4.0 #57761. The current limit is set to 16mA (setxxMax)&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
defmod WuT_Analog1 HTTPMOD none 30&lt;br /&gt;
attr WuT_Analog1 room W&amp;amp;T&lt;br /&gt;
attr WuT_Analog1 set01Max 16&lt;br /&gt;
attr WuT_Analog1 set01Min 0&lt;br /&gt;
attr WuT_Analog1 set01Name Output1&lt;br /&gt;
attr WuT_Analog1 set01URL http://192.xx.My_IP/outputaccess1?PW=MyPassword&amp;amp;State=$val&amp;amp;&lt;br /&gt;
attr WuT_Analog1 set02Max 16&lt;br /&gt;
attr WuT_Analog1 set02Min 0&lt;br /&gt;
attr WuT_Analog1 set02Name Output2&lt;br /&gt;
attr WuT_Analog1 set02URL http://192.xx.My_IP/outputaccess2?PW=MyPassword&amp;amp;State=$val&amp;amp;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Advanced configuration to create a valid session id that might be necessary ==&lt;br /&gt;
In simple cases logging in works with basic authentication. In the case HTTPMOD accepts a username and password as part of the URL in the form &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
http://User:Password@192.168.1.18/something&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However basic auth is seldom used. If you need to fill in a username and password in a HTML form and the session is then managed by a session id, here is how to configure this:&lt;br /&gt;
&lt;br /&gt;
when sending data to an HTTP-Device in a set, HTTPMOD will replace any &amp;lt;code&amp;gt;$sid&amp;lt;/code&amp;gt; in the URL, Headers and Post data with the internal &amp;lt;code&amp;gt;$hash-&amp;gt;{sid}&amp;lt;/code&amp;gt;. To authenticate towards the device and give this internal a value, you can use an optional multi step login procedure defined by the following attributes: &lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sid[0-9]*URL&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;sid[0-9]*Data.*&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;sid[0-9]*Header.*&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;sid[0-9]*IgnoreRedirects&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;idRegex&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;idJSON&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;idXPath&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;idXPath-Strict&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;(get|set|sid)[0-9]*IdRegex&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;(get|set|sid)[0-9]*IdJSON&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;(get|set|sid)[0-9]*IdXPath&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;(get|set|sid)[0-9]*IdXPath-Strict&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each step can have a URL, Headers, Post Data pieces and a Regex to extract a resulting Session ID into &amp;lt;code&amp;gt;$hash-&amp;gt;{sid}&amp;lt;/code&amp;gt;.&lt;br /&gt;
HTTPMOD will create a sorted list of steps (the numbers between sid and URL / Data / Header) and the loop through these steps and send the corresponding requests to the device. For each step a $sid in a Header or Post Data will be replaced with the current content of &amp;lt;code&amp;gt;$hash-&amp;gt;{sid}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Using this feature, HTTPMOD can perform a forms based authentication and send user name, password or other necessary data to the device and save the session id for further requests.&lt;br /&gt;
        &lt;br /&gt;
To determine when this login procedure is necessary, HTTPMOD will first try to send a request without &lt;br /&gt;
doing the login procedure. If the result contains an error that authentication is necessary, then a login is performed. &lt;br /&gt;
To detect such an error in the HTTP response, you can again use a regular expression, JSON or XPath, this time with the attributes &lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;reAuthRegex&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;reAuthJSON&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;reAuthXPath&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;reAuthXPath-Strict&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;(get|set)[0-9]*ReAuthRegex&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;(get|set)[0-9]*ReAuthJSON&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;(get|set)[0-9]*ReAuthXPath&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;(get|set)[0-9]*ReAuthXPath-Strict&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
reAuthJSON or reAuthXPath typically only extract one piece of data from a response. &lt;br /&gt;
If the existence of the specified piece of data is sufficent to start a login procedure, then nothing more needs to be defined to detect this situation. &lt;br /&gt;
If however the indicator is a status code that contains different values depending on a successful request and a failed request if a new authentication is needed, &lt;br /&gt;
then you can combine things like reAuthJSON with reAuthRegex. In this case the regex is only matched to the data extracted by JSON (or XPath). &lt;br /&gt;
This way you can easily extract the status code using JSON parsing and then specify the code that means &amp;quot;authentication needed&amp;quot; as a regular expression.&lt;br /&gt;
        &lt;br /&gt;
If for one step not all of the URL, Data or Header Attributes are set, then HTTPMOD tries to use a &lt;br /&gt;
&amp;lt;code&amp;gt;sidURL&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;sidData.*&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;sidHeader.*&amp;lt;/code&amp;gt; Attribute (without the step number after sid). This way parts that are the same for all steps don&#039;t need to be defined redundantly.&lt;br /&gt;
&lt;br /&gt;
=== Example for a multi step login procedure: ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr PM reAuthRegex /html/dummy_login.htm &lt;br /&gt;
attr PM sidURL http://192.168.70.90/cgi-bin/webgui.fcgi?sid=$sid&lt;br /&gt;
attr PM sidHeader1 Content-Type: application/json&lt;br /&gt;
attr PM sid1IDRegex wui.init\(&#039;([^&#039;]+)&#039;&lt;br /&gt;
attr PM sid2Data {&amp;quot;set&amp;quot; :{&amp;quot;9.17401.user&amp;quot; :&amp;quot;fhem&amp;quot; ,&amp;quot;9.17401.pass&amp;quot; :&amp;quot;password&amp;quot; }}&lt;br /&gt;
attr PM sid3Data {&amp;quot;set&amp;quot; :{&amp;quot;35.5062.value&amp;quot; :&amp;quot;128&amp;quot; }}&lt;br /&gt;
attr PM sid4Data {&amp;quot;set&amp;quot; :{&amp;quot;42.8026.code&amp;quot; :&amp;quot;pincode&amp;quot; }}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case HTTPMOD detects that a login is necessary by looking for the pattern /html/dummy_login.htm in the HTTP response. &lt;br /&gt;
If it matches, it starts a login sequence. In the above example all steps request the same URL. In step 1 only the defined Header is sent in an HTTP get request. The response will contain a session id that is extraced with the regex wui.init\(&#039;([^&#039;]+)&#039;.&lt;br /&gt;
&lt;br /&gt;
In the next step this session id is sent in a post request to the same URL where tha post data contains a username and password. The a third and a fourth request follow that set a value and a code. The result will be a valid and authorized session id that can be used in other requests where $sid is part of a URL, header or post data and will be replaced with the session id extracted above.&lt;br /&gt;
&lt;br /&gt;
===Another Practical Example reading the SOC from a Renault Zoe===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
define myZoe HTTPMOD https://www.services.renault-ze.com/api/vehicle/VINVINVIN/battery 7000&lt;br /&gt;
attr myZoe userattr reading01JSON reading01Name reading02JSON reading02Name reading03JSON reading03Nam\&lt;br /&gt;
e reading04JSON reading04Name reading05JSON reading05Name requestHeader02 sid1Data sid1Header01 sid1Id\&lt;br /&gt;
JSON sid1IgnoreRedirects:0,1 sid1URL&lt;br /&gt;
attr myZoe reAuthJSON message&lt;br /&gt;
attr myZoe reading01JSON charge_level&lt;br /&gt;
attr myZoe reading01Name SOC&lt;br /&gt;
attr myZoe reading02JSON charging&lt;br /&gt;
attr myZoe reading02Name charging&lt;br /&gt;
attr myZoe reading03JSON plugged&lt;br /&gt;
attr myZoe reading03Name plugged&lt;br /&gt;
attr myZoe reading04JSON remaining_range&lt;br /&gt;
attr myZoe reading04Name remaining_range&lt;br /&gt;
attr myZoe reading05JSON last_update&lt;br /&gt;
attr myZoe reading05Name last_update&lt;br /&gt;
attr myZoe requestHeader02 Authorization: Bearer $sid&lt;br /&gt;
attr myZoe sid1Data {&amp;quot;username&amp;quot;:&amp;quot;ZEUSERNAME&amp;quot;,&amp;quot;password&amp;quot;:&amp;quot;ZEPASSWORD&amp;quot;}&lt;br /&gt;
attr myZoe sid1Header01 Content-Type: application/json&lt;br /&gt;
attr myZoe sid1IdJSON token&lt;br /&gt;
attr myZoe sid1IgnoreRedirects 1&lt;br /&gt;
attr myZoe sid1URL https://www.services.renault-ze.com/api/user/login&lt;br /&gt;
attr myZoe timeout 10&lt;br /&gt;
#attr myZoe verbose 7&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The $sid is read by logging in with username and password from JSON {&amp;quot;token&amp;quot;: ..} after detecting an error {&amp;quot;message&amp;quot;: ..}  from a failed request. This example offers no solution for the reading of the VIN from the login request, which in turn is part of the reading URL. It should be possible to read more than just the $sid from the login sequence.&lt;br /&gt;
&lt;br /&gt;
In the special case where a session id is set as a HTTP-Cookie (with the header Set-cookie: in the HTTP response) HTTPMOD offers an even simpler way. With the attribute enableCookies a very basic cookie handling mechanism is activated that stores all cookies that the server sends to the HTTPMOD device and puts them back as cookie headers in the following requests.&lt;br /&gt;
&lt;br /&gt;
For such cases no sidIdRegex and no $sid in a user defined header is necessary.&lt;br /&gt;
&lt;br /&gt;
== Advanced configuration to define a &amp;lt;code&amp;gt;get&amp;lt;/code&amp;gt; and request additional data with its own request from a device ==&lt;br /&gt;
&lt;br /&gt;
The normal automatic HTTP request that is done repeatedly after the defined interval has elapsed works well in cases where all required readings can be requested in one common HTTP request. If however a device needs individual requests with different URLs or different POST data for each value, then another method is necessary. &lt;br /&gt;
For such cases a &amp;lt;code&amp;gt;get&amp;lt;/code&amp;gt; option can be defined and the user can either issue FHEM &amp;lt;code&amp;gt;get&amp;lt;/code&amp;gt; commands each time he needs the reading or the user can set an attribute to request the reading automatically together with the normal iteration.&lt;br /&gt;
For each &amp;lt;code&amp;gt;get&amp;lt;/code&amp;gt; option attributes define an individual URL, optional headers, and post data as well as individual regular expressions and formatting options. &lt;br /&gt;
&lt;br /&gt;
When a get option is defined by attributes, the module allows querying additional values from the device that require individual HTTP-Requests or special parameters to be sent&lt;br /&gt;
&lt;br /&gt;
Extension to the above example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr PM get01Name MyGetValue &lt;br /&gt;
attr PM get01URL http://MyPoolManager/cgi-bin/directory/webgui.fcgi?special=1?sid=$sid &lt;br /&gt;
attr PM getHeader1 Content-Type: application/json &lt;br /&gt;
attr PM get01Data {&amp;quot;get&amp;quot; :{&amp;quot;30.1234.value&amp;quot;}} &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example defines a get option with the name MyGetValue.&lt;br /&gt;
By issuing &amp;lt;code&amp;gt;get PM MyGetValue&amp;lt;/code&amp;gt; in FHEM, the defined HTTP request is sent to the device.&lt;br /&gt;
The HTTP response is then parsed using the same readingXXName and readingXXRegex attributes as above so&lt;br /&gt;
additional pairs will probably be needed there for additional values.&lt;br /&gt;
&lt;br /&gt;
if you prefer to define the parsing and formatting of readings individually per get command, you can use &lt;br /&gt;
attributes like get01Regex, get01XPath, get01Format, get01OMap and so on just like for reading01...&lt;br /&gt;
&lt;br /&gt;
You can also include parameters / values that are passed to the get command in the request just like for set commands.&lt;br /&gt;
The placeholder $val will be replaced with the value given to the get command or you can specify your own replacement as described above.&lt;br /&gt;
&lt;br /&gt;
If the new get parameter should also be queried regularly, you can define the following optional attributes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr PM get01Poll 1&lt;br /&gt;
attr PM get01PollDelay 300&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first attribute includes this reading in the automatic update cycle and the second defines an alternative lower update frequency. When the interval defined initially in the define is over and the normal readings are read from the device, the update function will check for additional get parameters that should be included in the update cycle.&lt;br /&gt;
&lt;br /&gt;
If a PollDelay is specified for a get parameter, the update function also checks if the time passed since it has last read this value is more than the given PollDelay. If not, this reading is skipped and it will be rechecked in the next cycle when interval is over again. So the effective PollDelay will always be a multiple of the interval specified in the initial define.&lt;br /&gt;
&lt;br /&gt;
Please note that each defined get command that is included in the regular update cycle will create its own HTTP request. So if you want to extract several values from the same request, it is much more efficient to do this by defining readingXXName and readingXXRegex, XPath or JSON attributes and to specify an interval and a URL in the define of the HTTPMOD device. &lt;br /&gt;
&lt;br /&gt;
Example for a Siemens webserver provided by Lanhydrock:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
define ozw672 HTTPMOD https://192.168.178.8/api/auth/login.json?user=test&amp;amp;pwd=test 300&lt;br /&gt;
&lt;br /&gt;
attr ozw672 get1Name tempAussen&lt;br /&gt;
attr ozw672 get1URL https://192.168.178.8/api/menutree/read_datapoint.json?SessionId=$sid&amp;amp;Id=1960&lt;br /&gt;
attr ozw672 get1Poll 1&lt;br /&gt;
attr ozw672 get1PollDelay 1800&lt;br /&gt;
&lt;br /&gt;
attr ozw672 get2Name tempAussenGemischt&lt;br /&gt;
attr ozw672 get2URL https://192.168.178.8/api/menutree/read_datapoint.json?SessionId=$sid&amp;amp;Id=1964&lt;br /&gt;
attr ozw672 get2Poll 1&lt;br /&gt;
attr ozw672 get2PollDelay 1800&lt;br /&gt;
&lt;br /&gt;
attr ozw672 get3Name tempTWW&lt;br /&gt;
attr ozw672 get3URL https://192.168.178.8/api/menutree/read_datapoint.json?SessionId=$sid&amp;amp;Id=1996&lt;br /&gt;
attr ozw672 get3Poll 1&lt;br /&gt;
&lt;br /&gt;
attr ozw672 get4Name tempKesselSoll&lt;br /&gt;
attr ozw672 get4URL https://192.168.178.8/api/menutree/read_datapoint.json?SessionId=$sid&amp;amp;Id=1910&lt;br /&gt;
attr ozw672 get4Poll 1&lt;br /&gt;
&lt;br /&gt;
attr ozw672 get5Name tempKesselRuecklauf&lt;br /&gt;
attr ozw672 get5URL https://192.168.178.8/api/menutree/read_datapoint.json?SessionId=$sid&amp;amp;Id=1915&lt;br /&gt;
attr ozw672 get5Poll 1&lt;br /&gt;
&lt;br /&gt;
attr ozw672 get6Name tempKesselRuecklaufSoll&lt;br /&gt;
attr ozw672 get6URL https://192.168.178.8/api/menutree/read_datapoint.json?SessionId=$sid&amp;amp;Id=1916&lt;br /&gt;
attr ozw672 get6Poll 1&lt;br /&gt;
&lt;br /&gt;
attr ozw672 get7Name anzahlStartsBrenner&lt;br /&gt;
attr ozw672 get7URL https://192.168.178.8/api/menutree/read_datapoint.json?SessionId=$sid&amp;amp;Id=1927&lt;br /&gt;
attr ozw672 get7PollDelay 1800&lt;br /&gt;
attr ozw672 get7Poll 1&lt;br /&gt;
&lt;br /&gt;
attr ozw672 get8Name statusKessel&lt;br /&gt;
attr ozw672 get8URL https://192.168.178.8/api/menutree/read_datapoint.json?SessionId=$sid&amp;amp;Id=1898&lt;br /&gt;
attr ozw672 get8Poll 1&lt;br /&gt;
attr ozw672 get8Regex Value&amp;quot;: &amp;quot;([a-zA-Zü ]*)&amp;quot;&lt;br /&gt;
attr ozw672 get8OMap Aus:0, Nachlauf aktiv:5, Freigegeben für TWW:10, Freigegeben für HK:20, In Teillastbetrieb für TWW:40, In Teillastbetrieb für HK:50, In Betrieb für Trinkwasser:90, In Betrieb für Heizkreis:100&lt;br /&gt;
&lt;br /&gt;
attr ozw672 getRegex Value&amp;quot;: &amp;quot;[ ]*([-.0-9]*)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
attr ozw672 reAuthRegex .*session not valid.*&lt;br /&gt;
attr ozw672 sid1IDRegex .*&amp;quot;(.*-.*-.*-[0-9a-z]*).*&lt;br /&gt;
attr ozw672 sid1URL https://192.168.178.8/api/auth/login.json?user=test&amp;amp;pwd=test&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== All attributes ==&lt;br /&gt;
;reading[0-9]+Name&lt;br /&gt;
:the name of a reading to extract with the corresponding readingRegex, readingJSON, readingXPath or readingXPath-Strict&lt;br /&gt;
:Please note that the old syntax &amp;lt;b&amp;gt;readingsName.*&amp;lt;/b&amp;gt; does not work with all features of HTTPMOD and should be avoided. It might go away in a future version of HTTPMOD.&lt;br /&gt;
&lt;br /&gt;
;(get|set)[0-9]+Name&lt;br /&gt;
:Name of a get or set command&lt;br /&gt;
:If the HTTP response that is received after the command is parsed with an individual parse option then this name is also used as a reading name. Please note that no individual parsing needs to be defined for a get or set. If no regex, XPath or JSON is specified for the command, then HTTPMOD will try to parse the response using all the defined readingRegex, reading XPath or readingJSON attributes.&lt;br /&gt;
&lt;br /&gt;
;(get|set|reading)[0-9]+Regex&lt;br /&gt;
:If this attribute is specified, the Regex defined here is used to extract the value from the HTTP Response and assign it to a Reading with the name defined in the (get|set|reading)[0-9]+Name attribute.&lt;br /&gt;
:If this attribute is not specified for an individual Reading or get or set but without the numbers in the middle, e.g. as getRegex or readingRegex, then it applies to all the other readings / get / set commands where no specific Regex is defined.&amp;lt;br&amp;gt;&lt;br /&gt;
:The value to extract should be in a capture group / sub expression e.g. ([\d\.]+) in the above example. Multiple capture groups will create multiple readings (see explanation above)&lt;br /&gt;
:Using this attribute for a set command (setXXRegex) only makes sense if you want to parse the HTTP response to the HTTP request that the set command sent by defining the attribute setXXParseResponse.&lt;br /&gt;
:Please note that the old syntax &amp;lt;code&amp;gt;readingsRegex.*&amp;lt;/code&amp;gt; does not work with all features of HTTPMOD and should be avoided. It might go away in a future version of HTTPMOD.&lt;br /&gt;
:If for get or set commands neither a generic Regex attribute without numbers nor a specific (get|set)[0-9]+Regex attribute is specified and also no XPath or JSON parsing specification is given for the get or set command, then HTTPMOD tries to use the parsing definitions for general readings defined in reading[0-9]+Name, reading[0-9]+Regex or XPath or JSON attributes and assigns the Readings that match here.&lt;br /&gt;
&lt;br /&gt;
;(get|set|reading)[0-9]+RegOpt&lt;br /&gt;
:Lets the user specify regular expression modifiers. For example if the same regular expression should be matched as often as possible in the HTTP response, then you can specify RegOpt g which will case the matching to be done as /regex/g&lt;br /&gt;
:The results will be trated the same way as multiple capture groups so the reading name will be extended with -number. &lt;br /&gt;
:For other possible regular expression modifiers see http://perldoc.perl.org/perlre.html#Modifiers&lt;br /&gt;
&lt;br /&gt;
;(get|set|reading)[0-9]+XPath&lt;br /&gt;
:defines an xpath to one or more values when parsing HTML data (see examples above)&lt;br /&gt;
:Using this attribute for a set command only makes sense if you want to parse the HTTP response to the HTTP request that the set command sent by defining the attribute setXXParseResponse.&lt;br /&gt;
&lt;br /&gt;
;get|set|reading[0-9]+XPath-Strict&lt;br /&gt;
:defines an xpath to one or more values when parsing XML data (see examples above)&lt;br /&gt;
:Using this attribute for a set command only makes sense if you want to parse the HTTP response to the HTTP request that the set command sent by defining the attribute setXXParseResponse.&lt;br /&gt;
&lt;br /&gt;
;(get|set|reading)[0-9]+AutoNumLen&lt;br /&gt;
:In cases where a regular expression or an XPath results in multiple results and these results are stored in a common reading name with extension -number, then you can modify the format of this number to have a fixed length with leading zeros. AutoNumLen 3 for example will lead to reading names ending with -001 -002 and so on.&lt;br /&gt;
&lt;br /&gt;
;(get|set|reading)[0-9]+AlwaysNum&lt;br /&gt;
:if set to 1 this attributes forces reading names to end with a -1, -01 (depending on the above described AutoNumLen) even if just one value is parsed.&lt;br /&gt;
&lt;br /&gt;
;get|set|reading[0-9]+JSON&lt;br /&gt;
:defines a path to the JSON object wanted by concatenating the object names. See the above example.&lt;br /&gt;
:If you don&#039;t know the paths, then start by using extractAllJSON and the use the names of the readings as values for the JSON attribute.&amp;lt;br&amp;gt;&lt;br /&gt;
:Please don&#039;t forget to also specify a name for a reading, get or set. &lt;br /&gt;
:Using this attribute for a set command only makes sense if you want to parse the HTTP response to the HTTP request that the set command sent by defining the attribute setXXParseResponse.&lt;br /&gt;
&lt;br /&gt;
;(get|set|reading)[0-9]*RecombineExpr&lt;br /&gt;
:defines an expression that is used in an eval to compute one reading value out of the list of matches.&lt;br /&gt;
:This is supposed to be used for regexes or xpath specifications that produce multiple results if only one result that combines them is wanted. The list of matches will be in the variable @matchlist.&lt;br /&gt;
:Using this attribute for a set command only makes sense if you want to parse the HTTP response to the HTTP request that the set command sent by defining the attribute setXXParseResponse.&lt;br /&gt;
&lt;br /&gt;
;get[0-9]*CheckAllReadings&lt;br /&gt;
:this attribute modifies the behavior of HTTPMOD when the HTTP Response of a get command is parsed. &amp;lt;br&amp;gt;&lt;br /&gt;
:If this attribute is set to 1, then additionally to the matching of the corresponding get specific regex (get[0-9]*Regex), XPath or JSON attribute also all the reading names and parse definitions defined in Reading[0-9]+Name and Reading[0-9]+Regex, XPath or JSON attributes are checked and if they match, the coresponding Readings are assigned as well.&lt;br /&gt;
:Please note that this does not mean that get01CheckAllReadings will cause a get02Regex to be used. Only the corresponding get01Regex will be used but additionally all the readingXYRegex attributes.&lt;br /&gt;
:This is automatically done if a get or set command is defined without its own parse attributes.&lt;br /&gt;
&lt;br /&gt;
;(get|reading)[0-9]*OExpr&lt;br /&gt;
:defines an optional expression that is used in an eval to compute / format a readings value after parsing an HTTP response&lt;br /&gt;
:The raw value from the parsing will be in the variable $val.&lt;br /&gt;
:If specified as readingOExpr then the attribute value is a default for all other readings that don&#039;t specify an explicit reading[0-9]*Expr.&lt;br /&gt;
:Please note that the old syntax &amp;lt;b&amp;gt;readingsExpr.*&amp;lt;/b&amp;gt; does not work with all features of HTTPMOD and should be avoided. It might go away in a future version of HTTPMOD.&lt;br /&gt;
&lt;br /&gt;
;(get|reading)[0-9]*Expr&lt;br /&gt;
:This is the old syntax for (get|reading)[0-9]*OExpr. It should be replaced by (get|reading)[0-9]*OExpr. The set command upgradeAttributes which becomes visible when the attribute enableControlSet is set to 1, can do this renaming automatically.&lt;br /&gt;
&lt;br /&gt;
;(get|reading)[0-9]*OMap&lt;br /&gt;
:Map that defines a mapping from raw value parsed to visible values like &amp;quot;0:mittig, 1:oberhalb, 2:unterhalb&amp;quot;.&lt;br /&gt;
:If specified as readingOMap then the attribute value is a default for all other readings that don&#039;t specify an explicit reading[0-9]*Map.&amp;lt;br&amp;gt;&lt;br /&gt;
:The individual options in a map are separated by a komma and an optional space. Spaces are allowed to appear in a visible value however kommas are not possible.&lt;br /&gt;
&lt;br /&gt;
;(get|reading)[0-9]*Map&lt;br /&gt;
:This is the old syntax for (get|reading)[0-9]*OMap. It should be replaced by (get|reading)[0-9]*OMap. The set command upgradeAttributes which becomes visible when the attribute enableControlSet is set to 1, can do this renaming automatically.&lt;br /&gt;
&lt;br /&gt;
;(get|set|reading)[0-9]*Format&lt;br /&gt;
:Defines a format string that will be used in sprintf to format a reading value.&lt;br /&gt;
:If specified without the numbers in the middle e.g. as readingFormat then the attribute value is a default for all other readings that don&#039;t specify an explicit reading[0-9]*Format.&lt;br /&gt;
:Using this attribute for a set command only makes sense if you want to parse the HTTP response to the HTTP request that the set command sent by defining the attribute setXXParseResponse.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;(get|set|reading)[0-9]*Decode&lt;br /&gt;
:defines an encoding to be used in a call to the perl function decode to convert the raw data string read from the device to a reading. &lt;br /&gt;
:This can be used if the device delivers strings in an encoding like cp850 instead of utf8.&lt;br /&gt;
:If your reading values contain Umlauts and they are shown as strange looking icons then you probably need to use this feature.&lt;br /&gt;
:Using this attribute for a set command only makes sense if you want to parse the HTTP response to the HTTP request that the set command sent by defining the attribute setXXParseResponse.&lt;br /&gt;
&lt;br /&gt;
;(get|set|reading)[0-9]*Encode&lt;br /&gt;
:defines an encoding to be used in a call to the perl function encode to convert the raw data string read from the device to a reading. &lt;br /&gt;
:This can be used if the device delivers strings in an encoding like cp850 and after decoding it you want to reencode it to e.g. utf8.&lt;br /&gt;
:If your reading values contain Umlauts and they are shown as strange looking icons then you probably need to use this feature.&lt;br /&gt;
:Using this attribute for a set command only makes sense if you want to parse the HTTP response to the HTTP request that the set command sent by defining the attribute setXXParseResponse.&lt;br /&gt;
&lt;br /&gt;
;(get|set)[0-9]*URL&lt;br /&gt;
:URL to be requested for the set or get command. If this option is missing, the URL specified during define will be used.&lt;br /&gt;
&lt;br /&gt;
;(get|set)[0-9]*Data&lt;br /&gt;
:Data to be sent to the device as POST data when the get or set command is executed. if this attribute is not specified, an HTTP GET method will be used instead of an HTTP POST&lt;br /&gt;
&lt;br /&gt;
;(get|set)[0-9]*NoData&lt;br /&gt;
:can be used to override a more generic attribute that specifies POST data for all get or set commands. With NoData no data is sent and therefor the request will be an HTTP GET.&lt;br /&gt;
&lt;br /&gt;
;(get|set)[0-9]*Header.*&lt;br /&gt;
:HTTP Headers to be sent to the device when the set is executed&lt;br /&gt;
&lt;br /&gt;
;requestHeader.*&lt;br /&gt;
:Define an optional additional HTTP Header to set in the HTTP request of the main loop&lt;br /&gt;
&lt;br /&gt;
;requestData&lt;br /&gt;
:optional POST Data to be sent in the request of the main loop. If not defined, it will be an HTTP GET request as defined in HttpUtils which is used by this module&lt;br /&gt;
&lt;br /&gt;
;get[0-9]+Poll&lt;br /&gt;
:if set to 1 the get is executed automatically during the normal update cycle (after the interval provided in the define command has elapsed)&lt;br /&gt;
&lt;br /&gt;
;get[0-9]+PollDelay&lt;br /&gt;
:if the value should not be read in each iteration (after the interval given to the define command), then a minimum delay can be specified with this attribute. This has only an effect if the above Poll attribute has also been set. Every time the update function is called, it checks if since this get has been read the last time, the defined delay has elapsed. If not, then it is skipped this time.&lt;br /&gt;
:PollDelay can be specified as seconds or as x[0-9]+ which means a multiple of the interval in the define command.&lt;br /&gt;
&lt;br /&gt;
;(get|set)[0-9]*TextArg&lt;br /&gt;
:For a get command this defines that the command accepts a text value after the option name. By default a get command doesn&#039;t accept optional values after the command name. &lt;br /&gt;
:If TextArg is specified and a value is passed after the get name then this value can then be used in a request URL, header or data as replacement for $val or in a user defined replacement that uses the internal &amp;quot;value&amp;quot; ($hash-&amp;gt;{value}).&lt;br /&gt;
:If used for a set command then it defines that the value to be set doesn&#039;t require any validation / conversion. &lt;br /&gt;
:The raw value is passed on as text to the device. By default a set command expects a numerical value or a text value that is converted to a numeric value using a map.&lt;br /&gt;
&lt;br /&gt;
;set[0-9]+Min&lt;br /&gt;
:Minimum value for input validation. &lt;br /&gt;
&lt;br /&gt;
;set[0-9]+Max&lt;br /&gt;
:Maximum value for input validation. &lt;br /&gt;
&lt;br /&gt;
;set[0-9]+IExpr&lt;br /&gt;
:Perl Expression to compute the raw value to be sent to the device from the input value passed to the set.&lt;br /&gt;
&lt;br /&gt;
;set[0-9]+Expr&lt;br /&gt;
:This is the old syntax for (get|reading)[0-9]*IExpr. It should be replaced by (get|reading)[0-9]*IExpr. The set command upgradeAttributes which becomes visible when the attribute enableControlSet is set to 1, can do this renaming automatically.&lt;br /&gt;
&lt;br /&gt;
;set[0-9]+IMap&lt;br /&gt;
:Map that defines a mapping from raw to input values like &amp;quot;0:mittig, 1:oberhalb, 2:unterhalb&amp;quot;. This attribute atomatically creates a hint for FHEMWEB so the user can choose one of the input values.&lt;br /&gt;
&lt;br /&gt;
;set[0-9]+Map&lt;br /&gt;
:This is the old syntax for (get|reading)[0-9]*IMap. It should be replaced by (get|reading)[0-9]*IMap. The set command upgradeAttributes which becomes visible when the attribute enableControlSet is set to 1, can do this renaming automatically.&lt;br /&gt;
&lt;br /&gt;
;set[0-9]+Hint&lt;br /&gt;
:Explicit hint for fhemWEB that will be returned when set ? is seen. Can be used to get a slider or a list of values to choose from.&lt;br /&gt;
&lt;br /&gt;
;set[0-9]*NoArg&lt;br /&gt;
:Defines that this set option doesn&#039;t require arguments. It allows sets like &amp;quot;on&amp;quot; or &amp;quot;off&amp;quot; without further values.&lt;br /&gt;
&lt;br /&gt;
;set[0-9]*ParseResponse&lt;br /&gt;
:defines that the HTTP response to the set will be parsed as if it was the response to a get command.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;(get|set)[0-9]*URLExpr&lt;br /&gt;
:Defines a Perl expression to specify the HTTP Headers for this request. This overwrites any other header specification and should be used carefully only if needed. The original Header is availabe as $old. Typically this feature is not needed and it might go away in future versions of HTTPMOD. Please use the &amp;quot;replacement&amp;quot; attributes if you want to pass additional variable data to a web service. &lt;br /&gt;
&lt;br /&gt;
;(get|set)[0-9]*DatExpr&lt;br /&gt;
:Defines a Perl expression to specify the HTTP Post data for this request. This overwrites any other post data specification and should be used carefully only if needed. The original Data is availabe as $old. Typically this feature is not needed and it might go away in future versions of HTTPMOD. Please use the &amp;quot;replacement&amp;quot; attributes if you want to pass additional variable data to a web service. &lt;br /&gt;
&lt;br /&gt;
;(get|set)[0-9]*HdrExpr&lt;br /&gt;
:Defines a Perl expression to specify the URL for this request. This overwrites any other URL specification and should be used carefully only if needed. The original URL is availabe as $old. Typically this feature is not needed and it might go away in future versions of HTTPMOD. Please use the &amp;quot;replacement&amp;quot; attributes if you want to pass additional variable data to a web service.           &lt;br /&gt;
&lt;br /&gt;
;ReAuthRegex&lt;br /&gt;
:regular Expression to match an error page indicating that a session has expired and a new authentication for read access needs to be done. &lt;br /&gt;
:This attribute only makes sense if you need a forms based authentication for reading data and if you specify a multi step login procedure based on the sid.. attributes.&lt;br /&gt;
:This attribute is used for all requests. For set and get operations you can however specify individual reAuthRegexes with the (get|set)[0-9]*ReAuthRegex attributes.&lt;br /&gt;
&lt;br /&gt;
;(get|set)[0-9]*ReAuthRegex&lt;br /&gt;
:Regex that will detect when a session has expired during a set operation and a new login needs to be performed.&lt;br /&gt;
:It works like the global reAuthRegex but is used for set operations.&lt;br /&gt;
&lt;br /&gt;
;sid[0-9]*URL&lt;br /&gt;
:different URLs or one common URL to be used for each step of an optional login procedure. &lt;br /&gt;
&lt;br /&gt;
;sid[0-9]*IDRegex&lt;br /&gt;
:different Regexes per login procedure step or one common Regex for all steps to extract the session ID from the HTTP response&lt;br /&gt;
&lt;br /&gt;
;sid[0-9]*Data.*&lt;br /&gt;
:data part for each step to be sent as POST data to the corresponding URL&lt;br /&gt;
&lt;br /&gt;
;sid[0-9]*Header.*&lt;br /&gt;
:HTTP Headers to be sent to the URL for the corresponding step&lt;br /&gt;
&lt;br /&gt;
;sid[0-9]*IgnoreRedirects&lt;br /&gt;
:Tells the HttpUtils to not follow HTTP Redirects for this Request. Might be needed for some devices that set a session cookie within a 303 Redirect.&lt;br /&gt;
&lt;br /&gt;
;clearSIdBeforeAuth&lt;br /&gt;
:will set the session id to &amp;quot;&amp;quot; before doing the authentication steps&lt;br /&gt;
&lt;br /&gt;
;authRetries&lt;br /&gt;
:number of retries for authentication procedure - defaults to 1&lt;br /&gt;
&lt;br /&gt;
;replacement[0-9]*Regex&lt;br /&gt;
:Defines a replacement to be applied to an HTTP request header, data or URL before it is sent. This allows any part of the request to be modified based on a reading, an internal or an expression.&lt;br /&gt;
:The regex defines which part of a header, data or URL should be replaced. The replacement is defined with the following attributes:&lt;br /&gt;
&lt;br /&gt;
;replacement[0-9]*Mode&lt;br /&gt;
:Defines how the replacement should be done and what replacementValue means. Valid options are text, reading, internal and expression.&lt;br /&gt;
&lt;br /&gt;
;replacement[0-9]*Value&lt;br /&gt;
:Defines the replacement. If the corresponding replacementMode is &amp;lt;code&amp;gt;text&amp;lt;/code&amp;gt;, then value is a static text that is used as the replacement.&lt;br /&gt;
:If replacementMode is &amp;lt;code&amp;gt;reading&amp;lt;/code&amp;gt; then Value can be the name of a reading of this device or it can be a reading of a different device referred to by devicename:reading.&lt;br /&gt;
:If replacementMode is &amp;lt;code&amp;gt;internal&amp;lt;/code&amp;gt; the Value can be the name of an internal of this device or it can be an internal of a different device referred to by devicename:internal.&lt;br /&gt;
:If replacementMode is &amp;lt;code&amp;gt;expression&amp;lt;/code&amp;gt; the the Value is treated as a Perl expression that computes the replacement value. The expression can use $1, $2 and so on to refer to capture groups of the corresponding regex that is matched against the original URL, header or post data.&lt;br /&gt;
:If replacementMode is &amp;lt;code&amp;gt;key&amp;lt;/code&amp;gt; then the module will use a value from a key / value pair that is stored in an obfuscated form in the file system with the set storeKeyValue command. This might be useful for storing passwords.&lt;br /&gt;
&lt;br /&gt;
;[gs]et[0-9]*Replacement[0-9]*Value&lt;br /&gt;
:This attribute can be used to override the replacement value for a specific get or set.&lt;br /&gt;
&lt;br /&gt;
;get|reading[0-9]*MaxAge&lt;br /&gt;
:Defines how long a reading is valid before it is automatically overwritten with a replacement when the read function is called the next time.&lt;br /&gt;
&lt;br /&gt;
;get|reading[0-9]*MaxAgeReplacement&lt;br /&gt;
:specifies the replacement for MaxAge - either as a static text or as a perl expression.&lt;br /&gt;
&lt;br /&gt;
;get|reading[0-9]*MaxAgeReplacementMode&lt;br /&gt;
:specifies how the replacement is interpreted: can be text, expression and delete.&lt;br /&gt;
&lt;br /&gt;
;get|reading[0-9]*DeleteIfUnmatched&lt;br /&gt;
:If set to 1 this attribute causes certain readings to be deleted when the parsing of the website does not match the specified reading. Internally HTTPMOD remembers which kind of operation created a reading (update, Get01, Get02 and so on). Specified readings will only be deleted if the same operation does not parse this reading again. This is especially useful for parsing that creates several matches / readings and the number of matches can vary from request to request. For example if reading01Regex creates 4 readings in one update cycle and in the next cycle it only matches two times then the readings containing the remaining values from the last round will be deleted.&lt;br /&gt;
:Please note that this mechanism will not work in all cases after a restart. Especially when a get definition does not contain its own parsing definition but ExtractAllJSON or relies on HTTPMOD to use all defined reading.* attributes to parse the responsee to a get command, old readings might not be deleted after a restart of fhem.&lt;br /&gt;
;get|reading[0-9]*DeleteOnError&lt;br /&gt;
:If set to 1 this attribute causes certain readings to be deleted when the website can not be reached and the HTTP request returns an error. Internally HTTPMOD remembers which kind of operation created a reading (update, Get01, Get02 and so on). Specified readings will only be deleted if the same operation returns an error.&lt;br /&gt;
The same restrictions as for DeleteIfUnmatched apply regarding a fhem restart.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;httpVersion&lt;br /&gt;
:defines the HTTP-Version to be sent to the server. This defaults to 1.0.&lt;br /&gt;
&lt;br /&gt;
;sslVersion&lt;br /&gt;
:defines the SSL Version for the negotiation with the server. The attribute is evaluated by HttpUtils. If it is not specified, HttpUtils assumes SSLv23:!SSLv3:!SSLv2&lt;br /&gt;
&lt;br /&gt;
;sslArgs&lt;br /&gt;
:defines a list that is converted to a key / value hash and gets passed to HttpUtils. To avoid certificate validation for broken servers you can for example specify &lt;br /&gt;
:&amp;lt;code&amp;gt;attr myDevice sslArgs SSL_verify_mode,SSL_VERIFY_NONE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;alignTime&lt;br /&gt;
:Aligns each periodic read request for the defined interval to this base time. This is typcally something like 00:00 (see the FHEM at command)&lt;br /&gt;
&lt;br /&gt;
;noShutdown&lt;br /&gt;
:pass the noshutdown flag to HTTPUtils for webservers that need it (some embedded webservers only deliver empty pages otherwise)&lt;br /&gt;
&lt;br /&gt;
;disable&lt;br /&gt;
:stop doing automatic HTTP requests while this attribute is set to 1&lt;br /&gt;
&lt;br /&gt;
;enableControlSet&lt;br /&gt;
:enables the built in set commands interval, stop, start, reread, upgradeAttributes, storeKeyValue.&lt;br /&gt;
&lt;br /&gt;
;enableCookies&lt;br /&gt;
:enables the built in cookie handling if set to 1. With cookie handling each HTTPMOD device will remember cookies that the server sets and send them back to the server in the following requests. &lt;br /&gt;
:This simplifies session magamenet in cases where the server uses a session ID in a cookie. In such cases enabling cookies should be sufficient and no sidRegex and no manual definition of a cookie header should be necessary.&lt;br /&gt;
&lt;br /&gt;
;showMatched&lt;br /&gt;
:if set to 1 then HTTPMOD will create a reading with the name MATCHED_READINGS that contains the names of all readings that could be matched in the last request as well as UNMATCHED_READINGS and LAST_REQUEST.&lt;br /&gt;
&lt;br /&gt;
;showError&lt;br /&gt;
:if set to 1 then HTTPMOD will create a reading and event with the Name LAST_ERROR that contains the error message of the last error returned from HttpUtils. &lt;br /&gt;
&lt;br /&gt;
;removeBuf&lt;br /&gt;
:if set to 1 then HTTPMOD removes the internal named buf when a HTTP-response has been received. &lt;br /&gt;
:$hash-&amp;gt;{buf} is used internally be Fhem httpUtils and in some use cases it is desireable to remove this internal after reception &lt;br /&gt;
:because it contains a very long response which looks ugly in Fhemweb.&lt;br /&gt;
&lt;br /&gt;
;timeout&lt;br /&gt;
:time in seconds to wait for an answer. Default value is 2&lt;br /&gt;
&lt;br /&gt;
;queueDelay&lt;br /&gt;
:HTTP Requests will be sent from a queue in order to avoid blocking when several Requests have to be sent in sequence. This attribute defines the delay between calls to the function that handles the send queue. It defaults to one second.&lt;br /&gt;
&lt;br /&gt;
;queueMax&lt;br /&gt;
:Defines the maximum size of the send queue. If it is reached then further HTTP Requests will be dropped and not be added to the queue&lt;br /&gt;
&lt;br /&gt;
;minSendDelay&lt;br /&gt;
:Defines the minimum time between two HTTP Requests.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* Example: [https://www.goingelectric.de/forum/viewtopic.php?f=57&amp;amp;t=21462|Abfrage Akkustand einer Zoe und mehr von Renault ZE Services]&lt;br /&gt;
* Example: [[Wetter_und_Wettervorhersagen#Wetter_von_Weather_Underground|Extract weather information from WeatherUnderground]]&lt;br /&gt;
* Example: [[Pollenflug|Pollen count]]&lt;br /&gt;
* Example: [[HTTPMOD Beispielkonfiguration zur Anbindung einer Daikin Klimaanlage mit WLAN-Modul|Connect Daikin aircondition to FHEM]]&lt;br /&gt;
* Example: [[Go-eCharger|Extract information from go-eCharger]]&lt;br /&gt;
* Example: [[Sonnenspeicher|Integration of energy supplies from sonnen (https://sonnenbatterie.de/en/start)]]&lt;br /&gt;
* Example: [https://forum.fhem.de/index.php/topic,95989.msg915870.html#msg915870 Miele 3rd party API für Miele Smarthome Geräte]&lt;br /&gt;
* Example: [https://forum.fhem.de/index.php/topic,84215.msg918662.html#msg918662 Honeywell Evohome Totalconnect]&lt;br /&gt;
* Example: [https://forum.fhem.de/index.php/topic,78613.msg889015.html#msg889015 Tigo Energy Integration]&lt;br /&gt;
* Example: [https://forum.fhem.de/index.php/topic,78613.msg708518.html#msg708518 Ecowater]&lt;br /&gt;
* {{Link2Forum|Topic=17804|LinkText=Thread}} in FHEM Forum that discusses the first version of this module &lt;br /&gt;
* {{Link2Forum|Topic=29471|LinkText=Thread}} in FHEM Forum that discusses the second major version of this module &lt;br /&gt;
* {{Link2Forum|Topic=45176|LinkText=Thread}} in FHEM Forum that discusses the third major version of this module &lt;br /&gt;
* [http://perldoc.perl.org/perlretut.html Introduction to regular expressions]&lt;br /&gt;
* [http://portswigger.net/burp/ BurpSuite]: Tool (local proxy) to help analyze http traffic&lt;br /&gt;
&lt;br /&gt;
[[Kategorie:IP Components]]&lt;/div&gt;</summary>
		<author><name>Jophb</name></author>
	</entry>
	<entry>
		<id>http://wiki.fhem.de/w/index.php?title=HTTPMOD&amp;diff=39053</id>
		<title>HTTPMOD</title>
		<link rel="alternate" type="text/html" href="http://wiki.fhem.de/w/index.php?title=HTTPMOD&amp;diff=39053"/>
		<updated>2024-01-28T20:47:34Z</updated>

		<summary type="html">&lt;p&gt;Jophb: Added set parametrs for Wiesemann&amp;amp;Theis Web.IO Analog 4.0&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox Modul&lt;br /&gt;
|ModPurpose=Extract information from devices with an HTTP interface (or, more generic, from any URL) or send information to such devices &lt;br /&gt;
|ModType=d&lt;br /&gt;
|ModCmdRef=HTTPMOD&lt;br /&gt;
|ModForumArea=Sonstiges&lt;br /&gt;
|ModTechName=98_HTTPMOD.pm&lt;br /&gt;
|ModOwner=StefanStrobel ({{Link2FU|3960|Forum}} / [[Benutzer:StefanStrobel|Wiki]])&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
HTTPMOD provides a generic way to retrieve information from devices with an HTTP Interface and store them in Readings or send information to such devices. It queries a given URL with Headers and data defined by attributes. &lt;br /&gt;
&lt;br /&gt;
From the HTTP response it extracts readings named in attributes using Regexes, JSON or XPath parsing also defined by attributes.&lt;br /&gt;
&lt;br /&gt;
In an advanced [[Konfiguration|configuration]] the module can also send information to devices. To do this, a generic &amp;lt;code&amp;gt;set&amp;lt;/code&amp;gt; option can be configured using attributes. &lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
With the help of HTTPMOD you can automatically access websites, retrieve information and send data. In the simplest case, an http call is started regularly and the content of a page, for example, is read and processed further. The URL and the time interval in which the call is to be made must then be specified when the call is made. In order to read information from the called web pages, readings are required. In this readings one specifies Regex, which reads the necessary information. Here is an example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
define PM HTTPMOD  http://www.klack.de/fernsehprogramm/was-laeuft-gerade/0/-1/free.html 20000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This creates a device that accesses the http://www.klack.de/fernsehprogramm/was-laeuft-gerade/0/-1/free.html website with the TV program every 20000 seconds. If neither readings nor other attributes are defined, then only the call of the website takes place and FHEM receives no further data from the web access.&lt;br /&gt;
&lt;br /&gt;
But now a television program is returned when you call the website, which you might want to read out. In order to save the contents in FHEM, which are related to the ARD, you need a reading. This reading must contain a name (so that FHEM knows under which name the information is stored) and a regex (so that you know where the information is stored on the website). Since usually not one, but many readings are defined, these readings are numbered consecutively. This is done by numbers that are given immediately after the word reading. In our example this would be for example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr PM reading1Name ARD &lt;br /&gt;
attr PM reading1Regex &amp;lt;span class=&amp;quot;stationName&amp;quot;&amp;gt;ARD&amp;lt;\/span&amp;gt;[\w\W]*?&amp;lt;div class=&amp;quot;content&amp;quot;&amp;gt;\s*&amp;lt;a[\w\W]*?&amp;gt;\s*(.*?)\s*&amp;lt;\/a&amp;gt; &lt;br /&gt;
attr PM reading2Name ARD_time &lt;br /&gt;
attr PM reading2Regex &amp;lt;span class=&amp;quot;stationName&amp;quot;&amp;gt;ARD&amp;lt;\/span&amp;gt;[\w\W]*?&amp;lt;td class=&amp;quot;time&amp;quot;&amp;gt;\s*(.*?)\s*&amp;lt; &lt;br /&gt;
attr PM reading3Name ARD_details &lt;br /&gt;
attr PM reading3Regex &amp;lt;span class=&amp;quot;stationName&amp;quot;&amp;gt;ARD&amp;lt;\/span&amp;gt;[\w\W]*?&amp;lt;div class=&amp;quot;content&amp;quot;&amp;gt;\s*&amp;lt;a[\w\W]*?&amp;gt;[\w\W]*?&amp;lt;\/a&amp;gt;\s*&amp;lt;br\/&amp;gt;\s*(.*?)(&amp;lt;img|&amp;lt;\/div) &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reading1 contains the programme, reading2 the time and reading3 further details.  The Regex result from the structure of the website and may have to be designed in painstaking detail.&lt;br /&gt;
&lt;br /&gt;
There are cases where this is not enough. For example, it could be the case that the information from the web access is not automated, but manually received. Then a 0 must first be entered at the top of the duration. But how does HTTPMOD then know when the data should be retrieved? This is done with get-commands. If a get-command is executed, HTTPMOD accesses the website, fetches the information and fills the corresponding readings. &lt;br /&gt;
&lt;br /&gt;
Again, it is possible to create not one but several get-commands. Therefore, get is always followed by (at least) one number with which the get commands are numbered.  Here is another example. The TV program should be called manually and not time-controlled. To do this we first change the definition to &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
define PM HTTPMOD  http://www.klack.de/fernsehprogramm/was-laeuft-gerade/0/-1/free.html 0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
and add the following to the attributes&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr PM get1Name ARDHolen &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
With the command &amp;quot;get PM ARDHolen&amp;quot; the above readings are filled. In order for FHEM to know that the other reading2, reading3, etc. are to be read as well as reading1, the (user) attribute  &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr PM get1CheckAllReadings 1 &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
needs to be defined.&lt;br /&gt;
&lt;br /&gt;
If the URL is not sufficient when the web page is called, but a special header is to be sent with it, this can be done with the get1Header attribute. If the header is multiline, the individual lines can be entered with get1Header1, get1Header2, and so on.    &lt;br /&gt;
&lt;br /&gt;
If you want to evaluate or control different URLs, you can define several get commands (get1, get2, etc.) and provide them with your own URLs. get1 usually reads only the reading1, get2 reads only the reading2 and so on. With CheckAllReadings all readings are evaluated simultaneously.&lt;br /&gt;
&lt;br /&gt;
If only data is to be sent on the web page, but not read, the set command is recommended. It has the same structure as the get-command.&lt;br /&gt;
&lt;br /&gt;
It becomes a bit more complex if the website requires a login check. The sid attributes are used for this purpose.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Availability, prerequisites and definition ==&lt;br /&gt;
This module is part of the regular FHEM distribution and uses the non blocking HTTP function &amp;lt;code&amp;gt;HttpUtils_NonblockingGet&amp;lt;/code&amp;gt; provided by FHEM&#039;s [[HttpUtils]] in a new version published in December 2013.&lt;br /&gt;
If not already installed in your environment, please [[update]] FHEM or install it manually using appropriate commands from your environment.&lt;br /&gt;
Please also note that FHEM HttpUtils need the global attribute dnsServer to be set in order to work really non blocking even when dns requests can not be answered.&lt;br /&gt;
&lt;br /&gt;
The device is defined as follows&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
define &amp;lt;name&amp;gt; HTTPMOD &amp;lt;URL&amp;gt; &amp;lt;Interval&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The module connects to the given &amp;lt;code&amp;gt;URL&amp;lt;/code&amp;gt; every &amp;lt;code&amp;gt;Interval&amp;lt;/code&amp;gt; seconds, sends optional headers and data and then parses the response with regular expressions, xpath or json to set readings.&lt;br /&gt;
&lt;br /&gt;
URL can be &amp;quot;none&amp;quot; and Interval can be 0 if you prefer to only query data with a get command and not in a defined interval.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
define PM HTTPMOD http://MyPoolManager/cgi-bin/webgui.fcgi 60&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Set-Commands ==&lt;br /&gt;
can be defined using attributes, see advanced configuration&lt;br /&gt;
&lt;br /&gt;
If you set the attribute enableControlSet to 1, the following additional built in set commands are available:&lt;br /&gt;
;interval&lt;br /&gt;
:set new interval time in seconds and restart the timer&lt;br /&gt;
;reread&lt;br /&gt;
:request the defined URL and try to parse it just like the automatic update would do it every Interval seconds without modifying the running timer.&lt;br /&gt;
;stop&lt;br /&gt;
:stop interval timer.&lt;br /&gt;
;start&lt;br /&gt;
:restart interval timer to call GetUpdate after interval seconds&lt;br /&gt;
;upgradeAttributes&lt;br /&gt;
:convert outdated attributes for older HTTPMOD-Versions that are still defined for this device from the old syntax to the new one.&lt;br /&gt;
:attributes with the description &amp;quot;this attribute should not be used anymore&amp;quot; or similar will be translated to the new syntax, e.g. readingsName1 to reading01Name.&lt;br /&gt;
;storeKeyValue&lt;br /&gt;
:stores a key value pair in an obfuscated form in the file system. Such values can then be used in replacements where the mode is &amp;quot;key&amp;quot; e.g. to avoid storing passwords in the configuration in clear text&lt;br /&gt;
&lt;br /&gt;
== Get-Commands ==&lt;br /&gt;
can be defined using attributes, see advanced configuration&lt;br /&gt;
&lt;br /&gt;
== simple Attributes ==&lt;br /&gt;
;enableControlSet&lt;br /&gt;
:enables the built in set commands &#039;&#039;interval&#039;&#039;, &#039;&#039;stop&#039;&#039;, &#039;&#039;start&#039;&#039;, &#039;&#039;reread&#039;&#039;, &#039;&#039;upgradeAttributes&#039;&#039;, &#039;&#039;storeKeyValue&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;enableCookies&lt;br /&gt;
:enables the cookie handling inside HTTPMOD. It is advisable to always set this attribute and allow HTTPMOD to track the state of cookies and set them for following HTTP-requests&lt;br /&gt;
&lt;br /&gt;
;enforceGoodReadingNames&lt;br /&gt;
:makes sure that HTTPMOD only creates readings that are allowd for Fhem (especially if reading names are dynamically created from JSON object names with extractAllJSON. It is advisable to always set this attribute.&lt;br /&gt;
&lt;br /&gt;
;handleRedirects&lt;br /&gt;
:enables the redirect handling inside HTTPMOD which should be used together with the cookie handling of HTTPMOD. HTTPMOD will then automatically follow redirects from a web server and keep track of cookies at the same time. It is advisable to always set this attribute.&lt;br /&gt;
&lt;br /&gt;
;requestHeader.* &lt;br /&gt;
:Define an additional HTTP Header to set in the HTTP request&lt;br /&gt;
&lt;br /&gt;
;requestData&lt;br /&gt;
:POST Data to be sent in the request. If not defined, it will be a GET request as defined in HttpUtils used by this module&lt;br /&gt;
&lt;br /&gt;
;reading[0-9]+(-[0-9]+)?Name&lt;br /&gt;
:the name of a reading to extract with the corresponding readingRegex&lt;br /&gt;
&lt;br /&gt;
;reading[0-9]*(-[0-9]+)?OExpr&lt;br /&gt;
:defines an expression that is used in an eval to compute the readings value. The raw value will be in the variable $val.&lt;br /&gt;
&lt;br /&gt;
;reading[0-9]*(-[0-9]+)?OMap&lt;br /&gt;
:Output Map. Defines a mapping from raw to visible values like &amp;quot;0:mittig, 1:oberhalb, 2:unterhalb&amp;quot;. If specified as readingOMap then the attribute value is a default for all other readings that don&#039;t specify an explicit reading[0-9]*OMap.&lt;br /&gt;
&lt;br /&gt;
;reading[0-9]*(-[0-9]+)?Format&lt;br /&gt;
:Defines a format string that will be used in sprintf to format a reading value. If specified as readingFormat then the attribute value is a default for all other readings that don&#039;t specify an explicit reading[0-9]*Format.&lt;br /&gt;
&lt;br /&gt;
;reading[0-9]*(-[0-9]+)?Decode&lt;br /&gt;
:defines an encoding to be used in a call to the perl function decode to convert the raw data string read from the device to a reading. This can be used if the device delivers strings in an encoding like cp850 instead of utf8.&lt;br /&gt;
&lt;br /&gt;
;reading[0-9]*(-[0-9]+)?Encode&lt;br /&gt;
:defines an encoding to be used in a call to the perl function encode to convert the raw data string read from the device to a reading. This can be used if the device delivers strings in an encoding like cp850 and after decoding it you want to reencode it to e.g. utf8.&lt;br /&gt;
&lt;br /&gt;
;reading[0-9]+Regex&lt;br /&gt;
:defines the regex to be used for extracting the reading. The value to extract should be in a capture group / sub expression &lt;br /&gt;
:e.g. ([\d\.]+) in the above example. Multiple capture groups will create multiple readings (see explanation above)&lt;br /&gt;
&lt;br /&gt;
;reading[0-9]+XPath&lt;br /&gt;
:defines an xpath to one or more readings when parsing HTML data (see examples below)&lt;br /&gt;
&lt;br /&gt;
;reading[0-9]+XPath-Strict&lt;br /&gt;
:defines an xpath to one or more readings when parsing XML data (see examples below)&lt;br /&gt;
&lt;br /&gt;
;reading[0-9]+JSON&lt;br /&gt;
:defines a path to the JSON object wanted by concatenating the object names with an underscore as delimiter (see the example below)&lt;br /&gt;
&lt;br /&gt;
;noShutdown&lt;br /&gt;
:pass the noshutdown flag to HTTPUtils for webservers that need it (some embedded webservers only deliver empty pages otherwise)&lt;br /&gt;
&lt;br /&gt;
;disable&lt;br /&gt;
:stop doing automatic HTTP requests while this attribute is set to 1&lt;br /&gt;
&lt;br /&gt;
;timeout&lt;br /&gt;
:time in seconds to wait for an answer. Default value is 2&lt;br /&gt;
&lt;br /&gt;
;do_not_notify&lt;br /&gt;
&lt;br /&gt;
;readingFnAttributes&lt;br /&gt;
&lt;br /&gt;
== Simple Configuration of HTTP Devices ==&lt;br /&gt;
If your device expects special HTTP-headers then specify them as &amp;lt;code&amp;gt;attr requestHeader1&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;attr requestHeaderX&amp;lt;/code&amp;gt;.&lt;br /&gt;
If your Device expects an HTTP POST instead of HTTP GET then the POST-data can be specified as &amp;lt;code&amp;gt;attr requestData&amp;lt;/code&amp;gt;.&lt;br /&gt;
To get the readings, specify pairs of &amp;lt;code&amp;gt;attr readingXName&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;attr readingXRegex&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;attr readingXXPath&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;attr readingXXPath-Strict&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;attr readingXJSON&amp;lt;/code&amp;gt; to define which readings you want to extract from the HTTP response and how to extract them. (The old syntax &amp;lt;code&amp;gt;attr readingsNameX&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;attr readingsRegexX&amp;lt;/code&amp;gt; is still supported but the new one with &amp;lt;code&amp;gt;attr readingXName&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;attr readingXRegex&amp;lt;/code&amp;gt; should be preferred. The actual values to be extracted have to be sub expressions within () in the regex (see example below)&lt;br /&gt;
&lt;br /&gt;
=== Example for a PoolManager 5: ===&lt;br /&gt;
The PoolManager Web GUI can be queried with HTTP POST Requests like this one:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
POST /cgi-bin/webgui.fcgi HTTP/1.1&lt;br /&gt;
Host: 192.168.70.90&lt;br /&gt;
Accept: */*&lt;br /&gt;
Content-Type: application/json;charset=UTF-8&lt;br /&gt;
Content-Length: 60&lt;br /&gt;
&lt;br /&gt;
{&amp;quot;get&amp;quot; :[&amp;quot;34.4001.value&amp;quot; ,&amp;quot;34.4008.value&amp;quot; ,&amp;quot;34.4033.value&amp;quot;]}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The resulting HTTP Response would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
HTTP/1.1 200 OK&lt;br /&gt;
Content-type: application/json; charset=UTF-8&lt;br /&gt;
Expires: 0&lt;br /&gt;
Cache-Control: no-cache&lt;br /&gt;
Date: Sun, 12 Jan 2014 12:23:11 GMT&lt;br /&gt;
Server: lighttpd/1.4.26&lt;br /&gt;
Content-Length: 179&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;data&amp;quot;:	{&lt;br /&gt;
		&amp;quot;34.4001.value&amp;quot;:	&amp;quot;7.00&amp;quot;,&lt;br /&gt;
		&amp;quot;34.4008.value&amp;quot;:	&amp;quot;0.52&amp;quot;,&lt;br /&gt;
		&amp;quot;34.4033.value&amp;quot;:	&amp;quot;24.8&amp;quot;&lt;br /&gt;
	},&lt;br /&gt;
	&amp;quot;status&amp;quot;:	{&lt;br /&gt;
		&amp;quot;code&amp;quot;:	0&lt;br /&gt;
	},&lt;br /&gt;
	&amp;quot;event&amp;quot;:	{&lt;br /&gt;
		&amp;quot;type&amp;quot;:	1,&lt;br /&gt;
		&amp;quot;data&amp;quot;:	&amp;quot;48.30000.0&amp;quot;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To configure HTTPMOD for a PoolManager one would first define a PoolManager device with e.g. the name PM, the URL and an interval of e.g. 60 seconds. &lt;br /&gt;
&lt;br /&gt;
Then the data to be sent in the request needs to be defined because in this example the device expects a POST request so the query is not contained in the URL but in the request data.&lt;br /&gt;
&lt;br /&gt;
Also as seen above the device expects special HTTP headers in the request so these headers also need to be defined as &amp;lt;code&amp;gt;attr PM requestHeader1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;attr PM requestHeader2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the names of the readings to be extracted would be set with attributes&lt;br /&gt;
&lt;br /&gt;
Then for each reading value to be extracted a regular expression needs to be set that will match the value in question within ().&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
define PM HTTPMOD http://MyPoolManager/cgi-bin/webgui.fcgi 60&lt;br /&gt;
&lt;br /&gt;
attr PM enableControlSet 1&lt;br /&gt;
attr PM enableCookies 1&lt;br /&gt;
attr PM enforceGoodReadingNames 1&lt;br /&gt;
attr PM handleRedirects 1&lt;br /&gt;
&lt;br /&gt;
attr PM reading01Name PH&lt;br /&gt;
attr PM reading01Regex 34.4001.value&amp;quot;:[ \t]+&amp;quot;([\d\.]+)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
attr PM reading02Name CL&lt;br /&gt;
attr PM reading02Regex 34.4008.value&amp;quot;:[ \t]+&amp;quot;([\d\.]+)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
attr PM reading03Name3TEMP&lt;br /&gt;
attr PM reading03Regex 34.4033.value&amp;quot;:[ \t]+&amp;quot;([\d\.]+)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
attr PM requestData {&amp;quot;get&amp;quot; :[&amp;quot;34.4001.value&amp;quot; ,&amp;quot;34.4008.value&amp;quot; ,&amp;quot;34.4033.value&amp;quot;, &amp;quot;14.16601.value&amp;quot;, &amp;quot;14.16602.value&amp;quot;]}&lt;br /&gt;
attr PM requestHeader1 Content-Type: application/json&lt;br /&gt;
attr PM requestHeader2 Accept: */*&lt;br /&gt;
attr PM stateFormat {sprintf(&amp;quot;%.1f Grad, PH %.1f, %.1f mg/l Chlor&amp;quot;, ReadingsVal($name,&amp;quot;TEMP&amp;quot;,0), ReadingsVal($name,&amp;quot;PH&amp;quot;,0), ReadingsVal($name,&amp;quot;CL&amp;quot;,0))}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example for AmbientMonitor ===&lt;br /&gt;
AmbientMonitor is a webbased visualisation for sensors connected to an Arduino device. Its web interface can also be queried with HTTMOD to grab the data into readings.&lt;br /&gt;
&lt;br /&gt;
This example was provided by locutus. The hardware configuration is an Arduino + Ethercard with ENC28J60 Controller + DHT22 Sensor and software can be downloaded from https://github.com/lucadentella/AmbientMonitor&lt;br /&gt;
&lt;br /&gt;
In this example an HTTP GET is sufficent, so no &amp;lt;code&amp;gt;requestData&amp;lt;/code&amp;gt; is needed. The device provides temperature and humidity readings in an HTTP response that looks like:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
HTTP/1.0 200 OK &lt;br /&gt;
Content-Type: text/html &lt;br /&gt;
&lt;br /&gt;
myCB({&#039;temperature&#039;:22.00,&#039;humidity&#039;:46.00})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the definition could be:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
define AmbientMonitor HTTPMOD http://192.168.1.221/?callback=? 300&lt;br /&gt;
&lt;br /&gt;
attr AmbientMonitor enableControlSet 1&lt;br /&gt;
attr AmbientMonitor enableCookies 1&lt;br /&gt;
attr AmbientMonitor enforceGoodReadingNames 1&lt;br /&gt;
attr AmbientMonitor handleRedirects 1&lt;br /&gt;
&lt;br /&gt;
attr AmbientMonitor requestHeader Content-Type: application/json&lt;br /&gt;
attr AmbientMonitor reading1Name Temperatur&lt;br /&gt;
attr AmbientMonitor reading1Regex temperature&#039;:([\d\.]+)&lt;br /&gt;
attr AmbientMonitor reading2Name Feuchtigkeit&lt;br /&gt;
attr AmbientMonitor reading2Regex humidity&#039;:([\d\.]+)&lt;br /&gt;
attr AmbientMonitor stateFormat {sprintf(&amp;quot;Temperatur %.1f C, Feuchtigkeit %.1f %&amp;quot;, ReadingsVal($name,&amp;quot;Temperatur&amp;quot;,0), ReadingsVal($name,&amp;quot;Feuchtigkeit&amp;quot;,0))}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== formatting and manipulating values / readings ==&lt;br /&gt;
Values that are parsed from an HTTP response can be further treated or formatted with the following attributes:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;(reading|get)[0-9]*(-[0-9]+)?OExpr&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;(reading|get)[0-9]*(-[0-9]+)?OMap&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;(reading|get)[0-9]*(-[0-9]+)?Format&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;(reading|get)[0-9]*(-[0-9]+)?Decode&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;(reading|get)[0-9]*(-[0-9]+)?Encode&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
They can all be specified for an individual reading, for all readings in one match (e.g. if a regular expression has several capture groups) or for all readings in a get command (defined by getXX) or for all readings in the main reading list (defined by readingXX):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
reading01Format %.1f&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will format the reading with the name specified by the attribute reading01Name to be numerical with one digit after the decimal point.&lt;br /&gt;
If the attribute reading01Regex is used and contains several capture groups then the format will be applied to all readings parsed by this regex unless these readings have their own format specified by reading01-1Format, reading01-2Format and so on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
reading01-2Format %.1f&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used in cases where a regular expression specified as reading01regex contains several capture groups or an xpath specified as reading01XPath creates several readings. &lt;br /&gt;
In this case reading01-2Format specifies the format to be applied to the second match.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
readingFormat %.1f&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
applies to all readings defined by a reading-Attribute that have no more specific format.&lt;br /&gt;
&lt;br /&gt;
If you need to do some calculation on a raw value before it is used as a reading, you can define the attribute &amp;lt;code&amp;gt;readingOExpr&amp;lt;/code&amp;gt;.&lt;br /&gt;
It defines a Perl expression that is used in an eval to compute the readings value. The raw value will be in the variable $val.&lt;br /&gt;
&lt;br /&gt;
Example for an expression:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr PM reading03OExpr $val * 10&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Just like in the above example of the readingFormat attributes, readingOExpr and the other following attributes can be applied on several levels.&lt;br /&gt;
&lt;br /&gt;
To map a numerical value to a name, you can use the readingOMap attribute. &lt;br /&gt;
It defines a mapping from raw to visible values like &amp;quot;0:mittig, 1:oberhalb, 2:unterhalb&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Example for a map:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr PM reading02-3OMap 0:kalt, 1:warm, 2:sehr warm&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To convert character sets, the module can first decode a string read from the device and then encode it again. For example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr PM getDecode UTF-8&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This applies to all readings defined for Get-Commands.&lt;br /&gt;
&lt;br /&gt;
== Some help with Regular Expressions ==&lt;br /&gt;
{{Randnotiz|RNTyp=y|RNText=Starting with version &#039;&#039;2018-02-10&#039;&#039; the internal that holds the HTTP response is no longer called &#039;&#039;&#039;&#039;&#039;buf&#039;&#039;&#039;&#039;&#039; but rather &#039;&#039;&#039;&#039;&#039;httpbody&#039;&#039;&#039;&#039;&#039;, and it is only displayed when attribute &#039;&#039;&#039;&#039;&#039;showBody&#039;&#039;&#039;&#039;&#039; is set to &amp;quot;1&amp;quot;.}}&lt;br /&gt;
If HTTPMOD seems not to work and the FHEM Logfile contains a message like  &lt;br /&gt;
:&amp;lt;code&amp;gt;HTTPMOD: Response didn&#039;t match Reading ...&amp;lt;/code&amp;gt;&lt;br /&gt;
then you should check if the value you want to extract is read into the internal with the name buf. Internals are visible when you click on the defined HTTPMOD Device. buf is an internal variable that contains the HTTP Response read. If the value is there and you get the mentioned message then probably something is wrong with your regular expression. Please note that buf might contain special characters like newlines but they are not shown in fhemweb. If you are new to regular expressions then the introduction at http://perldoc.perl.org/perlretut.html might be helpful. &lt;br /&gt;
&lt;br /&gt;
For a typical HTTPMOD use case where you want to extract a number out of a HTTP-Response you can use something like &amp;lt;code&amp;gt;[\d\.]+&amp;lt;/code&amp;gt; to match the number itself. The expression matches the number characters (&amp;lt;code&amp;gt;\d&amp;lt;/code&amp;gt;) or a &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; if one of these characters occurs at least once. &lt;br /&gt;
&lt;br /&gt;
To tell HTTPMOD that the number is what you want to use for the reading, you have to put the expression in between &amp;lt;code&amp;gt;()&amp;lt;/code&amp;gt;. A &amp;lt;code&amp;gt;([\d\.]+)&amp;lt;/code&amp;gt; alone would match the longest number in the HTTP Response which is very likely not the number you are looking for so you need to add something to the expression to give it a context and define how to find the number that you are looking for.&lt;br /&gt;
&lt;br /&gt;
If there is a title text before the number or a special text after the number you can put this in the regex. In one of the examples above &amp;lt;code&amp;gt;humidity&#039;:([\d\.]+)&amp;lt;/code&amp;gt; is looking for the number that immediately follows the text &amp;lt;code&amp;gt;humidity&#039;:&amp;lt;/code&amp;gt; without any blanks in between.&lt;br /&gt;
Be careful if the text you are getting from your device contains special characters like newline. You don&#039;t see such special characters in the fhem webinterface as contents of the internal buf but they might cause your regular expression to fail. &lt;br /&gt;
&lt;br /&gt;
If you have trouble defining a regular expression that matches a certain name, then many complicated characters and then a number, it might be helpful to use a negation in matching like &amp;lt;code&amp;gt;temp[^\d]+([\d\.]).*&amp;lt;/code&amp;gt;. In this examle &amp;lt;code&amp;gt;[^\d]+&amp;lt;/code&amp;gt; means any character that is not a numerical digit, more than once.&lt;br /&gt;
&lt;br /&gt;
=== Regular Expressions with multiple capture Groups ===&lt;br /&gt;
The regular expressions used in the above example for a Poolmanager will take the value that matches one capture group. This is the part of the regular expression inside (). In the above example &amp;quot;([\d\.]+)&amp;quot; refers to numerical digits or points between double quotation marks. Only the string consiting of digits and points will match inside (). This piece is assigned to the reading.&lt;br /&gt;
        &lt;br /&gt;
You can also use regular expressions that have several capture groups which might be helpful when parsing tables. In this case an attribute like &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
reading02Regex something[ \t]+([\d\.]+)[ \t]+([\d\.]+)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
could match two numbers. When you specify only one reading02Name like &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
reading02Name Temp&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the name Temp will be used with the extension -1 and -2 thus giving a reading Temp-1 for the first number and Temp-2 for the second. You can also specify individual names for several readings that get parsed from one regular expression with several capture groups by defining attributes &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
reading02-1Name&lt;br /&gt;
reading02-2Name&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The same notation can be used for formatting attributes like readingXOMap, readingXFormat and so on.&lt;br /&gt;
&lt;br /&gt;
The usual way to define readings is however to have an individual regular expression with just one capture group per reading as shown in the above example.&lt;br /&gt;
&lt;br /&gt;
== Parsing JSON ==&lt;br /&gt;
    &lt;br /&gt;
If a webservice delivers data in JSON format, HTTPMOD can directly parse JSON which might be easier in this case than definig regular expressions.&lt;br /&gt;
The next example shows the data that can be requested from a Poolmanager with the following partial configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
define test2 HTTPMOD none 0&lt;br /&gt;
attr test2 get01Name Chlor&lt;br /&gt;
attr test2 getURL http://192.168.70.90/cgi-bin/webgui.fcgi&lt;br /&gt;
attr test2 getHeader1 Content-Type: application/json&lt;br /&gt;
attr test2 getHeader2 Accept: */*&lt;br /&gt;
attr test2 getData {&amp;quot;get&amp;quot; :[&amp;quot;34.4008.value&amp;quot;]}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The data in the HTTP response looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;data&amp;quot;: {&lt;br /&gt;
			&amp;quot;34.4008.value&amp;quot;: &amp;quot;0.25&amp;quot;&lt;br /&gt;
	},&lt;br /&gt;
	&amp;quot;status&amp;quot;:       {&lt;br /&gt;
			&amp;quot;code&amp;quot;: 0&lt;br /&gt;
	},&lt;br /&gt;
	&amp;quot;event&amp;quot;:        {&lt;br /&gt;
			&amp;quot;type&amp;quot;: 1,&lt;br /&gt;
			&amp;quot;data&amp;quot;: &amp;quot;48.30000.0&amp;quot;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the classic way to extract the value 0.25 into a reading with the name Chlor with a regex would have been&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr test2 get01Regex 34.4008.value&amp;quot;:[ \t]+&amp;quot;([\d\.]+)&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
with JSON you can write &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr test2 get01JSON data_34.4008.value &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
which will create a reading with the Name &amp;quot;Chlor&amp;quot; (as shown above) and take the value 0.25 from the JSON string.&lt;br /&gt;
&lt;br /&gt;
or if you don&#039;t care about the naming of your readings, you can simply extract all JSON data with &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr test2 extractAllJSON&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which would apply to all data read from this device and create the following readings out of the HTTP response shown above:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| data_34.4008.value || 0.25&lt;br /&gt;
|-&lt;br /&gt;
| event_data || 48.30000.0&lt;br /&gt;
|-&lt;br /&gt;
| event_type || 1&lt;br /&gt;
|-&lt;br /&gt;
| status_code || 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
or you can specify&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr test2 get01ExtractAllJSON&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
which would only apply to all data read as response to the get command defined as get01.        &lt;br /&gt;
&lt;br /&gt;
It might seem very simple at first sight to use extractAllJSON but if you prefer readings with a meaningful name you should instead define these readings with readingXXName and readingXXJSON or getXXName and getXXJSON individually. Of Course it would be possible to create additional user readings outside HTTPMOD but doing calculations, naming and formatting inside HTTPMOD is more efficient.&lt;br /&gt;
&lt;br /&gt;
=== JSON Lists ===&lt;br /&gt;
&lt;br /&gt;
imagine the HTTP Response contains:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
{ &amp;quot;power&amp;quot;:&amp;quot;0&amp;quot;,&lt;br /&gt;
  &amp;quot;modes&amp;quot;:[&amp;quot;Off&amp;quot;,&amp;quot;SimpleColor&amp;quot;,&amp;quot;RainbowChase&amp;quot;],&lt;br /&gt;
  &amp;quot;code1&amp;quot;:3,&lt;br /&gt;
  &amp;quot;code2&amp;quot;:4&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then a configuration like &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr device reading01JSON modes &lt;br /&gt;
attr device reading01Name Mode &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will create a list of Subreadings just like a regex with multiple matches can create multiple subreadings:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| Mode-1 || Off&lt;br /&gt;
|-&lt;br /&gt;
| Mode-2  || SimpleColor&lt;br /&gt;
|-&lt;br /&gt;
| Mode-3 || RainbowChase &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
if you don&#039;t want several subreadings but one reading that contains the list of modes, you can specify a recombine expression:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr device reading01Name Modes &lt;br /&gt;
attr device reading01RecombineExpr join &amp;quot;,&amp;quot;, @matchlist &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which will create one reading containing a list:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| Modes || Off,SimpleColor,RainbowChase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
JSON parsing specifications also don&#039;t Need to match exactly. If there is no exact match for a defined reading, the HTTPMOD will try to Interpret the specification as a regex and look for json object paths that match the specification as a regex. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr device reading01Name CodeElem&lt;br /&gt;
attr device reading01JSON code&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which will create a list of readings:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| CodeElem-1|| 3&lt;br /&gt;
|-&lt;br /&gt;
| CodeElem-2  || 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
and of course they could also be recombined into one reading with a RecombineExpr Attribute.&lt;br /&gt;
&lt;br /&gt;
== Parsing http / XML using xpath ==&lt;br /&gt;
Another alternative to regex parsing is the use of XPath to extract values from HTTP responses.&lt;br /&gt;
The following example shows how XML data can be parsed with XPath-Strict or HTML Data can be parsed with XPath.&lt;br /&gt;
Both work similar and the example uses XML Data parsed with the XPath-Strict option:&lt;br /&gt;
&lt;br /&gt;
If The XML data in the HTTP response looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;root xmlns:foo=&amp;quot;http://www.foo.org/&amp;quot; xmlns:bar=&amp;quot;http://www.bar.org&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;actors&amp;gt;&lt;br /&gt;
		&amp;lt;actor id=&amp;quot;1&amp;quot;&amp;gt;Peter X&amp;lt;/actor&amp;gt;&lt;br /&gt;
		&amp;lt;actor id=&amp;quot;2&amp;quot;&amp;gt;Charles Y&amp;lt;/actor&amp;gt;&lt;br /&gt;
		&amp;lt;actor id=&amp;quot;3&amp;quot;&amp;gt;John Doe&amp;lt;/actor&amp;gt;&lt;br /&gt;
	&amp;lt;/actor&amp;gt;&lt;br /&gt;
&amp;lt;/root&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
with XPath you can write        &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr htest reading01Name Actor&lt;br /&gt;
attr htest reading01XPath-Strict //actor[2]/text()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will create a reading with the Name &amp;quot;Actor&amp;quot; and the value &amp;quot;Charles Y&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Since XPath specifications can define several values / matches, HTTPMOD can also interpret these and store them in multiple readings:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr htest reading01Name Actor&lt;br /&gt;
attr htest reading01XPath-Strict //actor/text()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will create the readings &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| Actor-1 || Peter X&lt;br /&gt;
|-&lt;br /&gt;
| Actor-2 || Charles Y&lt;br /&gt;
|-&lt;br /&gt;
| Actor-3 || John Doe&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Further replacements of URL, header or post data ==&lt;br /&gt;
sometimes it might be helpful to dynamically change parts of a URL, HTTP header or post data depending on existing readings, internals or &lt;br /&gt;
perl expressions at runtime. This might be needed to pass further variables to a server, a current date or other things. &lt;br /&gt;
&lt;br /&gt;
To support this HTTPMOD offers generic replacements that are applied to a request before it is sent to the server. A replacement can be defined with the attributes &lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;replacement[0-9]*Regex&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;replacement[0-9]*Mode&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;replacement[0-9]*Value&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;[gs]et[0-9]*Replacement[0-9]*Value&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a replacement always replaces a match of a regular expression. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;replacement[0-9]*Mode:&#039;&#039;&#039;&lt;br /&gt;
The way the replacement value is defined can be specified with the replacement mode.&lt;br /&gt;
* If the &amp;lt;code&amp;gt;replacement[0-9]*Mode&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;reading&amp;lt;/code&amp;gt;, then the corresponding &amp;lt;code&amp;gt;replacement[0-9]*Value&amp;lt;/code&amp;gt; is interpreted as the name of a &#039;&#039;reading&#039;&#039; of the same device or as &#039;&#039;device:reading&#039;&#039; to refer to another device.&lt;br /&gt;
* If the &amp;lt;code&amp;gt;replacement[0-9]*Mode&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;internal&amp;lt;/code&amp;gt;, then the corresponding &amp;lt;code&amp;gt;replacement[0-9]*Value&amp;lt;/code&amp;gt; is interpreted as the name of an &#039;&#039;internal&#039;&#039; of the same device or as &#039;&#039;device:internal&#039;&#039; to refer to another device.&lt;br /&gt;
* If the &amp;lt;code&amp;gt;replacement[0-9]*Mode&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;text&amp;lt;/code&amp;gt;, then the corresponding &amp;lt;code&amp;gt;replacement[0-9]*Value&amp;lt;/code&amp;gt; is interpreted as a static text&lt;br /&gt;
* If the &amp;lt;code&amp;gt;replacement[0-9]*Mode&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;expression&amp;lt;/code&amp;gt;, then the corresponding &amp;lt;code&amp;gt;replacement[0-9]*Value&amp;lt;/code&amp;gt; is evaluated as a perl expression to compute the replacement. Inside such a replacement expression it is possible to refer to capture groups of the replacement regex.&lt;br /&gt;
* If the &amp;lt;code&amp;gt;replacement[0-9]*Mode&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;key&amp;lt;/code&amp;gt;, then the module will use a value from a key / value pair that is stored in an obfuscated form in the file system with the set storeKeyValue command. This might be useful for storing passwords.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
attr mydevice getData {&amp;quot;get&amp;quot; :[&amp;quot;%%value%%.value&amp;quot;]}&lt;br /&gt;
attr mydevice replacement01Mode text&lt;br /&gt;
attr mydevice replacement01Regex %%value%%&lt;br /&gt;
&lt;br /&gt;
attr mydevice get01Name Chlor&lt;br /&gt;
attr mydevice get01Replacement01Value 34.4008&lt;br /&gt;
&lt;br /&gt;
attr mydevice get02Name Something&lt;br /&gt;
attr mydevice get02Replacement01Value 31.4024&lt;br /&gt;
&lt;br /&gt;
attr mydevice get05Name profile&lt;br /&gt;
attr mydevice get05URL http://www.mydevice.local/getprofile?password=%%password%%&lt;br /&gt;
attr mydevice replacement02Mode key&lt;br /&gt;
attr mydevice replacement02Regex %%password%%&lt;br /&gt;
attr mydevice replacement02Value password&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;        &lt;br /&gt;
&lt;br /&gt;
defines that &amp;lt;code&amp;gt;%%value%%&amp;lt;/code&amp;gt; will be replaced by a static text.&lt;br /&gt;
&lt;br /&gt;
All Get commands will be HTTP post requests of a similar form. Only the &amp;lt;code&amp;gt;%%value%%&amp;lt;/code&amp;gt; will be different from get to get.&lt;br /&gt;
The first get will set the reading named Chlor and for the request it will take the generic getData and replace %%value%% with 34.4008.&lt;br /&gt;
&lt;br /&gt;
A second get will look the same except a different name and replacement value.&lt;br /&gt;
&lt;br /&gt;
With the command &amp;lt;code&amp;gt;set mydevice storeKeyValue password geheim&amp;lt;/code&amp;gt; you can store the password geheim in an obfuscated form in the file system. &lt;br /&gt;
To use this password and send it in a request you can use the above replacement with mode key. The value password will then refer to the ofuscated string stored with the key password.&lt;br /&gt;
&lt;br /&gt;
The mode &amp;lt;code&amp;gt;expression&amp;lt;/code&amp;gt; allows you to define your own replacement syntax:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;        &lt;br /&gt;
attr mydevice replacement01Mode expression&lt;br /&gt;
attr mydevice replacement01Regex {{([^}]+)}}&lt;br /&gt;
attr mydevice replacement01Value ReadingsVal(&amp;quot;mydevice&amp;quot;, $1, &amp;quot;&amp;quot;)&lt;br /&gt;
attr mydevice getData {&amp;quot;get&amp;quot; :[&amp;quot;{{temp}}.value&amp;quot;]}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;      &lt;br /&gt;
&lt;br /&gt;
In this example any &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{name}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; in a URL, header or post data will be passed on to the perl function ReadingsVal &lt;br /&gt;
which uses the string between &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; as second parameter. This way one defined replacement can be used for many different&lt;br /&gt;
readings.&lt;br /&gt;
&lt;br /&gt;
HTTPMOD has two built in replacements: One for session Ids and another one for the input value in a set command.&lt;br /&gt;
The placeholder $sid is always replaced with the internal &amp;lt;code&amp;gt;$hash-&amp;gt;{sid}&amp;lt;/code&amp;gt; which contains the session id after it is extracted from a previous HTTP response. &lt;br /&gt;
If you don&#039;t like to use the placeholder $sid then you can define your own replacement for example like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr mydevice replacement01Mode internal&lt;br /&gt;
attr mydevice replacement01Regex %session%&lt;br /&gt;
attr mydevice replacement01Value sid&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;      &lt;br /&gt;
&lt;br /&gt;
Now the internal &amp;lt;code&amp;gt;$hash-&amp;gt;{sid}&amp;lt;/code&amp;gt; will be used as a replacement for the placeholder %session%.&lt;br /&gt;
&lt;br /&gt;
In the same way a value that is passed to a set-command can be put into a request with a user defined replacement. &lt;br /&gt;
In this case the internal &amp;lt;code&amp;gt;$hash-&amp;gt;{value}&amp;lt;/code&amp;gt; will contain the value passed to the set command. &lt;br /&gt;
&amp;lt;code&amp;gt;$hash-&amp;gt;{value}&amp;lt;/code&amp;gt; might even be a string containing several values that could be put into several different positions in a request by using user defined replacements.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Other example : steering a pellet stove from Rika&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The stove API of Rika on https://www.rika-firenet.com/web/ delivers a JSON string with all settings and values, and can be piloted with a data string containing all the &amp;quot;set&amp;quot; values at once.&lt;br /&gt;
&lt;br /&gt;
Delivered JSON on get https://www.rika-firenet.com/api/client/xxxxxxxx/status : (xxxxxxxx must be replaced with the unique stove ID)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;Vorzimmer&amp;quot;,&lt;br /&gt;
    &amp;quot;stoveID&amp;quot;: &amp;quot;xxxxxxxxx&amp;quot;,&lt;br /&gt;
    &amp;quot;lastSeenMinutes&amp;quot;: 1,&lt;br /&gt;
    &amp;quot;lastConfirmedRevision&amp;quot;: 1504385700,&lt;br /&gt;
    &amp;quot;controls&amp;quot;: {&lt;br /&gt;
        &amp;quot;revision&amp;quot;: 1504385700,&lt;br /&gt;
        &amp;quot;onOff&amp;quot;: true,&lt;br /&gt;
        &amp;quot;operatingMode&amp;quot;: 2,&lt;br /&gt;
        &amp;quot;heatingPower&amp;quot;: 65,&lt;br /&gt;
        &amp;quot;targetTemperature&amp;quot;: 24,&lt;br /&gt;
        &amp;quot;heatingTimesActive&amp;quot;: false,&lt;br /&gt;
        &amp;quot;heatingTimesActiveForComfort&amp;quot;: true,&lt;br /&gt;
        &amp;quot;setBackTemperature&amp;quot;: 18,&lt;br /&gt;
        &amp;quot;convectionFan1Active&amp;quot;: false,&lt;br /&gt;
        &amp;quot;convectionFan1Level&amp;quot;: 0,&lt;br /&gt;
        &amp;quot;convectionFan1Area&amp;quot;: 0,&lt;br /&gt;
        &amp;quot;convectionFan2Active&amp;quot;: false,&lt;br /&gt;
        &amp;quot;convectionFan2Level&amp;quot;: 0,&lt;br /&gt;
        &amp;quot;convectionFan2Area&amp;quot;: 0,&lt;br /&gt;
        &amp;quot;frostProtectionActive&amp;quot;: false,&lt;br /&gt;
        &amp;quot;frostProtectionTemperature&amp;quot;: 5&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;sensors&amp;quot;: {&lt;br /&gt;
        &amp;quot;statusError&amp;quot;: 0,&lt;br /&gt;
        &amp;quot;statusWarning&amp;quot;: 0,&lt;br /&gt;
        &amp;quot;statusService&amp;quot;: 0,&lt;br /&gt;
        &amp;quot;statusMainState&amp;quot;: 1,&lt;br /&gt;
        &amp;quot;statusSubState&amp;quot;: 3,&lt;br /&gt;
        &amp;quot;statusFrostStarted&amp;quot;: false,&lt;br /&gt;
        &amp;quot;inputFlameTemperature&amp;quot;: 21,&lt;br /&gt;
        &amp;quot;inputRoomTemperature&amp;quot;: 21,&lt;br /&gt;
        &amp;quot;inputExternalRequest&amp;quot;: true,&lt;br /&gt;
        &amp;quot;outputDischargeMotor&amp;quot;: 0,&lt;br /&gt;
        &amp;quot;outputInsertionMotor&amp;quot;: 0,&lt;br /&gt;
        &amp;quot;outputIDFan&amp;quot;: 0,&lt;br /&gt;
        &amp;quot;outputAirFlaps&amp;quot;: 0,&lt;br /&gt;
        &amp;quot;outputIgnition&amp;quot;: false,&lt;br /&gt;
        &amp;quot;parameterStoveTypeNumber&amp;quot;: 13,&lt;br /&gt;
        &amp;quot;parameterVersionMainBoard&amp;quot;: 223,&lt;br /&gt;
        &amp;quot;parameterVersionTFT&amp;quot;: 223,&lt;br /&gt;
        &amp;quot;parameterRuntimePellets&amp;quot;: 11,&lt;br /&gt;
        &amp;quot;parameterRuntimeLogs&amp;quot;: 0,&lt;br /&gt;
        &amp;quot;parameterFeedRateTotal&amp;quot;: 17,&lt;br /&gt;
        &amp;quot;parameterFeedRateService&amp;quot;: 683,&lt;br /&gt;
        &amp;quot;parameterOnOffCycles&amp;quot;: 2&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;stoveType&amp;quot;: &amp;quot;DOMO MultiAir&amp;quot;,&lt;br /&gt;
    &amp;quot;stoveFeatures&amp;quot;: {&lt;br /&gt;
        &amp;quot;multiAir1&amp;quot;: true,&lt;br /&gt;
        &amp;quot;multiAir2&amp;quot;: true,&lt;br /&gt;
        &amp;quot;insertionMotor&amp;quot;: false,&lt;br /&gt;
        &amp;quot;airFlaps&amp;quot;: false,&lt;br /&gt;
        &amp;quot;logRuntime&amp;quot;: false&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Data string to send to https://www.rika-firenet.com/api/client/xxxxxxxx/controls in order to set values:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
heatingTimesActiveForComfort=true&amp;amp;frostProtectionTemperature=3&amp;amp;setBackTemperature=18&amp;amp;targetTemperature=24&amp;amp;convectionFan2Level=0&amp;amp;convectionFan2Active=false&amp;amp;convectionFan1Level=0&amp;amp;onOff=true&amp;amp;convectionFan1Active=false&amp;amp;convectionFan2Area=0&amp;amp;revision=1505550101&amp;amp;heatingTimesActive=false&amp;amp;convectionFan1Area=0&amp;amp;frostProtectionActive=false&amp;amp;operatingMode=2&amp;amp;heatingPower=65&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Code in 99_myUtils.pm:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
use JSON;&lt;br /&gt;
...&lt;br /&gt;
sub&lt;br /&gt;
replaceJSON ($$) {&lt;br /&gt;
   my ($valToReplace, $value) = @_;&lt;br /&gt;
&lt;br /&gt;
   #$value in the parameters is a default value&lt;br /&gt;
   #It has to be replaced through the real value nnn passed in the set command &amp;quot;set &amp;lt;device&amp;gt; valToset nnn&amp;quot;&lt;br /&gt;
   $value = InternalVal(&amp;quot;Ofen&amp;quot;, &amp;quot;value&amp;quot;, $value);&lt;br /&gt;
   Log3 (&amp;quot;Ofen&amp;quot;, 3, &amp;quot;replaceJSON Internalvalue: $value&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
   #Force an update to avoid outdated revision number&lt;br /&gt;
   fhem (&amp;quot;get Ofen revision&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
   #Get all the controls as json&lt;br /&gt;
   my $json = ReadingsVal(&amp;quot;Ofen&amp;quot;, &amp;quot;controlsJSON&amp;quot;,&amp;quot;&amp;quot;);&lt;br /&gt;
   Log3 (&amp;quot;Ofen&amp;quot;, 3, &amp;quot;replaceJSON configsJSON: $json&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
   # When starting FHEM or rereading config, the reading controlsJSON is empty&lt;br /&gt;
   return if ($json eq &amp;quot;&amp;quot;); &lt;br /&gt;
&lt;br /&gt;
   my $decoded = decode_json($json);&lt;br /&gt;
   my $result;&lt;br /&gt;
   for my $key ( keys %$decoded ) {&lt;br /&gt;
      $result .= &amp;quot;$key=&amp;quot;;&lt;br /&gt;
      if ($key eq $valToReplace) {&lt;br /&gt;
         $result .= $value.&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
      } else {&lt;br /&gt;
         $result .= $decoded-&amp;gt;{$key}.&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
   chop($result); #remove last &amp;amp;&lt;br /&gt;
   Log3(&amp;quot;Ofen&amp;quot;, 3, &amp;quot;replaceJSON Result: $result&amp;quot;);&lt;br /&gt;
   return $result;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Define stove in fhem:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
defmod Ofen HTTPMOD https://www.rika-firenet.com/api/client/xxxxxxxx/status 60&lt;br /&gt;
&lt;br /&gt;
attr Ofen enableCookies 1&lt;br /&gt;
attr Ofen reAuthRegex id=&amp;quot;login&amp;quot;|Unauthorized&lt;br /&gt;
attr Ofen sid01Data email=xx@xx&amp;amp;password=xx&lt;br /&gt;
attr Ofen sid01URL https://www.rika-firenet.com/web/login&lt;br /&gt;
&lt;br /&gt;
attr Ofen reading01JSON sensors_inputRoomTemperature&lt;br /&gt;
attr Ofen reading01Name RaumTemp&lt;br /&gt;
attr Ofen reading02JSON controls_setBackTemperature&lt;br /&gt;
attr Ofen reading02Name Absenkung&lt;br /&gt;
attr Ofen reading03JSON controls_frostProtectionTemperature&lt;br /&gt;
attr Ofen reading03Name Frostschutz&lt;br /&gt;
attr Ofen reading10Name controlsJSON&lt;br /&gt;
attr Ofen reading10Regex (?s)controls.*?({.*?})&lt;br /&gt;
&lt;br /&gt;
attr Ofen get09Name revision&lt;br /&gt;
attr Ofen get09URL https://www.rika-firenet.com/api/client/xxxxxxxx/status&lt;br /&gt;
&lt;br /&gt;
attr Ofen setURL https://www.rika-firenet.com/api/client/xxxxxxxx/controls&lt;br /&gt;
attr Ofen setData {{data}}&lt;br /&gt;
attr Ofen replacement01Mode expression&lt;br /&gt;
attr Ofen replacement01Regex {{data}}&lt;br /&gt;
&lt;br /&gt;
attr Ofen set11Name frostProtectionTemperature&lt;br /&gt;
attr Ofen set11Replacement01Value replaceJSON(&amp;quot;frostProtectionTemperature&amp;quot;, 2)&lt;br /&gt;
&lt;br /&gt;
attr Ofen set12Name targetTemperature&lt;br /&gt;
attr Ofen set12Replacement01Value replaceJSON(&amp;quot;targetTemperature&amp;quot;, 24)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A detailed explanation (in german) of the login process can be found here: [https://forum.fhem.de/index.php/topic,76220.msg682514.html#msg682514]&lt;br /&gt;
and the explanation of the other parameters here: [https://forum.fhem.de/index.php/topic,76220.msg685710.html#msg685710]&lt;br /&gt;
&lt;br /&gt;
== replacing reading values when they have not been updated / the device did not respond ==&lt;br /&gt;
If a device does not respond then the values stored in readings will keep the same and only their timestamp shows that they are outdated. &lt;br /&gt;
If you want to modify reading values that have not been updated for a number of seconds, you can use the attributes&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;(reading|get)[0-9]*(-[0-9]+)?MaxAge&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;(reading|get)[0-9]*(-[0-9]+)?MaxAgeReplacementMode&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;(reading|get)[0-9]*(-[0-9]+)?MaxAgeReplacement&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every time the module tries to read from a device, it will also check if readings have not been updated &lt;br /&gt;
for longer than the &amp;lt;code&amp;gt;MaxAge&amp;lt;/code&amp;gt; attributes allow. If readings are outdated, the &amp;lt;code&amp;gt;MaxAgeReplacementMode&amp;lt;/code&amp;gt; defines how the affected&lt;br /&gt;
reading values should be replaced. &amp;lt;code&amp;gt;MaxAgeReplacementMode&amp;lt;/code&amp;gt; can be &amp;lt;code&amp;gt;text&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;reading&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;internal&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;expression&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;delete&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MaxAge&amp;lt;/code&amp;gt; specifies the number of seconds that a reading should remain untouched before it is replaced. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MaxAgeReplacement&amp;lt;/code&amp;gt; contains either a static text that is used as replacement value or a Perl expression that is evaluated to &lt;br /&gt;
give the replacement value. This can be used for example to replace a temperature that has not bee updated for more than 5 minutes &lt;br /&gt;
with the string &amp;quot;outdated - was 12&amp;quot;:        &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr PM readingMaxAge 300&lt;br /&gt;
attr PM readingMaxAgeReplacement &amp;quot;outdated - was &amp;quot; . $val&lt;br /&gt;
attr PM readingMaxAgeReplacementMode expression&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The variable &amp;lt;code&amp;gt;$val&amp;lt;/code&amp;gt; contains the value of the reading before it became outdated.&lt;br /&gt;
&lt;br /&gt;
Or to show that a device was offline:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr MyLight reading01Name color&lt;br /&gt;
attr MyLight reading01JSON result_02_color&lt;br /&gt;
attr MyLight reading01MaxAge 300&lt;br /&gt;
attr MyLight reading01MaxAgeReplacement &amp;quot;offline&amp;quot;&lt;br /&gt;
attr MyLight reading01MaxAgeReplacementMode text&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Note on determining how to send requests to a special device ==&lt;br /&gt;
If you don&#039;t know which URLs, headers or POST data your web GUI uses, you might try a local proxy like BurpSuite [http://portswigger.net/burp/ BurpSuite] to track requests and responses. This is a tedious task but probably the best way to achieve a successful result. &lt;br /&gt;
&lt;br /&gt;
Let us consider an example. The Telekom Speedport W724V has a login-site that is famous for being cumbersome. Burp allows to monitor each step in the login procedure. In the case of a speedport the following steps occur:&lt;br /&gt;
&lt;br /&gt;
First burp shows that a get command is issued&lt;br /&gt;
 ################################################################################################## &lt;br /&gt;
 GET / HTTP/1.1&lt;br /&gt;
 Host: speedport.ip&lt;br /&gt;
 Cache-Control: max-age=0&lt;br /&gt;
 Upgrade-Insecure-Requests: 1&lt;br /&gt;
 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36&lt;br /&gt;
 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8&lt;br /&gt;
 Accept-Language: de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4&lt;br /&gt;
 Cookie: lang=de&lt;br /&gt;
 Connection: close  &lt;br /&gt;
In order to mimic the behavior of a real person calling the website HTTPMOD should copy all necessary steps. Host, Cookie and the GET-command are usually necessary. The same cannot be said of the User-Agent because the website can be called from any mobile or desktop computer. &lt;br /&gt;
&lt;br /&gt;
Then, the speedport will answer with a command that consists of several lines. By going through every line for every step in the login procedure one will finally arrive at the information that is necessary to successfully enter the login of the speedport (in case of the W724V, for example, it is necessary to copy a token called _httoken and to include the referer).&lt;br /&gt;
&lt;br /&gt;
== Advanced configuration to define a &amp;lt;code&amp;gt;set&amp;lt;/code&amp;gt; command and send data to a device ==&lt;br /&gt;
       &lt;br /&gt;
When a set option is defined by attributes, the module will use the value given to the set command and integrate it into an HTTP-Request that sends the value to the device. The definitions for URL, headers and post data can contain the placeholder $val which will be replaced by the (numerical) value given to the set command.&lt;br /&gt;
&lt;br /&gt;
This can be as simple as:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
# No cyclic requests and no main URL needed in this example&lt;br /&gt;
define MyDevice HTTPMOD none 0&lt;br /&gt;
&lt;br /&gt;
attr MyDevice set01Name Licht&lt;br /&gt;
attr MyDevice set01URL http://192.168.1.22/switch=$val&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A user command &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
set MyDevice Licht 1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will be translated into the http GET request&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
http://192.168.1.22/switch=1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example a map would also be helpful, that translates on / off to 0 or 1 and allows the user to select on/of in fhemweb:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr MyDevive set01IMap 0:off, 1:on&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This also provides input validation to make sure that only on and off can be used with the set command.&lt;br /&gt;
&lt;br /&gt;
In more complex Scenarios you might need to login before sending a command and the Login might create a session id that has to be part of further requests either in the URL, in headers or in the post data.&lt;br /&gt;
&lt;br /&gt;
Extension to the above example for a PoolManager 5 where a set needs a session id in the URL and the values have to be passed in JSON strings as post data:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr PM set01Name HeizungSoll&lt;br /&gt;
attr PM set01URL http://MyPoolManager/cgi-bin/webgui.fcgi?sid=$sid&lt;br /&gt;
attr PM set01Hint 6,10,20,30&lt;br /&gt;
attr PM set01Min 6&lt;br /&gt;
attr PM set01Max 30&lt;br /&gt;
attr PM setHeader1 Content-Type: application/json&lt;br /&gt;
attr PM set01Data {&amp;quot;set&amp;quot; :{&amp;quot;34.3118.value&amp;quot; :&amp;quot;$val&amp;quot; }}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example defines a set option with the name HeizungSoll.&lt;br /&gt;
By issuing &amp;lt;code&amp;gt;set PM HeizungSoll 10&amp;lt;/code&amp;gt; in FHEM, the value 10 will be sent in the defined HTTP&lt;br /&gt;
Post to URL &amp;lt;code&amp;gt;http://MyPoolManager/cgi-bin/webgui.fcgi&amp;lt;/code&amp;gt; in the Post Data as&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
{&amp;quot;set&amp;quot; :{&amp;quot;34.3118.value&amp;quot; :&amp;quot;10&amp;quot; }}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The optional attributes set01Min and set01Max define input validations that will be checked in the set function. &lt;br /&gt;
The optional attribute set01Hint will define a selection list for the FHEMweb GUI.&lt;br /&gt;
&lt;br /&gt;
The HTTP response to such a request will be ignored unless you specify the attribute &amp;lt;code&amp;gt;setParseResponse&amp;lt;/code&amp;gt; &lt;br /&gt;
for all set commands or &amp;lt;code&amp;gt;set01ParseResponse&amp;lt;/code&amp;gt; for the set command with number 01.&lt;br /&gt;
If the HTTP response to a set command is parsed then this is done like the parsing of responses to get commands and you can use the attributes ending e.g. on Format, Encode, Decode, OMap and OExpr to manipulate / format the values read.&lt;br /&gt;
&lt;br /&gt;
If a parameter to a set command is not numeric but should be passed on to the device as text, then you can specify the attribute setTextArg. For example: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr PM set01TextArg&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a set command should not require a parameter at all, then you can specify the attribute NoArg. For example: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr PM set03Name On&lt;br /&gt;
attr PM set03NoArg&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are the parameters for Wiesemann&amp;amp;Theiss Web-IO Analog 4.0 #57761. The current limit is set to 16mA (setxxMax)&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
defmod WuT_Analog1 HTTPMOD none 30&lt;br /&gt;
attr WuT_Analog1 room W&amp;amp;T&lt;br /&gt;
attr WuT_Analog1 set01Max 16&lt;br /&gt;
attr WuT_Analog1 set01Min 0&lt;br /&gt;
attr WuT_Analog1 set01Name Output1&lt;br /&gt;
attr WuT_Analog1 set01URL http://192.xx.My_IP/outputaccess1?PW=MyPassword&amp;amp;State=$val&amp;amp;&lt;br /&gt;
attr WuT_Analog1 set02Max 16&lt;br /&gt;
attr WuT_Analog1 set02Min 0&lt;br /&gt;
attr WuT_Analog1 set02Name Output2&lt;br /&gt;
attr WuT_Analog1 set02URL http://192.xx.My_IP/outputaccess2?PW=MyPassword&amp;amp;State=$val&amp;amp;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Advanced configuration to create a valid session id that might be necessary ==&lt;br /&gt;
In simple cases logging in works with basic authentication. In the case HTTPMOD accepts a username and password as part of the URL in the form &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
http://User:Password@192.168.1.18/something&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However basic auth is seldom used. If you need to fill in a username and password in a HTML form and the session is then managed by a session id, here is how to configure this:&lt;br /&gt;
&lt;br /&gt;
when sending data to an HTTP-Device in a set, HTTPMOD will replace any &amp;lt;code&amp;gt;$sid&amp;lt;/code&amp;gt; in the URL, Headers and Post data with the internal &amp;lt;code&amp;gt;$hash-&amp;gt;{sid}&amp;lt;/code&amp;gt;. To authenticate towards the device and give this internal a value, you can use an optional multi step login procedure defined by the following attributes: &lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sid[0-9]*URL&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;sid[0-9]*Data.*&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;sid[0-9]*Header.*&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;sid[0-9]*IgnoreRedirects&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;idRegex&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;idJSON&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;idXPath&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;idXPath-Strict&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;(get|set|sid)[0-9]*IdRegex&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;(get|set|sid)[0-9]*IdJSON&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;(get|set|sid)[0-9]*IdXPath&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;(get|set|sid)[0-9]*IdXPath-Strict&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each step can have a URL, Headers, Post Data pieces and a Regex to extract a resulting Session ID into &amp;lt;code&amp;gt;$hash-&amp;gt;{sid}&amp;lt;/code&amp;gt;.&lt;br /&gt;
HTTPMOD will create a sorted list of steps (the numbers between sid and URL / Data / Header) and the loop through these steps and send the corresponding requests to the device. For each step a $sid in a Header or Post Data will be replaced with the current content of &amp;lt;code&amp;gt;$hash-&amp;gt;{sid}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Using this feature, HTTPMOD can perform a forms based authentication and send user name, password or other necessary data to the device and save the session id for further requests.&lt;br /&gt;
        &lt;br /&gt;
To determine when this login procedure is necessary, HTTPMOD will first try to send a request without &lt;br /&gt;
doing the login procedure. If the result contains an error that authentication is necessary, then a login is performed. &lt;br /&gt;
To detect such an error in the HTTP response, you can again use a regular expression, JSON or XPath, this time with the attributes &lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;reAuthRegex&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;reAuthJSON&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;reAuthXPath&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;reAuthXPath-Strict&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;(get|set)[0-9]*ReAuthRegex&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;(get|set)[0-9]*ReAuthJSON&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;(get|set)[0-9]*ReAuthXPath&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;(get|set)[0-9]*ReAuthXPath-Strict&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
reAuthJSON or reAuthXPath typically only extract one piece of data from a response. &lt;br /&gt;
If the existence of the specified piece of data is sufficent to start a login procedure, then nothing more needs to be defined to detect this situation. &lt;br /&gt;
If however the indicator is a status code that contains different values depending on a successful request and a failed request if a new authentication is needed, &lt;br /&gt;
then you can combine things like reAuthJSON with reAuthRegex. In this case the regex is only matched to the data extracted by JSON (or XPath). &lt;br /&gt;
This way you can easily extract the status code using JSON parsing and then specify the code that means &amp;quot;authentication needed&amp;quot; as a regular expression.&lt;br /&gt;
        &lt;br /&gt;
If for one step not all of the URL, Data or Header Attributes are set, then HTTPMOD tries to use a &lt;br /&gt;
&amp;lt;code&amp;gt;sidURL&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;sidData.*&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;sidHeader.*&amp;lt;/code&amp;gt; Attribute (without the step number after sid). This way parts that are the same for all steps don&#039;t need to be defined redundantly.&lt;br /&gt;
&lt;br /&gt;
=== Example for a multi step login procedure: ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr PM reAuthRegex /html/dummy_login.htm &lt;br /&gt;
attr PM sidURL http://192.168.70.90/cgi-bin/webgui.fcgi?sid=$sid&lt;br /&gt;
attr PM sidHeader1 Content-Type: application/json&lt;br /&gt;
attr PM sid1IDRegex wui.init\(&#039;([^&#039;]+)&#039;&lt;br /&gt;
attr PM sid2Data {&amp;quot;set&amp;quot; :{&amp;quot;9.17401.user&amp;quot; :&amp;quot;fhem&amp;quot; ,&amp;quot;9.17401.pass&amp;quot; :&amp;quot;password&amp;quot; }}&lt;br /&gt;
attr PM sid3Data {&amp;quot;set&amp;quot; :{&amp;quot;35.5062.value&amp;quot; :&amp;quot;128&amp;quot; }}&lt;br /&gt;
attr PM sid4Data {&amp;quot;set&amp;quot; :{&amp;quot;42.8026.code&amp;quot; :&amp;quot;pincode&amp;quot; }}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case HTTPMOD detects that a login is necessary by looking for the pattern /html/dummy_login.htm in the HTTP response. &lt;br /&gt;
If it matches, it starts a login sequence. In the above example all steps request the same URL. In step 1 only the defined Header is sent in an HTTP get request. The response will contain a session id that is extraced with the regex wui.init\(&#039;([^&#039;]+)&#039;.&lt;br /&gt;
&lt;br /&gt;
In the next step this session id is sent in a post request to the same URL where tha post data contains a username and password. The a third and a fourth request follow that set a value and a code. The result will be a valid and authorized session id that can be used in other requests where $sid is part of a URL, header or post data and will be replaced with the session id extracted above.&lt;br /&gt;
&lt;br /&gt;
===Another Practical Example reading the SOC from a Renault Zoe===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
define myZoe HTTPMOD https://www.services.renault-ze.com/api/vehicle/VINVINVIN/battery 7000&lt;br /&gt;
attr myZoe userattr reading01JSON reading01Name reading02JSON reading02Name reading03JSON reading03Nam\&lt;br /&gt;
e reading04JSON reading04Name reading05JSON reading05Name requestHeader02 sid1Data sid1Header01 sid1Id\&lt;br /&gt;
JSON sid1IgnoreRedirects:0,1 sid1URL&lt;br /&gt;
attr myZoe reAuthJSON message&lt;br /&gt;
attr myZoe reading01JSON charge_level&lt;br /&gt;
attr myZoe reading01Name SOC&lt;br /&gt;
attr myZoe reading02JSON charging&lt;br /&gt;
attr myZoe reading02Name charging&lt;br /&gt;
attr myZoe reading03JSON plugged&lt;br /&gt;
attr myZoe reading03Name plugged&lt;br /&gt;
attr myZoe reading04JSON remaining_range&lt;br /&gt;
attr myZoe reading04Name remaining_range&lt;br /&gt;
attr myZoe reading05JSON last_update&lt;br /&gt;
attr myZoe reading05Name last_update&lt;br /&gt;
attr myZoe requestHeader02 Authorization: Bearer $sid&lt;br /&gt;
attr myZoe sid1Data {&amp;quot;username&amp;quot;:&amp;quot;ZEUSERNAME&amp;quot;,&amp;quot;password&amp;quot;:&amp;quot;ZEPASSWORD&amp;quot;}&lt;br /&gt;
attr myZoe sid1Header01 Content-Type: application/json&lt;br /&gt;
attr myZoe sid1IdJSON token&lt;br /&gt;
attr myZoe sid1IgnoreRedirects 1&lt;br /&gt;
attr myZoe sid1URL https://www.services.renault-ze.com/api/user/login&lt;br /&gt;
attr myZoe timeout 10&lt;br /&gt;
#attr myZoe verbose 7&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The $sid is read by logging in with username and password from JSON {&amp;quot;token&amp;quot;: ..} after detecting an error {&amp;quot;message&amp;quot;: ..}  from a failed request. This example offers no solution for the reading of the VIN from the login request, which in turn is part of the reading URL. It should be possible to read more than just the $sid from the login sequence.&lt;br /&gt;
&lt;br /&gt;
In the special case where a session id is set as a HTTP-Cookie (with the header Set-cookie: in the HTTP response) HTTPMOD offers an even simpler way. With the attribute enableCookies a very basic cookie handling mechanism is activated that stores all cookies that the server sends to the HTTPMOD device and puts them back as cookie headers in the following requests.&lt;br /&gt;
&lt;br /&gt;
For such cases no sidIdRegex and no $sid in a user defined header is necessary.&lt;br /&gt;
&lt;br /&gt;
== Advanced configuration to define a &amp;lt;code&amp;gt;get&amp;lt;/code&amp;gt; and request additional data with its own request from a device ==&lt;br /&gt;
&lt;br /&gt;
The normal automatic HTTP request that is done repeatedly after the defined interval has elapsed works well in cases where all required readings can be requested in one common HTTP request. If however a device needs individual requests with different URLs or different POST data for each value, then another method is necessary. &lt;br /&gt;
For such cases a &amp;lt;code&amp;gt;get&amp;lt;/code&amp;gt; option can be defined and the user can either issue FHEM &amp;lt;code&amp;gt;get&amp;lt;/code&amp;gt; commands each time he needs the reading or the user can set an attribute to request the reading automatically together with the normal iteration.&lt;br /&gt;
For each &amp;lt;code&amp;gt;get&amp;lt;/code&amp;gt; option attributes define an individual URL, optional headers, and post data as well as individual regular expressions and formatting options. &lt;br /&gt;
&lt;br /&gt;
When a get option is defined by attributes, the module allows querying additional values from the device that require individual HTTP-Requests or special parameters to be sent&lt;br /&gt;
&lt;br /&gt;
Extension to the above example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr PM get01Name MyGetValue &lt;br /&gt;
attr PM get01URL http://MyPoolManager/cgi-bin/directory/webgui.fcgi?special=1?sid=$sid &lt;br /&gt;
attr PM getHeader1 Content-Type: application/json &lt;br /&gt;
attr PM get01Data {&amp;quot;get&amp;quot; :{&amp;quot;30.1234.value&amp;quot;}} &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example defines a get option with the name MyGetValue.&lt;br /&gt;
By issuing &amp;lt;code&amp;gt;get PM MyGetValue&amp;lt;/code&amp;gt; in FHEM, the defined HTTP request is sent to the device.&lt;br /&gt;
The HTTP response is then parsed using the same readingXXName and readingXXRegex attributes as above so&lt;br /&gt;
additional pairs will probably be needed there for additional values.&lt;br /&gt;
&lt;br /&gt;
if you prefer to define the parsing and formatting of readings individually per get command, you can use &lt;br /&gt;
attributes like get01Regex, get01XPath, get01Format, get01OMap and so on just like for reading01...&lt;br /&gt;
&lt;br /&gt;
You can also include parameters / values that are passed to the get command in the request just like for set commands.&lt;br /&gt;
The placeholder $val will be replaced with the value given to the get command or you can specify your own replacement as described above.&lt;br /&gt;
&lt;br /&gt;
If the new get parameter should also be queried regularly, you can define the following optional attributes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
attr PM get01Poll 1&lt;br /&gt;
attr PM get01PollDelay 300&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first attribute includes this reading in the automatic update cycle and the second defines an alternative lower update frequency. When the interval defined initially in the define is over and the normal readings are read from the device, the update function will check for additional get parameters that should be included in the update cycle.&lt;br /&gt;
&lt;br /&gt;
If a PollDelay is specified for a get parameter, the update function also checks if the time passed since it has last read this value is more than the given PollDelay. If not, this reading is skipped and it will be rechecked in the next cycle when interval is over again. So the effective PollDelay will always be a multiple of the interval specified in the initial define.&lt;br /&gt;
&lt;br /&gt;
Please note that each defined get command that is included in the regular update cycle will create its own HTTP request. So if you want to extract several values from the same request, it is much more efficient to do this by defining readingXXName and readingXXRegex, XPath or JSON attributes and to specify an interval and a URL in the define of the HTTPMOD device. &lt;br /&gt;
&lt;br /&gt;
Example for a Siemens webserver provided by Lanhydrock:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
define ozw672 HTTPMOD https://192.168.178.8/api/auth/login.json?user=test&amp;amp;pwd=test 300&lt;br /&gt;
&lt;br /&gt;
attr ozw672 get1Name tempAussen&lt;br /&gt;
attr ozw672 get1URL https://192.168.178.8/api/menutree/read_datapoint.json?SessionId=$sid&amp;amp;Id=1960&lt;br /&gt;
attr ozw672 get1Poll 1&lt;br /&gt;
attr ozw672 get1PollDelay 1800&lt;br /&gt;
&lt;br /&gt;
attr ozw672 get2Name tempAussenGemischt&lt;br /&gt;
attr ozw672 get2URL https://192.168.178.8/api/menutree/read_datapoint.json?SessionId=$sid&amp;amp;Id=1964&lt;br /&gt;
attr ozw672 get2Poll 1&lt;br /&gt;
attr ozw672 get2PollDelay 1800&lt;br /&gt;
&lt;br /&gt;
attr ozw672 get3Name tempTWW&lt;br /&gt;
attr ozw672 get3URL https://192.168.178.8/api/menutree/read_datapoint.json?SessionId=$sid&amp;amp;Id=1996&lt;br /&gt;
attr ozw672 get3Poll 1&lt;br /&gt;
&lt;br /&gt;
attr ozw672 get4Name tempKesselSoll&lt;br /&gt;
attr ozw672 get4URL https://192.168.178.8/api/menutree/read_datapoint.json?SessionId=$sid&amp;amp;Id=1910&lt;br /&gt;
attr ozw672 get4Poll 1&lt;br /&gt;
&lt;br /&gt;
attr ozw672 get5Name tempKesselRuecklauf&lt;br /&gt;
attr ozw672 get5URL https://192.168.178.8/api/menutree/read_datapoint.json?SessionId=$sid&amp;amp;Id=1915&lt;br /&gt;
attr ozw672 get5Poll 1&lt;br /&gt;
&lt;br /&gt;
attr ozw672 get6Name tempKesselRuecklaufSoll&lt;br /&gt;
attr ozw672 get6URL https://192.168.178.8/api/menutree/read_datapoint.json?SessionId=$sid&amp;amp;Id=1916&lt;br /&gt;
attr ozw672 get6Poll 1&lt;br /&gt;
&lt;br /&gt;
attr ozw672 get7Name anzahlStartsBrenner&lt;br /&gt;
attr ozw672 get7URL https://192.168.178.8/api/menutree/read_datapoint.json?SessionId=$sid&amp;amp;Id=1927&lt;br /&gt;
attr ozw672 get7PollDelay 1800&lt;br /&gt;
attr ozw672 get7Poll 1&lt;br /&gt;
&lt;br /&gt;
attr ozw672 get8Name statusKessel&lt;br /&gt;
attr ozw672 get8URL https://192.168.178.8/api/menutree/read_datapoint.json?SessionId=$sid&amp;amp;Id=1898&lt;br /&gt;
attr ozw672 get8Poll 1&lt;br /&gt;
attr ozw672 get8Regex Value&amp;quot;: &amp;quot;([a-zA-Zü ]*)&amp;quot;&lt;br /&gt;
attr ozw672 get8OMap Aus:0, Nachlauf aktiv:5, Freigegeben für TWW:10, Freigegeben für HK:20, In Teillastbetrieb für TWW:40, In Teillastbetrieb für HK:50, In Betrieb für Trinkwasser:90, In Betrieb für Heizkreis:100&lt;br /&gt;
&lt;br /&gt;
attr ozw672 getRegex Value&amp;quot;: &amp;quot;[ ]*([-.0-9]*)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
attr ozw672 reAuthRegex .*session not valid.*&lt;br /&gt;
attr ozw672 sid1IDRegex .*&amp;quot;(.*-.*-.*-[0-9a-z]*).*&lt;br /&gt;
attr ozw672 sid1URL https://192.168.178.8/api/auth/login.json?user=test&amp;amp;pwd=test&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== All attributes ==&lt;br /&gt;
;reading[0-9]+Name&lt;br /&gt;
:the name of a reading to extract with the corresponding readingRegex, readingJSON, readingXPath or readingXPath-Strict&lt;br /&gt;
:Please note that the old syntax &amp;lt;b&amp;gt;readingsName.*&amp;lt;/b&amp;gt; does not work with all features of HTTPMOD and should be avoided. It might go away in a future version of HTTPMOD.&lt;br /&gt;
&lt;br /&gt;
;(get|set)[0-9]+Name&lt;br /&gt;
:Name of a get or set command&lt;br /&gt;
:If the HTTP response that is received after the command is parsed with an individual parse option then this name is also used as a reading name. Please note that no individual parsing needs to be defined for a get or set. If no regex, XPath or JSON is specified for the command, then HTTPMOD will try to parse the response using all the defined readingRegex, reading XPath or readingJSON attributes.&lt;br /&gt;
&lt;br /&gt;
;(get|set|reading)[0-9]+Regex&lt;br /&gt;
:If this attribute is specified, the Regex defined here is used to extract the value from the HTTP Response and assign it to a Reading with the name defined in the (get|set|reading)[0-9]+Name attribute.&lt;br /&gt;
:If this attribute is not specified for an individual Reading or get or set but without the numbers in the middle, e.g. as getRegex or readingRegex, then it applies to all the other readings / get / set commands where no specific Regex is defined.&amp;lt;br&amp;gt;&lt;br /&gt;
:The value to extract should be in a capture group / sub expression e.g. ([\d\.]+) in the above example. Multiple capture groups will create multiple readings (see explanation above)&lt;br /&gt;
:Using this attribute for a set command (setXXRegex) only makes sense if you want to parse the HTTP response to the HTTP request that the set command sent by defining the attribute setXXParseResponse.&lt;br /&gt;
:Please note that the old syntax &amp;lt;code&amp;gt;readingsRegex.*&amp;lt;/code&amp;gt; does not work with all features of HTTPMOD and should be avoided. It might go away in a future version of HTTPMOD.&lt;br /&gt;
:If for get or set commands neither a generic Regex attribute without numbers nor a specific (get|set)[0-9]+Regex attribute is specified and also no XPath or JSON parsing specification is given for the get or set command, then HTTPMOD tries to use the parsing definitions for general readings defined in reading[0-9]+Name, reading[0-9]+Regex or XPath or JSON attributes and assigns the Readings that match here.&lt;br /&gt;
&lt;br /&gt;
;(get|set|reading)[0-9]+RegOpt&lt;br /&gt;
:Lets the user specify regular expression modifiers. For example if the same regular expression should be matched as often as possible in the HTTP response, then you can specify RegOpt g which will case the matching to be done as /regex/g&lt;br /&gt;
:The results will be trated the same way as multiple capture groups so the reading name will be extended with -number. &lt;br /&gt;
:For other possible regular expression modifiers see http://perldoc.perl.org/perlre.html#Modifiers&lt;br /&gt;
&lt;br /&gt;
;(get|set|reading)[0-9]+XPath&lt;br /&gt;
:defines an xpath to one or more values when parsing HTML data (see examples above)&lt;br /&gt;
:Using this attribute for a set command only makes sense if you want to parse the HTTP response to the HTTP request that the set command sent by defining the attribute setXXParseResponse.&lt;br /&gt;
&lt;br /&gt;
;get|set|reading[0-9]+XPath-Strict&lt;br /&gt;
:defines an xpath to one or more values when parsing XML data (see examples above)&lt;br /&gt;
:Using this attribute for a set command only makes sense if you want to parse the HTTP response to the HTTP request that the set command sent by defining the attribute setXXParseResponse.&lt;br /&gt;
&lt;br /&gt;
;(get|set|reading)[0-9]+AutoNumLen&lt;br /&gt;
:In cases where a regular expression or an XPath results in multiple results and these results are stored in a common reading name with extension -number, then you can modify the format of this number to have a fixed length with leading zeros. AutoNumLen 3 for example will lead to reading names ending with -001 -002 and so on.&lt;br /&gt;
&lt;br /&gt;
;(get|set|reading)[0-9]+AlwaysNum&lt;br /&gt;
:if set to 1 this attributes forces reading names to end with a -1, -01 (depending on the above described AutoNumLen) even if just one value is parsed.&lt;br /&gt;
&lt;br /&gt;
;get|set|reading[0-9]+JSON&lt;br /&gt;
:defines a path to the JSON object wanted by concatenating the object names. See the above example.&lt;br /&gt;
:If you don&#039;t know the paths, then start by using extractAllJSON and the use the names of the readings as values for the JSON attribute.&amp;lt;br&amp;gt;&lt;br /&gt;
:Please don&#039;t forget to also specify a name for a reading, get or set. &lt;br /&gt;
:Using this attribute for a set command only makes sense if you want to parse the HTTP response to the HTTP request that the set command sent by defining the attribute setXXParseResponse.&lt;br /&gt;
&lt;br /&gt;
;(get|set|reading)[0-9]*RecombineExpr&lt;br /&gt;
:defines an expression that is used in an eval to compute one reading value out of the list of matches.&lt;br /&gt;
:This is supposed to be used for regexes or xpath specifications that produce multiple results if only one result that combines them is wanted. The list of matches will be in the variable @matchlist.&lt;br /&gt;
:Using this attribute for a set command only makes sense if you want to parse the HTTP response to the HTTP request that the set command sent by defining the attribute setXXParseResponse.&lt;br /&gt;
&lt;br /&gt;
;get[0-9]*CheckAllReadings&lt;br /&gt;
:this attribute modifies the behavior of HTTPMOD when the HTTP Response of a get command is parsed. &amp;lt;br&amp;gt;&lt;br /&gt;
:If this attribute is set to 1, then additionally to the matching of the corresponding get specific regex (get[0-9]*Regex), XPath or JSON attribute also all the reading names and parse definitions defined in Reading[0-9]+Name and Reading[0-9]+Regex, XPath or JSON attributes are checked and if they match, the coresponding Readings are assigned as well.&lt;br /&gt;
:Please note that this does not mean that get01CheckAllReadings will cause a get02Regex to be used. Only the corresponding get01Regex will be used but additionally all the readingXYRegex attributes.&lt;br /&gt;
:This is automatically done if a get or set command is defined without its own parse attributes.&lt;br /&gt;
&lt;br /&gt;
;(get|reading)[0-9]*OExpr&lt;br /&gt;
:defines an optional expression that is used in an eval to compute / format a readings value after parsing an HTTP response&lt;br /&gt;
:The raw value from the parsing will be in the variable $val.&lt;br /&gt;
:If specified as readingOExpr then the attribute value is a default for all other readings that don&#039;t specify an explicit reading[0-9]*Expr.&lt;br /&gt;
:Please note that the old syntax &amp;lt;b&amp;gt;readingsExpr.*&amp;lt;/b&amp;gt; does not work with all features of HTTPMOD and should be avoided. It might go away in a future version of HTTPMOD.&lt;br /&gt;
&lt;br /&gt;
;(get|reading)[0-9]*Expr&lt;br /&gt;
:This is the old syntax for (get|reading)[0-9]*OExpr. It should be replaced by (get|reading)[0-9]*OExpr. The set command upgradeAttributes which becomes visible when the attribute enableControlSet is set to 1, can do this renaming automatically.&lt;br /&gt;
&lt;br /&gt;
;(get|reading)[0-9]*OMap&lt;br /&gt;
:Map that defines a mapping from raw value parsed to visible values like &amp;quot;0:mittig, 1:oberhalb, 2:unterhalb&amp;quot;.&lt;br /&gt;
:If specified as readingOMap then the attribute value is a default for all other readings that don&#039;t specify an explicit reading[0-9]*Map.&amp;lt;br&amp;gt;&lt;br /&gt;
:The individual options in a map are separated by a komma and an optional space. Spaces are allowed to appear in a visible value however kommas are not possible.&lt;br /&gt;
&lt;br /&gt;
;(get|reading)[0-9]*Map&lt;br /&gt;
:This is the old syntax for (get|reading)[0-9]*OMap. It should be replaced by (get|reading)[0-9]*OMap. The set command upgradeAttributes which becomes visible when the attribute enableControlSet is set to 1, can do this renaming automatically.&lt;br /&gt;
&lt;br /&gt;
;(get|set|reading)[0-9]*Format&lt;br /&gt;
:Defines a format string that will be used in sprintf to format a reading value.&lt;br /&gt;
:If specified without the numbers in the middle e.g. as readingFormat then the attribute value is a default for all other readings that don&#039;t specify an explicit reading[0-9]*Format.&lt;br /&gt;
:Using this attribute for a set command only makes sense if you want to parse the HTTP response to the HTTP request that the set command sent by defining the attribute setXXParseResponse.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;(get|set|reading)[0-9]*Decode&lt;br /&gt;
:defines an encoding to be used in a call to the perl function decode to convert the raw data string read from the device to a reading. &lt;br /&gt;
:This can be used if the device delivers strings in an encoding like cp850 instead of utf8.&lt;br /&gt;
:If your reading values contain Umlauts and they are shown as strange looking icons then you probably need to use this feature.&lt;br /&gt;
:Using this attribute for a set command only makes sense if you want to parse the HTTP response to the HTTP request that the set command sent by defining the attribute setXXParseResponse.&lt;br /&gt;
&lt;br /&gt;
;(get|set|reading)[0-9]*Encode&lt;br /&gt;
:defines an encoding to be used in a call to the perl function encode to convert the raw data string read from the device to a reading. &lt;br /&gt;
:This can be used if the device delivers strings in an encoding like cp850 and after decoding it you want to reencode it to e.g. utf8.&lt;br /&gt;
:If your reading values contain Umlauts and they are shown as strange looking icons then you probably need to use this feature.&lt;br /&gt;
:Using this attribute for a set command only makes sense if you want to parse the HTTP response to the HTTP request that the set command sent by defining the attribute setXXParseResponse.&lt;br /&gt;
&lt;br /&gt;
;(get|set)[0-9]*URL&lt;br /&gt;
:URL to be requested for the set or get command. If this option is missing, the URL specified during define will be used.&lt;br /&gt;
&lt;br /&gt;
;(get|set)[0-9]*Data&lt;br /&gt;
:Data to be sent to the device as POST data when the get or set command is executed. if this attribute is not specified, an HTTP GET method will be used instead of an HTTP POST&lt;br /&gt;
&lt;br /&gt;
;(get|set)[0-9]*NoData&lt;br /&gt;
:can be used to override a more generic attribute that specifies POST data for all get or set commands. With NoData no data is sent and therefor the request will be an HTTP GET.&lt;br /&gt;
&lt;br /&gt;
;(get|set)[0-9]*Header.*&lt;br /&gt;
:HTTP Headers to be sent to the device when the set is executed&lt;br /&gt;
&lt;br /&gt;
;requestHeader.*&lt;br /&gt;
:Define an optional additional HTTP Header to set in the HTTP request of the main loop&lt;br /&gt;
&lt;br /&gt;
;requestData&lt;br /&gt;
:optional POST Data to be sent in the request of the main loop. If not defined, it will be an HTTP GET request as defined in HttpUtils which is used by this module&lt;br /&gt;
&lt;br /&gt;
;get[0-9]+Poll&lt;br /&gt;
:if set to 1 the get is executed automatically during the normal update cycle (after the interval provided in the define command has elapsed)&lt;br /&gt;
&lt;br /&gt;
;get[0-9]+PollDelay&lt;br /&gt;
:if the value should not be read in each iteration (after the interval given to the define command), then a minimum delay can be specified with this attribute. This has only an effect if the above Poll attribute has also been set. Every time the update function is called, it checks if since this get has been read the last time, the defined delay has elapsed. If not, then it is skipped this time.&lt;br /&gt;
:PollDelay can be specified as seconds or as x[0-9]+ which means a multiple of the interval in the define command.&lt;br /&gt;
&lt;br /&gt;
;(get|set)[0-9]*TextArg&lt;br /&gt;
:For a get command this defines that the command accepts a text value after the option name. By default a get command doesn&#039;t accept optional values after the command name. &lt;br /&gt;
:If TextArg is specified and a value is passed after the get name then this value can then be used in a request URL, header or data as replacement for $val or in a user defined replacement that uses the internal &amp;quot;value&amp;quot; ($hash-&amp;gt;{value}).&lt;br /&gt;
:If used for a set command then it defines that the value to be set doesn&#039;t require any validation / conversion. &lt;br /&gt;
:The raw value is passed on as text to the device. By default a set command expects a numerical value or a text value that is converted to a numeric value using a map.&lt;br /&gt;
&lt;br /&gt;
;set[0-9]+Min&lt;br /&gt;
:Minimum value for input validation. &lt;br /&gt;
&lt;br /&gt;
;set[0-9]+Max&lt;br /&gt;
:Maximum value for input validation. &lt;br /&gt;
&lt;br /&gt;
;set[0-9]+IExpr&lt;br /&gt;
:Perl Expression to compute the raw value to be sent to the device from the input value passed to the set.&lt;br /&gt;
&lt;br /&gt;
;set[0-9]+Expr&lt;br /&gt;
:This is the old syntax for (get|reading)[0-9]*IExpr. It should be replaced by (get|reading)[0-9]*IExpr. The set command upgradeAttributes which becomes visible when the attribute enableControlSet is set to 1, can do this renaming automatically.&lt;br /&gt;
&lt;br /&gt;
;set[0-9]+IMap&lt;br /&gt;
:Map that defines a mapping from raw to input values like &amp;quot;0:mittig, 1:oberhalb, 2:unterhalb&amp;quot;. This attribute atomatically creates a hint for FHEMWEB so the user can choose one of the input values.&lt;br /&gt;
&lt;br /&gt;
;set[0-9]+Map&lt;br /&gt;
:This is the old syntax for (get|reading)[0-9]*IMap. It should be replaced by (get|reading)[0-9]*IMap. The set command upgradeAttributes which becomes visible when the attribute enableControlSet is set to 1, can do this renaming automatically.&lt;br /&gt;
&lt;br /&gt;
;set[0-9]+Hint&lt;br /&gt;
:Explicit hint for fhemWEB that will be returned when set ? is seen. Can be used to get a slider or a list of values to choose from.&lt;br /&gt;
&lt;br /&gt;
;set[0-9]*NoArg&lt;br /&gt;
:Defines that this set option doesn&#039;t require arguments. It allows sets like &amp;quot;on&amp;quot; or &amp;quot;off&amp;quot; without further values.&lt;br /&gt;
&lt;br /&gt;
;set[0-9]*ParseResponse&lt;br /&gt;
:defines that the HTTP response to the set will be parsed as if it was the response to a get command.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;(get|set)[0-9]*URLExpr&lt;br /&gt;
:Defines a Perl expression to specify the HTTP Headers for this request. This overwrites any other header specification and should be used carefully only if needed. The original Header is availabe as $old. Typically this feature is not needed and it might go away in future versions of HTTPMOD. Please use the &amp;quot;replacement&amp;quot; attributes if you want to pass additional variable data to a web service. &lt;br /&gt;
&lt;br /&gt;
;(get|set)[0-9]*DatExpr&lt;br /&gt;
:Defines a Perl expression to specify the HTTP Post data for this request. This overwrites any other post data specification and should be used carefully only if needed. The original Data is availabe as $old. Typically this feature is not needed and it might go away in future versions of HTTPMOD. Please use the &amp;quot;replacement&amp;quot; attributes if you want to pass additional variable data to a web service. &lt;br /&gt;
&lt;br /&gt;
;(get|set)[0-9]*HdrExpr&lt;br /&gt;
:Defines a Perl expression to specify the URL for this request. This overwrites any other URL specification and should be used carefully only if needed. The original URL is availabe as $old. Typically this feature is not needed and it might go away in future versions of HTTPMOD. Please use the &amp;quot;replacement&amp;quot; attributes if you want to pass additional variable data to a web service.           &lt;br /&gt;
&lt;br /&gt;
;ReAuthRegex&lt;br /&gt;
:regular Expression to match an error page indicating that a session has expired and a new authentication for read access needs to be done. &lt;br /&gt;
:This attribute only makes sense if you need a forms based authentication for reading data and if you specify a multi step login procedure based on the sid.. attributes.&lt;br /&gt;
:This attribute is used for all requests. For set and get operations you can however specify individual reAuthRegexes with the (get|set)[0-9]*ReAuthRegex attributes.&lt;br /&gt;
&lt;br /&gt;
;(get|set)[0-9]*ReAuthRegex&lt;br /&gt;
:Regex that will detect when a session has expired during a set operation and a new login needs to be performed.&lt;br /&gt;
:It works like the global reAuthRegex but is used for set operations.&lt;br /&gt;
&lt;br /&gt;
;sid[0-9]*URL&lt;br /&gt;
:different URLs or one common URL to be used for each step of an optional login procedure. &lt;br /&gt;
&lt;br /&gt;
;sid[0-9]*IDRegex&lt;br /&gt;
:different Regexes per login procedure step or one common Regex for all steps to extract the session ID from the HTTP response&lt;br /&gt;
&lt;br /&gt;
;sid[0-9]*Data.*&lt;br /&gt;
:data part for each step to be sent as POST data to the corresponding URL&lt;br /&gt;
&lt;br /&gt;
;sid[0-9]*Header.*&lt;br /&gt;
:HTTP Headers to be sent to the URL for the corresponding step&lt;br /&gt;
&lt;br /&gt;
;sid[0-9]*IgnoreRedirects&lt;br /&gt;
:Tells the HttpUtils to not follow HTTP Redirects for this Request. Might be needed for some devices that set a session cookie within a 303 Redirect.&lt;br /&gt;
&lt;br /&gt;
;clearSIdBeforeAuth&lt;br /&gt;
:will set the session id to &amp;quot;&amp;quot; before doing the authentication steps&lt;br /&gt;
&lt;br /&gt;
;authRetries&lt;br /&gt;
:number of retries for authentication procedure - defaults to 1&lt;br /&gt;
&lt;br /&gt;
;replacement[0-9]*Regex&lt;br /&gt;
:Defines a replacement to be applied to an HTTP request header, data or URL before it is sent. This allows any part of the request to be modified based on a reading, an internal or an expression.&lt;br /&gt;
:The regex defines which part of a header, data or URL should be replaced. The replacement is defined with the following attributes:&lt;br /&gt;
&lt;br /&gt;
;replacement[0-9]*Mode&lt;br /&gt;
:Defines how the replacement should be done and what replacementValue means. Valid options are text, reading, internal and expression.&lt;br /&gt;
&lt;br /&gt;
;replacement[0-9]*Value&lt;br /&gt;
:Defines the replacement. If the corresponding replacementMode is &amp;lt;code&amp;gt;text&amp;lt;/code&amp;gt;, then value is a static text that is used as the replacement.&lt;br /&gt;
:If replacementMode is &amp;lt;code&amp;gt;reading&amp;lt;/code&amp;gt; then Value can be the name of a reading of this device or it can be a reading of a different device referred to by devicename:reading.&lt;br /&gt;
:If replacementMode is &amp;lt;code&amp;gt;internal&amp;lt;/code&amp;gt; the Value can be the name of an internal of this device or it can be an internal of a different device referred to by devicename:internal.&lt;br /&gt;
:If replacementMode is &amp;lt;code&amp;gt;expression&amp;lt;/code&amp;gt; the the Value is treated as a Perl expression that computes the replacement value. The expression can use $1, $2 and so on to refer to capture groups of the corresponding regex that is matched against the original URL, header or post data.&lt;br /&gt;
:If replacementMode is &amp;lt;code&amp;gt;key&amp;lt;/code&amp;gt; then the module will use a value from a key / value pair that is stored in an obfuscated form in the file system with the set storeKeyValue command. This might be useful for storing passwords.&lt;br /&gt;
&lt;br /&gt;
;[gs]et[0-9]*Replacement[0-9]*Value&lt;br /&gt;
:This attribute can be used to override the replacement value for a specific get or set.&lt;br /&gt;
&lt;br /&gt;
;get|reading[0-9]*MaxAge&lt;br /&gt;
:Defines how long a reading is valid before it is automatically overwritten with a replacement when the read function is called the next time.&lt;br /&gt;
&lt;br /&gt;
;get|reading[0-9]*MaxAgeReplacement&lt;br /&gt;
:specifies the replacement for MaxAge - either as a static text or as a perl expression.&lt;br /&gt;
&lt;br /&gt;
;get|reading[0-9]*MaxAgeReplacementMode&lt;br /&gt;
:specifies how the replacement is interpreted: can be text, expression and delete.&lt;br /&gt;
&lt;br /&gt;
;get|reading[0-9]*DeleteIfUnmatched&lt;br /&gt;
:If set to 1 this attribute causes certain readings to be deleted when the parsing of the website does not match the specified reading. Internally HTTPMOD remembers which kind of operation created a reading (update, Get01, Get02 and so on). Specified readings will only be deleted if the same operation does not parse this reading again. This is especially useful for parsing that creates several matches / readings and the number of matches can vary from request to request. For example if reading01Regex creates 4 readings in one update cycle and in the next cycle it only matches two times then the readings containing the remaining values from the last round will be deleted.&lt;br /&gt;
:Please note that this mechanism will not work in all cases after a restart. Especially when a get definition does not contain its own parsing definition but ExtractAllJSON or relies on HTTPMOD to use all defined reading.* attributes to parse the responsee to a get command, old readings might not be deleted after a restart of fhem.&lt;br /&gt;
;get|reading[0-9]*DeleteOnError&lt;br /&gt;
:If set to 1 this attribute causes certain readings to be deleted when the website can not be reached and the HTTP request returns an error. Internally HTTPMOD remembers which kind of operation created a reading (update, Get01, Get02 and so on). Specified readings will only be deleted if the same operation returns an error.&lt;br /&gt;
The same restrictions as for DeleteIfUnmatched apply regarding a fhem restart.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;httpVersion&lt;br /&gt;
:defines the HTTP-Version to be sent to the server. This defaults to 1.0.&lt;br /&gt;
&lt;br /&gt;
;sslVersion&lt;br /&gt;
:defines the SSL Version for the negotiation with the server. The attribute is evaluated by HttpUtils. If it is not specified, HttpUtils assumes SSLv23:!SSLv3:!SSLv2&lt;br /&gt;
&lt;br /&gt;
;sslArgs&lt;br /&gt;
:defines a list that is converted to a key / value hash and gets passed to HttpUtils. To avoid certificate validation for broken servers you can for example specify &lt;br /&gt;
:&amp;lt;code&amp;gt;attr myDevice sslArgs SSL_verify_mode,SSL_VERIFY_NONE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;alignTime&lt;br /&gt;
:Aligns each periodic read request for the defined interval to this base time. This is typcally something like 00:00 (see the FHEM at command)&lt;br /&gt;
&lt;br /&gt;
;noShutdown&lt;br /&gt;
:pass the noshutdown flag to HTTPUtils for webservers that need it (some embedded webservers only deliver empty pages otherwise)&lt;br /&gt;
&lt;br /&gt;
;disable&lt;br /&gt;
:stop doing automatic HTTP requests while this attribute is set to 1&lt;br /&gt;
&lt;br /&gt;
;enableControlSet&lt;br /&gt;
:enables the built in set commands interval, stop, start, reread, upgradeAttributes, storeKeyValue.&lt;br /&gt;
&lt;br /&gt;
;enableCookies&lt;br /&gt;
:enables the built in cookie handling if set to 1. With cookie handling each HTTPMOD device will remember cookies that the server sets and send them back to the server in the following requests. &lt;br /&gt;
:This simplifies session magamenet in cases where the server uses a session ID in a cookie. In such cases enabling cookies should be sufficient and no sidRegex and no manual definition of a cookie header should be necessary.&lt;br /&gt;
&lt;br /&gt;
;showMatched&lt;br /&gt;
:if set to 1 then HTTPMOD will create a reading with the name MATCHED_READINGS that contains the names of all readings that could be matched in the last request as well as UNMATCHED_READINGS and LAST_REQUEST.&lt;br /&gt;
&lt;br /&gt;
;showError&lt;br /&gt;
:if set to 1 then HTTPMOD will create a reading and event with the Name LAST_ERROR that contains the error message of the last error returned from HttpUtils. &lt;br /&gt;
&lt;br /&gt;
;removeBuf&lt;br /&gt;
:if set to 1 then HTTPMOD removes the internal named buf when a HTTP-response has been received. &lt;br /&gt;
:$hash-&amp;gt;{buf} is used internally be Fhem httpUtils and in some use cases it is desireable to remove this internal after reception &lt;br /&gt;
:because it contains a very long response which looks ugly in Fhemweb.&lt;br /&gt;
&lt;br /&gt;
;timeout&lt;br /&gt;
:time in seconds to wait for an answer. Default value is 2&lt;br /&gt;
&lt;br /&gt;
;queueDelay&lt;br /&gt;
:HTTP Requests will be sent from a queue in order to avoid blocking when several Requests have to be sent in sequence. This attribute defines the delay between calls to the function that handles the send queue. It defaults to one second.&lt;br /&gt;
&lt;br /&gt;
;queueMax&lt;br /&gt;
:Defines the maximum size of the send queue. If it is reached then further HTTP Requests will be dropped and not be added to the queue&lt;br /&gt;
&lt;br /&gt;
;minSendDelay&lt;br /&gt;
:Defines the minimum time between two HTTP Requests.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* Example: [https://www.goingelectric.de/forum/viewtopic.php?f=57&amp;amp;t=21462|Abfrage Akkustand einer Zoe und mehr von Renault ZE Services]&lt;br /&gt;
* Example: [[Wetter_und_Wettervorhersagen#Wetter_von_Weather_Underground|Extract weather information from WeatherUnderground]]&lt;br /&gt;
* Example: [[Pollenflug|Pollen count]]&lt;br /&gt;
* Example: [[HTTPMOD Beispielkonfiguration zur Anbindung einer Daikin Klimaanlage mit WLAN-Modul|Connect Daikin aircondition to FHEM]]&lt;br /&gt;
* Example: [[Go-eCharger|Extract information from go-eCharger]]&lt;br /&gt;
* Example: [[Sonnenspeicher|Integration of energy supplies from sonnen (https://sonnenbatterie.de/en/start)]]&lt;br /&gt;
* Example: [https://forum.fhem.de/index.php/topic,95989.msg915870.html#msg915870 Miele 3rd party API für Miele Smarthome Geräte]&lt;br /&gt;
* Example: [https://forum.fhem.de/index.php/topic,84215.msg918662.html#msg918662 Honeywell Evohome Totalconnect]&lt;br /&gt;
* Example: [https://forum.fhem.de/index.php/topic,78613.msg889015.html#msg889015 Tigo Energy Integration]&lt;br /&gt;
* Example: [https://forum.fhem.de/index.php/topic,78613.msg708518.html#msg708518 Ecowater]&lt;br /&gt;
* {{Link2Forum|Topic=17804|LinkText=Thread}} in FHEM Forum that discusses the first version of this module &lt;br /&gt;
* {{Link2Forum|Topic=29471|LinkText=Thread}} in FHEM Forum that discusses the second major version of this module &lt;br /&gt;
* {{Link2Forum|Topic=45176|LinkText=Thread}} in FHEM Forum that discusses the third major version of this module &lt;br /&gt;
* [http://perldoc.perl.org/perlretut.html Introduction to regular expressions]&lt;br /&gt;
* [http://portswigger.net/burp/ BurpSuite]: Tool (local proxy) to help analyze http traffic&lt;br /&gt;
&lt;br /&gt;
[[Kategorie:IP Components]]&lt;/div&gt;</summary>
		<author><name>Jophb</name></author>
	</entry>
	<entry>
		<id>http://wiki.fhem.de/w/index.php?title=FileLog&amp;diff=33964</id>
		<title>FileLog</title>
		<link rel="alternate" type="text/html" href="http://wiki.fhem.de/w/index.php?title=FileLog&amp;diff=33964"/>
		<updated>2020-09-27T17:56:18Z</updated>

		<summary type="html">&lt;p&gt;Jophb: Mehrere Werte und Dummy in einer Zeile loggen hinzugefügt&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox Modul&lt;br /&gt;
|ModPurpose=Protokollierung von Fhem-Ereignissen&lt;br /&gt;
|ModType=h&lt;br /&gt;
|ModForumArea=Automatisierung&lt;br /&gt;
|ModTechName=92_FileLog.pm&lt;br /&gt;
|ModOwner=rudolfkoenig ({{Link2FU|8|Forum}} / [[Benutzer Diskussion:Rudolfkoenig|Wiki]])}}&lt;br /&gt;
&lt;br /&gt;
Das Modul [[FileLog]] dient zur Protokollierung von Ereignissen in FHEM. Die Einträge werden in eine einfache Textdatei geschrieben. Zur Protokollierung in eine Datenbank kann alternativ oder auch parallel das Modul [[DbLog]] verwendet werden.&lt;br /&gt;
&lt;br /&gt;
Logdateien sind die Basis für die Erstellung von Diagrammen ([[SVG]]).&lt;br /&gt;
&lt;br /&gt;
== Definition ==&lt;br /&gt;
Details in der {{Link2CmdRef|Anker=FileLogdefine}}.&lt;br /&gt;
&lt;br /&gt;
== Attribute ==&lt;br /&gt;
Über {{Link2CmdRef|Anker=FileLogattr|Label=Attribute}} lässt sich unter anderem auch festlegen, wie die Archivierung von Logdateien durchgeführt werden soll (Archivierungsbefehl, -pfad sowie Anzahl von Archivgenerationen).&lt;br /&gt;
&lt;br /&gt;
Wenn bestimmte Zeilen &#039;&#039;&#039;nicht&#039;&#039;&#039; in die Logdatei geschrieben werden sollen, ist das Attribut &#039;&#039;ignoreRegexp&#039;&#039; hilfreich. Wenn beispielsweise alle Zeilen, die die Zeichenfolge &amp;quot;AbCd&amp;quot; oder &amp;quot;CdEf&amp;quot; enthalten &#039;&#039;&#039;nicht&#039;&#039;&#039; geloggt werden sollen, dann wäre&lt;br /&gt;
:&amp;lt;code&amp;gt;attr &amp;lt;log-name&amp;gt; ignoreRegexp .*AbCd.*|.*CdEf.*&amp;lt;/code&amp;gt;&lt;br /&gt;
eine Attributdefinition, die das ermöglicht.&lt;br /&gt;
&lt;br /&gt;
Dies bezieht sich aber nur auf normale FileLog-Instanzen. Falls Events aus dem globalen FHEM-Logfile ausgeschlossen werden sollen, muss man das Attribut in &#039;&#039;&#039;global&#039;&#039;&#039; angeben. (Zusammenhang siehe [[#Globale Logdatei und &amp;quot;fakelog&amp;quot;|Globale Logdatei und &amp;quot;fakelog&amp;quot;]]) &lt;br /&gt;
:&amp;lt;code&amp;gt;attr global ignoreRegexp .*AbCd.*|.*CdEf.*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Funktionen ==&lt;br /&gt;
&#039;&#039;FileLog&#039;&#039; bietet Funktionen wie &#039;&#039;reopen&#039;&#039;, &#039;&#039;absorb&#039;&#039; und &#039;&#039;get&#039;&#039;. Details dazu sind in der {{Link2CmdRef|Anker=FileLogset}} zu finden.&lt;br /&gt;
&lt;br /&gt;
Sofern eine Instanz vom Objekt [[eventTypes]] angelegt ist, bietet die Detailansicht eines FileLog eine komfortable Möglichkeit, die regulären Ausdrücke für den/die Filter zu bearbeiten. Siehe hierzu auch diesen {{Link2Forum|Topic=12557|Message=75436}}.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Globale Logdatei und &amp;quot;fakelog&amp;quot; ==&lt;br /&gt;
Die globale Logdatei (üblicherweise als fhem.log bezeichnet) für FHEM wird mit dem Attribut &lt;br /&gt;
:&amp;lt;code&amp;gt;attr global logfile XXX&amp;lt;/code&amp;gt;&lt;br /&gt;
für das &#039;&#039;global&#039;&#039;-Objekt definiert, wobei für &#039;&#039;XXX&#039;&#039; normalerweise &amp;lt;code&amp;gt;./log/fhem-%Y-%m.log&amp;lt;/code&amp;gt; verwendet wird.&lt;br /&gt;
&lt;br /&gt;
Um das &#039;&#039;fhem.log&#039;&#039; über das [[FHEMWEB|Web Interface]] anzeigen zu können, ist ein weiterer Eintrag in der [[Konfiguration]] erforderlich, nämlich:&lt;br /&gt;
:&amp;lt;code&amp;gt;define Logfile FileLog XXX fakelog&amp;lt;/code&amp;gt;&lt;br /&gt;
Das &#039;&#039;XXX&#039;&#039; muss &#039;&#039;&#039;zwingend&#039;&#039;&#039; durch den gleichen Wert ersetzt werden, wie in der Definition des globalen &#039;&#039;logfile&#039;&#039; Attributs, weil anderenfalls unterschiedliche Dateien verwendet werden - mit dem Effekt, dass die über das Web Interface angezeigte Datei nicht die erwarteten Einträge enthält (Details dazu auch in diesem {{Link2Forum|Topic=40041|Message=323315|LinkText=Forenbeitrag}}).&lt;br /&gt;
&lt;br /&gt;
== Werte auslesen ==&lt;br /&gt;
Manchmal möchte man Daten aus den Logs abrufen ohne händisch in den Logfiles herumzuwühlen. Dies ist insb. auch dann hilfreich, wenn man eigenen Funktionen, Notifys oder spezielle Plots entwirft, bei denen man auf Logdaten zugreifen möchte.&lt;br /&gt;
&lt;br /&gt;
Grundsätzlich beschrieben ist dies in der {{Link2CmdRef|Lang=de|Anker=FileLog}} und unterscheidet sich minimal (aber entscheidend) von der Struktur bei [[DbLog#Werte_auslesen|DbLogs]].&lt;br /&gt;
&lt;br /&gt;
Hier ein paar Beispiele, was man damit anstellen kann:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;get FileLog_FHT_3a32 - - 2016-10-01 2016-10-03&amp;lt;/code&amp;gt; alle Einträge des FileLog_FHT_3a32 vom 01.10.-03.10.2016&lt;br /&gt;
* &amp;lt;code&amp;gt;get FileLog_FHT_3a32 - - 2016-10-01_08:00:00 2016-10-01_16:00:00&amp;lt;/code&amp;gt; alle Einträge des FileLog_FHT_3a32 von 8-16 Uhr am 01.10.2016&lt;br /&gt;
* &amp;lt;code&amp;gt;get FileLog_FHT_3a32 - - 2016-10-01_08:00:00 2016-10-01_16:00:00 4:measured:0:&amp;lt;/code&amp;gt; nur die Temperatur-Werte&lt;br /&gt;
* &amp;lt;code&amp;gt;{ ReadingsTimestamp(&amp;quot;FHT_3a32&amp;quot;,&amp;quot;state&amp;quot;,&amp;quot;0&amp;quot;) }&amp;lt;/code&amp;gt; Timestamp des aktuellen state des FHT_3a32&lt;br /&gt;
* &amp;lt;code&amp;gt;{ OldTimestamp(&amp;quot;FHT_3a32&amp;quot;) }&amp;lt;/code&amp;gt; Timestamp des letzten state des FHT_3a32&lt;br /&gt;
* &amp;lt;code&amp;gt;{ time_str2num(OldTimestamp(&amp;quot;FHT_3a32&amp;quot;)) }&amp;lt;/code&amp;gt; Timestamp in Sekunden des letzten state des FHT_3a32&lt;br /&gt;
* ...&lt;br /&gt;
Weitere Beispiele kann man sich gut aus den SVG-Dateien ziehen.&lt;br /&gt;
&lt;br /&gt;
== Mehrere Werte und Dummy in einer Zeile formatiert in Logdatei schreiben ==&lt;br /&gt;
Manchmal möchte man die einzelnen Werte nicht untereinander in der Logdatei haben, sondern wie bei einer CSV-Datei in einer Zeile.&lt;br /&gt;
&lt;br /&gt;
Hierzu kann man wie im Beispiel die einzelnen Readings Kesseltemperatur, Vorlauftemperatur und Rücklauftemperatur aus One-Wire-Sensoren DS18B20 und die Außentemperatur als vierten Wert aus einem Dummy über sprintf formatieren. Wer das mit Kommas oder Semikolons getrennt haben möchte, ersetzt die Leerzeichen zwischen den einzelnen Werten durch sein Wunschtrennzeichen.&amp;lt;blockquote&amp;gt;&amp;lt;code&amp;gt;attr HEIZUNG userReadings HeizDataLog {sprintf(&amp;quot;K: %3.1f VL: %3.1f  RL: %3.1f Pr: %4.1f&amp;quot;, ReadingsVal(&amp;quot;OWX_28_4C966XXXXXXX&amp;quot;,&amp;quot;temperature&amp;quot;, 0),ReadingsVal(&amp;quot;OWX_28_4F9XXXXXXXXX&amp;quot;,&amp;quot;temperature&amp;quot;, 0),ReadingsVal(&amp;quot;OWX_28_FFAXXXXXXXXX&amp;quot;,&amp;quot;temperature&amp;quot;, 0), (Value(&amp;quot;Heiz_Temp_Outside&amp;quot;)))}&amp;lt;/code&amp;gt;&amp;lt;/blockquote&amp;gt;Für die einzelnen Userreadings lassen sich auch unterschiedliche Intervalle angeben.&amp;lt;blockquote&amp;gt;&amp;lt;code&amp;gt;attr HEIZUNG event-min-interval HeizDataLog:300, HeizKesselTemp:20&amp;lt;/code&amp;gt;&amp;lt;/blockquote&amp;gt;Da im Beispiel nur Userreadings HeizDataLog geschreiben werden soll, muss es bei &amp;lt;regexp&amp;gt; dementsprechend angegeben werden.&amp;lt;blockquote&amp;gt;&amp;lt;code&amp;gt;# logging&amp;lt;/code&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;code&amp;gt;define FileLog_Heizung FileLog ./log/Heizung/Heizung_%Y_%m.log HEIZUNG:HeizDataLog.*&amp;lt;/code&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;code&amp;gt;attr FileLog_Heizung logtype text&amp;lt;/code&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;code&amp;gt;attr FileLog_Heizung room LogFiles,Heizung&amp;lt;/code&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;code&amp;gt;attr FileLog_Heizung group Heizung&amp;lt;/code&amp;gt;&amp;lt;/blockquote&amp;gt;Das ergibt folgendes Ergebnis:&amp;lt;blockquote&amp;gt;2020-09-27_19:36:57 &amp;lt;code&amp;gt;HEIZUNG&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;HeizDataLog&amp;lt;/code&amp;gt;: K: 66.8 VL: 60.8  RL: 35.7 Out: 18.4&amp;lt;/blockquote&amp;gt;&amp;lt;blockquote&amp;gt;2020-09-27_19:41:58 &amp;lt;code&amp;gt;HEIZUNG&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;HeizDataLog&amp;lt;/code&amp;gt;: K: 60.0 VL: 56.9  RL: 34.3 Out: 18.3&amp;lt;/blockquote&amp;gt;&amp;lt;blockquote&amp;gt;2020-09-27_19:46:58 &amp;lt;code&amp;gt;HEIZUNG&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;HeizDataLog&amp;lt;/code&amp;gt;: K: 50.2 VL: 47.9  RL: 34.4 Out: 18.2&amp;lt;/blockquote&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* {{Link2Forum|Topic=40041|Message=323315|LinkText=Forenbeitrag}} zum Thema fhem.log / fakelog&lt;br /&gt;
&lt;br /&gt;
[[Kategorie:Logging]]&lt;/div&gt;</summary>
		<author><name>Jophb</name></author>
	</entry>
	<entry>
		<id>http://wiki.fhem.de/w/index.php?title=UserReadings&amp;diff=25110</id>
		<title>UserReadings</title>
		<link rel="alternate" type="text/html" href="http://wiki.fhem.de/w/index.php?title=UserReadings&amp;diff=25110"/>
		<updated>2018-02-03T23:08:51Z</updated>

		<summary type="html">&lt;p&gt;Jophb: Link CommandRef eingefügt&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SEITENTITEL:userReadings}}  &amp;lt;!-- da richtige Schreibweise kleinen Anfangsbuchstaben hat --&amp;gt;&lt;br /&gt;
{{Baustelle}}&lt;br /&gt;
Über das Attribut [[userReadings]] können bei einem Device benutzerdefinierte Readings einschließlich der Anweisungen zum Befüllen derselben festgelegt werden. Das können zum Einen Formatänderungen (&amp;quot;sprintf&amp;quot;), oder aber auch durch die &#039;&#039;Modifier&#039;&#039;&lt;br /&gt;
* difference&lt;br /&gt;
* differential&lt;br /&gt;
* integral&lt;br /&gt;
* offset&lt;br /&gt;
* monotonic&lt;br /&gt;
gesteuerte Berechnungen sein.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
{{Randnotiz|RNTyp=y|RNText=&#039;&#039;&#039;Geändertes Verhalten - bitte beachten&#039;&#039;&#039;&lt;br /&gt;
Im April 2016 hat sich die Verarbeitung des &#039;&#039;Triggers&#039;&#039; dahingehend geändert, dass die Trigger-Spezifikation jetzt als [[Regulärer Ausdruck]] interpretiert wird, damit also z.B. ein &amp;lt;code&amp;gt;avgTemp:temperature&amp;lt;/code&amp;gt; geändert werden muss in &amp;lt;code&amp;gt;avgTemp:temperature.*&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Technische Details dazu wurden in {{Link2Forum|Topic=52165|LinkText=diesem Forenthread}} diskutiert. &lt;br /&gt;
}}&lt;br /&gt;
Siehe {{Link2CmdRef|Anker=readingFnAttributes}}.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Bei Eingabe im Editor-Feld müssen mehrere Befehle mit einem &amp;quot;;&amp;quot; getrennt werden, bei Änderung in der Eingabezeile sind zwei &amp;quot;;&amp;quot; notwendig.&lt;br /&gt;
* Die Variable, dessen Wert man im Reading haben möchte, kann man einfach ans Ende stellen[https://perldoc.perl.org/functions/return.html]&lt;br /&gt;
* mehrere UserReadings werden durch Komma getrennt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 myreading {my $v = ReadingsVal($name,&amp;quot;actuation&amp;quot;,&amp;quot;error&amp;quot;)+62;; fhem(&amp;quot;set PID desired $v&amp;quot;);; $v},&lt;br /&gt;
 myreading2 {my $v = ReadingsVal($name,&amp;quot;actuation&amp;quot;,&amp;quot;error&amp;quot;)+62;; fhem(&amp;quot;set PID2 desired $v&amp;quot;);; $v}&lt;br /&gt;
&lt;br /&gt;
== Beispiele ==&lt;br /&gt;
&lt;br /&gt;
==== Ausgabe eines Homematic 3-State Fenstersensor als Zahl für Visualisierung mit Icons ====&lt;br /&gt;
&lt;br /&gt;
attr HM_XXXXXX userReadings Statenum {if(ReadingsVal(&amp;quot;HM_XXXXXX&amp;quot;,&amp;quot;state&amp;quot;,&amp;quot;&amp;quot;) eq &amp;quot;closed&amp;quot;) {return 0} elsif (ReadingsVal(&amp;quot;HM_XXXXXX&amp;quot;,&amp;quot;state&amp;quot;,&amp;quot;&amp;quot;) eq &amp;quot;tilted&amp;quot;) {return 1} elsif (ReadingsVal(&amp;quot;HM_XXXXXX&amp;quot;,&amp;quot;state&amp;quot;,&amp;quot;&amp;quot;) eq &amp;quot;open&amp;quot;) {return 2} else {return -1}}&lt;br /&gt;
==== Ausgabe als Moving Average und formatierung mit sprintf ====&lt;br /&gt;
attr HZ_EINSTRAHLUNG_RAW userReadings Einstr_Mean.av {sprintf(&amp;quot;%.1f&amp;quot;,movingAverage(&amp;quot;HZ_EINSTRAHLUNG_RAW&amp;quot;,&amp;quot;reading&amp;quot;,1200))}&lt;br /&gt;
&lt;br /&gt;
==== Umrechnung der Temperatur (durch 10 geteilt) und Einheit [°C] angehängt ====&lt;br /&gt;
attr HZ_EINSTRAHLUNG_T userReadings SolarTemp {ReadingsVal(&amp;quot;HZ_EINSTRAHLUNG_T&amp;quot;,&amp;quot;reading&amp;quot;,0)/10  .&amp;quot; °C&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
==== Batterieüberwachung durch Erweiterung mit notify und userReading ====&lt;br /&gt;
[[Batterieüberwachung]]&lt;br /&gt;
==== Integralfunktion - integral ====&lt;br /&gt;
Die Verwendung der Integralfunktion bei &#039;&#039;userReadings&#039;&#039; ist ausführlich im Forenbeitrag {{Link2Forum|Topic=26300|Message=193084|LinkText=Integralfunktion bei UserReadings}} erklärt.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* {{Link2CmdRef|Lang=de|Anker=userReadings}} - userReadings&lt;br /&gt;
[[Kategorie:Attribut (allgemeingültig)]]&lt;/div&gt;</summary>
		<author><name>Jophb</name></author>
	</entry>
	<entry>
		<id>http://wiki.fhem.de/w/index.php?title=UserReadings&amp;diff=25108</id>
		<title>UserReadings</title>
		<link rel="alternate" type="text/html" href="http://wiki.fhem.de/w/index.php?title=UserReadings&amp;diff=25108"/>
		<updated>2018-02-03T23:01:24Z</updated>

		<summary type="html">&lt;p&gt;Jophb: /* Beispiele */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SEITENTITEL:userReadings}}  &amp;lt;!-- da richtige Schreibweise kleinen Anfangsbuchstaben hat --&amp;gt;&lt;br /&gt;
{{Baustelle}}&lt;br /&gt;
Über das Attribut [[userReadings]] können bei einem Device benutzerdefinierte Readings einschließlich der Anweisungen zum Befüllen derselben festgelegt werden. Das können zum Einen Formatänderungen (&amp;quot;sprintf&amp;quot;), oder aber auch durch die &#039;&#039;Modifier&#039;&#039;&lt;br /&gt;
* difference&lt;br /&gt;
* differential&lt;br /&gt;
* integral&lt;br /&gt;
* offset&lt;br /&gt;
* monotonic&lt;br /&gt;
gesteuerte Berechnungen sein.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
{{Randnotiz|RNTyp=y|RNText=&#039;&#039;&#039;Geändertes Verhalten - bitte beachten&#039;&#039;&#039;&lt;br /&gt;
Im April 2016 hat sich die Verarbeitung des &#039;&#039;Triggers&#039;&#039; dahingehend geändert, dass die Trigger-Spezifikation jetzt als [[Regulärer Ausdruck]] interpretiert wird, damit also z.B. ein &amp;lt;code&amp;gt;avgTemp:temperature&amp;lt;/code&amp;gt; geändert werden muss in &amp;lt;code&amp;gt;avgTemp:temperature.*&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Technische Details dazu wurden in {{Link2Forum|Topic=52165|LinkText=diesem Forenthread}} diskutiert. &lt;br /&gt;
}}&lt;br /&gt;
Siehe {{Link2CmdRef|Anker=readingFnAttributes}}.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Bei Eingabe im Editor-Feld müssen mehrere Befehle mit einem &amp;quot;;&amp;quot; getrennt werden, bei Änderung in der Eingabezeile sind zwei &amp;quot;;&amp;quot; notwendig.&lt;br /&gt;
* Die Variable, dessen Wert man im Reading haben möchte, kann man einfach ans Ende stellen[https://perldoc.perl.org/functions/return.html]&lt;br /&gt;
* mehrere UserReadings werden durch Komma getrennt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 myreading {my $v = ReadingsVal($name,&amp;quot;actuation&amp;quot;,&amp;quot;error&amp;quot;)+62;; fhem(&amp;quot;set PID desired $v&amp;quot;);; $v},&lt;br /&gt;
 myreading2 {my $v = ReadingsVal($name,&amp;quot;actuation&amp;quot;,&amp;quot;error&amp;quot;)+62;; fhem(&amp;quot;set PID2 desired $v&amp;quot;);; $v}&lt;br /&gt;
&lt;br /&gt;
== Beispiele ==&lt;br /&gt;
&lt;br /&gt;
==== Ausgabe eines Homematic 3-State Fenstersensor als Zahl für Visualisierung mit Icons ====&lt;br /&gt;
&lt;br /&gt;
attr HM_XXXXXX userReadings Statenum {if(ReadingsVal(&amp;quot;HM_XXXXXX&amp;quot;,&amp;quot;state&amp;quot;,&amp;quot;&amp;quot;) eq &amp;quot;closed&amp;quot;) {return 0} elsif (ReadingsVal(&amp;quot;HM_XXXXXX&amp;quot;,&amp;quot;state&amp;quot;,&amp;quot;&amp;quot;) eq &amp;quot;tilted&amp;quot;) {return 1} elsif (ReadingsVal(&amp;quot;HM_XXXXXX&amp;quot;,&amp;quot;state&amp;quot;,&amp;quot;&amp;quot;) eq &amp;quot;open&amp;quot;) {return 2} else {return -1}}&lt;br /&gt;
==== Ausgabe als Moving Average und formatierung mit sprintf ====&lt;br /&gt;
attr HZ_EINSTRAHLUNG_RAW userReadings Einstr_Mean.av {sprintf(&amp;quot;%.1f&amp;quot;,movingAverage(&amp;quot;HZ_EINSTRAHLUNG_RAW&amp;quot;,&amp;quot;reading&amp;quot;,1200))}&lt;br /&gt;
&lt;br /&gt;
==== Umrechnung der Temperatur (durch 10 geteilt) und Einheit [°C] angehängt ====&lt;br /&gt;
attr HZ_EINSTRAHLUNG_T userReadings SolarTemp {ReadingsVal(&amp;quot;HZ_EINSTRAHLUNG_T&amp;quot;,&amp;quot;reading&amp;quot;,0)/10  .&amp;quot; °C&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
==== Batterieüberwachung durch Erweiterung mit notify und userReading ====&lt;br /&gt;
[[Batterieüberwachung]]&lt;br /&gt;
==== Integralfunktion - integral ====&lt;br /&gt;
Die Verwendung der Integralfunktion bei &#039;&#039;userReadings&#039;&#039; ist ausführlich im Forenbeitrag {{Link2Forum|Topic=26300|Message=193084|LinkText=Integralfunktion bei UserReadings}} erklärt.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* ..&lt;br /&gt;
[[Kategorie:Attribut (allgemeingültig)]]&lt;/div&gt;</summary>
		<author><name>Jophb</name></author>
	</entry>
	<entry>
		<id>http://wiki.fhem.de/w/index.php?title=Benutzer_Diskussion:Ph1959de&amp;diff=23813</id>
		<title>Benutzer Diskussion:Ph1959de</title>
		<link rel="alternate" type="text/html" href="http://wiki.fhem.de/w/index.php?title=Benutzer_Diskussion:Ph1959de&amp;diff=23813"/>
		<updated>2017-12-25T20:42:56Z</updated>

		<summary type="html">&lt;p&gt;Jophb: Neuer Abschnitt /* Einfügen von Links und Beispielen */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Kategoriestruktur ==&lt;br /&gt;
&lt;br /&gt;
Ich habe eine Bestandsaufnahme der Kategoriestruktur mittels Freeplane Mindmap Programm erstellt. Die Quelldatei kann ich derzeit hier nicht ablegen, da nur Bilddateien erlaubt sind. Bei Bedarf bitte nach der .mm Datei fragen, ich sende sie gern an Interessenten (die willens sind, an der Umstrukturierung mitzuarbeiten). --[[Benutzer:Ph1959de|Greetz, Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 13:13, 8. Jul. 2013 (CEST)&lt;br /&gt;
&lt;br /&gt;
::Darfst du die Datei im Forum hochladen? Dann könntest einfach von hier dorthin verlinken? Grüße, [[Benutzer:Rince|Rince]] ([[Benutzer Diskussion:Rince|Diskussion]]) 08:43, 10. Jul. 2013 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Löschkandidaten ==&lt;br /&gt;
Die ganzen unverlinkten Bilde in Löschkandidaten packen hättest du nicht machen brauchen. Ich lösch unverlinkte Bilder die aus dem Import kommen auch so... wenn ich zwischendurch immer mal Zeit [[Benutzer:Soulman|Soulman]] ([[Benutzer Diskussion:Soulman|Diskussion]]) 17:00, 9. Jul. 2013 (CEST)&lt;br /&gt;
&lt;br /&gt;
: :-) ... War ich ja gar nicht - das war Markusbloch ... von mir war der Hinweis auf die unverlinkten Dateien. --[[Benutzer:Ph1959de|Greetz, Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 23:03, 9. Jul. 2013 (CEST)&lt;br /&gt;
&lt;br /&gt;
::: Manchmal hab ich eben so ne Phase irgendwie. Ist genauso wie bei der manuellen Korrektur aller Artikel direkt nach dem Import ;-) --[[Benutzer:Markusbloch|Markusbloch]] ([[Benutzer Diskussion:Markusbloch|Diskussion]]) 18:33, 10. Jul. 2013 (CEST)&lt;br /&gt;
&lt;br /&gt;
::::Oh ja, hab irgendwie nicht aufgepasst. Also gegen die Phasen hab ich nix :-)    [[Benutzer:Soulman|Soulman]] ([[Benutzer Diskussion:Soulman|Diskussion]]) 20:24, 10. Jul. 2013 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Abbildung von Bauteilen als Foto  ==&lt;br /&gt;
Hallo Peter,&lt;br /&gt;
&lt;br /&gt;
ich habe eine grundsätzliche Frage zur Darstellung von eigenen Fotos unter FHEMWiki. Ist es urheberrechtilich zulässig, eigene Fotos von Bauteilen darzustellen ?&lt;br /&gt;
&lt;br /&gt;
Gruß&lt;br /&gt;
Lothar&lt;br /&gt;
&lt;br /&gt;
:Hallo Lothar, ich bin da zwar kein Experte, denke aber, dass genau diese Art von Bildern erlaubt ist. Was nicht geht, ist das Übernehmen von Bildern von z.B. einer Herstellerseite, oder das direkte einbinden von Bildern aus fremdem Webspace. Ich denke, diese Aussage ist auch durch die Beschreibung bei Wikipedia abgedeckt: http://de.wikipedia.org/wiki/Hilfe:Bildertutorial/2_Bildrechte.&lt;br /&gt;
:&amp;lt;hr&amp;gt;&lt;br /&gt;
:--[[Benutzer:Ph1959de|Greetz, Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 13:30, 27. Aug. 2013 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Urheberschaft der alten Einträge ==&lt;br /&gt;
Hallo,&lt;br /&gt;
&lt;br /&gt;
ich habe festgestellt, dass ihr beim Neuaufsetzen des Wiki alle Urheberinformationen gelöscht habt. War das Absicht, oder ein Unfall ?&lt;br /&gt;
&lt;br /&gt;
KG&lt;br /&gt;
&lt;br /&gt;
pah&lt;br /&gt;
&amp;lt;hr /&amp;gt;&lt;br /&gt;
:Hallo pah, muss man wohl eher als Unfall bezeichnen. Das Wiki war komplett weg (und das Backup war nicht wirklich als solches zu bezeichnen, sondern komplett unbrauchbar) und wurde aus dem Google-Cache wieder hergestellt. Dabei ist natürlich die ganze Änderungshistorie (und damit auch das was Du vermutlich als Urheberinformation bezeichnest?) verloren gegangen. &lt;br /&gt;
:Aber das erinnert mich daran, dass ich bei einem der Administratoren dringend mal nachfragen wollte, wie es jetzt um die Sicherstellung der Backups steht.&lt;br /&gt;
:Und noch ein Nachsatz: &#039;&#039;...dass ihr beim Neuaufsetzen des Wiki...&#039;&#039;: daran war ich nicht wirklich aktiv beteiligt. Bin auch nur &amp;quot;ganz normaler&amp;quot; Wiki Benutzer ohne besondere Rechte.  --[[Benutzer:Ph1959de|Greetz, Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 14:43, 10. Nov. 2013 (CET)&lt;br /&gt;
&lt;br /&gt;
== Links auf der Willkommensseite == &lt;br /&gt;
Hallo Peter, &lt;br /&gt;
&lt;br /&gt;
ich bin - als Neuling - nicht ganz sicher, ob die Kommunikation mit Dir so gedacht ist, aber zumindest stand das so auf der Begrüßungsseite ;-)&lt;br /&gt;
&lt;br /&gt;
Ich habe festgestellt, dass in der Begrüßungsseite die Links auf die englische Version von wikipedia verweisen. Ich denke gerade für Neulinge wäre da die deutsche Version besser. (Z.B. http://de.wikipedia.org/wiki/Wikipedia:Tutorial)&lt;br /&gt;
&lt;br /&gt;
--[[Benutzer:Funfactor|Funfactor]] ([[Benutzer Diskussion:Funfactor|Diskussion]]) 12:31, 28. Nov. 2013 (CET)&lt;br /&gt;
: ... ja, ist mir bekannt (trotzdem danke für die Rückmeldung). Kann ich aber leider nicht ändern, aber wenn ich mich recht erinnere, habe ich da beim &amp;quot;Betreiber&amp;quot; unseres Wiki schon mal nachgefragt aber bisher keine Antwort bekommen. Ich werde noch mal nachhaken. --[[Benutzer:Ph1959de|Greetz, Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 13:40, 28. Nov. 2013 (CET)&lt;br /&gt;
:: Ok, ich habe mir das noch mal angeschaut. Ist für neue Benutzer wirklich ziemlich verwirrend, deshalb habe ich vorerst mal &amp;quot;hartcodiert&amp;quot; auf die Links auf die deutschen Wikipedia:-Hilfeseiten umgestellt. --[[Benutzer:Ph1959de|Greetz, Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 18:42, 28. Nov. 2013 (CET)&lt;br /&gt;
&lt;br /&gt;
== Verwendung der Sandbox == &lt;br /&gt;
Hallo Peter,&lt;br /&gt;
&lt;br /&gt;
den Wiki &amp;quot;sauber&amp;quot; zu halten ist ja eine wichtige Sache und ich denke dafür ist die [[FhemWiki:Sandbox]] gedacht. &lt;br /&gt;
Leider ist mir völlig unklar, wie ich diese in diesem Sinne verwenden soll. Gibt es hierzu eine Anleitung oder ein paar Hinweise?&lt;br /&gt;
&lt;br /&gt;
--[[Benutzer:Funfactor|Funfactor]] ([[Benutzer Diskussion:Funfactor|Diskussion]]) 17:01, 29. Nov. 2013 (CET)&lt;br /&gt;
:Die Geschichte mit der Sandbox sollte man vielleicht nicht überbewerten. Was vermieden werden sollte ist &lt;br /&gt;
:* das wilde Anlegen von neuen Artikeln mit zusätzlichem experimentieren mit den Seitennamen (das gibt dann immer gleich eine Weiterleitung und zusätzlichen Aufräumaufwand)&lt;br /&gt;
:* jede noch so kleine Änderung separat abzuspeichern (Vorschau, Vorschau, Vorschau!); es gibt einige Leute, die neue Änderungen querlesen - denen macht man die Arbeit sonst unnötig schwer&lt;br /&gt;
:* was mir sonst noch so eingefallen ist, habe ich schon auf die [[FHEMWiki:Über FHEMWiki]]-Seite geschrieben (darf natürlich ergänzt werden)&lt;br /&gt;
:Experimentieren kann man zur Not auch im eigenen Namensraum (also in Deinem Fall &amp;lt;nowiki&amp;gt;[[Funfactor/Experiment...]]&amp;lt;/nowiki&amp;gt;. Aber weitere Ideen sind jederzeit willkommen (bitte beachten: ich bin auch nur &amp;quot;ganz normaler User&amp;quot; hier). --[[Benutzer:Ph1959de|Greetz, Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 18:35, 29. Nov. 2013 (CET)&lt;br /&gt;
&lt;br /&gt;
== On-for-timer zurücksetzen ==&lt;br /&gt;
Hi, es gibt da einen Artikel, den ich erstmals gerne mit einem Template Löschkandidat oder Qualtitästsicherung versehen würde: &#039;&#039;&#039;On-for-timer zurücksetzen&#039;&#039;&#039;&lt;br /&gt;
Erbitte Zweitmeinung. Und ich weiss  nicht, ob wir ggf passende Templates haben muss ich zugeben.&lt;br /&gt;
&lt;br /&gt;
[[Benutzer:Soulman|Soulman]] ([[Benutzer Diskussion:Soulman|Diskussion]]) 16:38, 27. Dez. 2013 (CET)&lt;br /&gt;
:&amp;lt;hr&amp;gt;&lt;br /&gt;
:--[[Benutzer:Stephan|Stephan]] ([[Benutzer Diskussion:Stephan|Diskussion]]) 16:45, 27. Dez. 2013 (CET) &#039;&#039;(Stefans Beitrag auf die Diskussionsseite des Artikels ([[Diskussion:On-for-timer_zurücksetzen]]) verschoben [ph1959de])&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;hr&amp;gt;&lt;br /&gt;
:Ich (traue mich fast nicht :-), aber ich ...) verweise einfach mal auf die [[:Kategorie:Löschkandidaten]] und dortselbst auf den einleitenden Text.&lt;br /&gt;
:--[[Benutzer:Ph1959de|Greetz, Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 17:54, 27. Dez. 2013 (CET)&lt;br /&gt;
&lt;br /&gt;
== autocreate ==&lt;br /&gt;
du hast recht. in der default konfiguration von autocreate ist autosave an. aber es gibt devices wie z.b. OWServer/HUE und ich glaube sogar HM die gehen nicht über autocreate und da ist es auf jeden fall nötig von hand save zu sagen. [[Benutzer:Justme|Justme]] 19:56, 8. Jan. 2014 (CET)&lt;br /&gt;
&lt;br /&gt;
== 1-Wire - Kategorie vs. Artikel ==&lt;br /&gt;
Ich finde es nicht richtig, die Übersichtsbeschreibung - z.B. was das 1-Wire System ist - aus der Kategorieseite herauszunehmen. Diese Trennung schafft Redundanz und verhindert sie nicht.&lt;br /&gt;
&lt;br /&gt;
Die Beschreibung ist eine unmittelbare semantische Eigenschaft der Kategorie, und kein untergeordneter Begriff.&lt;br /&gt;
--[[Benutzer:Pahenning|Pahenning]] ([[Benutzer Diskussion:Pahenning|Diskussion]]) 19:05, 22. Feb. 2014 (UTC)&lt;br /&gt;
:&#039;&#039;Ich habe mir mal erlaubt, die Diskussion zu einem eigenen Abschnitt zu machen.&#039;&#039;&lt;br /&gt;
:Nachdem Du meine Änderung mittlerweile rückgängig gemacht hast, erübrigt sich ja eine weitere Diskussion. Konsequenterweise müsstest Du aber dann auch den Artikel [[1-Wire]] mitpflegen - Artikel und Kategorietext sind derzeit nur deshalb gleich, weil ich die Inhalte mit meiner Änderung auch konsolidiert hatte.&lt;br /&gt;
:Damit die Diskussion über dieses Thema leichter auffindbar ist, kopiere ich sie noch in die [[Kategorie_Diskussion:1-Wire]], wo sie dann ggf. auch weitergeführt werden kann/sollte.&lt;br /&gt;
&lt;br /&gt;
::Werde ich machen&lt;br /&gt;
::--[[Benutzer:Pahenning|Pahenning]] ([[Benutzer Diskussion:Pahenning|Diskussion]]) 15:38, 24. Mär. 2014 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Disclaimer ==&lt;br /&gt;
Es erscheinen immer mehr Schaltpläne hier im Wiki. Vorschlag: Einen allgemeinen Disclaimer des Inhaltes:&lt;br /&gt;
&lt;br /&gt;
- Nachbau aller Schaltpläne auf eigene Gefahr&lt;br /&gt;
- Weder Betreiber noch Autoren übernehmen irgendeine Haftung für Inhalte und unmittelbare oder mittelbare Folgen&lt;br /&gt;
- Hinweis auf die gesetzlichen Regelungen beim Anschluss an 230 V-Netze&lt;br /&gt;
&lt;br /&gt;
und diesen dann ausdrücklich unten neben &amp;quot;Datenschutz etc.&amp;quot; referenzieren.&lt;br /&gt;
&lt;br /&gt;
LG&lt;br /&gt;
&lt;br /&gt;
pah&lt;br /&gt;
--[[Benutzer:Pahenning|Pahenning]] ([[Benutzer Diskussion:Pahenning|Diskussion]]) 15:42, 24. Mär. 2014 (UTC)&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
:Wenn Du damit ein Template/eine Vorlage meinst, die auf relevanten Seiten gezielt eingebunden werden kann/muss, kann ich das gern mal in Angriff nehmen. Ich würde mich dann an dem Text orientieren, den Du auf [[1W-WPump]] eingefügt hast. Im Augenblick ließe sich dafür auch die Vorlage &amp;lt;nowiki&amp;gt;{{Randnotiz|...}}&amp;lt;/nowiki&amp;gt; (siehe [[FHEMWiki:Über_FHEMWiki#Vorlagen]]) verwenden.&lt;br /&gt;
:Für einen generellen Wiki-weiten Disclaimer würde ich Dich eher bitten, das selbst zu machen oder den Wiki-Admin [[Benutzer Diskussion:akw|Arno]] anzusprechen.&lt;br /&gt;
:--[[Benutzer:Ph1959de|Greetz, Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 10:45, 25. Mär. 2014 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Erweiterung der Vorlage &amp;quot;Infobox Hardware&amp;quot; ==&lt;br /&gt;
hallo peter, &lt;br /&gt;
ich habe deine nachricht eben erst gesehen. &lt;br /&gt;
&lt;br /&gt;
die idee war die infoboxen für modul und hardware ähnlicher zu machen. es ging mir nicht um den link zum modul sondern tatsächlich zum maintainer und da die möglichkeit aufs forums profil zu verlinken. so wie du es bei der neuen FLOORPLAN seite gemacht hast. zumindest bei &#039;meinen&#039; modulen ist es zur zeit so das die info für die hardware und das fhem modul auf einer seite stehen. siehe: pca301 oder panstamp/swap. da gibt es entweder nur eine der beiden boxen oder die gleiche info taucht in beiden boxen auf. beides gefällt mir nicht wirklich.&lt;br /&gt;
&lt;br /&gt;
eigentlich wollte ich die komplette ersteller zeile optional haben. das habe ich aber mit der tabellen formatierung noch nicht hin bekommen. jetzt ist erst mal nur der inhalt optional.&lt;br /&gt;
&lt;br /&gt;
inzwischen habe ich noch &amp;quot;FHEMDevice&amp;quot; in &amp;quot;Modulname&amp;quot; geändert so wie es in der modul infobox auch ist. und die reihenfolge unter sonstiges geändert.&lt;br /&gt;
&lt;br /&gt;
ich kann das aber auch wieder zurück bauen.&lt;br /&gt;
&lt;br /&gt;
--[[Benutzer:Justme|Justme]] ([[Benutzer Diskussion:Justme|Diskussion]]) 13:51, 16. Mai 2014 (UTC)&lt;br /&gt;
:Auf der [[Vorlage_Diskussion:Infobox_Hardware]]-Seite geht&#039;s weiter.&lt;br /&gt;
&lt;br /&gt;
== neue seiten ==&lt;br /&gt;
wo wir gerade dabei sind :). ich glaube es wäre schon den auskommentierten abschnitt &#039;neue seiten&#039; auf der einstiegsseite zu aktivieren. --[[Benutzer:Justme|Justme]] ([[Benutzer Diskussion:Justme|Diskussion]]) 14:01, 16. Mai 2014 (UTC)&lt;br /&gt;
&lt;br /&gt;
== neue Seiten ==&lt;br /&gt;
Hallo Peter,&lt;br /&gt;
&lt;br /&gt;
Ich bin auch ein Neuling, und will meine Erfahrungen gerne anbieten an andere Benutzer. Zum Beispiel habe ich gerade der Modul Openweathermap in Betrieb genommen, und habe dabei einige Probleme gelöst. Ich hätte gern mehr Beispiele gehabt, und will die darum in eine Seite verwenden. Ist das erwünscht? Wenn ja, wie sollen neue Seiten über Devices eingeordnet werden, z.B. Openweathermap? (Deutsch ist nicht meine Muttersprache, so hoffentlich mache ich nicht zuviel Fehler).&lt;br /&gt;
&lt;br /&gt;
[[Benutzer:TrudiB|TrudiB]] ([[Benutzer Diskussion:TrudiB|Diskussion]]) 11:37, 23. Mai 2014 (UTC)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr /&amp;gt;&lt;br /&gt;
:Hallo Trudi, es ist auf jeden Fall erwünscht, dass (funktionierende) Beispiele (möglichst komplett) vorgestellt werden.&lt;br /&gt;
:Um eine neue Modulbeschreibung anzulegen, würde ich empfehlen, mal [[Vorlage:Infobox_Modul]] anzuschauen. Auf der [[FHEMWiki:Über_FHEMWiki]]-Seite findest Du auch in der Spalte &amp;quot;Ref&amp;quot; eine Liste der Seiten, die nach dem Schema angelegt oder überarbeitet wurden.&lt;br /&gt;
:Im Zweifel einfach noch mal nachfragen. --[[Benutzer:Ph1959de|Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 13:11, 23. Mai 2014 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Admin ==&lt;br /&gt;
Ph1959de erhält mit sofortiger Wirkung Administrator-Status im FHEMWiki. --[[Benutzer:Akw|Akw]] ([[Benutzer Diskussion:Akw|Diskussion]]) 10:56, 31. Mai 2014 (UTC)&lt;br /&gt;
&lt;br /&gt;
==ZHK Seiten Einzelmodule ==&lt;br /&gt;
Hallo Peter,&lt;br /&gt;
Ich würde den Meinungsaustausch zum Thema wiki Pages valves/stellmotor gerne zu einem gemeinsamen Abschluss bringen. Ein (Erneutes) Feedback von dir wäre dabei hilfreich. Ich möchte dich daher herzlich einladen meine&lt;br /&gt;
Disk.Seite erneut zu besuchen und um Dein Feedback zu bereichern.&lt;br /&gt;
LG florian&lt;br /&gt;
&lt;br /&gt;
==Kategorien für EnOcean ==&lt;br /&gt;
Hallo Peter,&lt;br /&gt;
für EnOcean gibt es 2 Kategorien: EnOcean und EnOcean_Components (anlog Homematic u.a.). In EnOcean ist der &amp;quot;EnOcean starter guide&amp;quot; und die Kategorie ist sinnvoll ins Wiki eingebunden. In der nichteingebundenen Kategorie &amp;quot;EnOcean_Components&amp;quot; befindet sich nur ein Sensor. Ist das so beabsichtigt? oder sollte das nicht angepasste werden.&lt;br /&gt;
Danke, Christian&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
:Hallo Christian, nachdem die &amp;quot;EnOcean Components&amp;quot; Kategorie gerade erst &amp;quot;angelegt&amp;quot; wurde, würde ich erst mal abwarten. Eigentlich passt die Kategorie eher ins Konzept als das reine &amp;quot;EnOcean&amp;quot;. Ich tendiere also eher dazu, alles auf &amp;quot;EnOcean Components&amp;quot; zu konsolidieren. --[[Benutzer:Ph1959de|Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 17:45, 13. Jul. 2014 (UTC)&lt;br /&gt;
::Hallo Peter, bin dabei, den EnOcean starter guide schrittweise zu überarbeiten. Ich würde dabei einige Aktoren- und Sensorenerläuterungen aus dem Starter guide entnehmen und als separate Artikel in &amp;quot;EnOcean components&amp;quot; aufnehmen; jedoch hätte ich gerne auch eine vernünftige Erreichbarkeit. Am einfachsten wäre es doch auch den starter guide zu verschieben. Dazu habe ich aber zuwenig Ahnung und würde das lieber einem Admin überlassen. --[[Benutzer:Krikan|Krikan]] ([[Benutzer Diskussion:Krikan|Diskussion]]) 18:09, 13. Jul. 2014 (UTC)&lt;br /&gt;
::&amp;lt;hr&amp;gt;&lt;br /&gt;
:::Christian, wenn Du mit &amp;quot;Starter Guide verschieben&amp;quot; das Umhängen in Kategorie &amp;quot;EnOcean Components&amp;quot; meinst: das habe ich gerade gemacht (die Änderung besteht einfach nur aus dem Einsetzen des neuen Kategorienames im Artikel).  Außerdem habe ich Kategorie &amp;quot;EnOcean&amp;quot; nach [[:Kategorie:EnOcean Components]] verschoben. Jetzt ist es einheitlich zu FS20, HomeMatic, etc.&lt;br /&gt;
:::... und jetzt kannst Du loslegen mit den weiteren Änderungen - nur eine Bitte noch: Namensschema gut überlegen und neue Artikel möglichst erst speichern, wenn Du wirklich komplett damit zufrieden bist (Vorschaufunktion &amp;quot;großzügig verwenden&amp;quot;). Das macht es den (wenigen) Leuten, die alle Änderungen hier im Wiki &amp;quot;sichten&amp;quot; einfacher. --[[Benutzer:Ph1959de|Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 05:15, 14. Jul. 2014 (UTC)&lt;br /&gt;
:::: Vielen Dank für Deine schnelle Reaktion; werde versuchen Deine Bitten umzusetzen. Einen Wunsch habe ich natürlich noch ;-). Könnten wir EnOcean nicht auch auf der Hauptseite verlinken? Gruß, Christian--[[Benutzer:Krikan|Krikan]] ([[Benutzer Diskussion:Krikan|Diskussion]]) 09:27, 14. Jul. 2014 (UTC)&lt;br /&gt;
::::&amp;lt;hr&amp;gt;&lt;br /&gt;
:::::Ich habe ohnehin noch einige Änderungen für die Hauptseite auf meiner Liste. Da werde ich dann EnOcean auch mit aufnehmen ... bis dahin gibts ja dann vielleicht auch noch mehr Artikel in der Kategorie. --[[Benutzer:Ph1959de|Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 09:44, 14. Jul. 2014 (UTC)&lt;br /&gt;
::::::zum Namensschema: Habe in der Kategorie den Hinweis zum Namensschema analog der anderen Hardwaresystme eingefügt. Mich stört eigentlich das Vorsetzen von EnOcean- ,würde es gerne weglassen, aber es scheint übliche Konvention hier zu sein. In der der Übersicht erscheint so aber alles unter &amp;quot;E&amp;quot;. Hast Du dazu eine Meinung? Sorry, wenn ich so viel frage, aber bevor ich alles durcheinanderbringe...&lt;br /&gt;
::::::&amp;lt;hr&amp;gt;&lt;br /&gt;
:::::::Kein Problem (zu fragen) - ist wirklich einfacher, als nachher alles wieder &amp;quot;geradebiegen&amp;quot; zu müssen.&lt;br /&gt;
:::::::Nun, das Namensschema kannst ja Du im Augenblick noch festlegen. Bei den (z.B.) [[:Kategorie:FS20 Components|FS20 Komponenten]] ist es, wie Du schon bemerkt hast, so, dass alles unter einem Buchstaben im Index erscheint. Wie man das ändern kann, habe ich exemplarisch mal im [[FS20 WS1 Wechselschalter]] gezeigt.&lt;br /&gt;
:::::::Hat alles so seine Vor- und Nachteile. Auch wenn Du nicht immer &amp;quot;EnOcean&amp;quot; davor schreibst, werden doch trotzdem viele Geräte mit den gleichen Buchstaben beginnen. Dann kann es ja auch gleich das EnOcean sein. --[[Benutzer:Ph1959de|Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 11:27, 14. Jul. 2014 (UTC)&lt;br /&gt;
:::: Hallo Peter! Danke für das kurzfristige Aufnehmen von EnOcean auf der Hauptseite. --[[Benutzer:Krikan|Krikan]] ([[Benutzer Diskussion:Krikan|Diskussion]]) 15:14, 17. Jul. 2014 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Subtype Tabelle für EnOcean ... Wiki-Tipps? ==&lt;br /&gt;
Hallo Peter, bräuchte noch einmal Wiki-Nachhilfe, da ich keine einfache Lösung gefunden habe. Vielleicht hast Du eine Idee:&lt;br /&gt;
Ich würde gerne auf der Kategorie-Seite EnOcean Components die vorhandenen EnOcean-Wiki-Artikel noch einmal separat anhand des EnOcean-Attributs &amp;quot;subType&amp;quot; zuordnen und sichtbar machen.&lt;br /&gt;
Quasi eine (lange) Tabelle der Art &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! subType                                       !! Wiki-Seite Geräte                    &lt;br /&gt;
|-&lt;br /&gt;
| switch                      || [[EnOcean-PTM-210-Taster]]          &lt;br /&gt;
|-&lt;br /&gt;
| lightSensor.01              || [[EnOcean-FAH60-Au%C3%9Fen-Helligkeitssensor]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
Manuell könnte ich das auf die Kategorienseite einpflegen -&amp;gt; fehleranfällig&lt;br /&gt;
&lt;br /&gt;
Unterkategorien -&amp;gt; nicht erwünscht und klickintensiv, aber weniger wartungsintensiv&lt;br /&gt;
&lt;br /&gt;
Unterseite zu EnOcean Components -&amp;gt; fehleranfällig und nicht auffällig&lt;br /&gt;
&lt;br /&gt;
Hast Du dazu eine Idee/Meinung? Danke --[[Benutzer:Krikan|Krikan]] ([[Benutzer Diskussion:Krikan|Diskussion]]) 22:41, 5. Aug. 2014 (UTC)&lt;br /&gt;
&amp;lt;hr /&amp;gt;&lt;br /&gt;
:Ich würde (zumindest für&#039;s Erste) mal was Ähnliches machen wie die &amp;quot;News&amp;quot; Sektion auf der Hauptseite. Da wird Vorlage [[Vorlage:FHEMWiki_News]] eingebunden. In dieser Vorlage wird (manuell, aber wie ich finde recht übersichtlich) eine Tabelle unter zuhilfenahme der Vorlage [[Vorlage:News]] aufgebaut.&lt;br /&gt;
:Wenn ich das richtig sehe, könntest Du sogar in (D)einer neuen Vorlage (nennen wir sie mal &amp;lt;nowiki&amp;gt;{{EnOceanSubTypeTable}}&amp;lt;/nowiki&amp;gt;) einfach die News Vorlage so &amp;lt;nowiki&amp;gt;{{News|subType|Wiki-Seite}}&amp;lt;/nowiki&amp;gt; &amp;quot;missbrauchen&amp;quot;. Und die EnOceanSubTypeTable ließe sich dann nicht nur auf der Kategorie-Seite, sondern auch auf anderen Seiten bei Bedarf einfach so einbinden. Ansonsten halte ich mal die Augen offen und schaue, ob ich noch eine andere Lösung / einen besseren Ansatz finde.&lt;br /&gt;
:P.S.: Ich finde, Du machst einen Superjob in der &amp;quot;EnOcean-Abteilung&amp;quot; hier im Wiki. --[[Benutzer:Ph1959de|Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 06:16, 6. Aug. 2014 (UTC)&lt;br /&gt;
:&amp;lt;hr /&amp;gt;&lt;br /&gt;
:: Ich probiere einmal Deinen Vorschlag umzusetzen. Hoffe es gelingt; löschen kann man immer noch....&lt;br /&gt;
:: Nach Lösungen hatte ich auch gesucht, aber mit meinem Wiki-Halbwissen nichts einfaches entdecken können.&lt;br /&gt;
::P.S.: Danke, zurück an Dich (auch wegen Nachhilfe). Bei EnOcean hilft 50watt auch mit. --[[Benutzer:Krikan|Krikan]] ([[Benutzer Diskussion:Krikan|Diskussion]]) 12:04, 6. Aug. 2014 (UTC)&lt;br /&gt;
:: Hm, hatte es befürchtet, Vorlage und Text waren schnell erstellt, aber dann: &amp;lt;s&amp;gt;Deine &amp;quot;nowiki&amp;quot; Geschichte habe ich anscheinend falsch verstanden.&amp;lt;/s&amp;gt; (Man/Ich sollte erst denken und dann schreiben) Als Box -wie die News auf der Hauptseite- einbinden habe ich auf die Schnelle nicht hinbekommen. Da sind soviele Codetags mit denen ich mich noch beschäftigen muss. Hoffe ich habe hier kein Chaos verursacht; ansonsten bitte löschen. --[[Benutzer:Krikan|Krikan]] ([[Benutzer Diskussion:Krikan|Diskussion]]) 13:31, 6. Aug. 2014 (UTC)&lt;br /&gt;
::&amp;lt;hr /&amp;gt;&lt;br /&gt;
:::Sieht doch schon ganz gut aus. Für eine direkte Einbindung auf der Kategorieseite ist die Tabelle meiner Ansicht nach eh zu groß, daher finde ich den von Dir gewählen Ansatz mit der eigenen Seite ganz gut.&lt;br /&gt;
:::In der Vorlage müsstest Du noch die Erläuterung zum &amp;quot;xx&amp;quot; überarbeiten (die führende Leerstelle macht das automatisch zu einem &amp;lt;nowiki&amp;gt;&amp;lt;pre&amp;gt;&amp;lt;/nowiki&amp;gt;. Wenn Du die Hervorhebung willst, müsstest Du den Satz in &amp;lt;nowiki&amp;gt;&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;/nowiki&amp;gt; setzen.&lt;br /&gt;
:::Das Layout der Tabelle kann man ja auch jederzeit noch ändern.&lt;br /&gt;
:::Wenn Du noch Hilfe / Unterstützung brauchst, lass es mich wissen. --[[Benutzer:Ph1959de|Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 14:36, 6. Aug. 2014 (UTC)&lt;br /&gt;
:::&amp;lt;hr /&amp;gt;&lt;br /&gt;
::::Mit dem Ergebnis bin ich nicht wirklich zufrieden. Aber bevor ich daran weiterarbeite, muss ich mehr zur Wiki-Bearbeitung lernen. &lt;br /&gt;
::::Danke für Deine bisherige Unterstützung und auch das Hilfsangebot. Werde sicherlich darauf zurückkommen. --[[Benutzer:Krikan|Krikan]] ([[Benutzer Diskussion:Krikan|Diskussion]]) 14:53, 6. Aug. 2014 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Vorlage Link2Forum ==&lt;br /&gt;
Hallo Peter, soll ich die Vorlage Link2Forum schon nutzen? Wenn ich es zeitlich morgen schaffe, wollte ich sowieso noch einige EnOcean Wiki-Seiten anfassen. Würde es dann schon mitändern. Oder kannst Du das automatisiert? Gruß, Christian --[[Benutzer:Krikan|Krikan]] ([[Benutzer Diskussion:Krikan|Diskussion]]) 19:32, 11. Aug. 2014 (UTC)&lt;br /&gt;
&amp;lt;hr /&amp;gt;&lt;br /&gt;
:Hallo Christian, ich würde die Vorlage bisher nur für den sparsamen Einsatz (kannst sie gern in ein oder zwei Artikeln ausprobieren) empfehlen. Insbesondere innerhalb der &amp;quot;Infobox Modul&amp;quot; bin ich noch nicht ganz soweit - da tendiere ich eher noch dazu, das Link2Forum direkt aus der Infobox heraus einzusetzen. Das wäre dann nur eine Änderung, die hoffentlich alle bisherigen Einsatzstellen der Infobox erwischen würde (wobei, der Forenlink ist meines Wissens noch lange nicht überall drin; das habe ich ja erst kürzlich in die Infobox aufgenommen).&lt;br /&gt;
:Automatisieren kann ich leider nichts; mir ist (zumindest noch) nicht bewusst, dass wir hier die Möglichkeit haben, irgendwelche Bots einzusetzen. --[[Benutzer:Ph1959de|Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 21:32, 11. Aug. 2014 (UTC)&lt;br /&gt;
:&amp;lt;hr /&amp;gt;&lt;br /&gt;
::Nutze bei EnOcean nur &amp;quot;Infobox Hardware&amp;quot; intensiv, dort brauche ich die Links nicht. Innerhalb der Wiki-Seiten verlinke ich häufiger auf einen bestimmeten Beitrag im Forum. Dort könnte ich schon umstellen auf &amp;lt;nowiki&amp;gt;{{Link2Forum|Topic=12345|Message=54321}}&amp;lt;/nowiki&amp;gt;. Über die Vorlage &amp;quot;Infobox Modul&amp;quot; habe ich mir bei EnOcean noch keine Gedanken gemacht (Momentan grübel ich eher noch Einsatzbeispiele analog zur Vorlage EnOceanSubTypetable zusammenzufassen).  --[[Benutzer:Krikan|Krikan]] ([[Benutzer Diskussion:Krikan|Diskussion]]) 22:04, 11. Aug. 2014 (UTC)&lt;br /&gt;
::&amp;lt;hr /&amp;gt;&lt;br /&gt;
:::Wie gesagt, bitte noch &amp;quot;defensiv&amp;quot; benutzen, da ich noch keine umfangreicheren Tests gemacht habe. Daher bin ich aber natürlich auch an Rückmeldungen (die bitte dann auf der entsprechenden Diskussionsseite) zu der Vorlage interessiert (gibts Probleme, Änderungs-, Erweiterungswünsche und/oder -bedarf...?). &lt;br /&gt;
:::Ansonsten: Infobox Modul - dafür gäbe es bei EnOcean wohl nur genau eine Einsatzmöglichkeit, wenn ich das richtig sehe. Das könntest Du anlegen, wenn Du die Vorlage mal einsetzen möchtests. Oder gibt es weitere Module, die EnOcean implementieren? --[[Benutzer:Ph1959de|Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 05:06, 12. Aug. 2014 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Inhalt Hauptseite ==&lt;br /&gt;
Hallo Peter, folgende Idee/Vorschläge zur Wiki-Hauptseite:&lt;br /&gt;
Developers Corner: die dort direkt verlinkten Seiten sind -vorsichtig formuliert- nicht gerade die Aktuellsten; könnte man dort nicht besser gut gepflegte Seiten wie [[DevelopmentModuleIntro]] oder [[DevelopmentGuidelinesAV]] direkt verlinken? Außerdem ist das &amp;quot;Guter Startpunkt, sehr empfohlen!&amp;quot; unter &amp;quot;Wie fange ich an&amp;quot; meiner Meinung nach zu schwach. Ich denke das ist DIE Grundvoraussetzung für den ersten Überblick; hast Du auch unter [[Planung]] geschrieben. &amp;quot;Tipp der Woche&amp;quot; unter Ideen und Lösungen ist (war?) &amp;quot;nur&amp;quot; der &amp;quot;Tipp des Monats&amp;quot; und sollte dann auch so genannt werden. Wird anscheinend nur von soulman gepflegt. Wenn da nichts Aktuelles drin steht, wirkt das Wiki ziemlich tot. Andererseits habe ich persönlich auch keinen großen Antrieb dort etwas zu verfassen. Wer sucht dort wirklich?&lt;br /&gt;
Ich weis, kaum aktiv und schon Rumnörgeln... (Nicht wundern: Ich habe mich heute aber schon wieder darüber geärgert, dass immer mehr Blogs Fhem-Artikel mit typischen Wiki-Inhalt veröffentlichen statt dies hier zu tuen, wo ein zentraler Anlaufpunkt sein sollte. Wenn diese Blog-Artikel auch noch umständlich oder fehlerbehaftet sind, hat man keine Einfluß auf Korrekturen und der Kram ist im Umlauf. Dagegen sollten wir arbeiten.)--[[Benutzer:Krikan|Krikan]] ([[Benutzer Diskussion:Krikan|Diskussion]]) 15:22, 14. Aug. 2014 (UTC)&lt;br /&gt;
Auch &amp;lt;nowiki&amp;gt;[[Links|wichtige Fhem Links]]&amp;lt;/nowiki&amp;gt; sind nicht gerade top-aktuell. Für wichtig halte ich die schon gar nicht. So, Frust weg ;-). Aber dennoch halte ich meine Anmerkungen für diskussionswürdig. Ich möchte auf der Hauptseite nicht eigenständig ändern, da mir nicht bekannt ist, ob das für Normal-Anwender erlaubt ist. --[[Benutzer:Krikan|Krikan]] ([[Benutzer Diskussion:Krikan|Diskussion]]) 18:31, 14. Aug. 2014 (UTC)&lt;br /&gt;
&amp;lt;hr /&amp;gt;&lt;br /&gt;
:Christian, auch die Hauptseite kann von jedem bearbeitet werden - aber vorherige Diskussion ist da vielleicht nicht falsch. Ich habe daher Deine Anregungen mal auf die [[Diskussion:Hauptseite#Vorschläge zur Überarbeitung der Hauptseite|Diskussionsseite]] übertragen. Lass uns die Sache da weiterführen ... vielleicht beteiligt sich ja noch jemand... --[[Benutzer:Ph1959de|Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 05:41, 15. Aug. 2014 (UTC)&lt;br /&gt;
&amp;lt;hr /&amp;gt;&lt;br /&gt;
::Ok, werde auch versuchen meine Anmerkungen passender zu platzieren. Hoffe nur, dass das dann nicht komplett untergeht. Habe aber teilweise keine Ahnung, wo das hin soll - bin noch zu Wiki-unerfahren. Aktuell bspw. [[Spezial:Gewünschte_Seiten]] enthält nach meiner Meinung eine Vielzahl von &amp;quot;Leichen&amp;quot;, die weg können (FR und alles was damit zusammenhängt; Links durch STELLMOTOR). Ich habe da keine Ahnung, wo ich anfangen soll/darf. Ich würde beispielsweise bei [[STELLMOTOR]] die  &amp;quot;toten&amp;quot; Lemmas/Seiten herausnehmen. Der Ersteller von STELLMOTOR könnte sie wieder reinnehmen, wenn er tatsächlich daran arbeiten will; traue mich aber nicht.&lt;br /&gt;
::&#039;&#039; ... vielleicht beteiligt sich ja noch jemand...&#039;&#039; Hoffnung stirbt zuletzt.... ;-) --[[Benutzer:Krikan|Krikan]] ([[Benutzer Diskussion:Krikan|Diskussion]]) 08:15, 15. Aug. 2014 (UTC)&lt;br /&gt;
::&amp;lt;hr /&amp;gt;&lt;br /&gt;
:::* Ist schon ok, das hier zu plazieren ... aber außer mir findet das hier keiner, daher der &amp;quot;Umzug&amp;quot;&lt;br /&gt;
:::* &amp;quot;Gewünschte Seiten&amp;quot; ... enthält alle &amp;lt;nowiki&amp;gt;[[Lemma...]]&amp;lt;/nowiki&amp;gt; Stellen, die auf nicht existierende Seiten verweisen. Wenn&#039;s so extrem vorkommt wie in Deinem genannten Beispiel, einfach den entsprechenden Benutzer anschreiben. Wirklich stören tut&#039;s aber auch nicht - du glaubst gar nicht, wie &#039;&#039;&#039;wenige&#039;&#039;&#039; Benutzer die &amp;quot;Gewünschte Seiten&amp;quot; Seite jemals gesehen haben, geschweige denn regelmäßig benutzen.&lt;br /&gt;
:::* Anfangen darfst Du sicherlich da, wo ein Eintrag in die &amp;quot;Gewünschten Seiten&amp;quot; offensichtlich versehentlich entstanden ist, z.B. weil jemand sich schlicht vertippt hat; wenn jemand schon mal eine Liste erstellt hat, welche Seiten noch gemacht werden müssen (wie ich z.B. auf meiner Benutzerseite :-) ), würde ich das erst mal ganz gelassen so stehen lassen.&lt;br /&gt;
:::* Und immer im Hinterkopf behalten, dass viele Benutzer hier im Wiki nur ganz gelegentlich unterwegs sind um vielleicht den einen oder anderen Tippfehler zu korrigieren - und das war&#039;s dann auch schon. Die meisten Benutzer bekommen nicht mal die Begrüßungshinweise mit ... und/oder lesen sie nicht, halten sich nicht dran, verstehen sie nicht... &lt;br /&gt;
:::Bottom line: nicht zu viel erwarten, Dich selbst nicht &amp;quot;aufreiben&amp;quot;, aber fleißig weitermachen. --[[Benutzer:Ph1959de|Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 08:35, 15. Aug. 2014 (UTC)&lt;br /&gt;
:::&amp;lt;hr /&amp;gt;&lt;br /&gt;
::::Bottom line: keine Sorge, reibe mich schon nicht auf. &#039;&#039;weiter&#039;&#039;&#039;machen&#039;&#039;&#039;&#039;&#039;: ich würde es grds. einfach machen, will aber niemanden vergraulen und den Admins unnötig Arbeit machen; hätte in STELLMOTOR die &amp;quot;toten&amp;quot; Lemmas in normale Aufzählung verwandelt, FR gelöscht (Leiche des Absturzes), kleinere Änderungen an Hauptseite vorgenommen oder... Rückgängig kann man (Admin/Ersteller) es immer noch machen; eigentlich ist es mir zu viel Diskussion, die mMn keinen weiterbringt, (wie lange soll man auf Entgegnungen warten?).....  &lt;br /&gt;
::::Meine Bottom line: Keine Sorge Umstrukturierungen (Kategorien) o.ä. würde ich nicht undiskutiert vornehmen&lt;br /&gt;
:::::Nur teilweise Offtoic: Peter, wenn Du meine Verlinkung in der Homematic-Kategorie nicht OK findest, mach es einfach rückgängig: Für mich ist das in Ordnung, habe damit grds. kein Problem; gilt immer. Gruß, Christian (Habe da eh noch einen Tippfehler eingebaut!)&lt;br /&gt;
&lt;br /&gt;
== WikiArtikel Pflege ==&lt;br /&gt;
Hallo Peter,&lt;br /&gt;
die &amp;quot;Verschieben&amp;quot; Option von Artikeln kannte ich in der Tat noch nicht. Danke für den Hinweis..&lt;br /&gt;
:Kein Problem &amp;amp; gern geschehen. --[[Benutzer:Ph1959de|Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 06:45, 29. Aug. 2014 (UTC)&lt;br /&gt;
&lt;br /&gt;
Du kannst meine Wiki-Artikel gerne korrigieren und vereinheitlichen. Wenn du mir zusätzlich noch verrätst worauf du achtest, kann ich versuchen diese Dinge gleich selbst zu beachten.&lt;br /&gt;
:&amp;lt;hr /&amp;gt;&lt;br /&gt;
:Lässt sich so generell nicht beantworten; manchmal nur Kleinigkeiten. Beispiele:&lt;br /&gt;
:* Artikel in Ich-Form schreibe ich normalerweise auf neutrale Ausdrucksweise um (später weiß ohnehin niemand mehr, wer der &amp;quot;Ich&amp;quot; war); das ist verbindlicher und mMn für technische Beschreibungen angemessener.&lt;br /&gt;
:* Querverweise (Links auf andere Artikel) einfügen - auch IN anderen Artikeln wo sinnvoll Verweise auf Deinen neuen Artikel setzen (sonst entstehen &amp;quot;Waisen&amp;quot; und &amp;quot;Sackgassen&amp;quot;); ob es schon Links auf Deine Seite gibt, kannst Du über das &amp;quot;Links auf diese Seite&amp;quot; (links in der Navigationsleiste) herausfinden.&lt;br /&gt;
:* Rechtschreibung / Grammatik / Formulierung... ist eigentlich immer dabei&lt;br /&gt;
:* usw.&lt;br /&gt;
:-- [[Benutzer:Ph1959de|Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 06:45, 29. Aug. 2014 (UTC) &amp;lt;hr /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Nochetwas: ich vermisse eine Kategorie für selbst gebaute Schaltungen. Ich bin mir immer unsicher wo ich meine Artikel einstellen soll. ZurZeit sind 1wire-Schaltungen bei 1wire. Aber für Panstamps und Arduino basierte Schaltungen habe ich nichts gefunden. Kannst du helfen?&lt;br /&gt;
:&amp;lt;hr /&amp;gt;&lt;br /&gt;
:Es bei Hardware die Unterkategorie &amp;quot;Other Components&amp;quot;, da passt sowas derzeit immer rein. Sofern mal eine &amp;quot;kritische Masse&amp;quot; erreicht ist (also mehr als nur ein oder zwei Artikel), kann man ja überlegen, mal eine Unterkategorie &amp;quot;Eigenentwicklungen&amp;quot; (oder ähnlich) bei Hardware einzufügen.&lt;br /&gt;
:Für Arduino gibt es schon eine Kategorie (Unterkategorie von Hardware), für Panstamp könnte man sowas auch einrichten - wenn es vom Konzept her passt (dazu verstehe ich von der Arduino/Panstamp...-Welt zu wenig). Es sollten halt immer ähnliche Dinge in einer Kategorie/Unterkategorie... zusammengefasst sein.&lt;br /&gt;
:-- [[Benutzer:Ph1959de|Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 06:45, 29. Aug. 2014 (UTC) &amp;lt;hr /&amp;gt;&lt;br /&gt;
::Misch mich mal ein: Fände Kategorie Eigenentwicklungen o.ä. nicht schlecht, da bestimmte Zielgruppe angesprochen wird. Ich lasse bspw. meine Finger davon. Würde den Artikel trotzdem zusätzlich noch in Other Components aufnehmen oder wenn es 1-wire ist auf jeden Fall in 1-Wire. Bei Homematic haben wir doch Unterkategorie HomeBrew, analog auch bei anderen anlegen!? Wir sollten etwas angehen....--[[Benutzer:Krikan|Krikan]] ([[Benutzer Diskussion:Krikan|Diskussion]]) 08:18, 29. Aug. 2014 (UTC) &amp;lt;hr /&amp;gt;&lt;br /&gt;
:::Ok, dann machen wir doch einfach einen Auftrag an Tobias daraus: mal sammeln, welche Artikel schon vorliegen (oder er in Planung hat) für eine solche Kategorie, dann schauen wir kurz drüber und beschließen, welche neuen Unterkategorien und wie einsortiert...&lt;br /&gt;
:::@Tobias: ich stell das mal so auf Deine Diskussionsseite --[[Benutzer:Ph1959de|Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 08:48, 29. Aug. 2014 (UTC) &amp;lt;hr /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
GRuss&lt;br /&gt;
Tobias&lt;br /&gt;
&lt;br /&gt;
== Verschieben von Wiki-Seiten ohne Weiterleitung ==&lt;br /&gt;
Hallo Peter,&lt;br /&gt;
könntest Du bitte &lt;br /&gt;
* [[Z-Wave-EVR_ST814-Temperatur-_und_Feuchtesensor]] auf Z-Wave-EVR_ST81&#039;&#039;&#039;4&#039;&#039;&#039;-Temperatur-_und_Feuchtesensor ohne Weiterleitung verschieben. Der Ersteller [[Benutzer_Diskussion:Morgennebel]] ist anscheinend nicht mehr aktiv; reagiert auch nicht auf PM.&lt;br /&gt;
: -&amp;gt; Erledigt --[[Benutzer:Ph1959de|Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 12:31, 27. Dez. 2014 (UTC)&lt;br /&gt;
* hier [[Diskussion:WS3600]] mal reinschauen. Dort hätte ich auch gerne eine Wiki Seite verschoben. Keine Ahnung, ob Dir das aufgefallen ist.&lt;br /&gt;
: -&amp;gt; Ja, hatte ich gesehen ... und jetzt auch erledigt --[[Benutzer:Ph1959de|Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 12:31, 27. Dez. 2014 (UTC)&lt;br /&gt;
* WebIO_Digital auf WEBIO_12DIGITAL verschieben --[[Benutzer:Krikan|Christian]] ([[Benutzer Diskussion:Krikan|Diskussion]]) 17:36, 7. Dez. 2015 (CET)&lt;br /&gt;
: -&amp;gt; Erledigt --[[Benutzer:Ph1959de|Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 17:52, 7. Dez. 2015 (CET)&lt;br /&gt;
&lt;br /&gt;
== Nutzung von &amp;lt;nowiki&amp;gt;&amp;lt;pre style=&amp;quot;width:500px;&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt; statt  &amp;lt;nowiki&amp;gt;&amp;lt;code&amp;gt;&amp;lt;/nowiki&amp;gt; ==&lt;br /&gt;
Hallo Peter,&amp;lt;BR&amp;gt;&lt;br /&gt;
Du ersetzt teilweise in den Wikiseiten die Formatierung &amp;lt;nowiki&amp;gt;&amp;lt;code&amp;gt;&amp;lt;/nowiki&amp;gt; durch &amp;lt;nowiki&amp;gt;&amp;lt;pre style=&amp;quot;width:500px;&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;. Hat das einen bestimmten Grund? Das führt nämlich dazu, dass der Text in einigen Fällen über den Boxrand geht. Mir ist nicht klar, wie ich das umsetzen/anwenden soll. Danke. --[[Benutzer:Krikan|Christian]] ([[Benutzer Diskussion:Krikan|Diskussion]]) 07:28, 5. Feb. 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Hallo Christian, das mache ich (dachte ich) eigentlich nur, wenn die Zeilen in dem pre-Bereich durchweg relativ kurz sind. Was ich eigentlich häufiger mache, ist, pre durch code Tags zu ersetzen, gerade weil bei code ein automatischer Zeilenumbruch stattfindet. Insbesondere Einzeiler, die per nowiki, pre oder Leerzeichen in Spalte1 dann als Box formatiert werden ersetze ich gern duch &amp;lt;nowiki&amp;gt;:&amp;lt;code&amp;gt;define, attr, ...&amp;lt;/code&amp;gt;&amp;lt;/nowiki&amp;gt;, weil&#039;s meiner Ansicht nach einfach flüssiger lesbar ist Gesamtkontext.&lt;br /&gt;
:Verhalte ich mich am Ende anders, als ich es in [[FHEMWiki:Über_FHEMWiki#Gewünschtes Verhalten / &amp;quot;Do and Don&#039;t&amp;quot;|diesem Abschnitt]] beschrieben habe? --[[Benutzer:Ph1959de|Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 07:45, 5. Feb. 2015 (UTC)&lt;br /&gt;
::Werde es beobachten. Vielleicht bin ich auch nur übermüdet/unkonzentriert: Habe nämlich gerade gesehen, dass ich [[HM-OU-CFM-Pl_MP3_Funk-Gong_mit_Signalleuchte|hier]] -was letztliche Anstoß zum Schreiben war- falsch geschaut habe. Die anderen Beispiele, die ich in Erinnerung habe, müsste ich mir noch einmal raussuchen. Vielleicht habe ich da auch schief geschaut. Also bitte erst einmal vergessen. Gruß, --[[Benutzer:Krikan|Christian]] ([[Benutzer Diskussion:Krikan|Diskussion]]) 08:18, 5. Feb. 2015 (UTC) PS: Schaust Du bitte mit auf die diversen Unterkategorien zu &amp;quot;Hardware Typen&amp;quot; die ich angelegt habe und greifst bitte ggfs. korrigiernd ein.&lt;br /&gt;
:::Die neuen Unterkategorien habe ich schon zur Kenntnis genommen. Nachdem Du die letzten Änderungen an der Kategoriestruktur gemacht hast, kennst Du Dich da mittlerweile ja mindestens so gut aus wie ich. Das Einzige, was mir aufgefallen ist: auf den Kategorieseiten könnten noch ein paar kurze Worte zur Beschreibung der Kategorie eingefügt werden... aber das eilt nicht. --[[Benutzer:Ph1959de|Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 08:26, 5. Feb. 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
== PGM3 - Entwicklungsstand ==&lt;br /&gt;
Hallo Peter!&lt;br /&gt;
Habe heute bei PGM3 und PGM5 recht selbstsicher einen Hinweis &amp;quot;seit längerem nicht aktiv weiterentwickelt&amp;quot; hinzugefügt. Im Forum habe ich nichts gefunden und auch zu Google-Groups-Zeiten kann ich mich nicht wirklich erinnern. Bei der Nachkontrolle habe ich dann mit Erschrecken festgestellt, dass Du PGM3 auf der ToDo-Liste stehen hast und das plötzlich Martin Hass&#039; PGM3 Screenshot-Seiten nach einer gefühlten Ewigkeit wieder erreichbar sind. Irre ich mich und PGM3 ist doch noch ein (aktuelles) Thema? Gruß, [[Benutzer:Krikan|Christian]] ([[Benutzer Diskussion:Krikan|Diskussion]]) 21:09, 18. Feb. 2015 (CET)&lt;br /&gt;
&amp;lt;hr /&amp;gt;&lt;br /&gt;
:Christian, PGM3 auf meiner Todo-Liste ... eine Jugendsünde :-) ... fliegt gleich runter, weil bestimmt zwei Jahre alt und nie was gemacht. Die Updates auf Martin&#039;s Seiten solltest Du natürlich beobachten, aber auf mich musst Du keine Rücksicht nehmen. --[[Benutzer:Ph1959de|Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 06:55, 19. Feb. 2015 (CET)&lt;br /&gt;
&lt;br /&gt;
== Begrüßungsseite Link: Was Wikipedia nicht ist ==&lt;br /&gt;
Hallo Peter,&lt;br /&gt;
ich hoffe, dass ich das hier jetzt richtig mache :-). Beim aufmerksamen Lesen der Begrüßungseite bin ich gleich auf einen Link: Was_Wikipedia_nicht_ist getappst. &lt;br /&gt;
&lt;br /&gt;
Den kennt Wikipedia nicht...&lt;br /&gt;
Gruß Otto&lt;br /&gt;
&amp;lt;hr /&amp;gt;&lt;br /&gt;
:Hallo Otto, danke für&#039;s aufmerksame Lesen :-)&lt;br /&gt;
:habe den (und einen weiteren) fehlerhaften Link korrigiert. Da die Vorlage mit &amp;quot;subst:&amp;quot; eingebunden wird, profitieren leider nur die Neuankömmlinge ab jetzt davon.&lt;br /&gt;
:Grund für das Problem ist wohl die Art, wie das Fhem-Wiki aufgesetzt wurde (bin mir aber jetzt nicht sicher, ob sich da in dieser Hinsicht nochmal was geändert hat, oder ob ich die beiden Links schlicht vergessen habe ... andere Links, wie z.B. den auf das Tutorial, habe ich vor längerer Zeit schon mal umgestellt). --[[Benutzer:Ph1959de|Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 06:57, 2. Apr. 2015 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Pflege von [[Spezial:Gewünschte_Seiten]] ==&lt;br /&gt;
Hallo Peter,&lt;br /&gt;
bin gerade im Aufräumfieber und über die gewünschten Seiten gestolpert. Einige Dinge habe ich eigenständig geklärt, aber nun benötige ich Deine Hilfe. Insbesondere das zum Aussterben verurteilte FS20 taucht dort sehr umfangreich auf. Die abnehmende Bedeutung spricht aus meiner Sicht dafür, diese &amp;quot;gewünschten Seiten&amp;quot; dort herauszunehmen. Denke es gibt wichtigere Baustellen und dringendere notwendige Seiten. Zudem sind das teilweise Karteileichen, die seit Urzeiten dort geführt werden. Aus meiner Sicht schreckt das, neben den Wiki-Softwareproblemen, Interessenten von der Mitarbeit ab. Darum bitte ich Dich um Deine Meinung als FS20-User, bevor ich das weiter anleiere. Andere Punkte, die ich nicht &#039;&#039;&#039;&#039;&#039;&amp;lt;- meinst Du wirklich *nicht*?&#039;&#039;&#039;&#039;&#039; &#039;&#039;&amp;lt;-ergänze: allein/eigenständig!&#039;&#039; klären wollte, betreffen bspw. die gewünschte Seite &amp;quot;Hilfe:Seite bearbeiten&amp;quot;, &amp;quot;FHEMWiki:Stubs entfernen&amp;quot;. Schöne Feiertage, [[Benutzer:Krikan|Christian]] ([[Benutzer Diskussion:Krikan|Diskussion]])&lt;br /&gt;
:Hallo Christian, nur als schnelle Antwort (zu viele Baustellen gerade):&lt;br /&gt;
:* Gewünschte Seiten, speziell FS20: das was Mediawiki in die &amp;quot;gewünschten Seiten&amp;quot; einsortiert, sind die intra-Wiki Links, die nicht existieren also &amp;lt;nowiki&amp;gt;[[Existiert nicht]]&amp;lt;/nowiki&amp;gt; würde da z.B. auftauchen - gewünschte Seiten im eigentlichen Sinn sind das nur dann, wenn der Verlinkung absichtlich gemacht wurde ... wie z.B. bei den vielen FS20 Seiten. Die sind nämlich häufig bei mir (hast Du doch bestimmt gesehen ;-) ), weil ich noch zu diversen FS20 Geräten was schreiben möchte und sollte. Leider (die vielen Baustellen, siehe oben) komme ich derzeit und schon lange nicht dazu. Ansonsten habe ich da immer mal wieder reingeschaut, um falsch geschriebene Links aufzuspüren und zu bereinigen. Aber vielleicht sollten wir den Link darauf einfach von der Hauptseite entfernen und z.B. auf die/eine Interna Seite holen. Vielleicht als Ersatz / Nachfolger der Randnotiz von der Über FHEMWiki Seite, auf der ich die offenen Baustellen mal aufgelistet hatte (und schon länger nicht mehr gepflegt).&lt;br /&gt;
::* Natürlich habe ich gesehen, dass FS20 (auch) von Dir kommt; darum habe ich mich auch mit Wiki-Eingriffen zurückgehalten, sonst.. ;-). Dein Alternativvorschlag ist gut. Die offenen Baustellen auf der Über FHEMWiki Seite: Zu den Kategorien wollte ich -auch seit langem- eine bessere &amp;quot;Anweisung&amp;quot; an die anderen  Wikibearbeiter schreiben und dann abschließen. Und mich dann wieder verstärkt &amp;quot;meinen&amp;quot; eigentlichen Themen ZWave/EnO widmen.&lt;br /&gt;
:* Die Stubs-Seite / Kategorie / Vorlage kommt von Arno (akw), ist aber schon lange nicht mehr gepflegt worden und wird wohl auch nicht mehr aktiv genutzt&lt;br /&gt;
:* &#039;&#039;&#039;Hilfe:Seite bearbeiten&#039;&#039;&#039; fällt wohl in die Kategorie &amp;quot;Wiki-Softwareprobleme&amp;quot; (Du meinst den Link &amp;quot;Bearbeitungshilfe&amp;quot; neben den {{Taste|Speichern}} {{Taste|Vorschau zeigen}} Buttons?) und würde ich erst wieder aktiv in Angriff nehmen, wenn Arno die offenen Probleme komplett abgearbeitet hat :-(&lt;br /&gt;
::* Ja, werde mal Arno bitten.... [[Benutzer:Krikan|Christian]] ([[Benutzer Diskussion:Krikan|Diskussion]])&lt;br /&gt;
:Ebenfalls schöne Feiertage, --[[Benutzer:Ph1959de|Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 15:21, 3. Apr. 2015 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Vorlagen: Link2Forum,.. ==&lt;br /&gt;
Hallo Peter,&lt;br /&gt;
ist die Notwendigkeit der Vorlagen &amp;quot;Link2Forum&amp;quot;,.. nur darin begründet, dass man dann einfacher Anpassungen bei Änderungen der zugrundeliegenden Links vornehmen kann? Ich stelle nämlich immer wieder fest, dass außer uns beiden, die sowieso von (fast) keinem Wiki-Bearbeiter genutzt werden. Der Umstellungsaufwand im Änderungsfalle wird so vermutlich nicht sehr reduziert. Kann man dieses Problem der Linkänderungen nicht einfacher mit einem Bot lösen, der das Wiki mit Suchen/Ersetzen durchgeht? Dann hättest Du auch nicht den Pflegeaufwand für die Vorlagen. Gruß, --[[Benutzer:Krikan|Christian]] ([[Benutzer Diskussion:Krikan|Diskussion]]) 11:16, 13. Aug. 2015 (CEST)&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
:Hallo Christian, leider habe ich keine große Hoffnung, dass wir hier einmal die Chance haben werden, &#039;&#039;&#039;bot&#039;&#039;&#039;s einzusetzen und kenne mich damit auch (zumindest noch) nicht aus (Ausreden? Vielleicht). &lt;br /&gt;
:Interessant: ich habe gerade die DocLink Vorlage mal soweit fertig, dass man zumindest die ELV Links überarbeiten / generalisieren kann. &lt;br /&gt;
:Unterm Strich: ich werde die Vorlagen weiter pflegen und benutzen, wer sie benutzen mag soll&#039;s tun, zwingen werd ich niemanden. Wir haben halt immer noch sehr wenige Wiki-erfahrene Benutzer hier, was man auch an anderen Stellen merkt. --[[Benutzer:Ph1959de|Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 11:50, 13. Aug. 2015 (CEST)&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
:: Hallo Peter, will Dich auch nicht abhalten ;-) , sondern entlasten. Weil ich die DocLink-Vorlage gesehen habe, kam ich auf das Thema. Ich werde das bot-Thema mal auf meinen &amp;quot;Wunschzettel&amp;quot; aufnehmen und aktiv verfolgen. Schauen wir einmal, was sich ergibt. Gruß, --[[Benutzer:Krikan|Christian]] ([[Benutzer Diskussion:Krikan|Diskussion]]) 12:04, 13. Aug. 2015 (CEST)&lt;br /&gt;
::&amp;lt;hr&amp;gt;&lt;br /&gt;
:::Kein Problem - ich denke es gibt bei beiden Vorgehensweisen Vor- und Nachteile. Meine Skepsis beruht darauf, dass die Bots ja wohl auf dem Wiki-Server laufen und ich kaum Hoffnung habe, da mehr Zugriff zu bekommen. --[[Benutzer:Ph1959de|Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 12:16, 13. Aug. 2015 (CEST)&lt;br /&gt;
== Codierung  ==&lt;br /&gt;
Hallo Peter,&lt;br /&gt;
&lt;br /&gt;
Du schreibst auf meiner Benutzerseite&lt;br /&gt;
 HTML-Tags bitte nur verwenden, wenn es nicht anders geht&lt;br /&gt;
im Artikel &lt;br /&gt;
[[EnOcean-D-452-FU-EP-JR-Aktor-Beschattungselemente-Rollladen]]&lt;br /&gt;
hast Du die Codierung mittels Leerzeichen durch &amp;lt;nowiki&amp;gt;&amp;lt;code&amp;gt;&amp;lt;/Code&amp;gt;&amp;lt;/nowiki&amp;gt; ersetzt. Die Leerzeichen waren aber in [[http://www.fhemwiki.de/wiki/FHEMWiki:%C3%9Cber_FHEMWiki#Gewünschtes Verhalten / &amp;quot;Do and Don&#039;t&amp;quot;]] explizit erlaubt.&lt;br /&gt;
Einen anderen Artikel von mir hast Du nicht korrigert.&lt;br /&gt;
Wo liegt mein Fehler? Ich wollte der Gemeinschaft gerne etwas zurück geben - vor allem für die Arbeit die Christian mit mir gehabt hat.&lt;br /&gt;
&lt;br /&gt;
--[[Benutzer:BenMarloe|BenMarloe]] ([[Benutzer Diskussion:BenMarloe|Diskussion]]) 00:25, 21. Aug. 2015 (CEST)&lt;br /&gt;
&amp;lt;hr /&amp;gt;&lt;br /&gt;
:Hallo Ben(Marloe), das ist schnell erklärt:&lt;br /&gt;
:HTML-Tags nur verwenden - bezieht sich, wenn ich das jemandem schreibe, meist auf exzessive &amp;lt;nowiki&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/nowiki&amp;gt;-Tags. Da kann (sollte) im Wiki meistens einfach eine Leerzeile oder ein Zeilenumbruch verwendet werden (einfach die &amp;quot;Vorschau-funktion&amp;quot; verwenden, um zu kontrollieren, ob&#039;s &amp;quot;richtig&amp;quot; aussieht). Außerdem sieht der Wiki-Quelltext damit schon dem formatierten Ergebnis ähnlicher und ist einfacher lesbar. Nur bei manchen Vorlagen oder z.B. in Aufzählungen ist ein Zeilenumbruch &amp;quot;kontraproduktiv&amp;quot; und dann ist ein br nötig.&lt;br /&gt;
:Leerzeichen vs. code ... am besten veranschaulicht:&lt;br /&gt;
 Leerzeichen in Position 1&lt;br /&gt;
:... und der weitere Text. Im Vergleich dazu:&lt;br /&gt;
::&amp;lt;code&amp;gt;ein (eingerückter) Einzeiler, der als Code formatiert werden soll&amp;lt;/code&amp;gt;&lt;br /&gt;
:oder noch mal anders:&lt;br /&gt;
 Leerzeichen und ganz viel, ganz viel, ganz viel, ganz viel, ganz viel, ganz viel, ganz viel, ganz viel, ganz viel, ganz viel, ganz viel, ganz viel, ganz viel, ganz viel, ganz viel, ganz viel, ganz viel Text&lt;br /&gt;
::&amp;lt;code&amp;gt;ganz viel, ganz viel, ganz viel, ganz viel, ganz viel, ganz viel, ganz viel, ganz viel, ganz viel, ganz viel, ganz viel, ganz viel, ganz viel, ganz viel, ganz viel, ganz viel, ganz viel Text, der als Code formatiert werden soll&amp;lt;/code&amp;gt;&lt;br /&gt;
:Ich hoffe, der Unterschied wird damit klar: der Text wird meiner Ansicht nach kompakter, die Hervorhebung ist aber trotzdem da. Und: bei Mehrzeilern sieht das schon wieder ganz anders aus. Da ist aber meistens dann die Verwendung von &amp;lt;nowiki&amp;gt;&amp;lt;pre&amp;gt;&amp;lt;/pre&amp;gt;&amp;lt;/nowiki&amp;gt; die bessere Wahl, weil damit (im Wiki Source Text) besser verdeutlicht wird, dass die Formatierung absichtlich so gewählt ist.&lt;br /&gt;
:Zum Thema &#039;&#039;Einen anderen Artikel von mir hast Du nicht korrigert&#039;&#039; ... ich kann nicht überall sein :-) ... nein, ohne Scherz, ich mache das hier auch &amp;quot;nur nebenbei&amp;quot;, manches ist Geschmackssache, manches übersehe ich, manches ist &amp;quot;zu unwichtig&amp;quot;, etc.&lt;br /&gt;
:Und &#039;&#039;Wo liegt mein Fehler?&#039;&#039; - nirgends; einfach fleissig weiter mitmachen.&lt;br /&gt;
:--[[Benutzer:Ph1959de|Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 07:14, 21. Aug. 2015 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Neue Seite oder Ergänzung [erledigt]==&lt;br /&gt;
Mit Eurer Hilfe geht jetzt der EnOcean-FUD61NPN-Funk-Universal-Dimmaktor unidirektional bei mir.&lt;br /&gt;
Ich würde eine Anleitung erstellen, bin mir aber nicht sicher, ob ich das lieber als &lt;br /&gt;
# Ergänzung auf die existente Seite oder &lt;br /&gt;
# Kommentare auf die existente Seite mache oder&lt;br /&gt;
# eine neue Seite aufmache und wie die dann heißen soll.&lt;br /&gt;
Ich bitte um Vorschläge/Richtlinien&amp;lt;br&amp;gt;&lt;br /&gt;
--[[Benutzer:BenMarloe|BenMarloe]] ([[Benutzer Diskussion:BenMarloe|Diskussion]]) 16:48, 11. Sep. 2015 (CEST)&lt;br /&gt;
&amp;lt;hr /&amp;gt;&lt;br /&gt;
:Ich denke, das kommt auf Art und Umfang der Änderungen/Ergänzungen an. Wenn das ein einzelner Abschnitt mit den Unterschieden ist, passt das sicherlich gut in [[EnOcean-FUD61NPN-Funk-Universal-Dimmaktor]], wären es Kommentare, überall auf der Seite verstreut, würde ich eine eigene Seite bevorzugen (dann bitte an den Seitennamen &amp;quot; (unidirektional)&amp;quot; anhängen). Die Kommentarseite ist für sowas eher nicht geeignet. &lt;br /&gt;
:Wenn&#039;s eine neue Seite wird, dann bitte auf der Seite des bidirektionalen Aktors verlinken. In jedem Fall die Bemerkung über *direktional... anpassen. --[[Benutzer:Ph1959de|Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 16:10, 12. Sep. 2015 (CEST)&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
::so wird&#039;s gemacht. --[[Benutzer:BenMarloe|BenMarloe]] ([[Benutzer Diskussion:BenMarloe|Diskussion]]) 22:02, 18. Sep. 2015 (CEST)&lt;br /&gt;
==Extension SyntaxHighlight_GeSHi==&lt;br /&gt;
Ich hätte die [https://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi Extension] gerne, um Code besser lesbar darzustellen. Sollte eigentlich ab MediaWiki Version 1.21 dabei sein, aber eventuell ist sie nicht aktiviert? Wen muss ich dazu anbetteln? ;)&lt;br /&gt;
--[[Benutzer:Drhirn|Drhirn]] ([[Benutzer Diskussion:Drhirn|Diskussion]]) 15:58, 1. Okt. 2015 (CEST)&lt;br /&gt;
:[[Benutzer Diskussion:Akw#Wiki-Erweiterung Syntaxhighlight|Hier]] mal nachhaken? --[[Benutzer:Ph1959de|Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 18:57, 1. Okt. 2015 (CEST)&lt;br /&gt;
::Hat, wie ich gerade sehe, schon jemand anderer übernommen :) --[[Benutzer:Drhirn|Drhirn]] ([[Benutzer Diskussion:Drhirn|Diskussion]]) 10:26, 5. Okt. 2015 (CEST)&lt;br /&gt;
::&amp;lt;hr /&amp;gt;&lt;br /&gt;
:::Nicht verzagen ... jede Stimme zählt :-) --[[Benutzer:Ph1959de|Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 16:36, 5. Okt. 2015 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Vorlage &amp;quot;Hinweis&amp;quot; ==&lt;br /&gt;
Hallo Peter,&lt;br /&gt;
hast Du Dir die neue Vorlage &amp;quot;Hinweis&amp;quot; einmal angeschaut? Gibt es Vorbehalte von Deiner Seite oder kann ich die problemlos nutzen. Habe die Vorlage testweise mal in 2 Seiten eingebaut und finde sie in gewissen Situationen grds. nicht schlecht.&lt;br /&gt;
Gruß, --[[Benutzer:Krikan|Christian]] ([[Benutzer Diskussion:Krikan|Diskussion]]) 22:45, 6. Okt. 2015 (CEST)&lt;br /&gt;
&amp;lt;hr /&amp;gt;&lt;br /&gt;
:Hallo Christian, ja, die Vorlage habe ich gesehen und mal kurz reingeschaut. Gibts von meiner Seite keine Einwände (den Kommentar &amp;quot;Randnotiz ... leider nur Teil der Bildschirmbreite...&amp;quot; finde ich etwas befremdlich, da der Name der Vorlage ja genau das verspricht, aber das tut ja der eigentlichen Sache keinen Abbruch) - ich denke, es gibt für die Vorlage sinnvolle Einsatzgebiete, ganz nach gewünschtem Effekt / Erscheinungsbild. Es unterbricht halt den Lesefluss deutlich stärker als die Randnotiz, aber wenn das gewünscht ist, dann passts ja. --[[Benutzer:Ph1959de|Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 10:14, 7. Okt. 2015 (CEST)&lt;br /&gt;
&amp;lt;hr /&amp;gt;&lt;br /&gt;
::Sollten wir die Vorlage dann nicht auch [[FHEMWiki:%C3%9Cber_FHEMWiki#Vorlagen|hier]] aufnehmen? Falls ja, Du oder ich? Gruß, --[[Benutzer:Krikan|Christian]] ([[Benutzer Diskussion:Krikan|Diskussion]]) 10:30, 7. Okt. 2015 (CEST)&lt;br /&gt;
&amp;lt;hr/&amp;gt;&lt;br /&gt;
::Naja, &amp;quot;befremdlich&amp;quot; ;). Ich wollte nur erklären, warum ich extra eine neue Vorlage gemacht habe. Ich hätte natürlich auch die Vorlage &amp;quot;Randnotiz&amp;quot; um eine Option für die Breitenauswahl erweitern können. Grundsätzlich hätte die Randnotiz nämlich eh getan, was ich wollte. Aber das wäre etwas viel Arbeit geworden. --[[Benutzer:Drhirn|Drhirn]] ([[Benutzer Diskussion:Drhirn|Diskussion]]) 11:25, 23. Okt. 2015 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Änderung von Gliederungspunkten in Artikeln und wiki-interne Links ==&lt;br /&gt;
Hallo Peter,&lt;br /&gt;
hier [[Konfiguration]] wurde gestern ein Gliederungspunkt umbenannt. Gibt es/ Kennst Du eine einfache Möglichkeit herauszufinden, welche wiki-internen Link jetzt nicht mehr funktionieren? Bei den Spezial-Seiten finde ich dazu nichts und Google hilft mir auch nicht. Die Wiki-interne Suche ist dabei auch nicht optimal. Bisher vermeide ich aus diesem Grund auch eine Umbenennung von Gliederungspunkt. Danke und Gruß --[[Benutzer:Krikan|Christian]] ([[Benutzer Diskussion:Krikan|Diskussion]]) 09:48, 26. Okt. 2015 (CET)&lt;br /&gt;
&amp;lt;hr /&amp;gt;&lt;br /&gt;
:Hallo Christian,&lt;br /&gt;
:ich hatte die Änderung zwar kurz angeschaut, aber gar nicht an diese (möglichen) Auswirkungen gedacht. Habe (auf die Schnelle) auch nur wenig zu diesem Thema gefunden (ausser vielleicht diese Seite in [https://en.wikipedia.org/wiki/Wikipedia:Database_reports/Broken_section_anchors/Configuration Wikipedia]).&lt;br /&gt;
:Vermutlich (hoffentlich?) werden wir aber nicht allzu häufig von dieser Problematik betroffen sein, für diesen aktuellen Fall sehe ich folgende mögliche Vorgehensweisen:&lt;br /&gt;
:* Änderung der Überschrift zurücknehmen, dafür diesen Abschnitt eine Gliederungsebene tiefer (passt dann ohnehin besser in die Seitenstruktur)&lt;br /&gt;
:* Verwendung von &amp;lt;nowiki&amp;gt;{{Anker|Ankertext}}&amp;lt;/nowiki&amp;gt; mit der alten Überschrift, um das als zusätzlichen Anker einzufügen&lt;br /&gt;
:--[[Benutzer:Ph1959de|Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 11:25, 26. Okt. 2015 (CET)&lt;br /&gt;
&amp;lt;hr /&amp;gt;&lt;br /&gt;
::Hallo Peter, &lt;br /&gt;
::habe es mit 1. Ansatz umgesetzt, da mir der 2. Weg zu umständlich und (später) fehleranfällig erscheint. Obwohl ich irgendwann mal gelernt habe, dass es niemals nur einen Gliederungs-Unterpunkt gibt (halte ich hier aber auch nicht immer ein ;-) )&lt;br /&gt;
::Gruß, --[[Benutzer:Krikan|Christian]] ([[Benutzer Diskussion:Krikan|Diskussion]]) 13:33, 26. Okt. 2015 (CET)&lt;br /&gt;
&lt;br /&gt;
== Neuen Artikel verschieben/umbenenen ==&lt;br /&gt;
Hallo Peter, &lt;br /&gt;
&lt;br /&gt;
ich habe meinen ersten Artikel erstellt und würde gerne den nächsten Schritt machen. Wohin muß ich verschieben und wie gehts dann weiter. (Wiki Anfänger)&lt;br /&gt;
&lt;br /&gt;
Gruß [[Benutzer:Eisix|Eisix]] ([[Benutzer Diskussion:Eisix|Diskussion]]) 16:14, 25. Jan. 2016 (CET)&lt;br /&gt;
&amp;lt;hr /&amp;gt;&lt;br /&gt;
:Hallo Eisix,&lt;br /&gt;
:# es wäre nicht nötig gewesen, den Artikel erst auf Deiner Benutzerseite zu erstellen; so viel ist hier nicht los, dass bei einem neuen Artikel gleich Konflikte entstehen; ich glaube, nur &amp;quot;verschieben&amp;quot; geht in diesem Fall nicht so gut, daher würde ich vorschlagen:&lt;br /&gt;
:# Du gehst auf deiner Benutzerseite auf &amp;quot;Bearbeiten&amp;quot; und&lt;br /&gt;
:# fügst &amp;lt;nowiki&amp;gt;[[EnOcean MwC-32...]]&amp;lt;/nowiki&amp;gt; (die Details für die Namensfindung stehen auf der Kategorieseite [[:Kategorie:EnOcean Components]] oben rechts (ich glaube, &amp;quot;Deinen&amp;quot; Namen musst Du da noch etwas nachbearbeiten; im Zweifel [[Benutzer Diskussion:Krikan|Krikan]] fragen)) ein&lt;br /&gt;
:# Klickst auf {{Taste|Vorschau zeigen}}; daraufhin bekommst Du Deinen gewählten Seitentitel in rot in der Vorschau angezeigt; jetzt&lt;br /&gt;
:# öffnest Du diese &amp;quot;rote Seite&amp;quot; in einem neuen Browser-Tab&lt;br /&gt;
:# kopierst bzw. verschiebst den Quelltext Deiner Seite (ohne die gerade eingefügte Zeile) in das leere Editierfenster des zweiten Browser-Tabs&lt;br /&gt;
:# Dann noch ein paar Korrekturen (z.B. die korrekte Kategorie &amp;quot;EnOcean Components&amp;quot; verwenden); und schau Dir existierende (EnOcean-)Seiten (Gliederung!) an und übernimm das bitte entsprechend &lt;br /&gt;
:# Vorschau der neuen Seite anzeigen und überprüfen&lt;br /&gt;
:# wenn alles soweit stimmt, &amp;quot;Seite speichern&amp;quot;&lt;br /&gt;
:# Auf Deiner Benutzerseite kannst Du jetzt (z.B.) die Seite in (D)eine Liste der von Dir erstellten Seiten aufnehmen ... und evtl. noch ein paar Worte über Dich schreiben&lt;br /&gt;
:--[[Benutzer:Ph1959de|Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 18:18, 25. Jan. 2016 (CET)&lt;br /&gt;
&amp;lt;hr /&amp;gt;&lt;br /&gt;
: Hallo Eisix, Hallo Peter!&lt;br /&gt;
: Mische mich hier mal ein: Sind die Bildrechte für BSC-MwC-32.jpeg geklärt? Falls nein, bitte Bild nicht einbinden/löschen und gegebenenfalls eigenes Foto hochladen.&lt;br /&gt;
: Gruß, --[[Benutzer:Krikan|Christian]] ([[Benutzer Diskussion:Krikan|Diskussion]]) 19:06, 25. Jan. 2016 (CET)&lt;br /&gt;
&amp;lt;hr /&amp;gt;&lt;br /&gt;
: Hallo,&lt;br /&gt;
: @Peter ich wollte nicht wie ein Elefant im Porzellanladen durch die Wiki stapfen, dafür kenne ich mich damit zu wenig aus ;-)&lt;br /&gt;
: @Krikan guter Einwand das Bild ist von www.enocean-alliance.org wo auch die verlinkte Anleitung her ist. Eigenes Bild ist leider nicht mehr möglich da das ganze hinter einem Aquarium verbaut ist und nur mit größerem Aufwand wieder rauszuholen ist. Also nehme ich das Bild am besten wieder raus !?&lt;br /&gt;
:Gruß  --[[Benutzer:Eisix|Eisix]] ([[Benutzer Diskussion:Eisix|Diskussion]]) 10:19, 26. Jan. 2016 (CET)&lt;br /&gt;
&lt;br /&gt;
== Unterscheidung Code für DEF und .cfg ==&lt;br /&gt;
Hallo Peter!&amp;lt;BR&amp;gt;&lt;br /&gt;
habe gelesen, dass Du auf [[Ölverbrauchsanzeige_/_Betriebsstundenzähler]] den Code als .cfg-Code per Hinweis markiert hast. Bisher haben wir bei der Unterscheidung DEF,Einzeiler, aus optischen Gründen umgebrochenen Einzeiler  und .cfg Code im Wiki kein wirkliches System. Es bedarf jeweils der Interpretation. Vieles ist derzeit cfg.-Code. Eigentlich wünsche ich mir, dass wir überall einen Hinweis in den Codeboxen DEF bzw. cfg einpflegen. Das dürfte aber praktisch nicht umsetzbar sein und auch hohes Fehlerpotenzial haben. Hatte auch schon einmal einen Versuch in die Richtung unternommen, aber aufgegeben.&amp;lt;BR&amp;gt;&lt;br /&gt;
Momentan tendiere ich dazu, auf  [[Konfiguration]] einen Erläuterung einzufügen, woran man die verschiedenen Code-Varianten erkennt und die Seite -wie Du es mal geplant hattest, von allen anderen Seiten zu verlinken. Das ist mMn einfacher. Hast Du dazu eine Meinung/Idee?&amp;lt;BR&amp;gt;&lt;br /&gt;
Würde das auf ggfs. auf meine Todo-Liste setzen.&amp;lt;BR&amp;gt;&lt;br /&gt;
Gruß, --[[Benutzer:Krikan|Christian]] ([[Benutzer Diskussion:Krikan|Diskussion]]) 10:10, 16. Feb. 2016 (CET)&lt;br /&gt;
&amp;lt;hr /&amp;gt;&lt;br /&gt;
:Hallo Christian, ja, so eine grundlegende Vorgehensweise fehlt uns da noch. War mir auch bewusst, ich wollte aber in diesem konkreten Fall gleich was eintragen, weil das fehlende Wissen zu diesem Thema der Auslöser für den Forenthread war. Ich behalte das Thema auch im Hinterkopf - die zündende Idee, wie man das am besten umsetzen kann fehlt mir aber leider noch. Wer immer von uns früher dazu kommt, hat gewonnen :-) --[[Benutzer:Ph1959de|Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 12:28, 16. Feb. 2016 (CET)&lt;br /&gt;
&lt;br /&gt;
==Nochmal Begrüßungsseite==&lt;br /&gt;
Hallo Peter,&lt;br /&gt;
&lt;br /&gt;
Mein Benutzerkonto wurde gerade freigeschaltet und ich habe mich gewundert, warum die Begrüßungsseite so &amp;quot;wikipedistisch&amp;quot; ist. Sollten wir da nicht mal rangehen und eine Benutzerbegrüßung schreiben, die an das fhemwiki angepasst ist?&lt;br /&gt;
&lt;br /&gt;
Ein paar Grundlagen wie Bearbeitungshilfe würde ich auch aus Wikipedia einbinden, aber die Infoseite &amp;quot;was Wikipedia nicht ist&amp;quot; scheint mir irgendwie hier deplatziert...&lt;br /&gt;
&lt;br /&gt;
Ich würde mich dransetzen, aber brauche dann wahrscheinlich Hinweise, wo hier im fhemwiki die &amp;quot;Richtlinien&amp;quot; und andere Infos stecken, die man in der Willkommensnachricht verlinken könnte/sollte.&lt;br /&gt;
&lt;br /&gt;
Gruß, Markus --[[Benutzer:Krokofant|Krokofant]] ([[Benutzer Diskussion:Krokofant|Diskussion]]) 11:31, 5. Mär. 2016 (CET)&lt;br /&gt;
&amp;lt;hr /&amp;gt;&lt;br /&gt;
:Hallo Markus, die Begrüßungs-Vorlage ist einfach aus der Situation heraus mal entstanden. Es gab viele Neuanmeldungen von Leuten, die noch keinerlei Berührung mit Wiki(media) hatten und entsprechend gedankenlos ans Werk gegangen sind. War dann nachher mehr Aufräumarbeit nötig als dass die Mitarbeit Hilfe gewesen wäre. Dazu sind ein paar Hinweise auf Fhem-Wiki-Spezifika eingeflossen ... aber &#039;&#039;gelesen&#039;&#039; wird das Ganze leider ohnehin höchst selten, wenn man manche Beiräge hier so sieht.&lt;br /&gt;
:Aber lass Dich nicht entmutigen, Vorschläge und aktive Mitarbeit sind natürlich herzlich willkommen. &lt;br /&gt;
:Fhem-spezifische Informationen sind eigentlich komplett in Über FHEMWiki gesammelt bzw. über diese Seite zu erreichen. Wenn Du Dir die Änderungshistorie der Seite anschaust, wirst Du auch feststellen, dass das eine One-(oder Two, Krikan hilft auch mit)-Man-Show ist - von einigen &amp;quot;kurzen Strohfeuern&amp;quot; mal abgesehen. --[[Benutzer:Ph1959de|Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 12:02, 5. Mär. 2016 (CET)&lt;br /&gt;
&lt;br /&gt;
== Vorlage:News und Interwiki-Links ==&lt;br /&gt;
Hallo Peter,&lt;br /&gt;
&lt;br /&gt;
danke für die Einrichtung meines Logons.&lt;br /&gt;
# ich habe mir mal erlaubt die [[Vorlage:News]] zu Dokumentieren und dabei die Orientierung der ersten Spalte zu ändern. Ich finde es etwas irritierend beim Lesen wenn das Datum nicht auf der ersten Zeile des folgenden Eintrags steht. Ich hoffe das ist so für euch in Ordnung, ansonsten lässt sich das jederzeit wieder ändern.&amp;lt;br /&amp;gt; &amp;gt;&amp;gt; &#039;&#039;Klar; sieht jetzt besser aus und Dokumentation ist immer gut; ich sehe auch sonst keine Nachteile&#039;&#039; --[[Benutzer:Ph1959de|Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 14:45, 21. Apr. 2016 (CEST)&lt;br /&gt;
# Die Seite [[Spezial:Meiste_Interwikilinks]] ist hier leer und die [https://www.mediawiki.org/wiki/Extension:Interwiki Extension:Interwiki] scheint auch nicht installiert bzw. aktiviert zu sein. Sie gehört seit V1.21 zum Installationsbündel und müsste bei der hiesigen V1.24 also schon dabei sein. Man bräuchte sie also nur in Betrieb nehmen. Links auf die Wikipedia werden im FHEMWiki offenbar explizit als ausgeschriebene URL ausgeführt. Das ist meiner Erfahrung nach ungünstig. Auch Beiträge aus dem FHEM-Forum könnte man mit Interwikilinks konsistenter handhaben. Auch die [[Vorlage:DocLink]] lässt sich vermutlich damit einfacher gestalten.&amp;lt;br /&amp;gt; &amp;gt;&amp;gt; &#039;&#039;Wiki-seitig dürften sich da in nächster Zeit einige Änderungen ergeben, die das mit adressieren lassen. Als ich begonnen habe, die derzeitigen Links zu setzten, ging es leider nicht anders (wurde Server-seitig nicht angeboten). Da würde ich Dich einfach noch um etwas Geduld bitten - und später gern bei Dir nachhaken, nachdem Du Dich allein mit der Frage schon als Experte geoutet/qualifiziert hast :-) &#039;&#039; --[[Benutzer:Ph1959de|Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 14:45, 21. Apr. 2016 (CEST)&lt;br /&gt;
&lt;br /&gt;
Viele Grüße --[[Benutzer:MGu|MGu]] ([[Benutzer Diskussion:MGu|Diskussion]]) 13:06, 16. Apr. 2016 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Infobox Modul: Neue untergeordnete Boards Wettermodule und Kalendermodule ==&lt;br /&gt;
Hallo Peter!&lt;br /&gt;
&lt;br /&gt;
Könntest Du bei Gelegenheit bitte die Verbindung für die Infobox zu den neuen Unterboards einpflegen. Das scheint derzeit noch nicht zu funktionieren bzw. ich habe keine Ahnung wie...&amp;lt;BR&amp;gt;&lt;br /&gt;
Danke und Gruß, --[[Benutzer:Krikan|Christian]] ([[Benutzer Diskussion:Krikan|Diskussion]]) 21:56, 27. Mai 2016 (CEST)&lt;br /&gt;
&amp;lt;hr/&amp;gt;&lt;br /&gt;
:Hallo Christian...&lt;br /&gt;
:gut versteckt (hab selbst erst wieder &amp;quot;suchen&amp;quot; müssen) befindet sich die Liste der Forenboards in der Vorlage [[:Vorlage:Link2Forum|Link2Forum]]. Muss ich gelegentlich mal in der Doku zur Vorlage [[:Vorlage:Infobox Modul|Infobox Modul]] erwähnen. &lt;br /&gt;
:Habe gerade die neuen Unterboards eingefügt. --[[Benutzer:Ph1959de|Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 09:38, 28. Mai 2016 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Bitte um Kontrolle/Meinung ==&lt;br /&gt;
Hallo Peter!&amp;lt;BR&amp;gt;&lt;br /&gt;
Könntest Du bitte einmal hier [[Benutzer_Diskussion:Krueuw]] hineinschauen -falls noch nicht gesehen- und ggf. eingreifen, falls ich falsch liege und/oder etwas vergessen habe.&amp;lt;BR&amp;gt;&lt;br /&gt;
Danke und Gruß, --[[Benutzer:Krikan|Christian]] ([[Benutzer Diskussion:Krikan|Diskussion]]) 15:24, 7. Aug. 2016 (CEST)&lt;br /&gt;
:Vermutlich ist unsere Diskussion dort überholt. [[Benutzer:ThomasRamm]] hat die Artikel eben verschoben/geaendert/zusammengefasst und mir fehlt momentan darüber der Überblick. Gruß, --[[Benutzer:Krikan|Christian]] ([[Benutzer Diskussion:Krikan|Diskussion]]) 16:50, 7. Aug. 2016 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Artikel betr.: Arduino MySensors MYSENSORS ==&lt;br /&gt;
&lt;br /&gt;
Hallo Peter,&lt;br /&gt;
&lt;br /&gt;
habe eben mal etwas in den Kategorienseiten rumgestöbert um zu sehen, wo - nach meinem Geschmack und begrenztem Verständnis - eigentlich was hinsollte und bin über ein paar Dinge gestolpert, die ich gerne zur Diskussion stellen wollte. Im Detail:&lt;br /&gt;
&lt;br /&gt;
1. Unter &amp;quot;Arduino&amp;quot; finde ich nicht etwa den Hinweis, dass einige Projekte, die für FHEM eine größere Rolle spielen, Arduino-basiert sind, sondern die Beschreibung einer der Lösungen (ein FHEMduino?, der dazu noch recht alt ist und bei dem sich die verlinkten Sourcen evtl. mit heutiger SW-Umgebung gar nicht mehr compilieren lassen).&lt;br /&gt;
&lt;br /&gt;
Fragen: &lt;br /&gt;
&lt;br /&gt;
a) Sollte man die Seite nicht umbenennen (in FHEMduino?)?&lt;br /&gt;
&lt;br /&gt;
b) Eine neue Seite mit diesem Namen wäre für den interessierten Laien hilfreich, in der (mindestens) die einzelnen verfügbaren Projekte kurz aufgelistet sind (auf die Schnelle: SIGNALduino, firmata, FHEMduino, nanoCUL, MySensors, Arducounter, panstamp?...) sowie der Hinweis, dass die uC&#039;s (und auch andere uC&#039;s wie der ESP8266) mit der gleichnamigen IDE recht einfach selber programmiert werden können.&lt;br /&gt;
&lt;br /&gt;
2. Zu MySensors existieren derzeit drei Artikel: MySensors, MYSENSORS und MYSENSORS_DEVICE. &lt;br /&gt;
&lt;br /&gt;
a) Die letzteren beiden Artikel sind inhaltlich völlig ok, ich würde aber vorschlagen, die im Titel ggf. bereits als (Modul) zu kennzeichnen?&lt;br /&gt;
&lt;br /&gt;
b) Der MySensors-Artikel wäre an sich auch ok, wenn - jedenfalls aus Sicht des interessierten aber noch uniformierten Erstlesers - nicht der Eindruck entstehen würde, &lt;br /&gt;
* man bräuchte einen ESP und &lt;br /&gt;
* es handelte sich zwingend um eine IP-basierte Lösung - was es ja bei Verwendung der einfachsten Variante (Arduino als serielles GW) nicht ist!&lt;br /&gt;
Hier würde ich vorschlagen (bzw. das ggf. selbst tun), als erstes Beispiel noch ein schlichtes serielles GW zu nehmen.&lt;br /&gt;
Dann fehlt in dem Artikel m.E. nur der Verweis auf&#039;s Howto (s.u.) &lt;br /&gt;
&lt;br /&gt;
c) Unter [[:Kategorie:Other_Components]] tauchen beide mysensors-Links auf, das ist m.E. einer zu viel (der auf&#039;s Modul).&lt;br /&gt;
&lt;br /&gt;
3. M.E. fehlt dann eigentlich &amp;quot;nur noch&amp;quot; ein Howto mit den gesammelten Erkenntnissen (mein eigentlicher Job...). Wohin damit? nach [Kategorie:HOWTOS] oder nach [Kategorie:Examples]&lt;br /&gt;
&lt;br /&gt;
Bitte um Rückmeldung dazu und auch die Info, was ich ggf. davon selber machen soll/kann/darf. Ich will ja auch niemandem zu nahe treten...&lt;br /&gt;
&lt;br /&gt;
Gruß,&lt;br /&gt;
&lt;br /&gt;
Jörg&lt;br /&gt;
&amp;lt;hr /&amp;gt;&lt;br /&gt;
:Hallo Jörg,&lt;br /&gt;
:ich habe die Diskussion zur Kenntnis genommen, aber gerade nicht die Zeit, ausführlich darauf einzugehen und mich in die Artikelstruktur einzulesen. Hole ich in den nächsten Tagen nach. --[[Benutzer:Ph1959de|Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 07:21, 11. Nov. 2016 (CET)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr /&amp;gt;&lt;br /&gt;
::Hallo Peter,&lt;br /&gt;
::Danke für die Zwischeninfo. Nach meinen ersten Versuchen noch folgende Anmerkungen:&lt;br /&gt;
::*ad 1. Den Arduino-Artikel habe ich als Vorschlag umgebaut (s. Diskussion dazu), mich allerdings nicht getraut, das ohne Rücksprache &amp;quot;scharf&amp;quot; zu schalten&lt;br /&gt;
::*ad 2. Dass das Wiki erst mal davon ausgeht, dass aufgerufene Seiten auch existieren, hat mich genauso irritiert wie der Umstand, dass die URL&#039;s case-sensitive sind. So was ist mir vorher nirgends im Web aufgefallen. Ist das so beabsichtigt?&lt;br /&gt;
::*ad 3. Das Howto wird wohl kein hotwo im engeren Sinne (Anleitung), sondern eher eine Sammlung der bisherigen Erkenntnisse. Wie benennt man das am Besten? &amp;quot;Starter Guide&amp;quot; analog EnOcean?&lt;br /&gt;
&lt;br /&gt;
== verwaiste Bilder löschen? ==&lt;br /&gt;
Hallo Peter!&amp;lt;BR&amp;gt;&lt;br /&gt;
ich habe heute Bilder hochgeladen und eines davon nicht benötigt. Du hast mich auch diesbezüglich angeschrieben, aber ich finde keine Möglichkeit dies irgendwie zu löschen oder zum Löschen markieren. Ich dachte nicht verlinkte Bilder werden automatisch gelöscht!&lt;br /&gt;
Kannst du mir einen Tipp geben wie das gehen soll. Im MediaWiki habe ich gelesen ich muss hier einen Löschantrag erstellen, ist das wirklich so gemeint und wenn ja wie geht das hier?&lt;br /&gt;
--[[Benutzer:Reinhart|Reinhart]] ([[Benutzer Diskussion:Reinhart|Diskussion]]) 21:03, 5. Jan. 2017 (CET)&lt;br /&gt;
&amp;lt;hr /&amp;gt;&lt;br /&gt;
:Habe Dir auf Deiner Diskussionsseite geantwortet. --[[Benutzer:Ph1959de|Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 10:00, 6. Jan. 2017 (CET)&lt;br /&gt;
&lt;br /&gt;
== Zitierhilfe: Erweiterung Cite ==&lt;br /&gt;
Hallo,&lt;br /&gt;
&lt;br /&gt;
ich schlage vor, die ab MW Version 1.21 mitgelieferte [https://www.mediawiki.org/wiki/Extension:Cite/de Erweiterung &#039;&#039;Cite&#039;&#039;] zu aktivieren bzw. sie nachzuladen. &lt;br /&gt;
&lt;br /&gt;
Die Informationen in den Artikeln, die nicht originär vom jeweiligen Autor/Bearbeiter selbst stammen, sollten ja immer als Zitate gekennzeichnet bzw. deren Quellen vermerkt werden. &#039;&#039;Cite&#039;&#039; macht das wesentlich einfacher und unaufwändiger. &lt;br /&gt;
&lt;br /&gt;
[[Benutzer:Baumbuwe|Uwe ]] ([[Benutzer Diskussion:Baumbuwe|Diskussion]]) 16:53, 9. Jun. 2017 (CEST)&lt;br /&gt;
&lt;br /&gt;
: Hallo Peter, gibt es schon eine Meinung zu dem Vorschlag? [[Benutzer:Baumbuwe|Uwe ]] ([[Benutzer Diskussion:Baumbuwe|Diskussion]]) &lt;br /&gt;
:&amp;lt;hr /&amp;gt;&lt;br /&gt;
::Hallo Uwe, Markus hat die Extension gerade aktiviert ... kannst ja mal ausprobieren, ob es nach Deinen Vorstellungen funktioniert. --[[Benutzer:Ph1959de|Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 19:26, 26. Jul. 2017 (CEST)&lt;br /&gt;
::&amp;lt;hr /&amp;gt;&lt;br /&gt;
::: Alles prima, danke! Wenn es (wie es aussieht) die mitgelieferte Erweiterung ist, kann es nur richtig sein ;-). Vgl.: [[Telnet]].&lt;br /&gt;
:::[[Benutzer:Baumbuwe|Uwe ]] ([[Benutzer Diskussion:Baumbuwe|Diskussion]])&lt;br /&gt;
&lt;br /&gt;
== Änderung von Seitentiteln ==&lt;br /&gt;
Hi Peter,&lt;br /&gt;
weißt du wie ich einen Seitentitel ändern kann?&lt;br /&gt;
&lt;br /&gt;
panStamp Innenraumsensor  --&amp;gt; ESP8266 Innenraumsensor und -Steuerung&lt;br /&gt;
&amp;lt;hr /&amp;gt;&lt;br /&gt;
:Das &amp;quot;magic word&amp;quot; ist &amp;quot;verschieben&amp;quot; (siehe auch weiter oben auf dieser Seite). --[[Benutzer:Ph1959de|Peter]] ([[Benutzer Diskussion:Ph1959de|Diskussion]]) 10:03, 3. Aug. 2017 (CEST)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr/&amp;gt;&lt;br /&gt;
:: Danke, das wars&lt;br /&gt;
&lt;br /&gt;
== Einfügen von Links und Beispielen ==&lt;br /&gt;
&lt;br /&gt;
Hallo Peter,&lt;br /&gt;
&lt;br /&gt;
ich schlage mich gerade mit dem PRESENCE-Modul herum und würde gerne einen kurzen Verweis und einen Link auf  [https://wiki.fhem.de/wiki/FRITZBOX] FRITZBOX: Anwesenheitserkennung per regelmäßiger Abfrage über das PRESENCE Modul machen und eine Überschrift unter &#039;&#039;&#039;fritzbox - Das Überwachen von Geräten auf einer FritzBox via ctlmgr_ctl (Nur auf einer FritzBox möglich)&#039;&#039;&#039; mit dem Titel &#039;&#039;&#039;fritzbox - Anwesenheitserkennung per regelmäßiger Abfrage über das PRESENCE Modul&#039;&#039;&#039; einfügen.&lt;br /&gt;
&lt;br /&gt;
Desweiteren würde ich gerne bei https://wiki.fhem.de/wiki/UserReadings zumindest mal ein Beispiel für UserReadings einfügen, an dem ich lange gekämpft habe (Syntaxprobleme). Da geht es darum, den Textwert eines HOMEMATIC 3-State-Sensor für Fenster (close, open, tilted) in Zahlenwerte für Thingspeak umzuwandeln: attr &amp;lt;DEVICE&amp;gt; userReadings Statenum {if(ReadingsVal(&amp;quot;&amp;lt;DEVICE&amp;gt;&amp;quot;,&amp;quot;state&amp;quot;,&amp;quot;&amp;quot;) eq &amp;quot;closed&amp;quot;) {return 0} elsif (ReadingsVal(&amp;quot;&amp;lt;DEVICE&amp;gt;&amp;quot;,&amp;quot;state&amp;quot;,&amp;quot;&amp;quot;) eq &amp;quot;tilted&amp;quot;) {return 1} elsif (ReadingsVal(&amp;quot;&amp;lt;DEVICE&amp;gt;&amp;quot;,&amp;quot;state&amp;quot;,&amp;quot;&amp;quot;) eq &amp;quot;open&amp;quot;) {return 2} else {return -1}}&lt;br /&gt;
&lt;br /&gt;
Wird das diskutiert oder werden solche &amp;quot;Schönheitsreparaturen&amp;quot; einfach gemacht?&lt;/div&gt;</summary>
		<author><name>Jophb</name></author>
	</entry>
</feed>