diff --git a/fhem/FHEM/98_ModbusTrovis5576.pm b/fhem/FHEM/98_ModbusTrovis5576.pm new file mode 100644 index 000000000..dbdbaed5e --- /dev/null +++ b/fhem/FHEM/98_ModbusTrovis5576.pm @@ -0,0 +1,534 @@ +################################################################## +# +# $Id$ +# +# Fhem Modul für die Abfrage/Steuerung von Heizungssteuerungen vom Typ Samson Trovis 5576. +# Verwendet Modbus.pm als Basismodul für die eigentliche Implementation des Protokolls. +# +# Siehe 98_ModbusAttr.pm für ausführlichere Infos zur Verwendung des Moduls 98_Modbus.pm +# +################################################################## +# +# This file is part of fhem. +# +# Fhem is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# Fhem is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with fhem. If not, see . +# +############################################################################## +# Changelog +# 14.03.2016 +# Initial Release +# +############################################################################## + +package main; +use strict; +use warnings; +sub ModbusTrovis5576_Initialize($); + +my %Trovis5576ParseInfo = ( + # Grundlegendes + 'h0' => { reading => 'Modellnummer', + name => 'Erzeugnisnummer, Gerätekennung', + poll => 'once' + }, + 'h9' => { reading => 'Aussen_Temp', + name => 'AußentempAF1', + expr => '$val/10', + format => '%.1f', + unpack => 's>', + poll => 1 + }, + + # RK1 + 'h102' => { reading => 'RK1_Schalter', + name => 'Schalteroben', + map => '0:PA, 1:Auto, 2:Standby, 3:Hand, 4:Sonne, 5:Mond', + poll => 1 + }, + 'c1008' => {reading => 'RK1_Frostschutzbetrieb', + name => 'FrostschutzRk1', + map => '0:Aus, 1:An', + poll => 1 + }, + 'h105' => { reading => 'RK1_Betriebsart', + name => 'BetriebsArtRk1', + map => '2:Standby, 4:Sonne, 5:Mond', + poll => 1, + set => 1 + }, + 'c88' => { reading => 'RK1_Betriebsart_EBN', + name => 'Ebene Betriebsart Rk1 (HR40106)', + map => '0:GLT, 1:Autark', + poll => 1, + set => 1 + }, + 'h106' => { reading => 'RK1_Stellsignal', + name => 'Stellsignal Rk1 [0...100%] (CL90)', + min => 0, + max => 100, + poll => 1, + set => 1 + }, + 'c89' => { reading => 'RK1_Stellsignal_EBN', + name => 'Ebene Stellsignal Rk1 (HR40107)', + map => '0:GLT, 1:Autark', + poll => 1, + set => 1 + }, + 'c56' => { reading => 'RK1_Umwaelzpumpe', + name => 'Umwälzpumpe UP1 (Netzseite, CL96)', + map => '0:Aus, 1:An', + poll => 1, + set => 1 + }, + 'c95' => { reading => 'RK1_Umwaelzpumpe_EBN', + name => 'Ebene Umwälzpumpe UP1 (Netzseite, CL57)', + map => '0:GLT, 1:Autark', + poll => 1, + set => 1 + }, + 'h12' => { reading => 'RK1_Vorlauf_Temp', + name => 'VorlauftempVF1', + expr => '$val/10', + format => '%.1f', + unpack => 's>', + poll => 1 + }, + 'h16' => { reading => 'RK1_Ruecklauf_Temp', + name => 'RückltempRüF1', + expr => '$val/10', + format => '%.1f', + unpack => 's>', + poll => 1 + }, + + # RK2 + 'h103' => { reading => 'RK2_Schalter', + name => 'Schaltermitte', + map => '0:PA, 1:Auto, 2:Standby, 3:Hand, 4:Sonne, 5:Mond', + poll => 1 + }, + 'c1208' => {reading => 'RK2_Frostschutzbetrieb', + name => 'FrostschutzRk2', + map => '0:Aus, 1:An', + poll => 1 + }, + 'h107' => { reading => 'RK2_Betriebsart', + name => 'BetriebsArtRk2', + map => '2:Standby, 4:Sonne, 5:Mond', + poll => 1, + set => 1 + }, + 'c90' => { reading => 'RK2_Betriebsart_EBN', + name => 'Ebene Betriebsart Rk2 (HR40108)', + map => '0:GLT, 1:Autark', + poll => 1, + set => 1 + }, + 'h108' => { reading => 'RK2_Stellsignal', + name => 'Stellsignal Rk2 [0...100%] (CL90)', + min => 0, + max => 100, + poll => 1, + set => 1 + }, + 'c91' => { reading => 'RK2_Stellsignal_EBN', + name => 'Ebene Stellsignal Rk2 (HR40109)', + map => '0:GLT, 1:Autark', + poll => 1, + set => 1 + }, + 'c57' => { reading => 'RK2_Umwaelzpumpe', + name => 'Umwälzpumpe UP2 (Netzseite, CL97)', + map => '0:Aus, 1:An', + poll => 1, + set => 1 + }, + 'c96' => { reading => 'RK2_Umwaelzpumpe_EBN', + name => 'Ebene Umwälzpumpe UP2 (Netzseite, CL58)', + map => '0:GLT, 1:Autark', + poll => 1, + set => 1 + }, + 'h13' => { reading => 'RK2_Vorlauf_Temp', + name => 'VorlauftempVF2', + expr => '$val/10', + format => '%.1f', + unpack => 's>', + poll => 1 + }, + 'h17' => { reading => 'RK2_Ruecklauf_Temp', + name => 'RückltempRüF2', + expr => '$val/10', + format => '%.1f', + unpack => 's>', + poll => 1 + }, + + # Wasser + 'h104' => { reading => 'Wasser_Schalter', + name => 'Schalterunten', + map => '0:PA, 1:Auto, 2:Standby, 3:Hand, 4:Sonne, 5:Mond', + poll => 1 + }, + 'c1805' => {reading => 'Wasser_Frostschutzbetrieb', + name => 'FrostschutzTW', + map => '0:Aus, 1:An', + poll => 1 + }, + 'h111' => { reading => 'Wasser_Betriebsart', + name => 'BetriebsArtTW', + map => '2:Standby, 4:Sonne, 5:Mond', + poll => 1, + set => 1 + }, + 'c94' => { reading => 'Wasser_Betriebsart_EBN', + name => 'EBNBetrArtTW', + map => '0:GLT, 1:Autark', + poll => 1, + set => 1 + }, + 'c59' => { reading => 'Wasser_Speicherladepumpe', + name => 'BinärausgBA4', + map => '0:Aus, 1:An', + poll => 1, + set => 1 + }, + 'c98' => { reading => 'Wasser_Speicherladepumpe_EBN', + name => 'EBNBinärBA4', + map => '0:GLT, 1:Autark', + poll => 1, + set => 1 + }, + 'c1837' => {reading => 'Wasser_ThermischeDesinfektion', + name => 'FB14ThermDes', + map => '0:Aus, 1:An', + poll => 1, + set => 1 + }, + 'h22' => { reading => 'Wasser_Temp', + name => 'SpeichertempSF1', + expr => '$val/10', + format => '%.1f', + unpack => 's>', + poll => 1 + }, + 'h1799' => {reading => 'Wasser_Temp_Soll', + name => 'Trinkwasser (Speicher) -Sollwert', + hint => '20.0,25.0,30.0,35.0,40.0,45.0,50.0,55.0,60.0,65.0,70.0,75.0,80.0,85.0,90.0', + min => 20, + max => 90, + expr => '$val/10', + format => '%.1f', + unpack => 's>', + setexpr => '$val*10', + poll => 1, + set => 1 + }, + 'h1806' => {reading => 'Wasser_Temp_Minimum', + name => 'Trinkwasser (Speicher) - Minimalwert', + hint => '20.0,25.0,30.0,35.0,40.0,45.0,50.0,55.0,60.0,65.0,70.0,75.0,80.0,85.0,90.0', + min => 20, + max => 90, + expr => '$val/10', + format => '%.1f', + unpack => 's>', + setexpr => '$val*10', + poll => 1, + set => 1 + }, + 'h1829' => {reading => 'Wasser_Temp_Desinfektion', + name => 'Desinfektionstemperatur', + hint => '60.0,65.0,70.0,75.0,80.0,85.0,90.0', + min => 60, + max => 90, + expr => '$val/10', + format => '%.1f', + unpack => 's>', + setexpr => '$val*10', + poll => 1, + set => 1 + } +); + +my %Trovis5576DeviceInfo = ( + 'h' => {defShowGet => 1, + combine => 5 + }, + 'c' => {defShowGet => 1, + combine => 5 + }, + 'timing' => {sendDelay => 0.2, + commDelay => 0.2 + } +); + + + +##################################### +sub ModbusTrovis5576_Initialize($) { + my ($hash) = @_; + + require "$attr{global}{modpath}/FHEM/98_Modbus.pm"; + $hash->{parseInfo} = \%Trovis5576ParseInfo; # defines registers, inputs, coils etc. for this Modbus Device + $hash->{deviceInfo} = \%Trovis5576DeviceInfo; # defines properties of the device like defaults and supported function codes + + ModbusLD_Initialize($hash); # Generic function of the Modbus module does the rest + + $hash->{AttrList} .= ' '.$hash->{ObjAttrList}.' '.$hash->{DevAttrList}.' poll-.* polldelay-.*'; +} + +1; + +=pod +=begin html + + +

ModbusTrovis5576

+ + +=end html + +=begin html_DE + + +

ModbusTrovis5576

+ + +=end html_DE +=cut diff --git a/fhem/MAINTAINER.txt b/fhem/MAINTAINER.txt index 72f73fdf5..10199fd8f 100644 --- a/fhem/MAINTAINER.txt +++ b/fhem/MAINTAINER.txt @@ -306,6 +306,7 @@ FHEM/98_JsonList2.pm rudolfkoenig http://forum.fhem.de Automatis FHEM/98_Modbus.pm stefanstrobel http://forum.fhem.de Sonstiges FHEM/98_ModbusAttr.pm stefanstrobel http://forum.fhem.de Sonstiges FHEM/98_ModbusSET.pm stefanstrobel http://forum.fhem.de Sonstiges +FHEM/98_ModbusTrovis5576.pm Reinerlein http://forum.fhem.de Heizungssteuerung/Raumklima FHEM/98_PID20.pm John http://forum.fhem.de Automatisierung FHEM/98_RandomTimer.pm dietmar63 http://forum.fhem.de Unterstuetzende Dienste FHEM/98_SVG.pm rudolfkoenig http://forum.fhem.de Frontends/SVG/Plots/logProxy