<?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=ZDX</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=ZDX"/>
	<link rel="alternate" type="text/html" href="http://wiki.fhem.de/wiki/Spezial:Beitr%C3%A4ge/ZDX"/>
	<updated>2026-04-10T19:56:38Z</updated>
	<subtitle>Benutzerbeiträge</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>http://wiki.fhem.de/w/index.php?title=Waterkotte_heat_pump_with_Res%C3%BCmat_CD4&amp;diff=33847</id>
		<title>Waterkotte heat pump with Resümat CD4</title>
		<link rel="alternate" type="text/html" href="http://wiki.fhem.de/w/index.php?title=Waterkotte_heat_pump_with_Res%C3%BCmat_CD4&amp;diff=33847"/>
		<updated>2020-09-03T17:47:41Z</updated>

		<summary type="html">&lt;p&gt;ZDX: Add prerequisites&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox Modul&lt;br /&gt;
|ModPurpose=Control / Extract information from Waterkotte Heat pumps with Resümat CD4 controller&lt;br /&gt;
|ModType=contrib&lt;br /&gt;
|ModCmdRef=WKRCD4&lt;br /&gt;
|ModForumArea=Sonstiges&lt;br /&gt;
|ModFTopic=17658&lt;br /&gt;
|ModTechName=98_WKRCD4.pm&lt;br /&gt;
|ModOwner=StefanStrobel ({{Link2FU|3960|Forum}} / [[Benutzer:StefanStrobel|Wiki]])&lt;br /&gt;
}}&lt;br /&gt;
WKRCD4 allows to control / communicate with older heat pumps from Waterkotte that have a control unit called Resümat CD4 with an RS232 serial interface. Newer heat pumps from Waterkotte typically have a modbus interface that can be controlled with module [[ModbusAttr]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
CD4 control units with software version 7000, 8000 or 8011 can be controlled with [https://forum.fhem.de/index.php/topic,83006.msg886622.html#msg886622 another version] of the WKRCD4 module.&lt;br /&gt;
&lt;br /&gt;
== Availability == &lt;br /&gt;
The module has been checked in to the contrib area.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
This module requires Device::SerialPort or Win32::SerialPort module. Make sure to set &amp;quot;Modem-Klingelzeichen&amp;quot; and &amp;quot;Fremdzugriff&amp;quot; to the lowest possible value.&lt;br /&gt;
&lt;br /&gt;
== Define ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define &amp;lt;name&amp;gt; WKRCD4 &amp;lt;devicename@speed&amp;gt; &amp;lt;Interval&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The module connects to the heat pump through a serial interface and actively requests data from the heat pump every &amp;lt;Interval&amp;gt; seconds&lt;br /&gt;
&lt;br /&gt;
=== Example:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define WP WKRCD4 /dev/dualser0@9600 60&lt;br /&gt;
attr WP stateFormat Status&lt;br /&gt;
attr WP event-min-interval .*:3600&lt;br /&gt;
attr WP event-on-change-reading .*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuration of the module ==&lt;br /&gt;
Apart from the serial interface and the interval there is nothing that needs to be defined.&lt;br /&gt;
&lt;br /&gt;
== Get-Commands ==&lt;br /&gt;
There are only two parameters for which an explicit GET has been implemented. Most values are just readings that are automatically requested:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Hzg-TempBasisSoll&lt;br /&gt;
WW-Temp-Soll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Set-Commands ==&lt;br /&gt;
There is only one parameter that can be changed:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Hzg-TempBasisSoll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Supported readings ==&lt;br /&gt;
The module extracts the following readings from the heat pump:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Versions-Nummer       &lt;br /&gt;
Temp-Aussen           &lt;br /&gt;
Temp-Ruecklauf-Soll   &lt;br /&gt;
Temp-Ruecklauf        &lt;br /&gt;
Temp-Vorlauf          &lt;br /&gt;
Temp-WW-Soll          &lt;br /&gt;
Temp-WW               &lt;br /&gt;
Temp-Raum             &lt;br /&gt;
Temp-WQuelle-Ein      &lt;br /&gt;
Temp-WQuelle-Aus      &lt;br /&gt;
Temp-Verdampfer       &lt;br /&gt;
Temp-Kondensator      &lt;br /&gt;
Temp-Saugleitung      &lt;br /&gt;
Druck-Verdampfer      &lt;br /&gt;
Druck-Kondensator     &lt;br /&gt;
Hzg-TempEinsatz       &lt;br /&gt;
Hzg-TempBasisSoll     &lt;br /&gt;
Hzg-KlSteilheit       &lt;br /&gt;
Hzg-KlBegrenz         &lt;br /&gt;
Hzg-TempRlSoll        &lt;br /&gt;
Hzg-TempRlIst         &lt;br /&gt;
Hzg-TmpRaumSoll       &lt;br /&gt;
Hzg-RaumEinfluss      &lt;br /&gt;
Hzg-ExtAnhebung       &lt;br /&gt;
Hzg-Zeit-Ein          &lt;br /&gt;
Hzg-Zeit-Aus          &lt;br /&gt;
Hzg-AnhebungEin       &lt;br /&gt;
Hzg-AnhebungAus       &lt;br /&gt;
Hzg-St2Begrenz        &lt;br /&gt;
Hzg-Hysterese         &lt;br /&gt;
Hzg-PumpenNachl       &lt;br /&gt;
Klg-Abschaltung       &lt;br /&gt;
Klg-Temp-Einsatz      &lt;br /&gt;
Klg-TeBasisSoll       &lt;br /&gt;
Klg-KlSteilheit       &lt;br /&gt;
Klg-KlBegrenz         &lt;br /&gt;
Klg-KlSollwert        &lt;br /&gt;
Klg-Temp-Rl           &lt;br /&gt;
Ww-Abschaltung        &lt;br /&gt;
Ww-Zeit-Ein           &lt;br /&gt;
Ww-Zeit-Aus           &lt;br /&gt;
Ww-Temp-Ist           &lt;br /&gt;
Ww-Temp-Soll          &lt;br /&gt;
Ww-Hysterese          &lt;br /&gt;
Uhrzeit               &lt;br /&gt;
Datum                 &lt;br /&gt;
BetrStundenKompressor &lt;br /&gt;
BetrStundenHzgPu      &lt;br /&gt;
BetrStundenWwPu       &lt;br /&gt;
BetrStundenSt2        &lt;br /&gt;
Zeit                  &lt;br /&gt;
SetBetriebsMode       &lt;br /&gt;
Display-Zeile-1       &lt;br /&gt;
Display-Zeile-2       &lt;br /&gt;
Status-Gesamt         &lt;br /&gt;
Status-Heizung        &lt;br /&gt;
Status-Kuehlung       &lt;br /&gt;
Mode-Heizung          &lt;br /&gt;
Mode-Kuehlung         &lt;br /&gt;
Mode-Warmwasser       &lt;br /&gt;
Heizung               &lt;br /&gt;
Kuehlung              &lt;br /&gt;
Warmwasser  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Attributes ==&lt;br /&gt;
;do_not_notify&lt;br /&gt;
: ...&lt;br /&gt;
;readingFnAttributes&lt;br /&gt;
: ...  [[Kategorie:Other Components]] [[Kategorie:Heizungssteuerung]]&lt;/div&gt;</summary>
		<author><name>ZDX</name></author>
	</entry>
	<entry>
		<id>http://wiki.fhem.de/w/index.php?title=Acer_Beamer_mit_RS232&amp;diff=33374</id>
		<title>Acer Beamer mit RS232</title>
		<link rel="alternate" type="text/html" href="http://wiki.fhem.de/w/index.php?title=Acer_Beamer_mit_RS232&amp;diff=33374"/>
		<updated>2020-06-09T18:22:56Z</updated>

		<summary type="html">&lt;p&gt;ZDX: Beispieldefinitionen hinzugefügt&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox Modul&lt;br /&gt;
|ModPurpose=Ermöglicht die Steuerung von Beamern der Marke Acer über das RS232-Interface&lt;br /&gt;
|ModType=x&lt;br /&gt;
|ModCmdRef=AcerBeamer_RS232&lt;br /&gt;
|ModForumArea=Multimedia&lt;br /&gt;
|ModFTopic=95757&lt;br /&gt;
|ModTechName=70_AcerBeamer_RS232.pm&lt;br /&gt;
|ModOwner=mwllgr ({{Link2FU|34515|Forum}})&lt;br /&gt;
}}&lt;br /&gt;
[[Acer Beamer mit RS232]] können mit dem Modul 70_AcerBeamer_RS232.pm gesteuert werden. Auch Informationen wie z.B. der derzeitige Eingang können abgerufen werden.&lt;br /&gt;
&lt;br /&gt;
== Definition ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define &amp;lt;Name&amp;gt; AcerBeamer_RS232 &amp;lt;device@baudrate&amp;gt; &amp;lt;Interval&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Wenn keine Baud-Rate angegeben ist wird standardmäßig 9600 verwendet - dies sollte für die meisten Beamer auch korrekt sein.&lt;br /&gt;
Das Modul überprüft alle &#039;&#039;&amp;lt;Interval&amp;gt;&#039;&#039;-Sekunden (wenn nicht angegeben: 60) ob der Beamer derzeit eingeschaltet ist oder nicht und setzt das entsprechende Reading.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Beispieldefinitionen:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Linux&amp;lt;pre&amp;gt;&lt;br /&gt;
define Beamer AcerBeamer_RS232 /dev/ttyUSB0@9600 60&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Windows&amp;lt;pre&amp;gt;&lt;br /&gt;
define Beamer AcerBeamer_RS232 COM1@9600 60&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Readings / Get-Befehle ==&lt;br /&gt;
* lampHours - Betriebsstunden der Lampe&lt;br /&gt;
* manufacturer - Hersteller/Marke des Beamers&lt;br /&gt;
* source - Derzeit ausgewählter Eingang&lt;br /&gt;
* presence - absent/present für aus/ein (Nicht direkt als get)&lt;br /&gt;
* state - off/on (Nicht direkt als get)&lt;br /&gt;
&lt;br /&gt;
== Set-Befehle ==&lt;br /&gt;
* power&lt;br /&gt;
** on&lt;br /&gt;
** off&lt;br /&gt;
&lt;br /&gt;
* quickSettings&lt;br /&gt;
** 16:9&lt;br /&gt;
** 4:3&lt;br /&gt;
** brightness&lt;br /&gt;
** colorRgb&lt;br /&gt;
** colorTemp&lt;br /&gt;
** contrast&lt;br /&gt;
** eKey&lt;br /&gt;
** keystone&lt;br /&gt;
** language&lt;br /&gt;
&lt;br /&gt;
* remoteControl&lt;br /&gt;
** up&lt;br /&gt;
** down&lt;br /&gt;
** left&lt;br /&gt;
** right&lt;br /&gt;
** freeze&lt;br /&gt;
** hide&lt;br /&gt;
** menu&lt;br /&gt;
** mute&lt;br /&gt;
** zoom&lt;br /&gt;
** volUp&lt;br /&gt;
** volDown&lt;br /&gt;
&lt;br /&gt;
* source&lt;br /&gt;
** auto&lt;br /&gt;
** resync&lt;br /&gt;
** dsub&lt;br /&gt;
** hdmi&lt;br /&gt;
** composite&lt;br /&gt;
** svideo&lt;br /&gt;
&lt;br /&gt;
== Bekannte Probleme ==&lt;br /&gt;
Wird ein Befehl abgesetzt während eine zyklische Power-Abfrage läuft so kann es unter Umständen passieren, dass der Status des Beamers fälschlicherweise auf &amp;quot;off&amp;quot; gesetzt wird.&lt;br /&gt;
&lt;br /&gt;
Bei einigen Beamern funktionieren manche Befehle eventuell nicht, bitte im Forenthread melden, wenn Probleme auftreten.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
[http://bilder.hifi-forum.de/medium/226620/pinbelegung_195544.jpg Pinbelegung für das benötige Kabel], hifi-forum.de&lt;br /&gt;
&lt;br /&gt;
[[Kategorie:Gerätemodul]]&lt;br /&gt;
[[Kategorie:Unterhaltungselektronik]]&lt;/div&gt;</summary>
		<author><name>ZDX</name></author>
	</entry>
	<entry>
		<id>http://wiki.fhem.de/w/index.php?title=Acer_Beamer_mit_RS232&amp;diff=33070</id>
		<title>Acer Beamer mit RS232</title>
		<link rel="alternate" type="text/html" href="http://wiki.fhem.de/w/index.php?title=Acer_Beamer_mit_RS232&amp;diff=33070"/>
		<updated>2020-04-14T21:40:16Z</updated>

		<summary type="html">&lt;p&gt;ZDX: Forenbenutzer geändert&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox Modul&lt;br /&gt;
|ModPurpose=Ermöglicht die Steuerung von Beamern der Marke Acer über das RS232-Interface&lt;br /&gt;
|ModType=x&lt;br /&gt;
|ModCmdRef=AcerBeamer_RS232&lt;br /&gt;
|ModForumArea=Multimedia&lt;br /&gt;
|ModFTopic=95757&lt;br /&gt;
|ModTechName=70_AcerBeamer_RS232.pm&lt;br /&gt;
|ModOwner=mwllgr ({{Link2FU|34515|Forum}})&lt;br /&gt;
}}&lt;br /&gt;
[[Acer Beamer mit RS232]] können mit dem Modul 70_AcerBeamer_RS232.pm gesteuert werden. Auch Informationen wie z.B. der derzeitige Eingang können abgerufen werden.&lt;br /&gt;
&lt;br /&gt;
== Definition ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define &amp;lt;Name&amp;gt; AcerBeamer_RS232 &amp;lt;device@baudrate&amp;gt; &amp;lt;Interval&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Wenn keine Baud-Rate angegeben ist wird standardmäßig 9600 verwendet - dies sollte für die meisten Beamer auch korrekt sein.&lt;br /&gt;
Das Modul überprüft alle &#039;&#039;&amp;lt;Interval&amp;gt;&#039;&#039;-Sekunden (wenn nicht angegeben: 60) ob der Beamer derzeit eingeschaltet ist oder nicht und setzt das entsprechende Reading.&lt;br /&gt;
&lt;br /&gt;
== Readings / Get-Befehle ==&lt;br /&gt;
* lampHours - Betriebsstunden der Lampe&lt;br /&gt;
* manufacturer - Hersteller/Marke des Beamers&lt;br /&gt;
* source - Derzeit ausgewählter Eingang&lt;br /&gt;
* presence - absent/present für aus/ein (Nicht direkt als get)&lt;br /&gt;
* state - off/on (Nicht direkt als get)&lt;br /&gt;
&lt;br /&gt;
== Set-Befehle ==&lt;br /&gt;
* power&lt;br /&gt;
** on&lt;br /&gt;
** off&lt;br /&gt;
&lt;br /&gt;
* quickSettings&lt;br /&gt;
** 16:9&lt;br /&gt;
** 4:3&lt;br /&gt;
** brightness&lt;br /&gt;
** colorRgb&lt;br /&gt;
** colorTemp&lt;br /&gt;
** contrast&lt;br /&gt;
** eKey&lt;br /&gt;
** keystone&lt;br /&gt;
** language&lt;br /&gt;
&lt;br /&gt;
* remoteControl&lt;br /&gt;
** up&lt;br /&gt;
** down&lt;br /&gt;
** left&lt;br /&gt;
** right&lt;br /&gt;
** freeze&lt;br /&gt;
** hide&lt;br /&gt;
** menu&lt;br /&gt;
** mute&lt;br /&gt;
** zoom&lt;br /&gt;
** volUp&lt;br /&gt;
** volDown&lt;br /&gt;
&lt;br /&gt;
* source&lt;br /&gt;
** auto&lt;br /&gt;
** resync&lt;br /&gt;
** dsub&lt;br /&gt;
** hdmi&lt;br /&gt;
** composite&lt;br /&gt;
** svideo&lt;br /&gt;
&lt;br /&gt;
== Bekannte Probleme ==&lt;br /&gt;
Wird ein Befehl abgesetzt während eine zyklische Power-Abfrage läuft so kann es unter Umständen passieren, dass der Status des Beamers fälschlicherweise auf &amp;quot;off&amp;quot; gesetzt wird.&lt;br /&gt;
&lt;br /&gt;
Bei einigen Beamern funktionieren manche Befehle eventuell nicht, bitte im Forenthread melden, wenn Probleme auftreten.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
[http://bilder.hifi-forum.de/medium/226620/pinbelegung_195544.jpg Pinbelegung für das benötige Kabel], hifi-forum.de&lt;br /&gt;
&lt;br /&gt;
[[Kategorie:Gerätemodul]]&lt;br /&gt;
[[Kategorie:Unterhaltungselektronik]]&lt;/div&gt;</summary>
		<author><name>ZDX</name></author>
	</entry>
	<entry>
		<id>http://wiki.fhem.de/w/index.php?title=ModbusAttr&amp;diff=32296</id>
		<title>ModbusAttr</title>
		<link rel="alternate" type="text/html" href="http://wiki.fhem.de/w/index.php?title=ModbusAttr&amp;diff=32296"/>
		<updated>2020-01-05T15:07:53Z</updated>

		<summary type="html">&lt;p&gt;ZDX: /* All Attributes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox Modul&lt;br /&gt;
|ModPurpose=Extract information from devices with a Modbus interface or send information to such devices &lt;br /&gt;
|ModType=d&lt;br /&gt;
|ModCmdRef=ModbusAttr&lt;br /&gt;
|ModForumArea=Sonstiges&lt;br /&gt;
|ModFTopic=25315&lt;br /&gt;
|ModTechName=98_ModbusAttr.pm&lt;br /&gt;
|ModOwner=StefanStrobel ({{Link2FU|3960|Forum}} / [[Benutzer:StefanStrobel|Wiki]])&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[ModbusAttr]] uses the low level Modbus module 98_[[Modbus]].pm to provide a generic Modbus module (as master, slave, relay or passive listener) &lt;br /&gt;
that can be configured by attributes similar to the way HTTPMOD works for devices with a web interface.&lt;br /&gt;
&lt;br /&gt;
ModbusAttr can be used as a Modbus master that queries data from other devices over a serial RS232 / RS485 or TCP connection, &lt;br /&gt;
it can be used as a Modbus slave that can make readings of Fhem devices available via Modbus to external Modbus masters,&lt;br /&gt;
it can act as a Modbus relay that receives requests over one connection and forwards them over another connection (e.g. from Modbus TCP to serial Modbus RTU)&lt;br /&gt;
or it can passively listen to other devices that communicate over a serial RS485 connection and extract readings from the objects it sees.&lt;br /&gt;
The supported protocols are Modbus RTU, Modbus ASCII or Modbus TCP.&lt;br /&gt;
&lt;br /&gt;
There are several attributes that modify the way data objects are converted before they are stored in readings or sent to a device. Data can be modified by a perl expression defined in an atribute, formatted with a format string defined in another attribute or mapped to a table defined in an attribute.&lt;br /&gt;
&lt;br /&gt;
Readings can directly correspond to one data object or they can span several objects. A float value for example might be stored in two input or holding registers in the Modbus device. By specifying attributes that define the length of a reading in objects and by specifying the unpack code to get from a raw string to perl variables, all these cases can be described by attributes and no perl coding is necessary.&lt;br /&gt;
&lt;br /&gt;
== Availability == &lt;br /&gt;
The module has been checked in.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
This module uses the [[Modbus|Modbus base module 98_Modbus.pm]] which uses the DevIO module&lt;br /&gt;
&lt;br /&gt;
== Define as Modbus master == &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define &amp;lt;iodevice&amp;gt; Modbus /dev/device@baudrate,bits,parity,stop&lt;br /&gt;
define &amp;lt;name&amp;gt; ModbusAttr &amp;lt;Id&amp;gt; &amp;lt;Interval&amp;gt; &amp;lt;RTU|ASCII&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define &amp;lt;name&amp;gt; ModbusAttr &amp;lt;Id&amp;gt; &amp;lt;Interval&amp;gt; &amp;lt;Address:Port&amp;gt; &amp;lt;RTU|ASCII|TCP&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the first case the module connects to the external Modbus device with Modbus Id &amp;lt;Id&amp;gt; through a serial modbus device (RS232 or RS485).&lt;br /&gt;
&lt;br /&gt;
In the second case it connects directly through Modbus TCP or Modbus RTU or ASCII over TCP.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;Interval&amp;gt; is not 0 then the module actively requests data from that device every &amp;lt;Interval&amp;gt; seconds.&lt;br /&gt;
&lt;br /&gt;
The objects that the module should request and the readings it should create from these objects have to be defined with attributes (see below). &lt;br /&gt;
These attributes will define a mapping from so called &amp;quot;coils&amp;quot;, &amp;quot;digital inputs&amp;quot;, &amp;quot;input registers&amp;quot; or &amp;quot;holding registers&amp;quot; of the external device to readings inside Fhem together with the data type and format of the values.&lt;br /&gt;
Interval can be 0 in which case the Module only requests data when it is triggered with a Fhem get-Command.&lt;br /&gt;
With this mode a Fhem installation can for example query sensor data from a heating system, energy meter or solar power installation if these systems offer a Modbus interface.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define ModbusLine Modbus /dev/ttyUSB1@9600&lt;br /&gt;
define WP ModbusAttr 1 60&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Define WP as a Modbus master that communicates through the Modbus serial interface device named ModbusLine. The protocol defaults to Modbus RTU&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define ModbusLine Modbus /dev/ttyUSB1@9600&lt;br /&gt;
define WP ModbusAttr 20 0 ASCII&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Define WP as a Modbus master that communicates through the Modbus serial interface device named ModbusLine with Modbus ASCII. &lt;br /&gt;
Use Modbus Id 20 and don&#039;t query the device in a defined interval. Instead individual SET / GET options have to be used for communication.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define WP ModbusAttr 5 60 192.168.1.122:502 TCP&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to talk Modbus TCP to a device with IP-Address 192.168.1.122 and the reserved port for Modbus TCP 502&lt;br /&gt;
Note that for Modbus over a TCP connection you don&#039;t need a basic Modbus device for the interface like ModbusLine above. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define WP ModbusAttr 3 60 192.168.1.122:8000 RTU&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to talk Modbus RTU over TCP and use the port number 8000&lt;br /&gt;
    &lt;br /&gt;
== Define as Modbus slave == &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define &amp;lt;name&amp;gt; ModbusAttr &amp;lt;Id&amp;gt; slave&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define &amp;lt;name&amp;gt; ModbusAttr &amp;lt;Id&amp;gt; slave &amp;lt;Address:Port&amp;gt; &amp;lt;RTU|ASCII|TCP&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module waits for connections from other Modbus masters. It will respond to their requests if the requests contain the given Modbus &amp;lt;Id&amp;gt;&lt;br /&gt;
To provide data with Modbus to external Modbus masters a mapping needs to be defined using attributes. &lt;br /&gt;
These attributes will define a mapping from Readings inside Fhem to so called &amp;quot;coils&amp;quot;, &amp;quot;digital inputs&amp;quot;, &amp;quot;input registers&amp;quot; or &amp;quot;holding registers&amp;quot; and their Modbus object address together with the data type and format of the values.&lt;br /&gt;
With this mode a Fhem installation can for example supply data to a PLC that actively reads data from Fhem or writes data to Fhem readings.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define MRS485 Modbus /dev/ttyUSB2@9600,8,E,1&lt;br /&gt;
define Data4PLC ModbusAttr 1 slave&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Define Data4PLC as a Modbus slave that communicates through the Modbus serial interface device named MRS485 to listen for Modbus requests with Id 1. The protocol defaults to Modbus RTU&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define MRS485 Modbus /dev/ttyUSB2@9600,8,E,1&lt;br /&gt;
define Data4PLC ModbusAttr 20 slave ASCII&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to listen for Modbus requests with Id 20 with Modbus ASCII. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define Data4PLC ModbusAttr 5 slave 192.168.1.2:502 TCP&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to start listening to TCP port 502 on the local address 192.168.1.2. Modbus TCP will be used as protocol and Requests with Modbus Id 5 will be answered.&lt;br /&gt;
&lt;br /&gt;
Please be aware that opening a port number smaller than 1024 needs root permissions on Unix devices. So it is probably better to use a non standard port number above 1024 instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define Data4PLC ModbusAttr 3 slave 192.168.1.2:8000 RTU&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to listen to the local port 8000 and talk Modbus RTU over TCP&lt;br /&gt;
&lt;br /&gt;
== Define as Modbus passive listener == &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define &amp;lt;name&amp;gt; ModbusAttr &amp;lt;Id&amp;gt; passive &amp;lt;RTU|ASCII|TCP&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module listens on a serial (RS485) connection for modbus communication with the given Modbus &amp;lt;Id&amp;gt; and extracts readings. It does not send requests by itself but waits for another master to communicate with a slave. So only objects that the other master requests can be seen by Fhem in this configuration. &lt;br /&gt;
The objects that the module recognizes and the readings that it should create from these objects have to be defined with attributes (see below) in the same way as for a Modbus master. &lt;br /&gt;
These attributes will define a mapping from so called &amp;quot;coils&amp;quot;, &amp;quot;digital inputs&amp;quot;, &amp;quot;input registers&amp;quot; or &amp;quot;holding registers&amp;quot; of the external device to readings inside Fhem together with the data type and format of the values.&lt;br /&gt;
With this mode a Fhem installation can for example Listen to the communication between an energy counter as slave and a solar control system as master if they use Modbus RTU over RS485. Since only one Master is allowed when using Modbus over serial lines, Fhem can not be master itself. As a passive listener it can however see when the master queries e.g. the current power consumption and then also see the reply from the energy meter and store the value in a Fhem reading.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define MB-485 Modbus /dev/ttyUSB2&lt;br /&gt;
define WP ModbusAttr 1 passive&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to passively listen for Modbus requests and replies with Id 1 over a serial interface managed by an already defined basic modbus device named MB-485. The protocol defaults to Modbus RTU&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define MB-485 Modbus /dev/ttyUSB2&lt;br /&gt;
define WP ModbusAttr 20 passive ASCII&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to passivel listen for Modbus requests / replies with Id 20 and Modbus ASCII. &lt;br /&gt;
&lt;br /&gt;
== Define as Modbus relay == &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define &amp;lt;name&amp;gt; ModbusAttr &amp;lt;Id&amp;gt; relay to &amp;lt;FhemMasterDevice&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define &amp;lt;name&amp;gt; ModbusAttr &amp;lt;Id&amp;gt; relay &amp;lt;Address:Port&amp;gt; &amp;lt;RTU|ASCII|TCP&amp;gt; to &amp;lt;FhemMasterDevice&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module waits for connections from other Modbus masters. It will forward requests if they match the given Modbus &amp;lt;Id&amp;gt; to an already defined Modbus Master device inside Fhem which will send them to its defined slave, take the reply and the pass it back to the original Master.&lt;br /&gt;
With this mode a Fhem installation can for example be used in front of a device that only speaks Modbus RTU over RS485 to make it available via Modbus TCP over the local network. &lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define MB-485 Modbus /dev/ttyUSB2&lt;br /&gt;
define Heating ModbusAttr 22 0&lt;br /&gt;
define Relay ModbusAttr 33 relay 192.168.1.2:1502 TCP to Heating&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Defines MB-485 as a base device for the RS-485 communication with a heating system, &lt;br /&gt;
defines Heating as a Modbus Master to communicate with the Heating and its Modbus ID 22, &lt;br /&gt;
and then defines the relay which listens to the local IP address 192.168.1.2, TCP port 1502, Modbus Id 33 and protocol Modbus-TCP.&lt;br /&gt;
Requests coming in through Modbus TCP and port 1502 are then translated to Modbus RTU and forwarded via RS-485 to the heating system with Modbus Id 22. &lt;br /&gt;
&lt;br /&gt;
or (unlikely)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define MB-232 Modbus /dev/ttyUSB2@19200&lt;br /&gt;
define Solar ModbusAttr 7 0 192.168.1.122:502 RTU&lt;br /&gt;
define PLC2NetRelay ModbusAttr 1 ASCII relay to Solar&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Defines MB-232 as a base device for the RS-232 communication with a PLC as Modbus master, &lt;br /&gt;
defines Solar as a Modbus Master to communicate with Modbus TCP to a Solar power system at IP Adrress 192.168.1.122 and its Modbus ID 7, &lt;br /&gt;
and then defines the PLC2NetRelay as a relay which listens to Modbus-ASCII requests over the serial RS-232 link from a PLC to Modbus ID 1.&lt;br /&gt;
Requests to Modbus Id 1 coming in through the serial link are then translated to Modbus TCP and forwarded over the network to the solar power system with Modbus Id 7. &lt;br /&gt;
&lt;br /&gt;
== Configuration of the module as master or passive listener == &lt;br /&gt;
&lt;br /&gt;
Data objects (holding registers, input registers, coils or discrete inputs) are defined using attributes. &lt;br /&gt;
If Fhem is Modbus master or passive listener, the attributes assign data objects of external devices (heating systems, power meters, PLCs or other) with their register addresses to readings inside fhem and control how these readings are calculated from the raw values and how they are formatted.&lt;br /&gt;
Please be aware that Modbus does not define common data types so the representation of a value can be very different from device to device. One device might make a temperature value avaliable as a floating point value that is stored in two holding resgisters, another device might store the temperature multiplied with 10 as an signed integer in one register. Even the order of bytes can vary.&lt;br /&gt;
Therefore it is typically necessary to specify the data representation as a Perl unpack code.&lt;br /&gt;
A Modbus master can also write values to Objects in the device and attributes define how this is done.&lt;br /&gt;
&lt;br /&gt;
Example for a Modbus master or passive configuration:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define PWP ModbusAttr 5 30&lt;br /&gt;
attr PWP obj-h256-reading Temp_Wasser_ein&lt;br /&gt;
attr PWP obj-h256-expr $val/10&lt;br /&gt;
&lt;br /&gt;
attr PWP obj-h258-reading Temp_Wasser_Aus&lt;br /&gt;
attr PWP obj-h258-expr $val/10&lt;br /&gt;
&lt;br /&gt;
attr PWP obj-h262-reading Temp_Luft&lt;br /&gt;
attr PWP obj-h262-expr $val / 10&lt;br /&gt;
&lt;br /&gt;
attr PWP obj-h770-reading Temp_Soll&lt;br /&gt;
attr PWP obj-h770-expr $val / 10&lt;br /&gt;
attr PWP obj-h770-set 1&lt;br /&gt;
attr PWP obj-h770-setexpr $val * 10&lt;br /&gt;
attr PWP obj-h770-max 32&lt;br /&gt;
attr PWP obj-h770-min 10&lt;br /&gt;
attr PWP obj-h770-hint 8,10,20,25,28,29,30,30.5,31,31.5,32&lt;br /&gt;
&lt;br /&gt;
attr PWP dev-h-combine 5&lt;br /&gt;
attr PWP dev-h-defPoll 1&lt;br /&gt;
attr PWP dev-h-defUnpack n&lt;br /&gt;
&lt;br /&gt;
attr PWP room Pool-WP&lt;br /&gt;
attr PWP stateFormat {sprintf(&amp;quot;%.1f Grad&amp;quot;, ReadingsVal($name,&amp;quot;Temp_Wasser_Ein&amp;quot;,0))}&lt;br /&gt;
attr PWP webCmd Temp_Soll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Attributes to define data objects start with obj- followed by a code that identifies the type and address&lt;br /&gt;
of the data object. &lt;br /&gt;
&lt;br /&gt;
Modbus devices offer the following types of data objects: &lt;br /&gt;
&lt;br /&gt;
;holding registers (16 bit objects that can be read and written)&lt;br /&gt;
;input registers (16 bit objects that can only be read)&lt;br /&gt;
;coils (single bit objects that can be read and written)&lt;br /&gt;
;discrete inputs (single bit objects that can only be read)&lt;br /&gt;
&lt;br /&gt;
The module uses the first character of these data object types to define attributes. &lt;br /&gt;
Thus h770 refers to a holding register with the decimal address 770 and c120 refers to a coil with address 120. &lt;br /&gt;
The address has to be specified as pure decimal number. The address counting starts at address 0&lt;br /&gt;
&lt;br /&gt;
Please note that the documentation for devices sometimes uses different numbering. They might start counting with one instead of zero so if a voltage value is stored in input register number 107 according to the documentation of the device, it might technically mean register number 106 (in the Modbus protocol specification addresses start with 0).&lt;br /&gt;
Also some vendors use hexadecimal descriptions of their register addresses. So input register 107 might be noted as hex and means 263 or even 262 as decimal address.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
attr PWP obj-h258-reading Temp_Wasser_Aus&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
defines a reading with the name Temp_Wasser_Aus that is read from the Modbus holding register at address 258.&lt;br /&gt;
With the attribute ending on &amp;lt;code&amp;gt;-expr&amp;lt;/code&amp;gt; you can define a perl expression to do some conversion or calculation on the raw value read from the device. &lt;br /&gt;
In the above example the raw value has to be devided by 10 to get the real value. If the raw value is also the final value then no &amp;lt;code&amp;gt;-expr&amp;lt;/code&amp;gt; attribute is necessary. &lt;br /&gt;
&lt;br /&gt;
An object attribute ending on &amp;lt;code&amp;gt;-set&amp;lt;/code&amp;gt; creates a fhem set option. &lt;br /&gt;
In the above example the reading Temp_Soll can be changed to 12 degrees by the user with the fhem command &amp;lt;code&amp;gt;set PWP Temp_Soll 12&amp;lt;/code&amp;gt;&lt;br /&gt;
The object attributes ending on &amp;lt;code&amp;gt;-min&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-max&amp;lt;/code&amp;gt; define min and max values for input validation &lt;br /&gt;
and the attribute ending on &amp;lt;code&amp;gt;-hint&amp;lt;/code&amp;gt; will tell fhem to create a selection list so the user can graphically select the defined values.&lt;br /&gt;
&lt;br /&gt;
To define general properties of the device you can specify attributes starting with &amp;lt;code&amp;gt;dev-&amp;lt;/code&amp;gt;. &lt;br /&gt;
E.g. with &amp;lt;code&amp;gt;dev-timing-timeout&amp;lt;/code&amp;gt; you can specify the timeout when waiting for a response from the device. &lt;br /&gt;
With &amp;lt;code&amp;gt;dev-h-&amp;lt;/code&amp;gt; you can specify several default values or general settings for all holding registers &lt;br /&gt;
like the function code to be used when reading or writing holding registers. &lt;br /&gt;
These attributes are optional and the module will use defaults that work in most cases. &lt;br /&gt;
&amp;lt;code&amp;gt;dev-h-combine 5&amp;lt;/code&amp;gt; for example allows the module to combine read requests to objects having an address that differs 5 or less into one read request. &lt;br /&gt;
Without setting this attribute the module will start individual read requests for each object. &lt;br /&gt;
Typically the documentation for the modbus interface of a given device states the maximum number of objects that can be read in one function code 3 request.&lt;br /&gt;
&amp;lt;code&amp;gt;dev-h-defUnpack n&amp;lt;/code&amp;gt; means that the values in this example that the values are stored as unsigned short (16-bit) in &amp;quot;network&amp;quot; (big-endian) order. This is only one possibility of many. An integer value might be signed instead of unsigned or it might use different byte ordering (e.g. unpack codes v or s). &lt;br /&gt;
&lt;br /&gt;
== Handling Data Types == &lt;br /&gt;
&lt;br /&gt;
The Modbus protocol does not define data types. If the documentation of a device states that for example the current temperature is stored in holding register 102 this leaves room for many interpretations. Not only can the address 102 mean different things (actually decimal 102 or rather 101 if the vendor starts counting at 1 instead of 0 or even 257 or 258 if the vendor used hexadecimal addresses in his documentation ) also the data representation can be many different things. As in every programming language, there are many ways to represent numbers. They can be stored signed or unsigned, they can be integers or floating point numbers, the byte-order can be &amp;quot;big endian&amp;quot; or &amp;quot;small endian&amp;quot;, the value can be stored in one holding register or in two holding registers (floating point numbers typically take four bytes which means two holding registers).&lt;br /&gt;
The Modbus module allows flexible configuration of data representations be assigning a Perl unpack-code, a length, a Perl Expression, and the register ordering. The following example illustrates how this can be done:        &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
attr PWP obj-h338-reading Pressure&lt;br /&gt;
attr PWP obj-h338-len 2&lt;br /&gt;
attr PWP obj-h338-unpack f&amp;gt;&lt;br /&gt;
attr PWP obj-h338-revRegs 1&lt;br /&gt;
attr PWP obj-h338-format %.2f&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In This example a floating point value for the reading &amp;quot;Pressure&amp;quot; is read from the holding registers starting at address 338. &lt;br /&gt;
The value occupies 32 Bits and is therefore stored in two registers. The Perl pack code to use is f&amp;gt; which means a native single precision float in big endian format (byte order). With revRegs the module is instructed to reverse the order of the registers directly after reading. The format specification then defines how the value is formatted into a reading - in this case with two digits after the comma. See http://perldoc.perl.org/functions/pack.html for Perl pack / unpack codes and http://perldoc.perl.org/functions/sprintf.html for format specifications.&lt;br /&gt;
&lt;br /&gt;
If you need to read / write many objects for a device, defining all these parameters each time is not elegant. The Modbus module therefore offers twi ways to simplify this task: &lt;br /&gt;
You can define defaults for every type of object or you can define your own data types once and then refer to them.&lt;br /&gt;
This exampe shows how defaults can be specified for holding registers and input registers:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
attr PWP dev-h-defUnpack f&amp;gt;&lt;br /&gt;
attr PWP dev-h-defLen 2&lt;br /&gt;
attr PWP dev-h-defRevRegs 1&lt;br /&gt;
attr PWP dev-h-defFormat %.2f&lt;br /&gt;
&lt;br /&gt;
attr PWP dev-i-defUnpack n&lt;br /&gt;
attr PWP dev-i-defLen 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The next example shows how you can define your own data types and then apply them to objects:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
attr WP dev-type-VT_R4-format %.1f&lt;br /&gt;
attr WP dev-type-VT_R4-len 2&lt;br /&gt;
attr WP dev-type-VT_R4-revRegs 1&lt;br /&gt;
attr WP dev-type-VT_R4-unpack f&amp;gt;&lt;br /&gt;
&lt;br /&gt;
attr WP obj-h1234-reading Temp_In&lt;br /&gt;
attr WP obj-h1234-type VT_R4&lt;br /&gt;
attr WP obj-h1236-reading Temp_Out&lt;br /&gt;
attr WP obj-h1236-type VT_R4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This example defines a data type with the name VT_R4 which uses an unpack code of f&amp;gt;, length 2 and reversed register ordering. It then assigns this Type to the objects Temp_In and Temp_Out.&lt;br /&gt;
&lt;br /&gt;
== Configuration of the module as Modbus slave == &lt;br /&gt;
&lt;br /&gt;
Data objects that the module offers to external Modbus masters (holding registers, input registers, coils or discrete inputs) are defined using attributes. &lt;br /&gt;
If Fhem is Modbus slave, the attributes assign readings of Fhem devices to Modbus objects with their addresses and control how these objects are calculated from the reading values that exist in Fhem.&lt;br /&gt;
It is also possible to allow an external Modbus master to send write function codes and change the value of readings inside Fhem.&lt;br /&gt;
&lt;br /&gt;
Example for a Modbus slave configuration:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define MRS485 Modbus /dev/ttyUSB2@9600,8,E,1&lt;br /&gt;
define Data4PLC ModbusAttr 1 slave&lt;br /&gt;
attr Data4PLC IODev MRS485&lt;br /&gt;
&lt;br /&gt;
attr Data4PLC obj-h256-reading THSensTerrasse:temperature&lt;br /&gt;
attr Data4PLC obj-h256-unpack f&lt;br /&gt;
attr Data4PLC obj-h256-len 2&lt;br /&gt;
&lt;br /&gt;
attr Data4PLC obj-h258-reading THSensTerrasse:humidity&lt;br /&gt;
attr Data4PLC obj-h258-unpack f&lt;br /&gt;
attr Data4PLC obj-h258-len 2&lt;br /&gt;
&lt;br /&gt;
attr Data4PLC obj-h260-reading myDummy:limit&lt;br /&gt;
attr Data4PLC obj-h260-unpack n&lt;br /&gt;
attr Data4PLC obj-h260-len 1&lt;br /&gt;
attr Data4PLC obj-h260-allowWrite 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example Fhem allows an external Modbus master to read the temperature of a Fhem device named THSensTerrasse through holding register 256 and the humidity of that Fhem device through holding register 258. Both are encoded as floting point values that span two registers. &lt;br /&gt;
The master can also read but also write the reading named limit of the device myDummy.&lt;br /&gt;
&lt;br /&gt;
== Set-Commands ==&lt;br /&gt;
can be defined for holding registers and coils by using attributes.&lt;br /&gt;
&lt;br /&gt;
Every object for which an attribute like &amp;lt;code&amp;gt;obj-xy-set&amp;lt;/code&amp;gt; is set to 1 will create a valid set option.&lt;br /&gt;
&lt;br /&gt;
Additionally the attribute &amp;lt;code&amp;gt;enableControlSet&amp;lt;/code&amp;gt; enables the set options &amp;lt;code&amp;gt;interval&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;stop&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;reread&amp;lt;/code&amp;gt; as well as &amp;lt;code&amp;gt;scanModbusObjects&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;scanStop&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;scanModbusIds&amp;lt;/code&amp;gt; (for devices connected with RTU / ASCII over a serial line).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;interval &amp;amp;lt;Interval&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:modifies the interval that was set during define. &lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;stop&amp;lt;/code&amp;gt;&lt;br /&gt;
:stops the interval timer that is used to automatically poll objects through Modbus.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt;&lt;br /&gt;
:starts the interval timer that is used to automatically poll objects through Modbus. &lt;br /&gt;
:If an interval is specified during the define command then the interval timer is started automatically. &lt;br /&gt;
:However if you stop it with the command &amp;lt;code&amp;gt;set &amp;amp;lt;mydevice&amp;amp;gt; stop&amp;lt;/code&amp;gt; &lt;br /&gt;
:then you can start it again with &amp;lt;code&amp;gt;set &amp;amp;lt;mydevice&amp;amp;gt; start&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;reread&amp;lt;/code&amp;gt;&lt;br /&gt;
:causes a read of all objects that are set to be polled in the defined interval. The interval timer is not modified.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;scanModbusObjects &amp;amp;lt;startObj&amp;amp;gt; - &amp;amp;lt;endObj&amp;amp;gt; &amp;amp;lt;reqLen&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:scans the device objects and automatically creates attributes for each reply it gets. &lt;br /&gt;
:This might be useful for exploring devices without proper documentation. &lt;br /&gt;
:The following example starts a scan and queries the holding registers with addresses between 100 and 120. &lt;br /&gt;
:&amp;lt;code&amp;gt;set MyModbusAttrDevice scanModbusObjects h100-120&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
:For each reply it gets, the module creates a reading like&lt;br /&gt;
:&amp;lt;code&amp;gt;scan-h100 hex=0021, string=.!, s=8448, s&amp;gt;=33, S=8448, S&amp;gt;=33&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
:the representation of the result as hex is 0021 and&lt;br /&gt;
:the ASCII representation is .!. s, s&amp;gt;, S and S&amp;gt; are different representations with their Perl pack-code.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;scanModbusIds &amp;amp;lt;startId&amp;amp;gt; - &amp;amp;lt;endId&amp;amp;gt; &amp;amp;lt;knownObj&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:scans for Modbus Ids on an RS485 Bus. The following set command for example starts a scan:&amp;lt;br&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;set Device scanModbusId 1-7 h770&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
:since many Modbus devices don&#039;t reply at all if an object is requested that does not exist, &lt;br /&gt;
:scanModbusId needs the adress of an object that is known to exist.&lt;br /&gt;
:If a device with Id 5 replies to a read request for holding register 770, a reading like the following will be created:&lt;br /&gt;
:&amp;lt;code&amp;gt;scanId-5-Response-h770 hex=0064, string=.d, s=25600, s&amp;gt;=100, S=25600, S&amp;gt;=100&amp;lt;/code&amp;gt;&lt;br /&gt;
;&amp;lt;code&amp;gt;scanStop&amp;lt;/code&amp;gt;&lt;br /&gt;
:stops any running scans.&lt;br /&gt;
;saveAsModule &amp;lt;name&amp;gt;&lt;br /&gt;
:experimental: saves the definitions of obj- and dev- attributes in a new fhem module file as /tmp/98_ModbusGen&amp;lt;name&amp;gt;.pm.&lt;br /&gt;
:if this file is copied into the fhem module subdirectory (e.g. /opt/fhem/FHEM) and fhem is restarted then instead of defining a device&lt;br /&gt;
:as ModbusAttr with all the attributes to define objects, you can just define a device of the new type ModbusGen&amp;lt;name&amp;gt; and all the &lt;br /&gt;
:objects will be there by default. However all definitions can still be changed / overriden with the attribues defined in ModbusAttr if needed.&lt;br /&gt;
&lt;br /&gt;
== Get-Commands ==&lt;br /&gt;
&lt;br /&gt;
Every reading can be manually requested by a Get. &lt;br /&gt;
Internally a Get command triggers the corresponding Modbus request to the device and the module then interprets the data and sets the right Fhem readings. To avoid huge option lists in FHEMWEB, the objects visible as Get in FHEMWEB can be defined by setting an attribute &amp;lt;code&amp;gt;obj-xy-showGet&amp;lt;/code&amp;gt; to 1.&lt;br /&gt;
&lt;br /&gt;
== All Attributes ==&lt;br /&gt;
&lt;br /&gt;
;readingFnAttributes&lt;br /&gt;
:the usual Fhem attributes for all devices&lt;br /&gt;
&lt;br /&gt;
;alignTime&lt;br /&gt;
:Aligns each periodic read request for the defined interval to this base time. &lt;br /&gt;
:This is typcally something like 00:00 (see the Fhem at command)&lt;br /&gt;
&lt;br /&gt;
;enableControlSet&lt;br /&gt;
:enables the built in set commands like interval, stop, start and reread (see above)        &lt;br /&gt;
&lt;br /&gt;
the following list of attributes can be applied to any data object by specifying the objects type and address in the variable part. &lt;br /&gt;
For many attributes you can also specify default values per object type (see dev- attributes later) or you can specify an object attribute without type and address (e.g. obj-len) which then applies as default for all objects:&lt;br /&gt;
&lt;br /&gt;
;obj-[cdih][1-9][0-9]*-reading &lt;br /&gt;
:define the name of a reading that corresponds to the Modbus data object of type c,d,i or h and a decimal address (e.g. obj-h225-reading).&lt;br /&gt;
	&lt;br /&gt;
;obj-[cdih][1-9][0-9]*-name &lt;br /&gt;
:defines an optional internal name of this data object (this has no meaning for fhem and serves mainly documentation purposes.&lt;br /&gt;
&lt;br /&gt;
;obj-[cdih][1-9][0-9]*-set &lt;br /&gt;
:if set to 1 then this data object can be changed (works only for holding registers and coils since discrete inputs and input registers can not be modified by definition.&lt;br /&gt;
&lt;br /&gt;
;obj-[cdih][1-9][0-9]*-min &lt;br /&gt;
:defines a lower limit to the value that can be written to this data object. This ist just used for input validation.&lt;br /&gt;
&lt;br /&gt;
;obj-[cdih][1-9][0-9]*-max &lt;br /&gt;
:defines an upper limit to the value that can be written to this data object. This ist just used for input validation.&lt;br /&gt;
&lt;br /&gt;
;obj-[cdih][1-9][0-9]*-hint &lt;br /&gt;
:this is used for set options and tells fhemweb what selection to display for the set option (list or slider etc.)&lt;br /&gt;
&lt;br /&gt;
;obj-[cdih][1-9][0-9]*-expr &lt;br /&gt;
:defines a perl expression that converts the raw value read from the device.&lt;br /&gt;
&lt;br /&gt;
;obj-[cdih][1-9][0-9]*-ignoreExpr&lt;br /&gt;
:defines a perl expression that returns 1 if a value should be ignored and the existing reading should not be modified&lt;br /&gt;
&lt;br /&gt;
;obj-[cdih][1-9][0-9]*-map &lt;br /&gt;
:defines a map to convert values read from the device to more convenient values when the raw value is read from the device or back when the value to write has to be converted from the user value to a raw value that can be written. Example: 0:mittig, 1:oberhalb, 2:unterhalb &lt;br /&gt;
&lt;br /&gt;
;obj-[cdih][1-9][0-9]*-setexpr &lt;br /&gt;
:defines a perl expression that converts the user specified value in a set to a raw value that can be sent to the device. This is typically the inversion of -expr above.&lt;br /&gt;
&lt;br /&gt;
;obj-[cdih][1-9][0-9]*-format &lt;br /&gt;
:defines a format string to format the value read e.g. %.1f&lt;br /&gt;
&lt;br /&gt;
;obj-[cdih][1-9][0-9]*-len &lt;br /&gt;
:defines the length of the data object in registers. It defaults to 1. Some devices store 32 bit floating point values in two registers. In this case you can set this attribute to two.&lt;br /&gt;
&lt;br /&gt;
;obj-[cdih][1-9][0-9]*-unpack &lt;br /&gt;
:defines the unpack code to convert the raw data string read from the device to a reading. For an unsigned integer in big endian format this would be &amp;quot;n&amp;quot;, for a signed 16 bit integer in big endian format this would be &amp;quot;s&amp;gt;&amp;quot; and for a 32 bit big endian float value this would be &amp;quot;f&amp;gt;&amp;quot;. (see the perl documentation of the pack function).&lt;br /&gt;
&lt;br /&gt;
;obj-[cdih][1-9][0-9]*-revRegs&lt;br /&gt;
:this is only applicable to objects that span several input registers or holding registers.&lt;br /&gt;
:when they are read then the order of the registers will be reversed before &lt;br /&gt;
:further interpretation / unpacking of the raw register string. &lt;br /&gt;
:The same happens before the object is written with a set command.&lt;br /&gt;
&lt;br /&gt;
;obj-[cdih][1-9][0-9]*-bswapRegs&lt;br /&gt;
:this is applicable to objects that span several input or holding registers.&lt;br /&gt;
:After the registers have been read and before they are writtem, &lt;br /&gt;
:all 16-bit values are treated big-endian and are reversed to little-endian by swapping the two 8 bit bytes. &lt;br /&gt;
:This functionality is most likely used for reading (ASCII) strings from the device &lt;br /&gt;
:that are stored as big-endian 16-bit values.&lt;br /&gt;
:example: original reading is &amp;quot;324d3130203a57577361657320722020&amp;quot;. After applying bswapRegs, &lt;br /&gt;
:the value will be &amp;quot;4d3230313a2057576173736572202020&amp;quot; which will result in the ASCII string &lt;br /&gt;
:&amp;quot;M201: WWasser   &amp;quot;. &lt;br /&gt;
:Should be used with &amp;quot;(a*)&amp;quot; as -unpack value.&lt;br /&gt;
&lt;br /&gt;
;obj-[cdih][1-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 &lt;br /&gt;
: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;
&lt;br /&gt;
;obj-[cdih][1-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 &lt;br /&gt;
: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;
&lt;br /&gt;
;obj-[cdih][1-9][0-9]*-showGet &lt;br /&gt;
:every reading can also be requested by a get command. However these get commands are not automatically offered in fhemweb. By specifying this attribute, the get will be visible in fhemweb.&lt;br /&gt;
&lt;br /&gt;
;obj-[cdih][1-9][0-9]*-poll&lt;br /&gt;
:if set to 1 then this obeject is included in the cyclic update request as specified in the define command. If not set, then the object can manually be requested with a get command, but it is not automatically updated each interval. Note that this setting can also be specified as default for all objects with the dev- atributes described later.&lt;br /&gt;
&lt;br /&gt;
;obj-[cdih][1-9][0-9]*-polldelay &lt;br /&gt;
:this attribute allows to poll objects at a lower rate than the interval specified in the define command. you can either specify a time in seconds or number prefixed by &amp;quot;x&amp;quot; which means a multiple of the interval of the define command. if you specify a normal numer then it is interpreted as minimal time between the last read and another automatic read. Please note that this does not create an individual interval timer. Instead the normal interval timer defined by the interval of the define command will check if this reading is due or not yet. So the effective interval will always be a multiple of the interval of the define.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;dev-([cdih]-)*read &lt;br /&gt;
:specifies the function code to use for reading this type of object. The default is 3 for holding registers, 1 for coils, 2 for discrete inputs and 4 for input registers.&lt;br /&gt;
&lt;br /&gt;
;dev-([cdih]-)*write &lt;br /&gt;
:specifies the function code to use for writing this type of object. The default is 6 for holding registers and 5 for coils. Discrete inputs and input registers can not be written by definition.&lt;br /&gt;
&lt;br /&gt;
;dev-([cdih]-)*combine &lt;br /&gt;
:defines how many adjacent objects can be read in one request. If not specified, the default is 1&lt;br /&gt;
&lt;br /&gt;
;dev-([cdih]-)*defLen &lt;br /&gt;
:defines the default length for this object type. If not specified, the default is 1&lt;br /&gt;
&lt;br /&gt;
;dev-([cdih]-)*defFormat &lt;br /&gt;
:defines a default format string to use for this object type in a sprintf function on the values read from the device.&lt;br /&gt;
&lt;br /&gt;
;dev-([cdih]-)*defExpr&lt;br /&gt;
:defines a default Perl expression to use for this object type to convert raw values read.&lt;br /&gt;
&lt;br /&gt;
;dev-([cdih]-)*defIgnoreExpr&lt;br /&gt;
:defines a default Perl expression to decide when values should be ignored.&lt;br /&gt;
&lt;br /&gt;
;dev-([cdih]-)*defUnpack &lt;br /&gt;
:defines the default unpack code for this object type. &lt;br /&gt;
&lt;br /&gt;
;dev-([cdih]-)*defRevRegs&lt;br /&gt;
:defines that the order of registers for objects that span several registers will be reversed before &lt;br /&gt;
:further interpretation / unpacking of the raw register string&lt;br /&gt;
&lt;br /&gt;
;dev-([cdih]-)*defBswapRegs&lt;br /&gt;
:per device default for swapping the bytes in Registers (see obj-bswapRegs above)&lt;br /&gt;
&lt;br /&gt;
;dev-([cdih]-)*defDecode&lt;br /&gt;
:defines a default for decoding the strings read from a different character set e.g. cp850&lt;br /&gt;
&lt;br /&gt;
;dev-([cdih]-)*defEncode&lt;br /&gt;
:defines a default for encoding the strings read (or after decoding from a different character set) e.g. utf8&lt;br /&gt;
&lt;br /&gt;
;dev-([cdih]-)*defPoll &lt;br /&gt;
:if set to 1 then all objects of this type will be included in the cyclic update by default. &lt;br /&gt;
&lt;br /&gt;
;dev-([cdih]-)*defShowGet &lt;br /&gt;
:if set to 1 then all objects of this type will have a visible get by default. &lt;br /&gt;
&lt;br /&gt;
;dev-timing-timeout &lt;br /&gt;
:timeout for the device (defaults to 2 seconds)&lt;br /&gt;
&lt;br /&gt;
;dev-timing-sendDelay &lt;br /&gt;
:delay to enforce between sending two requests to the device. Default ist 0.1 seconds.&lt;br /&gt;
&lt;br /&gt;
;dev-timing-commDelay &lt;br /&gt;
:delay between the last read and a next request. Default ist 0.1 seconds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;dev-([cdih]-)*allowShortResponses &lt;br /&gt;
:if set to 1 the module will accept a response with valid checksum but data lengh &amp;lt; lengh in header&lt;br /&gt;
&lt;br /&gt;
;dev-timing-timeout &lt;br /&gt;
:timeout for the device (defaults to 2 seconds)&lt;br /&gt;
&lt;br /&gt;
;dev-timing-sendDelay &lt;br /&gt;
:delay to enforce between sending two requests to the device. Default ist 0.1 seconds.&lt;br /&gt;
&lt;br /&gt;
;dev-timing-commDelay &lt;br /&gt;
:delay between the last read and a next request. Default ist 0.1 seconds.&lt;br /&gt;
&lt;br /&gt;
;nextOpenDelay &lt;br /&gt;
:delay for Modbus-TCP connections. &lt;br /&gt;
:This defines how long the module should wait after a failed TCP connection attempt before the next reconnection attempt. &lt;br /&gt;
:This defaults to 60 seconds.&lt;br /&gt;
&lt;br /&gt;
;openTimeout     &lt;br /&gt;
:timeout to be used when opening a Modbus TCP connection (defaults to 3)&lt;br /&gt;
&lt;br /&gt;
;timeoutLogLevel &lt;br /&gt;
:log level that is used when logging a timeout. Defaults to 3. &lt;br /&gt;
&lt;br /&gt;
;silentReconnect &lt;br /&gt;
:if set to 1, then it will set the loglevel for &amp;quot;disconnected&amp;quot; and &amp;quot;reappeared&amp;quot; messages to 4 instead of 3&lt;br /&gt;
&lt;br /&gt;
;maxTimeoutsToReconnect &lt;br /&gt;
:this attribute is only valid for TCP connected devices. &lt;br /&gt;
:In such cases a disconnected device might stay undetected and lead to timeouts until the TCP connection is reopened. &lt;br /&gt;
:This attribute specifies after how many timeouts an automatic reconnect is tried.&lt;br /&gt;
&lt;br /&gt;
;dev-h-brokenFC3&lt;br /&gt;
:workaround for some broken Modbus function code 3 implementations&lt;br /&gt;
&lt;br /&gt;
;disable&lt;br /&gt;
:stop communication with the device while this attribute is set to 1. For Modbus over TCP this also closes the TCP connection.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [http://www.Modbus.org Modbus.org]&lt;br /&gt;
* About Modbus ([http://en.wikipedia.org/wiki/Modbus English] / [http://de.wikipedia.org/wiki/Modbus German])&lt;br /&gt;
* Perl [http://perldoc.perl.org/functions/pack.html unpack codes]&lt;br /&gt;
&lt;br /&gt;
[[Kategorie:IP Components]]&lt;/div&gt;</summary>
		<author><name>ZDX</name></author>
	</entry>
	<entry>
		<id>http://wiki.fhem.de/w/index.php?title=ModbusAttr&amp;diff=32295</id>
		<title>ModbusAttr</title>
		<link rel="alternate" type="text/html" href="http://wiki.fhem.de/w/index.php?title=ModbusAttr&amp;diff=32295"/>
		<updated>2020-01-05T15:07:31Z</updated>

		<summary type="html">&lt;p&gt;ZDX: /* Get-Commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox Modul&lt;br /&gt;
|ModPurpose=Extract information from devices with a Modbus interface or send information to such devices &lt;br /&gt;
|ModType=d&lt;br /&gt;
|ModCmdRef=ModbusAttr&lt;br /&gt;
|ModForumArea=Sonstiges&lt;br /&gt;
|ModFTopic=25315&lt;br /&gt;
|ModTechName=98_ModbusAttr.pm&lt;br /&gt;
|ModOwner=StefanStrobel ({{Link2FU|3960|Forum}} / [[Benutzer:StefanStrobel|Wiki]])&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[ModbusAttr]] uses the low level Modbus module 98_[[Modbus]].pm to provide a generic Modbus module (as master, slave, relay or passive listener) &lt;br /&gt;
that can be configured by attributes similar to the way HTTPMOD works for devices with a web interface.&lt;br /&gt;
&lt;br /&gt;
ModbusAttr can be used as a Modbus master that queries data from other devices over a serial RS232 / RS485 or TCP connection, &lt;br /&gt;
it can be used as a Modbus slave that can make readings of Fhem devices available via Modbus to external Modbus masters,&lt;br /&gt;
it can act as a Modbus relay that receives requests over one connection and forwards them over another connection (e.g. from Modbus TCP to serial Modbus RTU)&lt;br /&gt;
or it can passively listen to other devices that communicate over a serial RS485 connection and extract readings from the objects it sees.&lt;br /&gt;
The supported protocols are Modbus RTU, Modbus ASCII or Modbus TCP.&lt;br /&gt;
&lt;br /&gt;
There are several attributes that modify the way data objects are converted before they are stored in readings or sent to a device. Data can be modified by a perl expression defined in an atribute, formatted with a format string defined in another attribute or mapped to a table defined in an attribute.&lt;br /&gt;
&lt;br /&gt;
Readings can directly correspond to one data object or they can span several objects. A float value for example might be stored in two input or holding registers in the Modbus device. By specifying attributes that define the length of a reading in objects and by specifying the unpack code to get from a raw string to perl variables, all these cases can be described by attributes and no perl coding is necessary.&lt;br /&gt;
&lt;br /&gt;
== Availability == &lt;br /&gt;
The module has been checked in.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
This module uses the [[Modbus|Modbus base module 98_Modbus.pm]] which uses the DevIO module&lt;br /&gt;
&lt;br /&gt;
== Define as Modbus master == &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define &amp;lt;iodevice&amp;gt; Modbus /dev/device@baudrate,bits,parity,stop&lt;br /&gt;
define &amp;lt;name&amp;gt; ModbusAttr &amp;lt;Id&amp;gt; &amp;lt;Interval&amp;gt; &amp;lt;RTU|ASCII&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define &amp;lt;name&amp;gt; ModbusAttr &amp;lt;Id&amp;gt; &amp;lt;Interval&amp;gt; &amp;lt;Address:Port&amp;gt; &amp;lt;RTU|ASCII|TCP&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the first case the module connects to the external Modbus device with Modbus Id &amp;lt;Id&amp;gt; through a serial modbus device (RS232 or RS485).&lt;br /&gt;
&lt;br /&gt;
In the second case it connects directly through Modbus TCP or Modbus RTU or ASCII over TCP.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;Interval&amp;gt; is not 0 then the module actively requests data from that device every &amp;lt;Interval&amp;gt; seconds.&lt;br /&gt;
&lt;br /&gt;
The objects that the module should request and the readings it should create from these objects have to be defined with attributes (see below). &lt;br /&gt;
These attributes will define a mapping from so called &amp;quot;coils&amp;quot;, &amp;quot;digital inputs&amp;quot;, &amp;quot;input registers&amp;quot; or &amp;quot;holding registers&amp;quot; of the external device to readings inside Fhem together with the data type and format of the values.&lt;br /&gt;
Interval can be 0 in which case the Module only requests data when it is triggered with a Fhem get-Command.&lt;br /&gt;
With this mode a Fhem installation can for example query sensor data from a heating system, energy meter or solar power installation if these systems offer a Modbus interface.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define ModbusLine Modbus /dev/ttyUSB1@9600&lt;br /&gt;
define WP ModbusAttr 1 60&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Define WP as a Modbus master that communicates through the Modbus serial interface device named ModbusLine. The protocol defaults to Modbus RTU&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define ModbusLine Modbus /dev/ttyUSB1@9600&lt;br /&gt;
define WP ModbusAttr 20 0 ASCII&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Define WP as a Modbus master that communicates through the Modbus serial interface device named ModbusLine with Modbus ASCII. &lt;br /&gt;
Use Modbus Id 20 and don&#039;t query the device in a defined interval. Instead individual SET / GET options have to be used for communication.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define WP ModbusAttr 5 60 192.168.1.122:502 TCP&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to talk Modbus TCP to a device with IP-Address 192.168.1.122 and the reserved port for Modbus TCP 502&lt;br /&gt;
Note that for Modbus over a TCP connection you don&#039;t need a basic Modbus device for the interface like ModbusLine above. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define WP ModbusAttr 3 60 192.168.1.122:8000 RTU&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to talk Modbus RTU over TCP and use the port number 8000&lt;br /&gt;
    &lt;br /&gt;
== Define as Modbus slave == &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define &amp;lt;name&amp;gt; ModbusAttr &amp;lt;Id&amp;gt; slave&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define &amp;lt;name&amp;gt; ModbusAttr &amp;lt;Id&amp;gt; slave &amp;lt;Address:Port&amp;gt; &amp;lt;RTU|ASCII|TCP&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module waits for connections from other Modbus masters. It will respond to their requests if the requests contain the given Modbus &amp;lt;Id&amp;gt;&lt;br /&gt;
To provide data with Modbus to external Modbus masters a mapping needs to be defined using attributes. &lt;br /&gt;
These attributes will define a mapping from Readings inside Fhem to so called &amp;quot;coils&amp;quot;, &amp;quot;digital inputs&amp;quot;, &amp;quot;input registers&amp;quot; or &amp;quot;holding registers&amp;quot; and their Modbus object address together with the data type and format of the values.&lt;br /&gt;
With this mode a Fhem installation can for example supply data to a PLC that actively reads data from Fhem or writes data to Fhem readings.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define MRS485 Modbus /dev/ttyUSB2@9600,8,E,1&lt;br /&gt;
define Data4PLC ModbusAttr 1 slave&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Define Data4PLC as a Modbus slave that communicates through the Modbus serial interface device named MRS485 to listen for Modbus requests with Id 1. The protocol defaults to Modbus RTU&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define MRS485 Modbus /dev/ttyUSB2@9600,8,E,1&lt;br /&gt;
define Data4PLC ModbusAttr 20 slave ASCII&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to listen for Modbus requests with Id 20 with Modbus ASCII. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define Data4PLC ModbusAttr 5 slave 192.168.1.2:502 TCP&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to start listening to TCP port 502 on the local address 192.168.1.2. Modbus TCP will be used as protocol and Requests with Modbus Id 5 will be answered.&lt;br /&gt;
&lt;br /&gt;
Please be aware that opening a port number smaller than 1024 needs root permissions on Unix devices. So it is probably better to use a non standard port number above 1024 instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define Data4PLC ModbusAttr 3 slave 192.168.1.2:8000 RTU&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to listen to the local port 8000 and talk Modbus RTU over TCP&lt;br /&gt;
&lt;br /&gt;
== Define as Modbus passive listener == &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define &amp;lt;name&amp;gt; ModbusAttr &amp;lt;Id&amp;gt; passive &amp;lt;RTU|ASCII|TCP&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module listens on a serial (RS485) connection for modbus communication with the given Modbus &amp;lt;Id&amp;gt; and extracts readings. It does not send requests by itself but waits for another master to communicate with a slave. So only objects that the other master requests can be seen by Fhem in this configuration. &lt;br /&gt;
The objects that the module recognizes and the readings that it should create from these objects have to be defined with attributes (see below) in the same way as for a Modbus master. &lt;br /&gt;
These attributes will define a mapping from so called &amp;quot;coils&amp;quot;, &amp;quot;digital inputs&amp;quot;, &amp;quot;input registers&amp;quot; or &amp;quot;holding registers&amp;quot; of the external device to readings inside Fhem together with the data type and format of the values.&lt;br /&gt;
With this mode a Fhem installation can for example Listen to the communication between an energy counter as slave and a solar control system as master if they use Modbus RTU over RS485. Since only one Master is allowed when using Modbus over serial lines, Fhem can not be master itself. As a passive listener it can however see when the master queries e.g. the current power consumption and then also see the reply from the energy meter and store the value in a Fhem reading.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define MB-485 Modbus /dev/ttyUSB2&lt;br /&gt;
define WP ModbusAttr 1 passive&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to passively listen for Modbus requests and replies with Id 1 over a serial interface managed by an already defined basic modbus device named MB-485. The protocol defaults to Modbus RTU&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define MB-485 Modbus /dev/ttyUSB2&lt;br /&gt;
define WP ModbusAttr 20 passive ASCII&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to passivel listen for Modbus requests / replies with Id 20 and Modbus ASCII. &lt;br /&gt;
&lt;br /&gt;
== Define as Modbus relay == &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define &amp;lt;name&amp;gt; ModbusAttr &amp;lt;Id&amp;gt; relay to &amp;lt;FhemMasterDevice&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define &amp;lt;name&amp;gt; ModbusAttr &amp;lt;Id&amp;gt; relay &amp;lt;Address:Port&amp;gt; &amp;lt;RTU|ASCII|TCP&amp;gt; to &amp;lt;FhemMasterDevice&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module waits for connections from other Modbus masters. It will forward requests if they match the given Modbus &amp;lt;Id&amp;gt; to an already defined Modbus Master device inside Fhem which will send them to its defined slave, take the reply and the pass it back to the original Master.&lt;br /&gt;
With this mode a Fhem installation can for example be used in front of a device that only speaks Modbus RTU over RS485 to make it available via Modbus TCP over the local network. &lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define MB-485 Modbus /dev/ttyUSB2&lt;br /&gt;
define Heating ModbusAttr 22 0&lt;br /&gt;
define Relay ModbusAttr 33 relay 192.168.1.2:1502 TCP to Heating&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Defines MB-485 as a base device for the RS-485 communication with a heating system, &lt;br /&gt;
defines Heating as a Modbus Master to communicate with the Heating and its Modbus ID 22, &lt;br /&gt;
and then defines the relay which listens to the local IP address 192.168.1.2, TCP port 1502, Modbus Id 33 and protocol Modbus-TCP.&lt;br /&gt;
Requests coming in through Modbus TCP and port 1502 are then translated to Modbus RTU and forwarded via RS-485 to the heating system with Modbus Id 22. &lt;br /&gt;
&lt;br /&gt;
or (unlikely)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define MB-232 Modbus /dev/ttyUSB2@19200&lt;br /&gt;
define Solar ModbusAttr 7 0 192.168.1.122:502 RTU&lt;br /&gt;
define PLC2NetRelay ModbusAttr 1 ASCII relay to Solar&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Defines MB-232 as a base device for the RS-232 communication with a PLC as Modbus master, &lt;br /&gt;
defines Solar as a Modbus Master to communicate with Modbus TCP to a Solar power system at IP Adrress 192.168.1.122 and its Modbus ID 7, &lt;br /&gt;
and then defines the PLC2NetRelay as a relay which listens to Modbus-ASCII requests over the serial RS-232 link from a PLC to Modbus ID 1.&lt;br /&gt;
Requests to Modbus Id 1 coming in through the serial link are then translated to Modbus TCP and forwarded over the network to the solar power system with Modbus Id 7. &lt;br /&gt;
&lt;br /&gt;
== Configuration of the module as master or passive listener == &lt;br /&gt;
&lt;br /&gt;
Data objects (holding registers, input registers, coils or discrete inputs) are defined using attributes. &lt;br /&gt;
If Fhem is Modbus master or passive listener, the attributes assign data objects of external devices (heating systems, power meters, PLCs or other) with their register addresses to readings inside fhem and control how these readings are calculated from the raw values and how they are formatted.&lt;br /&gt;
Please be aware that Modbus does not define common data types so the representation of a value can be very different from device to device. One device might make a temperature value avaliable as a floating point value that is stored in two holding resgisters, another device might store the temperature multiplied with 10 as an signed integer in one register. Even the order of bytes can vary.&lt;br /&gt;
Therefore it is typically necessary to specify the data representation as a Perl unpack code.&lt;br /&gt;
A Modbus master can also write values to Objects in the device and attributes define how this is done.&lt;br /&gt;
&lt;br /&gt;
Example for a Modbus master or passive configuration:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define PWP ModbusAttr 5 30&lt;br /&gt;
attr PWP obj-h256-reading Temp_Wasser_ein&lt;br /&gt;
attr PWP obj-h256-expr $val/10&lt;br /&gt;
&lt;br /&gt;
attr PWP obj-h258-reading Temp_Wasser_Aus&lt;br /&gt;
attr PWP obj-h258-expr $val/10&lt;br /&gt;
&lt;br /&gt;
attr PWP obj-h262-reading Temp_Luft&lt;br /&gt;
attr PWP obj-h262-expr $val / 10&lt;br /&gt;
&lt;br /&gt;
attr PWP obj-h770-reading Temp_Soll&lt;br /&gt;
attr PWP obj-h770-expr $val / 10&lt;br /&gt;
attr PWP obj-h770-set 1&lt;br /&gt;
attr PWP obj-h770-setexpr $val * 10&lt;br /&gt;
attr PWP obj-h770-max 32&lt;br /&gt;
attr PWP obj-h770-min 10&lt;br /&gt;
attr PWP obj-h770-hint 8,10,20,25,28,29,30,30.5,31,31.5,32&lt;br /&gt;
&lt;br /&gt;
attr PWP dev-h-combine 5&lt;br /&gt;
attr PWP dev-h-defPoll 1&lt;br /&gt;
attr PWP dev-h-defUnpack n&lt;br /&gt;
&lt;br /&gt;
attr PWP room Pool-WP&lt;br /&gt;
attr PWP stateFormat {sprintf(&amp;quot;%.1f Grad&amp;quot;, ReadingsVal($name,&amp;quot;Temp_Wasser_Ein&amp;quot;,0))}&lt;br /&gt;
attr PWP webCmd Temp_Soll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Attributes to define data objects start with obj- followed by a code that identifies the type and address&lt;br /&gt;
of the data object. &lt;br /&gt;
&lt;br /&gt;
Modbus devices offer the following types of data objects: &lt;br /&gt;
&lt;br /&gt;
;holding registers (16 bit objects that can be read and written)&lt;br /&gt;
;input registers (16 bit objects that can only be read)&lt;br /&gt;
;coils (single bit objects that can be read and written)&lt;br /&gt;
;discrete inputs (single bit objects that can only be read)&lt;br /&gt;
&lt;br /&gt;
The module uses the first character of these data object types to define attributes. &lt;br /&gt;
Thus h770 refers to a holding register with the decimal address 770 and c120 refers to a coil with address 120. &lt;br /&gt;
The address has to be specified as pure decimal number. The address counting starts at address 0&lt;br /&gt;
&lt;br /&gt;
Please note that the documentation for devices sometimes uses different numbering. They might start counting with one instead of zero so if a voltage value is stored in input register number 107 according to the documentation of the device, it might technically mean register number 106 (in the Modbus protocol specification addresses start with 0).&lt;br /&gt;
Also some vendors use hexadecimal descriptions of their register addresses. So input register 107 might be noted as hex and means 263 or even 262 as decimal address.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
attr PWP obj-h258-reading Temp_Wasser_Aus&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
defines a reading with the name Temp_Wasser_Aus that is read from the Modbus holding register at address 258.&lt;br /&gt;
With the attribute ending on &amp;lt;code&amp;gt;-expr&amp;lt;/code&amp;gt; you can define a perl expression to do some conversion or calculation on the raw value read from the device. &lt;br /&gt;
In the above example the raw value has to be devided by 10 to get the real value. If the raw value is also the final value then no &amp;lt;code&amp;gt;-expr&amp;lt;/code&amp;gt; attribute is necessary. &lt;br /&gt;
&lt;br /&gt;
An object attribute ending on &amp;lt;code&amp;gt;-set&amp;lt;/code&amp;gt; creates a fhem set option. &lt;br /&gt;
In the above example the reading Temp_Soll can be changed to 12 degrees by the user with the fhem command &amp;lt;code&amp;gt;set PWP Temp_Soll 12&amp;lt;/code&amp;gt;&lt;br /&gt;
The object attributes ending on &amp;lt;code&amp;gt;-min&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-max&amp;lt;/code&amp;gt; define min and max values for input validation &lt;br /&gt;
and the attribute ending on &amp;lt;code&amp;gt;-hint&amp;lt;/code&amp;gt; will tell fhem to create a selection list so the user can graphically select the defined values.&lt;br /&gt;
&lt;br /&gt;
To define general properties of the device you can specify attributes starting with &amp;lt;code&amp;gt;dev-&amp;lt;/code&amp;gt;. &lt;br /&gt;
E.g. with &amp;lt;code&amp;gt;dev-timing-timeout&amp;lt;/code&amp;gt; you can specify the timeout when waiting for a response from the device. &lt;br /&gt;
With &amp;lt;code&amp;gt;dev-h-&amp;lt;/code&amp;gt; you can specify several default values or general settings for all holding registers &lt;br /&gt;
like the function code to be used when reading or writing holding registers. &lt;br /&gt;
These attributes are optional and the module will use defaults that work in most cases. &lt;br /&gt;
&amp;lt;code&amp;gt;dev-h-combine 5&amp;lt;/code&amp;gt; for example allows the module to combine read requests to objects having an address that differs 5 or less into one read request. &lt;br /&gt;
Without setting this attribute the module will start individual read requests for each object. &lt;br /&gt;
Typically the documentation for the modbus interface of a given device states the maximum number of objects that can be read in one function code 3 request.&lt;br /&gt;
&amp;lt;code&amp;gt;dev-h-defUnpack n&amp;lt;/code&amp;gt; means that the values in this example that the values are stored as unsigned short (16-bit) in &amp;quot;network&amp;quot; (big-endian) order. This is only one possibility of many. An integer value might be signed instead of unsigned or it might use different byte ordering (e.g. unpack codes v or s). &lt;br /&gt;
&lt;br /&gt;
== Handling Data Types == &lt;br /&gt;
&lt;br /&gt;
The Modbus protocol does not define data types. If the documentation of a device states that for example the current temperature is stored in holding register 102 this leaves room for many interpretations. Not only can the address 102 mean different things (actually decimal 102 or rather 101 if the vendor starts counting at 1 instead of 0 or even 257 or 258 if the vendor used hexadecimal addresses in his documentation ) also the data representation can be many different things. As in every programming language, there are many ways to represent numbers. They can be stored signed or unsigned, they can be integers or floating point numbers, the byte-order can be &amp;quot;big endian&amp;quot; or &amp;quot;small endian&amp;quot;, the value can be stored in one holding register or in two holding registers (floating point numbers typically take four bytes which means two holding registers).&lt;br /&gt;
The Modbus module allows flexible configuration of data representations be assigning a Perl unpack-code, a length, a Perl Expression, and the register ordering. The following example illustrates how this can be done:        &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
attr PWP obj-h338-reading Pressure&lt;br /&gt;
attr PWP obj-h338-len 2&lt;br /&gt;
attr PWP obj-h338-unpack f&amp;gt;&lt;br /&gt;
attr PWP obj-h338-revRegs 1&lt;br /&gt;
attr PWP obj-h338-format %.2f&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In This example a floating point value for the reading &amp;quot;Pressure&amp;quot; is read from the holding registers starting at address 338. &lt;br /&gt;
The value occupies 32 Bits and is therefore stored in two registers. The Perl pack code to use is f&amp;gt; which means a native single precision float in big endian format (byte order). With revRegs the module is instructed to reverse the order of the registers directly after reading. The format specification then defines how the value is formatted into a reading - in this case with two digits after the comma. See http://perldoc.perl.org/functions/pack.html for Perl pack / unpack codes and http://perldoc.perl.org/functions/sprintf.html for format specifications.&lt;br /&gt;
&lt;br /&gt;
If you need to read / write many objects for a device, defining all these parameters each time is not elegant. The Modbus module therefore offers twi ways to simplify this task: &lt;br /&gt;
You can define defaults for every type of object or you can define your own data types once and then refer to them.&lt;br /&gt;
This exampe shows how defaults can be specified for holding registers and input registers:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
attr PWP dev-h-defUnpack f&amp;gt;&lt;br /&gt;
attr PWP dev-h-defLen 2&lt;br /&gt;
attr PWP dev-h-defRevRegs 1&lt;br /&gt;
attr PWP dev-h-defFormat %.2f&lt;br /&gt;
&lt;br /&gt;
attr PWP dev-i-defUnpack n&lt;br /&gt;
attr PWP dev-i-defLen 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The next example shows how you can define your own data types and then apply them to objects:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
attr WP dev-type-VT_R4-format %.1f&lt;br /&gt;
attr WP dev-type-VT_R4-len 2&lt;br /&gt;
attr WP dev-type-VT_R4-revRegs 1&lt;br /&gt;
attr WP dev-type-VT_R4-unpack f&amp;gt;&lt;br /&gt;
&lt;br /&gt;
attr WP obj-h1234-reading Temp_In&lt;br /&gt;
attr WP obj-h1234-type VT_R4&lt;br /&gt;
attr WP obj-h1236-reading Temp_Out&lt;br /&gt;
attr WP obj-h1236-type VT_R4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This example defines a data type with the name VT_R4 which uses an unpack code of f&amp;gt;, length 2 and reversed register ordering. It then assigns this Type to the objects Temp_In and Temp_Out.&lt;br /&gt;
&lt;br /&gt;
== Configuration of the module as Modbus slave == &lt;br /&gt;
&lt;br /&gt;
Data objects that the module offers to external Modbus masters (holding registers, input registers, coils or discrete inputs) are defined using attributes. &lt;br /&gt;
If Fhem is Modbus slave, the attributes assign readings of Fhem devices to Modbus objects with their addresses and control how these objects are calculated from the reading values that exist in Fhem.&lt;br /&gt;
It is also possible to allow an external Modbus master to send write function codes and change the value of readings inside Fhem.&lt;br /&gt;
&lt;br /&gt;
Example for a Modbus slave configuration:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define MRS485 Modbus /dev/ttyUSB2@9600,8,E,1&lt;br /&gt;
define Data4PLC ModbusAttr 1 slave&lt;br /&gt;
attr Data4PLC IODev MRS485&lt;br /&gt;
&lt;br /&gt;
attr Data4PLC obj-h256-reading THSensTerrasse:temperature&lt;br /&gt;
attr Data4PLC obj-h256-unpack f&lt;br /&gt;
attr Data4PLC obj-h256-len 2&lt;br /&gt;
&lt;br /&gt;
attr Data4PLC obj-h258-reading THSensTerrasse:humidity&lt;br /&gt;
attr Data4PLC obj-h258-unpack f&lt;br /&gt;
attr Data4PLC obj-h258-len 2&lt;br /&gt;
&lt;br /&gt;
attr Data4PLC obj-h260-reading myDummy:limit&lt;br /&gt;
attr Data4PLC obj-h260-unpack n&lt;br /&gt;
attr Data4PLC obj-h260-len 1&lt;br /&gt;
attr Data4PLC obj-h260-allowWrite 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example Fhem allows an external Modbus master to read the temperature of a Fhem device named THSensTerrasse through holding register 256 and the humidity of that Fhem device through holding register 258. Both are encoded as floting point values that span two registers. &lt;br /&gt;
The master can also read but also write the reading named limit of the device myDummy.&lt;br /&gt;
&lt;br /&gt;
== Set-Commands ==&lt;br /&gt;
can be defined for holding registers and coils by using attributes.&lt;br /&gt;
&lt;br /&gt;
Every object for which an attribute like &amp;lt;code&amp;gt;obj-xy-set&amp;lt;/code&amp;gt; is set to 1 will create a valid set option.&lt;br /&gt;
&lt;br /&gt;
Additionally the attribute &amp;lt;code&amp;gt;enableControlSet&amp;lt;/code&amp;gt; enables the set options &amp;lt;code&amp;gt;interval&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;stop&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;reread&amp;lt;/code&amp;gt; as well as &amp;lt;code&amp;gt;scanModbusObjects&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;scanStop&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;scanModbusIds&amp;lt;/code&amp;gt; (for devices connected with RTU / ASCII over a serial line).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;interval &amp;amp;lt;Interval&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:modifies the interval that was set during define. &lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;stop&amp;lt;/code&amp;gt;&lt;br /&gt;
:stops the interval timer that is used to automatically poll objects through Modbus.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt;&lt;br /&gt;
:starts the interval timer that is used to automatically poll objects through Modbus. &lt;br /&gt;
:If an interval is specified during the define command then the interval timer is started automatically. &lt;br /&gt;
:However if you stop it with the command &amp;lt;code&amp;gt;set &amp;amp;lt;mydevice&amp;amp;gt; stop&amp;lt;/code&amp;gt; &lt;br /&gt;
:then you can start it again with &amp;lt;code&amp;gt;set &amp;amp;lt;mydevice&amp;amp;gt; start&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;reread&amp;lt;/code&amp;gt;&lt;br /&gt;
:causes a read of all objects that are set to be polled in the defined interval. The interval timer is not modified.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;scanModbusObjects &amp;amp;lt;startObj&amp;amp;gt; - &amp;amp;lt;endObj&amp;amp;gt; &amp;amp;lt;reqLen&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:scans the device objects and automatically creates attributes for each reply it gets. &lt;br /&gt;
:This might be useful for exploring devices without proper documentation. &lt;br /&gt;
:The following example starts a scan and queries the holding registers with addresses between 100 and 120. &lt;br /&gt;
:&amp;lt;code&amp;gt;set MyModbusAttrDevice scanModbusObjects h100-120&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
:For each reply it gets, the module creates a reading like&lt;br /&gt;
:&amp;lt;code&amp;gt;scan-h100 hex=0021, string=.!, s=8448, s&amp;gt;=33, S=8448, S&amp;gt;=33&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
:the representation of the result as hex is 0021 and&lt;br /&gt;
:the ASCII representation is .!. s, s&amp;gt;, S and S&amp;gt; are different representations with their Perl pack-code.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;scanModbusIds &amp;amp;lt;startId&amp;amp;gt; - &amp;amp;lt;endId&amp;amp;gt; &amp;amp;lt;knownObj&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:scans for Modbus Ids on an RS485 Bus. The following set command for example starts a scan:&amp;lt;br&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;set Device scanModbusId 1-7 h770&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
:since many Modbus devices don&#039;t reply at all if an object is requested that does not exist, &lt;br /&gt;
:scanModbusId needs the adress of an object that is known to exist.&lt;br /&gt;
:If a device with Id 5 replies to a read request for holding register 770, a reading like the following will be created:&lt;br /&gt;
:&amp;lt;code&amp;gt;scanId-5-Response-h770 hex=0064, string=.d, s=25600, s&amp;gt;=100, S=25600, S&amp;gt;=100&amp;lt;/code&amp;gt;&lt;br /&gt;
;&amp;lt;code&amp;gt;scanStop&amp;lt;/code&amp;gt;&lt;br /&gt;
:stops any running scans.&lt;br /&gt;
;saveAsModule &amp;lt;name&amp;gt;&lt;br /&gt;
:experimental: saves the definitions of obj- and dev- attributes in a new fhem module file as /tmp/98_ModbusGen&amp;lt;name&amp;gt;.pm.&lt;br /&gt;
:if this file is copied into the fhem module subdirectory (e.g. /opt/fhem/FHEM) and fhem is restarted then instead of defining a device&lt;br /&gt;
:as ModbusAttr with all the attributes to define objects, you can just define a device of the new type ModbusGen&amp;lt;name&amp;gt; and all the &lt;br /&gt;
:objects will be there by default. However all definitions can still be changed / overriden with the attribues defined in ModbusAttr if needed.&lt;br /&gt;
&lt;br /&gt;
== Get-Commands ==&lt;br /&gt;
&lt;br /&gt;
Every reading can be manually requested by a Get. &lt;br /&gt;
Internally a Get command triggers the corresponding Modbus request to the device and the module then interprets the data and sets the right Fhem readings. To avoid huge option lists in FHEMWEB, the objects visible as Get in FHEMWEB can be defined by setting an attribute &amp;lt;code&amp;gt;obj-xy-showGet&amp;lt;/code&amp;gt; to 1.&lt;br /&gt;
&lt;br /&gt;
== All Attributes ==&lt;br /&gt;
&lt;br /&gt;
;readingFnAttributes&lt;br /&gt;
:the usual Fhem attributes for all devices&lt;br /&gt;
&lt;br /&gt;
;alignTime&lt;br /&gt;
:Aligns each periodic read request for the defined interval to this base time. &lt;br /&gt;
:This is typcally something like 00:00 (see the Fhem at command)&lt;br /&gt;
&lt;br /&gt;
;enableControlSet&lt;br /&gt;
:enables the built in set commands like interval, stop, start and reread (see above)        &lt;br /&gt;
&lt;br /&gt;
the following list of attributes can be applied to any data object by specifying the objects type and address in the variable part. &lt;br /&gt;
For many attributes you can also specify default values per object type (see dev- attributes later) or you can specify an object attribute without type and address (e.g. obj-len) which then applies as default for all objects:&lt;br /&gt;
&lt;br /&gt;
;obj-[cdih][1-9][0-9]*-reading &lt;br /&gt;
:define the name of a reading that corresponds to the Modbus data object of type c,d,i or h and a decimal address (e.g. obj-h225-reading).&lt;br /&gt;
	&lt;br /&gt;
;obj-[cdih][1-9][0-9]*-name &lt;br /&gt;
:defines an optional internal name of this data object (this has no meaning for fhem and serves mainly documentation purposes.&lt;br /&gt;
&lt;br /&gt;
;obj-[cdih][1-9][0-9]*-set &lt;br /&gt;
:if set to 1 then this data object can be changed (works only for holding registers and coils since discrete inputs and input registers can not be modified by definition.&lt;br /&gt;
&lt;br /&gt;
;obj-[cdih][1-9][0-9]*-min &lt;br /&gt;
:defines a lower limit to the value that can be written to this data object. This ist just used for input validation.&lt;br /&gt;
&lt;br /&gt;
;obj-[cdih][1-9][0-9]*-max &lt;br /&gt;
:defines an upper limit to the value that can be written to this data object. This ist just used for input validation.&lt;br /&gt;
&lt;br /&gt;
;obj-[cdih][1-9][0-9]*-hint &lt;br /&gt;
:this is used for set options and tells fhemweb what selection to display for the set option (list or slider etc.)&lt;br /&gt;
&lt;br /&gt;
;obj-[cdih][1-9][0-9]*-expr &lt;br /&gt;
:defines a perl expression that converts the raw value read from the device.&lt;br /&gt;
&lt;br /&gt;
;obj-[cdih][1-9][0-9]*-ignoreExpr&lt;br /&gt;
:defines a perl expression that returns 1 if a value should be ignored and the existing reading should not be modified&lt;br /&gt;
&lt;br /&gt;
;obj-[cdih][1-9][0-9]*-map &lt;br /&gt;
:defines a map to convert values read from the device to more convenient values when the raw value is read from the device or back when the value to write has to be converted from the user value to a raw value that can be written. Example: 0:mittig, 1:oberhalb, 2:unterhalb &lt;br /&gt;
&lt;br /&gt;
;obj-[cdih][1-9][0-9]*-setexpr &lt;br /&gt;
:defines a perl expression that converts the user specified value in a set to a raw value that can be sent to the device. This is typically the inversion of -expr above.&lt;br /&gt;
&lt;br /&gt;
;obj-[cdih][1-9][0-9]*-format &lt;br /&gt;
:defines a format string to format the value read e.g. %.1f&lt;br /&gt;
&lt;br /&gt;
;obj-[cdih][1-9][0-9]*-len &lt;br /&gt;
:defines the length of the data object in registers. It defaults to 1. Some devices store 32 bit floating point values in two registers. In this case you can set this attribute to two.&lt;br /&gt;
&lt;br /&gt;
;obj-[cdih][1-9][0-9]*-unpack &lt;br /&gt;
:defines the unpack code to convert the raw data string read from the device to a reading. For an unsigned integer in big endian format this would be &amp;quot;n&amp;quot;, for a signed 16 bit integer in big endian format this would be &amp;quot;s&amp;gt;&amp;quot; and for a 32 bit big endian float value this would be &amp;quot;f&amp;gt;&amp;quot;. (see the perl documentation of the pack function).&lt;br /&gt;
&lt;br /&gt;
;obj-[cdih][1-9][0-9]*-revRegs&lt;br /&gt;
:this is only applicable to objects that span several input registers or holding registers.&lt;br /&gt;
:when they are read then the order of the registers will be reversed before &lt;br /&gt;
:further interpretation / unpacking of the raw register string. &lt;br /&gt;
:The same happens before the object is written with a set command.&lt;br /&gt;
&lt;br /&gt;
;obj-[cdih][1-9][0-9]*-bswapRegs&lt;br /&gt;
:this is applicable to objects that span several input or holding registers.&lt;br /&gt;
:After the registers have been read and before they are writtem, &lt;br /&gt;
:all 16-bit values are treated big-endian and are reversed to little-endian by swapping the two 8 bit bytes. &lt;br /&gt;
:This functionality is most likely used for reading (ASCII) strings from the device &lt;br /&gt;
:that are stored as big-endian 16-bit values.&lt;br /&gt;
:example: original reading is &amp;quot;324d3130203a57577361657320722020&amp;quot;. After applying bswapRegs, &lt;br /&gt;
:the value will be &amp;quot;4d3230313a2057576173736572202020&amp;quot; which will result in the ASCII string &lt;br /&gt;
:&amp;quot;M201: WWasser   &amp;quot;. &lt;br /&gt;
:Should be used with &amp;quot;(a*)&amp;quot; as -unpack value.&lt;br /&gt;
&lt;br /&gt;
;obj-[cdih][1-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 &lt;br /&gt;
: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;
&lt;br /&gt;
;obj-[cdih][1-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 &lt;br /&gt;
: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;
&lt;br /&gt;
;obj-[cdih][1-9][0-9]*-showget &lt;br /&gt;
:every reading can also be requested by a get command. However these get commands are not automatically offered in fhemweb. By specifying this attribute, the get will be visible in fhemweb.&lt;br /&gt;
&lt;br /&gt;
;obj-[cdih][1-9][0-9]*-poll&lt;br /&gt;
:if set to 1 then this obeject is included in the cyclic update request as specified in the define command. If not set, then the object can manually be requested with a get command, but it is not automatically updated each interval. Note that this setting can also be specified as default for all objects with the dev- atributes described later.&lt;br /&gt;
&lt;br /&gt;
;obj-[cdih][1-9][0-9]*-polldelay &lt;br /&gt;
:this attribute allows to poll objects at a lower rate than the interval specified in the define command. you can either specify a time in seconds or number prefixed by &amp;quot;x&amp;quot; which means a multiple of the interval of the define command. if you specify a normal numer then it is interpreted as minimal time between the last read and another automatic read. Please note that this does not create an individual interval timer. Instead the normal interval timer defined by the interval of the define command will check if this reading is due or not yet. So the effective interval will always be a multiple of the interval of the define.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;dev-([cdih]-)*read &lt;br /&gt;
:specifies the function code to use for reading this type of object. The default is 3 for holding registers, 1 for coils, 2 for discrete inputs and 4 for input registers.&lt;br /&gt;
&lt;br /&gt;
;dev-([cdih]-)*write &lt;br /&gt;
:specifies the function code to use for writing this type of object. The default is 6 for holding registers and 5 for coils. Discrete inputs and input registers can not be written by definition.&lt;br /&gt;
&lt;br /&gt;
;dev-([cdih]-)*combine &lt;br /&gt;
:defines how many adjacent objects can be read in one request. If not specified, the default is 1&lt;br /&gt;
&lt;br /&gt;
;dev-([cdih]-)*defLen &lt;br /&gt;
:defines the default length for this object type. If not specified, the default is 1&lt;br /&gt;
&lt;br /&gt;
;dev-([cdih]-)*defFormat &lt;br /&gt;
:defines a default format string to use for this object type in a sprintf function on the values read from the device.&lt;br /&gt;
&lt;br /&gt;
;dev-([cdih]-)*defExpr&lt;br /&gt;
:defines a default Perl expression to use for this object type to convert raw values read.&lt;br /&gt;
&lt;br /&gt;
;dev-([cdih]-)*defIgnoreExpr&lt;br /&gt;
:defines a default Perl expression to decide when values should be ignored.&lt;br /&gt;
&lt;br /&gt;
;dev-([cdih]-)*defUnpack &lt;br /&gt;
:defines the default unpack code for this object type. &lt;br /&gt;
&lt;br /&gt;
;dev-([cdih]-)*defRevRegs&lt;br /&gt;
:defines that the order of registers for objects that span several registers will be reversed before &lt;br /&gt;
:further interpretation / unpacking of the raw register string&lt;br /&gt;
&lt;br /&gt;
;dev-([cdih]-)*defBswapRegs&lt;br /&gt;
:per device default for swapping the bytes in Registers (see obj-bswapRegs above)&lt;br /&gt;
&lt;br /&gt;
;dev-([cdih]-)*defDecode&lt;br /&gt;
:defines a default for decoding the strings read from a different character set e.g. cp850&lt;br /&gt;
&lt;br /&gt;
;dev-([cdih]-)*defEncode&lt;br /&gt;
:defines a default for encoding the strings read (or after decoding from a different character set) e.g. utf8&lt;br /&gt;
&lt;br /&gt;
;dev-([cdih]-)*defPoll &lt;br /&gt;
:if set to 1 then all objects of this type will be included in the cyclic update by default. &lt;br /&gt;
&lt;br /&gt;
;dev-([cdih]-)*defShowGet &lt;br /&gt;
:if set to 1 then all objects of this type will have a visible get by default. &lt;br /&gt;
&lt;br /&gt;
;dev-timing-timeout &lt;br /&gt;
:timeout for the device (defaults to 2 seconds)&lt;br /&gt;
&lt;br /&gt;
;dev-timing-sendDelay &lt;br /&gt;
:delay to enforce between sending two requests to the device. Default ist 0.1 seconds.&lt;br /&gt;
&lt;br /&gt;
;dev-timing-commDelay &lt;br /&gt;
:delay between the last read and a next request. Default ist 0.1 seconds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;dev-([cdih]-)*allowShortResponses &lt;br /&gt;
:if set to 1 the module will accept a response with valid checksum but data lengh &amp;lt; lengh in header&lt;br /&gt;
&lt;br /&gt;
;dev-timing-timeout &lt;br /&gt;
:timeout for the device (defaults to 2 seconds)&lt;br /&gt;
&lt;br /&gt;
;dev-timing-sendDelay &lt;br /&gt;
:delay to enforce between sending two requests to the device. Default ist 0.1 seconds.&lt;br /&gt;
&lt;br /&gt;
;dev-timing-commDelay &lt;br /&gt;
:delay between the last read and a next request. Default ist 0.1 seconds.&lt;br /&gt;
&lt;br /&gt;
;nextOpenDelay &lt;br /&gt;
:delay for Modbus-TCP connections. &lt;br /&gt;
:This defines how long the module should wait after a failed TCP connection attempt before the next reconnection attempt. &lt;br /&gt;
:This defaults to 60 seconds.&lt;br /&gt;
&lt;br /&gt;
;openTimeout     &lt;br /&gt;
:timeout to be used when opening a Modbus TCP connection (defaults to 3)&lt;br /&gt;
&lt;br /&gt;
;timeoutLogLevel &lt;br /&gt;
:log level that is used when logging a timeout. Defaults to 3. &lt;br /&gt;
&lt;br /&gt;
;silentReconnect &lt;br /&gt;
:if set to 1, then it will set the loglevel for &amp;quot;disconnected&amp;quot; and &amp;quot;reappeared&amp;quot; messages to 4 instead of 3&lt;br /&gt;
&lt;br /&gt;
;maxTimeoutsToReconnect &lt;br /&gt;
:this attribute is only valid for TCP connected devices. &lt;br /&gt;
:In such cases a disconnected device might stay undetected and lead to timeouts until the TCP connection is reopened. &lt;br /&gt;
:This attribute specifies after how many timeouts an automatic reconnect is tried.&lt;br /&gt;
&lt;br /&gt;
;dev-h-brokenFC3&lt;br /&gt;
:workaround for some broken Modbus function code 3 implementations&lt;br /&gt;
&lt;br /&gt;
;disable&lt;br /&gt;
:stop communication with the device while this attribute is set to 1. For Modbus over TCP this also closes the TCP connection.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [http://www.Modbus.org Modbus.org]&lt;br /&gt;
* About Modbus ([http://en.wikipedia.org/wiki/Modbus English] / [http://de.wikipedia.org/wiki/Modbus German])&lt;br /&gt;
* Perl [http://perldoc.perl.org/functions/pack.html unpack codes]&lt;br /&gt;
&lt;br /&gt;
[[Kategorie:IP Components]]&lt;/div&gt;</summary>
		<author><name>ZDX</name></author>
	</entry>
	<entry>
		<id>http://wiki.fhem.de/w/index.php?title=BEOK&amp;diff=30305</id>
		<title>BEOK</title>
		<link rel="alternate" type="text/html" href="http://wiki.fhem.de/w/index.php?title=BEOK&amp;diff=30305"/>
		<updated>2019-04-30T21:01:45Z</updated>

		<summary type="html">&lt;p&gt;ZDX: lock Beschreibung hinzugefügt&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox Modul&lt;br /&gt;
|ModPurpose=WiFi Raum-Thermostate für FHEM &lt;br /&gt;
|ModType=d&lt;br /&gt;
|ModCmdRef=BEOK&lt;br /&gt;
|ModForumArea=Heizungssteuerung/Raumklima&lt;br /&gt;
|ModTechName=38_BEOK.pm&lt;br /&gt;
|ModOwner=Wzut ({{Link2FU|1172|Forum}} / [[Benutzer Diskussion:plin/Wzut|Wiki]])}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Das Modul &#039;&#039;&#039;BEOK&#039;&#039;&#039; implementiert die Steuerung von FHEM zu BEOK / Floureon / Hysen WiFi Raum-Thermostaten.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Voraussetzungen ==&lt;br /&gt;
=== FHEM-Server ===&lt;br /&gt;
&lt;br /&gt;
Da das Modul AES-Verschlüsselung benötigt, müssen ggf. noch zusätzliche Perl Module installiert werden.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bsp. für Debian/Raspian :&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;code&amp;gt;sudo apt-get install libcrypt-cbc-perl&amp;lt;/code&amp;gt;&lt;br /&gt;
  &amp;lt;code&amp;gt;sudo apt-get install libcrypt-rijndael-perl&amp;lt;/code&amp;gt;&lt;br /&gt;
  &amp;lt;code&amp;gt;sudo apt-get install libssl-dev&amp;lt;/code&amp;gt;&lt;br /&gt;
  &amp;lt;code&amp;gt;sudo cpan Crypt/OpenSSL/AES.pm&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
Bezugsquellen :&amp;lt;br&amp;gt;&lt;br /&gt;
[https://www.amazon.de/Fussbodenheizung-Touchscreen-Intelligente-Programmierbare-Raumthermostat/dp/B07B8TKG5Y/  Amazon] Chunyang weiss Tasten 28€&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[https://de.aliexpress.com/item/16A-AC-220-V-WIFI-Heizung-Thermostat-Wasser-Elektrische-Heizung-System-WIFI-Thermostat-APP-Steuert-f/32889325428.html Ali] KETOTEK weiss Tasten ca 25€&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[https://www.amazon.de/FLOUREON-programmierbar-Fussbodenheizung-Heizungsthermostat-Heizungsregelung/dp/B077G6JKCX/ref=sr_1_2?s=diy&amp;amp;ie=UTF8&amp;amp;qid=1547653340&amp;amp;sr=1-2&amp;amp;keywords=floureon+wifi+raumthermostat Amazon] Floureon schwarz Touch 40 €&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[https://de.aliexpress.com/item/Floureon-Smart-Wi-Fi-Programmable-Thermostat-Digital-Touch-Screen-Room-Temperature-Controller-NTC-Underfloor-Heating-Thermostat/32826733099.html  Ali] Floureon schwarz Touch 31 €&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[https://www.amazon.de/BEOK-tds21wifi-ep-Raumthermostat-programmierbar-Fu%C3%9Fbodenheizung/dp/B075WPWGH5/ Amazon]&lt;br /&gt;
BEOK TDS21 weiß Touch ca 40€ – z.Z. bei  Ali nicht lieferbar&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
=== Erste Schritte ===&lt;br /&gt;
Spätestens nach einem &#039;update all&#039; sollte das Modul &#039;&#039;&#039;38_BEOK.pm&#039;&#039;&#039; verfügbar sein.&lt;br /&gt;
&lt;br /&gt;
Nun ist ein Device in FHEM anzulegen:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;define &amp;lt;name&amp;gt; BEOK &amp;lt;ip&amp;gt; [mac]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Zum Beispiel &lt;br /&gt;
  &amp;lt;code&amp;gt;define Thermo BEOK 192.168.1.100&amp;lt;/code&amp;gt;&lt;br /&gt;
  &amp;lt;code&amp;gt;define Thermo BEOK 192.168.1.100 de:ad:be:ef:01:02&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Anwendung ==&lt;br /&gt;
=== Attribute ===&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;interval&#039;&#039;&#039;&lt;br /&gt;
: Poll Intevall in Sekunden,  0 = kein Polling , default 60&lt;br /&gt;
* &#039;&#039;&#039;timesync&#039;&#039;&#039;&lt;br /&gt;
: Uhrzeit und Wochentag automatisch mit FHEM synchronisieren, default 1 (an)&lt;br /&gt;
* &#039;&#039;&#039;timeout&#039;&#039;&#039;&lt;br /&gt;
: Timeout in Sekunden für die Netzwerk Kommunikation, default 5&lt;br /&gt;
* &#039;&#039;&#039;language&#039;&#039;&#039;&lt;br /&gt;
: de oder DE f&amp;amp;uuml;r deutsche Bezeichnungen, Raum statt Room , usw.&lt;br /&gt;
* &#039;&#039;&#039;model&#039;&#039;&#039;&lt;br /&gt;
: nur für die FHEM Modul Statistik unter [https://fhem.de/stats/statistics.html https://fhem.de/stats/statistics.html]&lt;br /&gt;
&lt;br /&gt;
=== Set ===&lt;br /&gt;
&lt;br /&gt;
Das Modul kennt derzeit folgende Commands&lt;br /&gt;
&lt;br /&gt;
* set &amp;lt;name&amp;gt; &#039;&#039;&#039;desired-temp &amp;lt;5 - 99&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
: Gewünschte Zieltemperatur&lt;br /&gt;
&lt;br /&gt;
* set &amp;lt;name&amp;gt; &#039;&#039;&#039;mode &amp;lt;auto|manual&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
: Modus auf automatisch oder manuell setzen&lt;br /&gt;
&lt;br /&gt;
* set &amp;lt;name&amp;gt; &#039;&#039;&#039;loop &amp;lt;12345.67 123456.7 1234567&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
: 12345.67 Montag - Freitag Werktag, Samstag &amp;amp; Sonntag sind Wochenende&lt;br /&gt;
: 123456.7 Montag - Samstag Werktag, nur Sonntag ist Wochendende&lt;br /&gt;
: 1234567 jeder Tag (inklusive Samstag &amp;amp; Sonntag) ist ein Werktag, kein Wochenende &lt;br /&gt;
&lt;br /&gt;
* set &amp;lt;name&amp;gt; &#039;&#039;&#039;sensor &amp;lt;external|internal|both&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
: both = internal control temperature, external limit temperature &lt;br /&gt;
&lt;br /&gt;
* set &amp;lt;name&amp;gt; &#039;&#039;&#039;time&#039;&#039;&#039;&lt;br /&gt;
: synchronisiert Uhrzeit und Wochentag mit FHEM  &lt;br /&gt;
&lt;br /&gt;
* set &amp;lt;name&amp;gt; &#039;&#039;&#039;lock &amp;lt;on off&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
: sperrt die Tasten am Gerät (außer ein/aus), Bedienung nur via W-LAN möglich&lt;br /&gt;
&lt;br /&gt;
* set &amp;lt;name&amp;gt; &#039;&#039;&#039;power-on-memory &amp;lt;on off&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
: tbd &lt;br /&gt;
&lt;br /&gt;
* set &amp;lt;name&amp;gt; &#039;&#039;&#039;fre &amp;lt;open|close&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
: Frostschutz Funktion&lt;br /&gt;
&lt;br /&gt;
* set &amp;lt;name&amp;gt; &#039;&#039;&#039;room-temp-adj &amp;lt;-5 - +5&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
: Korrekturwert (Offset) Raumtemperatur&lt;br /&gt;
&lt;br /&gt;
* set &amp;lt;name&amp;gt; &#039;&#039;&#039;osv &amp;lt;5 - 99&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
: Maximum Temperatur für externen Sensor &lt;br /&gt;
&lt;br /&gt;
* set &amp;lt;name&amp;gt; &#039;&#039;&#039;svh &amp;lt;5 - 99&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
: Raumtemperatur Maximum&lt;br /&gt;
&lt;br /&gt;
* set &amp;lt;name&amp;gt; &#039;&#039;&#039;svl &amp;lt;5 - 99&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
: Raumtemperatur Minimum&lt;br /&gt;
&lt;br /&gt;
* set &amp;lt;name&amp;gt; &#039;&#039;&#039;dif &amp;lt;1 - 9&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
: difference of limit temperature value of external sensor &lt;br /&gt;
&lt;br /&gt;
* set &amp;lt;name&amp;gt; &#039;&#039;&#039;day-profil[1-6]-temp &amp;lt;5 - 99&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
: Werktagprofil Temperatur &lt;br /&gt;
&lt;br /&gt;
* set &amp;lt;name&amp;gt; &#039;&#039;&#039;day-profil[1-6]-time &amp;lt;00:00 - 23:59&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
: Werktagprofil Zeit &lt;br /&gt;
&lt;br /&gt;
* set &amp;lt;name&amp;gt; &#039;&#039;&#039;we-profile[7-8]-temp &amp;lt;5 - 99&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
: Wochenendprofil Temperatu&lt;br /&gt;
&lt;br /&gt;
* set &amp;lt;name&amp;gt; &#039;&#039;&#039;we-profile[7-8]-time &amp;lt;00:00 - 23:59&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
: Wochenendprofil Zeit &lt;br /&gt;
&lt;br /&gt;
* set &amp;lt;name&amp;gt; &#039;&#039;&#039;weekprofile&#039;&#039;&#039;&lt;br /&gt;
: Setzt alle Wochentag Schaltzeiten und Temperaturen mit Werten aus einem Profil des Moduls weekprofile.&lt;br /&gt;
: Syntax : set weekprofile &amp;lt;weekprofile_device:profil_name[:Wochentag]&amp;gt;&lt;br /&gt;
: siehe auch Erklärung im Forum :{{Link2Forum|Topic=80703|Message=901303}}&lt;br /&gt;
&lt;br /&gt;
== Anwendungsbeispiele ==&lt;br /&gt;
&lt;br /&gt;
folgen noch&lt;br /&gt;
&lt;br /&gt;
== Bekannte Probleme / Fehlersuche ==&lt;br /&gt;
&lt;br /&gt;
folgen noch&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* Erläuterung im Forum: {{Link2Forum|Topic=80703|Message=901303}}&lt;br /&gt;
* FHEM Modul Statistik unter [https://fhem.de/stats/statistics.html https://fhem.de/stats/statistics.html]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Kategorie:Heizungssteuerung]] &lt;br /&gt;
&amp;lt;!-- (Modulkategorie wird automatisch gesetzt) --&amp;gt;&lt;/div&gt;</summary>
		<author><name>ZDX</name></author>
	</entry>
	<entry>
		<id>http://wiki.fhem.de/w/index.php?title=Waterkotte_heat_pump_with_Res%C3%BCmat_CD4&amp;diff=30219</id>
		<title>Waterkotte heat pump with Resümat CD4</title>
		<link rel="alternate" type="text/html" href="http://wiki.fhem.de/w/index.php?title=Waterkotte_heat_pump_with_Res%C3%BCmat_CD4&amp;diff=30219"/>
		<updated>2019-04-21T17:41:37Z</updated>

		<summary type="html">&lt;p&gt;ZDX: Hinweis zu anderer Version verbessert&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox Modul&lt;br /&gt;
|ModPurpose=Control / Extract information from Waterkotte Heat pumps with Resümat CD4 controller&lt;br /&gt;
|ModType=contrib&lt;br /&gt;
|ModCmdRef=WKRCD4&lt;br /&gt;
|ModForumArea=Sonstiges&lt;br /&gt;
|ModFTopic=17658&lt;br /&gt;
|ModTechName=98_WKRCD4.pm&lt;br /&gt;
|ModOwner=StefanStrobel ({{Link2FU|3960|Forum}} / [[Benutzer:StefanStrobel|Wiki]])&lt;br /&gt;
}}&lt;br /&gt;
WKRCD4 allows to control / communicate with older heat pumps from Waterkotte that have a control unit called Resümat CD4 with an RS232 serial interface. Newer heat pumps from Waterkotte typically have a modbus interface that can be controlled with module [[ModbusAttr]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
CD4 control units with software version 7000, 8000 or 8011 can be controlled with [https://forum.fhem.de/index.php/topic,83006.msg886622.html#msg886622 another version] of the WKRCD4 module.&lt;br /&gt;
&lt;br /&gt;
== Availability == &lt;br /&gt;
The module has been checked in to the contrib area.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
This module requires Device::SerialPort or Win32::SerialPort module.&lt;br /&gt;
&lt;br /&gt;
== Define ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define &amp;lt;name&amp;gt; WKRCD4 &amp;lt;devicename@speed&amp;gt; &amp;lt;Interval&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The module connects to the heat pump through a serial interface and actively requests data from the heat pump every &amp;lt;Interval&amp;gt; seconds&lt;br /&gt;
&lt;br /&gt;
=== Example:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define WP WKRCD4 /dev/dualser0@9600 60&lt;br /&gt;
attr WP stateFormat Status&lt;br /&gt;
attr WP event-min-interval .*:3600&lt;br /&gt;
attr WP event-on-change-reading .*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuration of the module ==&lt;br /&gt;
Apart from the serial interface and the interval there is nothing that needs to be defined.&lt;br /&gt;
&lt;br /&gt;
== Get-Commands ==&lt;br /&gt;
There are only two parameters for which an explicit GET has been implemented. Most values are just readings that are automatically requested:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Hzg-TempBasisSoll&lt;br /&gt;
WW-Temp-Soll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Set-Commands ==&lt;br /&gt;
There is only one parameter that can be changed:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Hzg-TempBasisSoll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Supported readings ==&lt;br /&gt;
The module extracts the following readings from the heat pump:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Versions-Nummer       &lt;br /&gt;
Temp-Aussen           &lt;br /&gt;
Temp-Ruecklauf-Soll   &lt;br /&gt;
Temp-Ruecklauf        &lt;br /&gt;
Temp-Vorlauf          &lt;br /&gt;
Temp-WW-Soll          &lt;br /&gt;
Temp-WW               &lt;br /&gt;
Temp-Raum             &lt;br /&gt;
Temp-WQuelle-Ein      &lt;br /&gt;
Temp-WQuelle-Aus      &lt;br /&gt;
Temp-Verdampfer       &lt;br /&gt;
Temp-Kondensator      &lt;br /&gt;
Temp-Saugleitung      &lt;br /&gt;
Druck-Verdampfer      &lt;br /&gt;
Druck-Kondensator     &lt;br /&gt;
Hzg-TempEinsatz       &lt;br /&gt;
Hzg-TempBasisSoll     &lt;br /&gt;
Hzg-KlSteilheit       &lt;br /&gt;
Hzg-KlBegrenz         &lt;br /&gt;
Hzg-TempRlSoll        &lt;br /&gt;
Hzg-TempRlIst         &lt;br /&gt;
Hzg-TmpRaumSoll       &lt;br /&gt;
Hzg-RaumEinfluss      &lt;br /&gt;
Hzg-ExtAnhebung       &lt;br /&gt;
Hzg-Zeit-Ein          &lt;br /&gt;
Hzg-Zeit-Aus          &lt;br /&gt;
Hzg-AnhebungEin       &lt;br /&gt;
Hzg-AnhebungAus       &lt;br /&gt;
Hzg-St2Begrenz        &lt;br /&gt;
Hzg-Hysterese         &lt;br /&gt;
Hzg-PumpenNachl       &lt;br /&gt;
Klg-Abschaltung       &lt;br /&gt;
Klg-Temp-Einsatz      &lt;br /&gt;
Klg-TeBasisSoll       &lt;br /&gt;
Klg-KlSteilheit       &lt;br /&gt;
Klg-KlBegrenz         &lt;br /&gt;
Klg-KlSollwert        &lt;br /&gt;
Klg-Temp-Rl           &lt;br /&gt;
Ww-Abschaltung        &lt;br /&gt;
Ww-Zeit-Ein           &lt;br /&gt;
Ww-Zeit-Aus           &lt;br /&gt;
Ww-Temp-Ist           &lt;br /&gt;
Ww-Temp-Soll          &lt;br /&gt;
Ww-Hysterese          &lt;br /&gt;
Uhrzeit               &lt;br /&gt;
Datum                 &lt;br /&gt;
BetrStundenKompressor &lt;br /&gt;
BetrStundenHzgPu      &lt;br /&gt;
BetrStundenWwPu       &lt;br /&gt;
BetrStundenSt2        &lt;br /&gt;
Zeit                  &lt;br /&gt;
SetBetriebsMode       &lt;br /&gt;
Display-Zeile-1       &lt;br /&gt;
Display-Zeile-2       &lt;br /&gt;
Status-Gesamt         &lt;br /&gt;
Status-Heizung        &lt;br /&gt;
Status-Kuehlung       &lt;br /&gt;
Mode-Heizung          &lt;br /&gt;
Mode-Kuehlung         &lt;br /&gt;
Mode-Warmwasser       &lt;br /&gt;
Heizung               &lt;br /&gt;
Kuehlung              &lt;br /&gt;
Warmwasser  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Attributes ==&lt;br /&gt;
;do_not_notify&lt;br /&gt;
: ...&lt;br /&gt;
;readingFnAttributes&lt;br /&gt;
: ...&lt;br /&gt;
&lt;br /&gt;
[[Kategorie:Other Components]]&lt;br /&gt;
[[Kategorie:Heizungssteuerung]]&lt;/div&gt;</summary>
		<author><name>ZDX</name></author>
	</entry>
	<entry>
		<id>http://wiki.fhem.de/w/index.php?title=Waterkotte_heat_pump_with_Res%C3%BCmat_CD4&amp;diff=30214</id>
		<title>Waterkotte heat pump with Resümat CD4</title>
		<link rel="alternate" type="text/html" href="http://wiki.fhem.de/w/index.php?title=Waterkotte_heat_pump_with_Res%C3%BCmat_CD4&amp;diff=30214"/>
		<updated>2019-04-21T12:27:18Z</updated>

		<summary type="html">&lt;p&gt;ZDX: Zeilenumbruch korrigiert&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox Modul&lt;br /&gt;
|ModPurpose=Control / Extract information from Waterkotte Heat pumps with Resümat CD4 controller&lt;br /&gt;
|ModType=contrib&lt;br /&gt;
|ModCmdRef=WKRCD4&lt;br /&gt;
|ModForumArea=Sonstiges&lt;br /&gt;
|ModFTopic=17658&lt;br /&gt;
|ModTechName=98_WKRCD4.pm&lt;br /&gt;
|ModOwner=StefanStrobel ({{Link2FU|3960|Forum}} / [[Benutzer:StefanStrobel|Wiki]])&lt;br /&gt;
}}&lt;br /&gt;
WKRCD4 allows to control / communicate with older heat pumps from Waterkotte that have a control unit called Resümat CD4 with an RS232 serial interface. Newer heat pumps from Waterkotte typically have a modbus interface that can be controlled with module [[ModbusAttr]].&lt;br /&gt;
CD4 control units with software version 7000, 8000 or 8011 have to be controlled with [https://forum.fhem.de/index.php/topic,83006.msg886622.html#msg886622 another version] of the WKRCD4 module.&lt;br /&gt;
&lt;br /&gt;
== Availability == &lt;br /&gt;
The module has been checked in to the contrib area.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
This module requires Device::SerialPort or Win32::SerialPort module.&lt;br /&gt;
&lt;br /&gt;
== Define ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define &amp;lt;name&amp;gt; WKRCD4 &amp;lt;devicename@speed&amp;gt; &amp;lt;Interval&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The module connects to the heat pump through a serial interface and actively requests data from the heat pump every &amp;lt;Interval&amp;gt; seconds&lt;br /&gt;
&lt;br /&gt;
=== Example:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define WP WKRCD4 /dev/dualser0@9600 60&lt;br /&gt;
attr WP stateFormat Status&lt;br /&gt;
attr WP event-min-interval .*:3600&lt;br /&gt;
attr WP event-on-change-reading .*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuration of the module ==&lt;br /&gt;
Apart from the serial interface and the interval there is nothing that needs to be defined.&lt;br /&gt;
&lt;br /&gt;
== Get-Commands ==&lt;br /&gt;
There are only two parameters for which an explicit GET has been implemented. Most values are just readings that are automatically requested:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Hzg-TempBasisSoll&lt;br /&gt;
WW-Temp-Soll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Set-Commands ==&lt;br /&gt;
There is only one parameter that can be changed:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Hzg-TempBasisSoll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Supported readings ==&lt;br /&gt;
The module extracts the following readings from the heat pump:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Versions-Nummer       &lt;br /&gt;
Temp-Aussen           &lt;br /&gt;
Temp-Ruecklauf-Soll   &lt;br /&gt;
Temp-Ruecklauf        &lt;br /&gt;
Temp-Vorlauf          &lt;br /&gt;
Temp-WW-Soll          &lt;br /&gt;
Temp-WW               &lt;br /&gt;
Temp-Raum             &lt;br /&gt;
Temp-WQuelle-Ein      &lt;br /&gt;
Temp-WQuelle-Aus      &lt;br /&gt;
Temp-Verdampfer       &lt;br /&gt;
Temp-Kondensator      &lt;br /&gt;
Temp-Saugleitung      &lt;br /&gt;
Druck-Verdampfer      &lt;br /&gt;
Druck-Kondensator     &lt;br /&gt;
Hzg-TempEinsatz       &lt;br /&gt;
Hzg-TempBasisSoll     &lt;br /&gt;
Hzg-KlSteilheit       &lt;br /&gt;
Hzg-KlBegrenz         &lt;br /&gt;
Hzg-TempRlSoll        &lt;br /&gt;
Hzg-TempRlIst         &lt;br /&gt;
Hzg-TmpRaumSoll       &lt;br /&gt;
Hzg-RaumEinfluss      &lt;br /&gt;
Hzg-ExtAnhebung       &lt;br /&gt;
Hzg-Zeit-Ein          &lt;br /&gt;
Hzg-Zeit-Aus          &lt;br /&gt;
Hzg-AnhebungEin       &lt;br /&gt;
Hzg-AnhebungAus       &lt;br /&gt;
Hzg-St2Begrenz        &lt;br /&gt;
Hzg-Hysterese         &lt;br /&gt;
Hzg-PumpenNachl       &lt;br /&gt;
Klg-Abschaltung       &lt;br /&gt;
Klg-Temp-Einsatz      &lt;br /&gt;
Klg-TeBasisSoll       &lt;br /&gt;
Klg-KlSteilheit       &lt;br /&gt;
Klg-KlBegrenz         &lt;br /&gt;
Klg-KlSollwert        &lt;br /&gt;
Klg-Temp-Rl           &lt;br /&gt;
Ww-Abschaltung        &lt;br /&gt;
Ww-Zeit-Ein           &lt;br /&gt;
Ww-Zeit-Aus           &lt;br /&gt;
Ww-Temp-Ist           &lt;br /&gt;
Ww-Temp-Soll          &lt;br /&gt;
Ww-Hysterese          &lt;br /&gt;
Uhrzeit               &lt;br /&gt;
Datum                 &lt;br /&gt;
BetrStundenKompressor &lt;br /&gt;
BetrStundenHzgPu      &lt;br /&gt;
BetrStundenWwPu       &lt;br /&gt;
BetrStundenSt2        &lt;br /&gt;
Zeit                  &lt;br /&gt;
SetBetriebsMode       &lt;br /&gt;
Display-Zeile-1       &lt;br /&gt;
Display-Zeile-2       &lt;br /&gt;
Status-Gesamt         &lt;br /&gt;
Status-Heizung        &lt;br /&gt;
Status-Kuehlung       &lt;br /&gt;
Mode-Heizung          &lt;br /&gt;
Mode-Kuehlung         &lt;br /&gt;
Mode-Warmwasser       &lt;br /&gt;
Heizung               &lt;br /&gt;
Kuehlung              &lt;br /&gt;
Warmwasser  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Attributes ==&lt;br /&gt;
;do_not_notify&lt;br /&gt;
: ...&lt;br /&gt;
;readingFnAttributes&lt;br /&gt;
: ...&lt;br /&gt;
&lt;br /&gt;
[[Kategorie:Other Components]]&lt;br /&gt;
[[Kategorie:Heizungssteuerung]]&lt;/div&gt;</summary>
		<author><name>ZDX</name></author>
	</entry>
	<entry>
		<id>http://wiki.fhem.de/w/index.php?title=Waterkotte_heat_pump_with_Res%C3%BCmat_CD4&amp;diff=30213</id>
		<title>Waterkotte heat pump with Resümat CD4</title>
		<link rel="alternate" type="text/html" href="http://wiki.fhem.de/w/index.php?title=Waterkotte_heat_pump_with_Res%C3%BCmat_CD4&amp;diff=30213"/>
		<updated>2019-04-21T12:26:34Z</updated>

		<summary type="html">&lt;p&gt;ZDX: Hinweis für Software-Version 7000/8000/8011 hinzugefügt.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox Modul&lt;br /&gt;
|ModPurpose=Control / Extract information from Waterkotte Heat pumps with Resümat CD4 controller&lt;br /&gt;
|ModType=contrib&lt;br /&gt;
|ModCmdRef=WKRCD4&lt;br /&gt;
|ModForumArea=Sonstiges&lt;br /&gt;
|ModFTopic=17658&lt;br /&gt;
|ModTechName=98_WKRCD4.pm&lt;br /&gt;
|ModOwner=StefanStrobel ({{Link2FU|3960|Forum}} / [[Benutzer:StefanStrobel|Wiki]])&lt;br /&gt;
}}&lt;br /&gt;
WKRCD4 allows to control / communicate with older heat pumps from Waterkotte that have a control unit called Resümat CD4 with an RS232 serial interface. Newer heat pumps from Waterkotte typically have a modbus interface that can be controlled with module [[ModbusAttr]].&lt;br /&gt;
&lt;br /&gt;
CD4 control units with software version 7000, 8000 or 8011 have to be controlled with [https://forum.fhem.de/index.php/topic,83006.msg886622.html#msg886622 another version] of the WKRCD4 module.&lt;br /&gt;
&lt;br /&gt;
== Availability == &lt;br /&gt;
The module has been checked in to the contrib area.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
This module requires Device::SerialPort or Win32::SerialPort module.&lt;br /&gt;
&lt;br /&gt;
== Define ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define &amp;lt;name&amp;gt; WKRCD4 &amp;lt;devicename@speed&amp;gt; &amp;lt;Interval&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The module connects to the heat pump through a serial interface and actively requests data from the heat pump every &amp;lt;Interval&amp;gt; seconds&lt;br /&gt;
&lt;br /&gt;
=== Example:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define WP WKRCD4 /dev/dualser0@9600 60&lt;br /&gt;
attr WP stateFormat Status&lt;br /&gt;
attr WP event-min-interval .*:3600&lt;br /&gt;
attr WP event-on-change-reading .*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuration of the module ==&lt;br /&gt;
Apart from the serial interface and the interval there is nothing that needs to be defined.&lt;br /&gt;
&lt;br /&gt;
== Get-Commands ==&lt;br /&gt;
There are only two parameters for which an explicit GET has been implemented. Most values are just readings that are automatically requested:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Hzg-TempBasisSoll&lt;br /&gt;
WW-Temp-Soll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Set-Commands ==&lt;br /&gt;
There is only one parameter that can be changed:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Hzg-TempBasisSoll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Supported readings ==&lt;br /&gt;
The module extracts the following readings from the heat pump:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Versions-Nummer       &lt;br /&gt;
Temp-Aussen           &lt;br /&gt;
Temp-Ruecklauf-Soll   &lt;br /&gt;
Temp-Ruecklauf        &lt;br /&gt;
Temp-Vorlauf          &lt;br /&gt;
Temp-WW-Soll          &lt;br /&gt;
Temp-WW               &lt;br /&gt;
Temp-Raum             &lt;br /&gt;
Temp-WQuelle-Ein      &lt;br /&gt;
Temp-WQuelle-Aus      &lt;br /&gt;
Temp-Verdampfer       &lt;br /&gt;
Temp-Kondensator      &lt;br /&gt;
Temp-Saugleitung      &lt;br /&gt;
Druck-Verdampfer      &lt;br /&gt;
Druck-Kondensator     &lt;br /&gt;
Hzg-TempEinsatz       &lt;br /&gt;
Hzg-TempBasisSoll     &lt;br /&gt;
Hzg-KlSteilheit       &lt;br /&gt;
Hzg-KlBegrenz         &lt;br /&gt;
Hzg-TempRlSoll        &lt;br /&gt;
Hzg-TempRlIst         &lt;br /&gt;
Hzg-TmpRaumSoll       &lt;br /&gt;
Hzg-RaumEinfluss      &lt;br /&gt;
Hzg-ExtAnhebung       &lt;br /&gt;
Hzg-Zeit-Ein          &lt;br /&gt;
Hzg-Zeit-Aus          &lt;br /&gt;
Hzg-AnhebungEin       &lt;br /&gt;
Hzg-AnhebungAus       &lt;br /&gt;
Hzg-St2Begrenz        &lt;br /&gt;
Hzg-Hysterese         &lt;br /&gt;
Hzg-PumpenNachl       &lt;br /&gt;
Klg-Abschaltung       &lt;br /&gt;
Klg-Temp-Einsatz      &lt;br /&gt;
Klg-TeBasisSoll       &lt;br /&gt;
Klg-KlSteilheit       &lt;br /&gt;
Klg-KlBegrenz         &lt;br /&gt;
Klg-KlSollwert        &lt;br /&gt;
Klg-Temp-Rl           &lt;br /&gt;
Ww-Abschaltung        &lt;br /&gt;
Ww-Zeit-Ein           &lt;br /&gt;
Ww-Zeit-Aus           &lt;br /&gt;
Ww-Temp-Ist           &lt;br /&gt;
Ww-Temp-Soll          &lt;br /&gt;
Ww-Hysterese          &lt;br /&gt;
Uhrzeit               &lt;br /&gt;
Datum                 &lt;br /&gt;
BetrStundenKompressor &lt;br /&gt;
BetrStundenHzgPu      &lt;br /&gt;
BetrStundenWwPu       &lt;br /&gt;
BetrStundenSt2        &lt;br /&gt;
Zeit                  &lt;br /&gt;
SetBetriebsMode       &lt;br /&gt;
Display-Zeile-1       &lt;br /&gt;
Display-Zeile-2       &lt;br /&gt;
Status-Gesamt         &lt;br /&gt;
Status-Heizung        &lt;br /&gt;
Status-Kuehlung       &lt;br /&gt;
Mode-Heizung          &lt;br /&gt;
Mode-Kuehlung         &lt;br /&gt;
Mode-Warmwasser       &lt;br /&gt;
Heizung               &lt;br /&gt;
Kuehlung              &lt;br /&gt;
Warmwasser  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Attributes ==&lt;br /&gt;
;do_not_notify&lt;br /&gt;
: ...&lt;br /&gt;
;readingFnAttributes&lt;br /&gt;
: ...&lt;br /&gt;
&lt;br /&gt;
[[Kategorie:Other Components]]&lt;br /&gt;
[[Kategorie:Heizungssteuerung]]&lt;/div&gt;</summary>
		<author><name>ZDX</name></author>
	</entry>
	<entry>
		<id>http://wiki.fhem.de/w/index.php?title=HomeMatic_Wired&amp;diff=30100</id>
		<title>HomeMatic Wired</title>
		<link rel="alternate" type="text/html" href="http://wiki.fhem.de/w/index.php?title=HomeMatic_Wired&amp;diff=30100"/>
		<updated>2019-04-04T17:04:24Z</updated>

		<summary type="html">&lt;p&gt;ZDX: /* Aktoren / Sensoren */ Schreibfehler korrigiert&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;HomeMatic Wired&#039;&#039;&#039; (HMW / HM485) ist ein auf RS485 basierendes Bussystem für die Hausautomation. Die Auswahl an Aktoren und Sensoren ist im Vergleich zum [[HomeMatic]]-Funksystem geringer. Die wichtigsten Funktionen wie Lichtsteuerung, Rollläden, Tür- / Fenstersensoren, Schalter und Taster lassen sich aber integrieren. Über verschiedene I/O-Module lassen sich viele weitere Geräte anschließen. Auch analoge Messwerte können ausgewertet werden, so dass hier z.B. auch Temperatursensoren integriert werden könnten. &lt;br /&gt;
&lt;br /&gt;
Alle Module sind rückkanalfähig, d.h. es erfolgt eine Rückmeldung, wenn ein Gerät eine Nachricht erhalten hat (&#039;&#039;ACK&#039;&#039; für &#039;&#039;&#039;Ack&#039;&#039;&#039;nowledgement, also Empfangsbestätigung). Auch werden externe Zustandsänderungen der Geräte unmittelbar über den Bus weitergeleitet (bei den meisten Geräten ist letzteres abschaltbar).&lt;br /&gt;
&lt;br /&gt;
Alle HMW-Module werden über den Bus mit Energie versorgt. Batteriebetriebene Module sind nicht vorgesehen und auch nicht sinnvoll, da HMW ein kabelgebundenes System ist.&lt;br /&gt;
&lt;br /&gt;
== Installation und Upgrade in FHEM ==&lt;br /&gt;
Für den Einsatz mit FHEM benötigt man die entsprechende [[:Kategorie:Server_Hardware|Rechner-Hardware]], FHEM selbst und einen Übertragungs- bzw. Konfigurationsadapter ([[Interface]]) wie z.B. einen [[Serial/Netzwerk-RS485-Adapter]] oder das [[HomeMatic Wired RS485 LAN Gateway]], wobei letzteres nicht wirklich empfohlen werden kann.&lt;br /&gt;
&lt;br /&gt;
HM485 ist nicht automatisch Teil von FHEM. Es muss explizit installiert bzw. hinzugefügt werden. Die Installation funktioniert folgendermaßen:&lt;br /&gt;
* Falls man sich seiner Sache nicht ganz sicher ist, empfiehlt sich zuerst ein Backup der FHEM-Installation.&lt;br /&gt;
* HM485 benötigt das Perl-Modul XML::Simple. Unter Debian (inklusive normaler Raspberry-Installationen) ist dieses Modul im Paket libxml-simple-perl enthalten, kann also mittels &amp;lt;code&amp;gt;apt-get install libxml-simple-perl&amp;lt;/code&amp;gt; (auf Betriebssystemebene als root) installiert werden. Ansonsten kann es z.B. über Cpan installiert werden.&lt;br /&gt;
* Falls man den letzten FHEM-Update vor dem 24.12.2015 gemacht hat, dann muss man vor der HM485-Installation einen Update durchführen. Also im Kommandofeld eingeben:&amp;lt;code&amp;gt;update&amp;lt;/code&amp;gt; Dann den Update-Vorgang abwarten und Neustarten:&amp;lt;code&amp;gt;shutdown restart&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Dann das HM485-Repository zum FHEM Update hinzufügen: &lt;br /&gt;
** &amp;lt;code&amp;gt;update add https://raw.githubusercontent.com/kc-GitHub/FHEM-HM485/master/controls_hm485.txt&amp;lt;/code&amp;gt;&lt;br /&gt;
* Jetzt &amp;lt;code&amp;gt;update force hm485&amp;lt;/code&amp;gt; und &amp;lt;code&amp;gt;shutdown restart&amp;lt;/code&amp;gt;. HM485 sollte jetzt installiert sein.&lt;br /&gt;
* Es muss jetzt noch sichergestellt werden, dass das Programm HM485d.pl (im Verzeichnis FHEM/lib/HM485/HM485d) für den User fhem ausführbar ist. Das ist normalerweise nicht automatisch der Fall. Es muss im Zweifelsfall per &amp;lt;code&amp;gt;sudo chmod a+x HM485d.pl&amp;lt;/code&amp;gt; ausführbar gemacht werden.&lt;br /&gt;
&lt;br /&gt;
Zum Upgrade reicht ein &amp;lt;code&amp;gt;update&amp;lt;/code&amp;gt;, wenn man HM485 wie oben beschrieben installiert hat. Ansonsten kann man auch das HM485-Repository nachträglich eintragen wie oben beschrieben. Wenn man von einer manuellen Installation auf die &amp;quot;update add&amp;quot;-Variante wechselt, dann sollte man das erste Mal immer &amp;lt;code&amp;gt;update force hm485&amp;lt;/code&amp;gt; machen. Will man nur den HM485-Teil aktualisieren und nicht alles in FHEM, dann geht das mit &amp;lt;code&amp;gt;update all hm485&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Falls es insbesondere beim Upgrade oder nach einem Upgrade Probleme gibt (welcher Art auch immer), sollten die folgenden Punkte geprüft werden:&lt;br /&gt;
* Wird das richtige Repository benutzt? Man kann das mit &amp;lt;code&amp;gt;update list&amp;lt;/code&amp;gt; überprüfen. Wenn der Eintrag für hm485 nicht genau so aussieht wie oben beschrieben, dann sollte er per &amp;lt;code&amp;gt;update delete&amp;lt;/code&amp;gt; gelöscht werden und dann genau so eingetragen werden wie oben beschrieben. Insbesondere Zwischenversionen wie &amp;quot;dev&amp;quot;, &amp;quot;v0800&amp;quot; oder &amp;quot;thorsten&amp;quot; gibt es nur temporär und sollten nur zum Testen verwendet werden.  &lt;br /&gt;
* Ist XML::Simple installiert? Siehe die Installationanleitung weiter oben für Details.&lt;br /&gt;
* FHEM braucht Schreibrechte im Verzeichnis &amp;lt;fhem&amp;gt;/FHEM/lib/HM485/Devices (&amp;lt;fhem&amp;gt; steht meistens für /opt/fhem) und allen Dateien und Unterverzeichnissen. Auf Betriebssystemebene (Linux) kann man das mit &amp;lt;code&amp;gt;ls -ls&amp;lt;/code&amp;gt; überprüfen. Meistens kann es mit folgendem Befehl repariert werden: &amp;lt;code&amp;gt;chown -R fhem:dialout /opt/fhem/FHEM/lib/HM485/Devices&amp;lt;/code&amp;gt;. &lt;br /&gt;
* Wenn das nicht hilft, dann kann man auch vor einem &amp;lt;code&amp;gt;shutdown restart&amp;lt;/code&amp;gt; alle pm-Dateien im Devices-Verzeichnis löschen (&amp;lt;code&amp;gt;rm /opt/fhem/FHEM/lib/HM485/Devices/*.pm&amp;lt;/code&amp;gt;). Diese Dateien werden beim nächsten FHEM-Start neu generiert.&lt;br /&gt;
&lt;br /&gt;
== Verkabelung ==&lt;br /&gt;
Das folgende Bild zeigt die Verkabelung von HM-Wired am Beispiel eines seriellen USB-Adapters und zwei Geräten.&lt;br /&gt;
[[File:HM-Wired-Verkabelung-Digitus.jpg|border|700px|Verkabelungsbeispiel HM-Wired]]&lt;br /&gt;
&lt;br /&gt;
Im Unterschied zu anderen RS485-Bussystemen wird GND immer mit verbunden. Außerdem sind die Widerstandswerte des sogenannten Busabschluss zu beachten.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Der sogenannte Busabschluss ==&lt;br /&gt;
&lt;br /&gt;
Im Gegensatz zu anderen RS485-Bussystemen braucht Homematic Wired keinen echten Busabschluss. Die Datenübertragungsrate ist zu niedrig, als dass es zu Problemen wegen Reflexionen kommt. Wahrscheinlich kann es durch den üblichen RS485-Busabschluss (etwa 120 Ohm zwischen A und B) sogar vorkommen, dass der Bus nicht richtig funktioniert oder sogar Geräte beschädigt werden. &lt;br /&gt;
Das, was von eq3 als Abschlusswiderstand verkauft wird, ist kein Busabschluss, sondern ein Widerstandsnetzwerk, welches den Bus auf ein definiertes Potential bringt, wenn kein Busteilnehmer sendet. Die genauen Werte können dem obigen Bild entnommen werden. Das ganze ist so berechnet, dass sich zwischen A und B in etwa ein Unterschied von 5V ergibt. (Sehe auch Homematic Inside [https://homematic-forum.de/forum/viewtopic.php?t=15128])&lt;br /&gt;
Wenn man jetzt noch zusätzlich 120Ohm (möglicherweise zweimal) an den Bus hängt, dann hat man in etwa 60Ohm zwischen A und B. Dadurch liegen A und B fast auf demselben Potential und man hat in etwa das Gegenteil von dem erreicht, was man eigentlich wollte.&lt;br /&gt;
&lt;br /&gt;
In vielen Fällen funktioniert ein Homematic Wired System auch ohne Abschlusswiderstand, insbesondere wenn Homebrew-Geräte am Bus angeschlossen sind. Allerdings haben bisherige Erfahrungen gezeigt, dass das System mit der Zeit instabil werden kann, wenn z.B. der Bus verlängert wird oder mehr Geräte dazukommen. Für einen &amp;quot;produktiven&amp;quot; Einsatz wird daher empfohlen, einen Abschlusswiderstand zu verwenden, auch wenn es im Test oft ohne geht. Das gilt insbesondere dann, wenn man nur Original-eq3-Geräte verwendet.&lt;br /&gt;
&lt;br /&gt;
Falls man nur Homebrew-Devices am Bus hat, hat man möglicherweise gar keine 24V. Dann ist auch der eq3-Abschlusswiderstand nicht sinnvoll. Es reicht dann ein einfacher Pulldown an B und ein Pullup auf 5V an A.&lt;br /&gt;
&lt;br /&gt;
== Pair / Peer bzw. pairen und peeren ==&lt;br /&gt;
HMW-Geräte können unter- bzw. miteinander [[Peering (HomeMatic)|gepeert]] werden, wenn z.B. ein Sensor einen Aktor direkt (ohne Zentrale) steuern soll. Ein einfaches Peering zweier Kanäle kann meistens ohne Zentrale erfolgen, d.h. mit den Bedienelementen direkt an den Geräten. Allerdings ist es über die FHEM-Oberfläche in der Regel einfacher. Außerdem können dann weitere Parameter der jeweiligen Verknüpfung angegeben werden.&lt;br /&gt;
&lt;br /&gt;
HMW-Geräte müssen andererseits mit einer Zentrale &#039;&#039;gepairt&#039;&#039; werden, wenn diese Zentrale die Geräte (um-)konfigurieren bzw. steuern oder zumindest auslesen können soll.&lt;br /&gt;
&lt;br /&gt;
Anders als bei den HomeMatic-Funk-Geräten erfolgt dieses Pairing automatisch, sobald ein Gerät erstmalig Nachrichten über den RS485 Bus sendet. Zusätzlich besteht die Möglichkeit, über einen Discovery-Befehl alle am Bus angeschlossenen Module zu ermitteln. Auch bei diesem Vorgang erfolgt im Anschluss daran ein automatisches Pairing aller bis dahin unbekannten Geräte mit der Zentrale bzw. mit FHEM.&lt;br /&gt;
&lt;br /&gt;
== Aktoren / Sensoren ==&lt;br /&gt;
Eine Übersicht und weitere Informationen über die von FHEM unterstützten HomeMatic-Geräte ist [[:Kategorie:HomeMatic Components| hier]] zu finden: &lt;br /&gt;
&lt;br /&gt;
Hier dennoch eine dedizierte Liste aller HMW-Geräte und der benötigten Interfaces:&lt;br /&gt;
* [[Serial/Netzwerk-RS485-Adapter]] Netzwerk-/Serial-/USB-RS485 Adapter&lt;br /&gt;
* [[HomeMatic Wired RS485 LAN Gateway|HMW-LGW-O-DR-GS-EU]] HomeMatic Wired RS485 LAN Gateway, Hutschienenmontage&lt;br /&gt;
* &#039;&#039;HMW-Sen-SC-12|HMW-Sen-SC-12-DR&#039;&#039; HomeMatic Wired RS485 Schließerkontakt, 12 Eingänge, Hutschienenmontage&lt;br /&gt;
* &#039;&#039;HMW-Sen-SC-12|HMW-Sen-SC-12-FM&#039;&#039; HomeMatic Wired RS485 Schließerkontakt, 12 Eingänge, Unterputzmontage&lt;br /&gt;
* &#039;&#039;HMW-IO-12-FM&#039;&#039; HomeMatic Wired RS485 I/O-Modul, 12 Ein-/Ausgänge, Unterputzmontage&lt;br /&gt;
* [[HMW-IO-12-Sw14-DR Wired RS485 I/O-Modul 12 Eingänge 14 Ausgänge]], Hutschienenmontage&lt;br /&gt;
* &#039;&#039;HMW-LC-Sw2-DR&#039;&#039; HomeMatic Wired RS485-Schaltaktor 2fach, Hutschienenmontage&lt;br /&gt;
* [[HMW-IO-12-Sw7-DR Wired RS485 I/O-Modul 12 Eingänge 7 Ausgänge]], Hutschienenmontage&lt;br /&gt;
* &#039;&#039;HMW-IO-4-FM&#039;&#039; HomeMatic Wired RS485 4fach-I/O-Modul, 4 Ein-/Ausgänge, Unterputzmontage&lt;br /&gt;
* &#039;&#039;HMW-LC-Bl1-DR&#039;&#039; HomeMatic Wired RS485-Rollladenaktor, 1fach, Hutschienenmontage&lt;br /&gt;
* [[HMW-LC-Dim1L-DR Wired RS485 Dimmaktor 1fach]], Phasenanschnitt, Hutschienenmontage&lt;br /&gt;
&lt;br /&gt;
Momentan werden (bzw. wurden) außerdem &amp;quot;HM-Homebrew&amp;quot; Geräte entwickelt. &lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Modell&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;ID&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Beschreibung&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;FHEM&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;CCU&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Firmware&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [[HBW-1W-T10]]&lt;br /&gt;
| 0x81&lt;br /&gt;
| 10-fach 1-Wire Temperatursensor&lt;br /&gt;
| {{Link2Forum|Topic=22952|Message=207372|LinkText=ja}}&lt;br /&gt;
| ja&lt;br /&gt;
| [https://github.com/kc-GitHub/HM485-Lib/tree/thorsten/HBW-1W-T10 Git]&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;HBW-LC-Bl-4&#039;&#039;&lt;br /&gt;
| 0x82&lt;br /&gt;
| 4-Kanal Rollladenaktor&lt;br /&gt;
| ja&lt;br /&gt;
| &lt;br /&gt;
| [https://github.com/ThorstenPferdekaemper/HBWired/tree/master/HBW-LC-BL-4 Git]&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;HBW-LC-Bl-8&#039;&#039;&lt;br /&gt;
| 0x92&lt;br /&gt;
| 8-Kanal Rollladenaktor&lt;br /&gt;
| ja&lt;br /&gt;
| &lt;br /&gt;
| [https://github.com/ThorstenPferdekaemper/HBWired/tree/master/HBW-LC-BL-8 Git]&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;HBW-LC-Sw8&#039;&#039;&lt;br /&gt;
| 0x83&lt;br /&gt;
| 8-fach Schaltaktor&lt;br /&gt;
| ja&lt;br /&gt;
| &lt;br /&gt;
| [https://github.com/ThorstenPferdekaemper/HBWired/tree/master/HBW-LC-Sw-8 Git]&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;HBW-LC-Sw-12&#039;&#039;&lt;br /&gt;
| 0x93&lt;br /&gt;
| 12-fach Schaltaktor&lt;br /&gt;
| ja&lt;br /&gt;
| &lt;br /&gt;
| [https://github.com/ThorstenPferdekaemper/HBWired/tree/master/HBW-LC-Sw-12 Git]&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;HBW-Sen-EP&#039;&#039;&lt;br /&gt;
| 0x84&lt;br /&gt;
| 8-fach S0-Interface&lt;br /&gt;
| ja&lt;br /&gt;
| &lt;br /&gt;
| [https://github.com/kc-GitHub/HM485-Lib/tree/thorsten/HBW-Sen-EP Git]&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;HBW-Sen-KEY&#039;&#039;&lt;br /&gt;
| 0x85&lt;br /&gt;
| RFID-Interface&lt;br /&gt;
| ja&lt;br /&gt;
| &lt;br /&gt;
| [https://github.com/kc-GitHub/HM485-Lib/tree/markus/HBW-Sen-KEY Git]&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;HBW-Sen-SC8&#039;&#039;&lt;br /&gt;
| 0x86&lt;br /&gt;
| 8-fach Tasterschnittstelle&lt;br /&gt;
| ja&lt;br /&gt;
| &lt;br /&gt;
| [https://github.com/mago0211/HBW-RS485 Git]&lt;br /&gt;
|-&lt;br /&gt;
| {{Link2Forum|Topic=64700|Message=563558|LinkText=HBW-Sen-Key-12}} &lt;br /&gt;
| 0x95&lt;br /&gt;
| 12-fach Tasterschnittstelle&lt;br /&gt;
| ja&lt;br /&gt;
| &lt;br /&gt;
| [https://github.com/ThorstenPferdekaemper/HBWired Git]&lt;br /&gt;
|-&lt;br /&gt;
| {{Link2Forum|Topic=22952|Message=270160|LinkText=HBW-CC-Vd2-T}}&lt;br /&gt;
| 0x87&lt;br /&gt;
| Steuerung 24V-Ventile&lt;br /&gt;
| ja&lt;br /&gt;
| &lt;br /&gt;
| [https://github.com/hresalg/HBW/tree/dev/HBW_CC_Vd2_T Git]&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
| 0x88&lt;br /&gt;
| Wettersensor&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
| 0x89&lt;br /&gt;
| Tastsensor&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| {{Link2Forum|Topic=22952|Message=186435|LinkText=HBW-Sec-MDIR-2}} &lt;br /&gt;
| 0x91&lt;br /&gt;
| Bewegungsmelder-Schnittstelle&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| [https://github.com/kc-GitHub/HM485-Lib/tree/rene/HBW-Sec-MDIR-2 Git]&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;HMW-LC-Sw2-DR&#039;&#039;&lt;br /&gt;
| 0x11&lt;br /&gt;
| &lt;br /&gt;
| ja&lt;br /&gt;
| ja&lt;br /&gt;
| [https://github.com/kc-GitHub/HM485-Lib/blob/thorsten/HMW-LC-Sw2-DR Git], {{Link2Forum|Topic=22952|Message=251906|LinkText=Forum}}&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;HMW-LC-Bl1-DR&#039;&#039;&lt;br /&gt;
| 0x15&lt;br /&gt;
| 1-Kanal Rollladenaktor&lt;br /&gt;
| ja&lt;br /&gt;
| ja&lt;br /&gt;
| [https://github.com/kc-GitHub/HM485-Lib/tree/markus/HMW-LC-Bl1-DR Git]&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;HMW-IO-12-FM&#039;&#039;&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| nein&lt;br /&gt;
| nein&lt;br /&gt;
| [https://github.com/kc-GitHub/HM485-Lib/tree/thorsten/HMW-IO-12-FM Git]&lt;br /&gt;
|-&lt;br /&gt;
| {{Link2Forum|Topic=22952|Message=275898|LinkText=HBW_LC_RGB1_CV}}&lt;br /&gt;
| 0xA0&lt;br /&gt;
| 3-fach Dimmer als RGB-Controller&lt;br /&gt;
| ja&lt;br /&gt;
| ?&lt;br /&gt;
| [https://github.com/BrainHunter/RGB-CTRL Git]&lt;br /&gt;
|-&lt;br /&gt;
| HBW-SD6-Multikey &lt;br /&gt;
| 0xB1&lt;br /&gt;
| Reserviert für 6-fach Taster von [http://haus-bus.de/ haus-bus.de]&lt;br /&gt;
| nein&lt;br /&gt;
| nein&lt;br /&gt;
| [https://github.com/haus-bus/MultitasterSD6/tree/HM-Wired Git]&lt;br /&gt;
|-&lt;br /&gt;
| {{Link2Forum|Topic=22952|Message=837275|LinkText=HBW-SC-10-Dim-6}}&lt;br /&gt;
| 0x96&lt;br /&gt;
| 6-fach Dimmer mit 10 digitalen Eingängen&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| [https://github.com/loetmeister/HBWired/tree/master/HBW-SC-10-Dim-6 Git]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In der obigen Liste der Homematic-Wired-Homebrew Geräte kommen auch Modellbezeichnungen von Original-Homematic-Geräten vor (HMW...). In diesen Fällen handelt es sich um Homebrew-Geräte, die sich gegenüber FHEM bzw. der CCU wie das angegebene Gerät verhalten. Unter Umständen weicht aber das Verhalten von dem der Original-Geräte ab. &lt;br /&gt;
Die Spalten &amp;quot;FHEM&amp;quot; und &amp;quot;CCU&amp;quot; besagen, ob das entsprechende Gerät in FHEM bzw. in der CCU erkannt wird und funktioniert. Ist in beiden Spalten ein &amp;quot;nein&amp;quot; eingetragen, dann kann davon ausgegangen werden, dass das Gerät noch gar nicht funktioniert. Bei einem &amp;quot;ja&amp;quot; kann es auch noch Einschränkungen geben.&lt;br /&gt;
&lt;br /&gt;
Zur Erstellung eigener HBW Geräte mittels Arduino gibt es ein {{Link2Forum|Topic=61780|LinkText=Tutorial}} von Thorsten im Forum.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [https://github.com/kc-GitHub/FHEM-HM485 Github Repository] der HM485 Module (für FHEM)&lt;br /&gt;
* [https://github.com/kc-GitHub/FHEM-HM485/archive/master.zip aktuelle Version] der HM485 Module zum Download (für FHEM)&lt;br /&gt;
* [https://github.com/kc-GitHub/HM485-Lib Arduino HBW lib] wird nicht mehr aktuallisiert !!!&lt;br /&gt;
* [https://github.com/ThorstenPferdekaemper/HBWired Arduino HBWired lib] aktuelle Version&lt;br /&gt;
* {{Link2Forum|Topic=61780|LinkText=Tutorial}} zur Erstellung eigener HBW Geräte mit Arduino&lt;br /&gt;
* [http://www.homematic.com/ HomeMatic] Homepage&lt;br /&gt;
* Hersteller [http://www.eq-3.de eQ-3] &lt;br /&gt;
&lt;br /&gt;
[[Kategorie:HomeMatic Components]]&lt;br /&gt;
[[Kategorie:Glossary]]&lt;/div&gt;</summary>
		<author><name>ZDX</name></author>
	</entry>
	<entry>
		<id>http://wiki.fhem.de/w/index.php?title=Acer_Beamer_mit_RS232&amp;diff=29553</id>
		<title>Acer Beamer mit RS232</title>
		<link rel="alternate" type="text/html" href="http://wiki.fhem.de/w/index.php?title=Acer_Beamer_mit_RS232&amp;diff=29553"/>
		<updated>2019-02-18T11:14:28Z</updated>

		<summary type="html">&lt;p&gt;ZDX: /* Bekannte Probleme */Abschnitt zu bekannten Problemen hinzugefügt&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox Modul&lt;br /&gt;
|ModPurpose=Ermöglicht die Steuerung von Beamern der Marke Acer über das RS232-Interface&lt;br /&gt;
|ModType=x&lt;br /&gt;
|ModCmdRef=AcerBeamer_RS232&lt;br /&gt;
|ModForumArea=Multimedia&lt;br /&gt;
|ModFTopic=95757&lt;br /&gt;
|ModTechName=70_AcerBeamer_RS232.pm&lt;br /&gt;
|ModOwner=ZDX ({{Link2FU|34515|Forum}} / [[Benutzer:ZDX|Wiki]])&lt;br /&gt;
}}&lt;br /&gt;
[[Acer Beamer mit RS232]] können mit dem Modul 70_AcerBeamer_RS232.pm gesteuert werden. Auch Informationen wie z.B. der derzeitige Eingang können abgerufen werden.&lt;br /&gt;
&lt;br /&gt;
== Definition ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define &amp;lt;Name&amp;gt; AcerBeamer_RS232 &amp;lt;device@baudrate&amp;gt; &amp;lt;Interval&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Wenn keine Baud-Rate angegeben ist wird standardmäßig 9600 verwendet - dies sollte für die meisten Beamer auch korrekt sein.&lt;br /&gt;
Das Modul überprüft alle &#039;&#039;&amp;lt;Interval&amp;gt;&#039;&#039;-Sekunden (wenn nicht angegeben: 60) ob der Beamer derzeit eingeschaltet ist oder nicht und setzt das entsprechende Reading.&lt;br /&gt;
&lt;br /&gt;
== Readings / Get-Befehle ==&lt;br /&gt;
* lampHours - Betriebsstunden der Lampe&lt;br /&gt;
* manufacturer - Hersteller/Marke des Beamers&lt;br /&gt;
* source - Derzeit ausgewählter Eingang&lt;br /&gt;
* presence - absent/present für aus/ein (Nicht direkt als get)&lt;br /&gt;
* state - off/on (Nicht direkt als get)&lt;br /&gt;
&lt;br /&gt;
== Set-Befehle ==&lt;br /&gt;
* power&lt;br /&gt;
** on&lt;br /&gt;
** off&lt;br /&gt;
&lt;br /&gt;
* quickSettings&lt;br /&gt;
** 16:9&lt;br /&gt;
** 4:3&lt;br /&gt;
** brightness&lt;br /&gt;
** colorRgb&lt;br /&gt;
** colorTemp&lt;br /&gt;
** contrast&lt;br /&gt;
** eKey&lt;br /&gt;
** keystone&lt;br /&gt;
** language&lt;br /&gt;
&lt;br /&gt;
* remoteControl&lt;br /&gt;
** up&lt;br /&gt;
** down&lt;br /&gt;
** left&lt;br /&gt;
** right&lt;br /&gt;
** freeze&lt;br /&gt;
** hide&lt;br /&gt;
** menu&lt;br /&gt;
** mute&lt;br /&gt;
** zoom&lt;br /&gt;
** volUp&lt;br /&gt;
** volDown&lt;br /&gt;
&lt;br /&gt;
* source&lt;br /&gt;
** auto&lt;br /&gt;
** resync&lt;br /&gt;
** dsub&lt;br /&gt;
** hdmi&lt;br /&gt;
** composite&lt;br /&gt;
** svideo&lt;br /&gt;
&lt;br /&gt;
== Bekannte Probleme ==&lt;br /&gt;
Wird ein Befehl abgesetzt während eine zyklische Power-Abfrage läuft so kann es unter Umständen passieren, dass der Status des Beamers fälschlicherweise auf &amp;quot;off&amp;quot; gesetzt wird.&lt;br /&gt;
&lt;br /&gt;
Bei einigen Beamern funktionieren manche Befehle eventuell nicht, bitte im Forenthread melden, wenn Probleme auftreten.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
[http://bilder.hifi-forum.de/medium/226620/pinbelegung_195544.jpg Pinbelegung für das benötige Kabel], hifi-forum.de&lt;br /&gt;
&lt;br /&gt;
[[Kategorie:Gerätemodul]]&lt;br /&gt;
[[Kategorie:Unterhaltungselektronik]]&lt;/div&gt;</summary>
		<author><name>ZDX</name></author>
	</entry>
	<entry>
		<id>http://wiki.fhem.de/w/index.php?title=Acer_Beamer_mit_RS232&amp;diff=29552</id>
		<title>Acer Beamer mit RS232</title>
		<link rel="alternate" type="text/html" href="http://wiki.fhem.de/w/index.php?title=Acer_Beamer_mit_RS232&amp;diff=29552"/>
		<updated>2019-02-18T11:01:08Z</updated>

		<summary type="html">&lt;p&gt;ZDX: Seite erstellt, Inhalt hinzugefügt&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox Modul&lt;br /&gt;
|ModPurpose=Ermöglicht die Steuerung von Beamern der Marke Acer über das RS232-Interface&lt;br /&gt;
|ModType=x&lt;br /&gt;
|ModCmdRef=AcerBeamer_RS232&lt;br /&gt;
|ModForumArea=Multimedia&lt;br /&gt;
|ModFTopic=95757&lt;br /&gt;
|ModTechName=70_AcerBeamer_RS232.pm&lt;br /&gt;
|ModOwner=ZDX ({{Link2FU|34515|Forum}} / [[Benutzer:ZDX|Wiki]])&lt;br /&gt;
}}&lt;br /&gt;
[[Acer Beamer mit RS232]] können mit dem Modul 70_AcerBeamer_RS232.pm gesteuert werden. Auch Informationen wie z.B. der derzeitige Eingang können abgerufen werden.&lt;br /&gt;
&lt;br /&gt;
== Definition ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define &amp;lt;Name&amp;gt; AcerBeamer_RS232 &amp;lt;device@baudrate&amp;gt; &amp;lt;Interval&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Wenn keine Baud-Rate angegeben ist wird standardmäßig 9600 verwendet - dies sollte für die meisten Beamer auch korrekt sein.&lt;br /&gt;
Das Modul überprüft alle &#039;&#039;&amp;lt;Interval&amp;gt;&#039;&#039;-Sekunden (wenn nicht angegeben: 60) ob der Beamer derzeit eingeschaltet ist oder nicht und setzt das entsprechende Reading.&lt;br /&gt;
&lt;br /&gt;
== Readings / Get-Befehle ==&lt;br /&gt;
* lampHours - Betriebsstunden der Lampe&lt;br /&gt;
* manufacturer - Hersteller/Marke des Beamers&lt;br /&gt;
* source - Derzeit ausgewählter Eingang&lt;br /&gt;
* presence - absent/present für aus/ein (Nicht direkt als get)&lt;br /&gt;
* state - off/on (Nicht direkt als get)&lt;br /&gt;
&lt;br /&gt;
== Set-Befehle ==&lt;br /&gt;
* power&lt;br /&gt;
** on&lt;br /&gt;
** off&lt;br /&gt;
&lt;br /&gt;
* quickSettings&lt;br /&gt;
** 16:9&lt;br /&gt;
** 4:3&lt;br /&gt;
** brightness&lt;br /&gt;
** colorRgb&lt;br /&gt;
** colorTemp&lt;br /&gt;
** contrast&lt;br /&gt;
** eKey&lt;br /&gt;
** keystone&lt;br /&gt;
** language&lt;br /&gt;
&lt;br /&gt;
* remoteControl&lt;br /&gt;
** up&lt;br /&gt;
** down&lt;br /&gt;
** left&lt;br /&gt;
** right&lt;br /&gt;
** freeze&lt;br /&gt;
** hide&lt;br /&gt;
** menu&lt;br /&gt;
** mute&lt;br /&gt;
** zoom&lt;br /&gt;
** volUp&lt;br /&gt;
** volDown&lt;br /&gt;
&lt;br /&gt;
* source&lt;br /&gt;
** auto&lt;br /&gt;
** resync&lt;br /&gt;
** dsub&lt;br /&gt;
** hdmi&lt;br /&gt;
** composite&lt;br /&gt;
** svideo&lt;br /&gt;
&lt;br /&gt;
== Bekannte Probleme ==&lt;br /&gt;
Wird ein Befehl abgesetzt während eine zyklische Power-Abfrage läuft so kann es unter Umständen passieren, dass der Status des Beamers fälschlicherweise auf &amp;quot;off&amp;quot; gesetzt wird.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
[http://bilder.hifi-forum.de/medium/226620/pinbelegung_195544.jpg Pinbelegung für das benötige Kabel], hifi-forum.de&lt;br /&gt;
&lt;br /&gt;
[[Kategorie:Gerätemodul]]&lt;br /&gt;
[[Kategorie:Unterhaltungselektronik]]&lt;/div&gt;</summary>
		<author><name>ZDX</name></author>
	</entry>
</feed>