Autor Thema: VBus in fhem  (Gelesen 227371 mal)

Offline saschab

  • New Member
  • *
  • Beiträge: 23
  • Passiv, aber da!
Antw:VBus in fhem
« Antwort #810 am: 20 September 2020, 21:28:46 »
Hallo Zusammen,
ich habe eine DeltaSol MX mit Modul EM1 und DL3 in Betrieb genommen, leider habe ich folgendes Problem:

mit der Version über Update (21_VBUSDEV.pm, 2017-01-06 12:39:24, Tobias.Faust, 19_VBUSIF.pm, 2017-01-06 12:36:39, Tobias.Faust)
- Device werden angelegt,
- aber das Model lässt sich nicht wählen, da der Eintag nach den setzen verschwindet,
- es werden keine Readings angelegt.
- VBUSIF ist opened

mit der Version über Update (21_VBUSDEV.pm, 2020-09-19 10:10:10Z pejonp, 19_VBUSIF.pm, 2020-05-06 10:10:10Z pejonp)

update add https://raw.githubusercontent.com/pejonp/vbus/master/controls_vbus.txt
- Device werden nicht angelegt,
- aber das Model lassen sich wählen und Eintag bleibt erhalten.
- es werden keine Readings angelegt.
- VBUSIF ist opened

Hat jemand eine Idee woran das liegen kann?

Grüß Sascha
FHEM und Homebridge im Dockercontainer auf einem RPi4!!!
(für: Wärmepumpe, Heizungsreglung, PV-Anlage, Wallbox, Kontrollierte Wohnraumlüftung, Beleuchtung, Energiekosten Monitoring, Wetterstation, Feinstraubsensor)

Offline pejonp

  • Hero Member
  • *****
  • Beiträge: 1318
Antw:VBus in fhem
« Antwort #811 am: 21 September 2020, 09:04:20 »
@saschab
Stell mal verbose=5 beim vbusif und hänge den log hier an.

Ich brauche die Devids (List) der angelegten Geräte. Sind wahrscheinlich nicht 7E11 .....

Pejonp

PS: Installier die mal die ServiceCenter-Software RSC von hier (https://www.resol.de/de/software) Bei Win10 bitte die Hinweise beachten, sonst startet es nicht.
Die Ausgaben sehen dann so aus.

Wie bist du mit dem DeltaSol MX verbunden VBUS-LAN oder ... ???


« Letzte Änderung: 21 September 2020, 11:33:49 von pejonp »
LaCrossGW 868MHz:WT470+TFA+TX37-IT+EMT7110+W136+WH25A HP1003+WH2621
SignalD(CC1101):Bresser+WS-0101(868MHz WH1080)+Velux KLF200+MAX!+HM-MOD-UART:Smoke HM-SEC-SD+VITOSOLIC 200 RESOL VBUS-LAN+SolarEdge SE5K(Modbus)+Sonnen!eco8(10kWh)+TD3511+DRT710M(Modbus)+ZigBee+Z-Wave+MQTT+vitoconnect

Offline saschab

  • New Member
  • *
  • Beiträge: 23
  • Passiv, aber da!
Antw:VBus in fhem
« Antwort #812 am: 01 Oktober 2020, 08:02:56 »
@pejonp,
sorry bin erst jetzt dazu gekommen.
Leider funktioniert die Kommunikation mit RSC nicht, es wird mir die LAN-Schnittstelle nicht angezeigt.
Woran kann das liegen?

Infrastruktur: Windows 10 (aktuell), FritzBox7590, und Netzwerk mit drei VLANs, Fhem (als Docker auf Raspberry Pi 4 mit zwei Netzkarten)


Diese Device werden nur mit der Version von (Tobias.Faust, 19_VBUSIF.pm, 2017-01-06 12:36:39) erstellt:

VBUSDEV_6651
VBUSDEV_7e11
VBUSDEV_7e12
VBUSDEV_7e21
VBUSDEV_7e22
VBUSDEV_7e31
VBUSDEV_7e32
VBUSDEV_7e33
VBUSDEV_7e34
VBUSDEV_7e35
VBUSDEV_7e41

Gruß Sascha

« Letzte Änderung: 01 Oktober 2020, 08:11:06 von saschab »
FHEM und Homebridge im Dockercontainer auf einem RPi4!!!
(für: Wärmepumpe, Heizungsreglung, PV-Anlage, Wallbox, Kontrollierte Wohnraumlüftung, Beleuchtung, Energiekosten Monitoring, Wetterstation, Feinstraubsensor)

Offline pejonp

  • Hero Member
  • *****
  • Beiträge: 1318
Antw:VBus in fhem
« Antwort #813 am: 01 Oktober 2020, 10:51:20 »
@saschab

VLAN: Hast du die Geräte alle im gleichen VLAN ? Kennst du die IP-Adresse vom DL3 ? Kommst du an den DL3 mit einem Browser ?

Eigentlich sollten auch mit der neuen Version die Devices angezeigt werden.

Kannst du mal verbose=5 setzten und dann den log hier angängen.

In der neueren Version werden die Device alle mit Großbuchstaben angezeigt.

7e11 --> 7E11


du hast geschrieben das du dieses hier im Einsatz hast: DeltaSol MX mit Modul EM1 und DL3

Du kannst doch über den DL3 die Daten abfragen ?!
Kannst du dich am DL3 anmelden und siehst du dann deine DeltaSol MX mit Modul EM1 ?

Wenn ja, dann können wir über den DL3 die Daten in FHEM holen. Hoffe ich. Mit dem DL2 hat es schon mal geklappt (https://github.com/pejonp/vbus) DL2 Eintrag.


pejonp

LaCrossGW 868MHz:WT470+TFA+TX37-IT+EMT7110+W136+WH25A HP1003+WH2621
SignalD(CC1101):Bresser+WS-0101(868MHz WH1080)+Velux KLF200+MAX!+HM-MOD-UART:Smoke HM-SEC-SD+VITOSOLIC 200 RESOL VBUS-LAN+SolarEdge SE5K(Modbus)+Sonnen!eco8(10kWh)+TD3511+DRT710M(Modbus)+ZigBee+Z-Wave+MQTT+vitoconnect

Offline saschab

  • New Member
  • *
  • Beiträge: 23
  • Passiv, aber da!
Antw:VBus in fhem
« Antwort #814 am: 04 Oktober 2020, 06:20:41 »
@pejonp,

zu VLAN: es ist im gleichen VLAN.


das Ergebnis der folgenden Abfrage siehe Anhang (live.txt):
http://192.168.2.170/dlx/download/live?channel=1&sessionAuthUsername=admin&sessionAuthPassword=admin&outputType=json&source=current%2060

das Ergebnis der folgenden Abfrage siehe Anhang (live2.txt):
http://192.168.2.170/dlx/download/live?sessionAuthUsername=admin&sessionAuthPassword=admin&outputType=json&source=current%2060


leider steht in der log nur folgenden drin:
2020.10.04 05:35:14.316 5: Cmd: >define RESOL VBUSIF 192.168.2.170:7053<
2020.10.04 05:35:14.316 4: RESOL:  Define: HASH(0x73ad1a0)
2020.10.04 05:35:14.316 3: Opening RESOL device 192.168.2.170:7053
2020.10.04 05:35:14.317 5: Read VBUS password from file
2020.10.04 05:35:14.460 4: RESOL:  Define: InitIO
2020.10.04 05:35:14.460 3: RESOL device opened
2020.10.04 05:35:14.460 5: Starting notify loop for RESOL, 1 event(s), first is CONNECTED
2020.10.04 05:35:14.460 5: createNotifyHash

Und es werden immer noch keine Device angelegt.

Gruß Sascha
FHEM und Homebridge im Dockercontainer auf einem RPi4!!!
(für: Wärmepumpe, Heizungsreglung, PV-Anlage, Wallbox, Kontrollierte Wohnraumlüftung, Beleuchtung, Energiekosten Monitoring, Wetterstation, Feinstraubsensor)

Offline pejonp

  • Hero Member
  • *****
  • Beiträge: 1318
Antw:VBus in fhem
« Antwort #815 am: 05 Oktober 2020, 11:51:54 »
@saschab

Da du einen DL3 hast benötigst du kein VBUS-LAN. Du kannst es viel einfacher machen.
Aus deiner Textdatei habe ich dieser Daten erhalten. Die Darstellung ist natürlich noch nicht fertig. Am besten du siehst dir das Beispiel für den DL2 an.

https://github.com/pejonp/vbus/blob/master/dl2_httpmod_fhem.cfg

defmod DataLogger HTTPMOD http://192.168.4.115/vbus/live.json 60
attr DataLogger enableControlSet 1
attr DataLogger enableCookies 1
attr DataLogger extractAllJSON 1
attr DataLogger handleRedirects 1
attr DataLogger room Solartherme
attr DataLogger verbose 5

setstate DataLogger 2020-10-05 10:58:08 headers_01_channel 0
setstate DataLogger 2020-10-05 10:58:08 headers_01_command 256
setstate DataLogger 2020-10-05 10:58:08 headers_01_description VBus 0: DL3
setstate DataLogger 2020-10-05 10:58:08 headers_01_destination_address 16
setstate DataLogger 2020-10-05 10:58:08 headers_01_destination_name DFA
setstate DataLogger 2020-10-05 10:58:08 headers_01_id 00_0010_0053_0100
setstate DataLogger 2020-10-05 10:58:08 headers_01_info 0
.....
setstate DataLogger 2020-10-05 10:58:08 headers_14_fields_03_name Drehza

« Letzte Änderung: 05 Oktober 2020, 21:47:22 von pejonp »
LaCrossGW 868MHz:WT470+TFA+TX37-IT+EMT7110+W136+WH25A HP1003+WH2621
SignalD(CC1101):Bresser+WS-0101(868MHz WH1080)+Velux KLF200+MAX!+HM-MOD-UART:Smoke HM-SEC-SD+VITOSOLIC 200 RESOL VBUS-LAN+SolarEdge SE5K(Modbus)+Sonnen!eco8(10kWh)+TD3511+DRT710M(Modbus)+ZigBee+Z-Wave+MQTT+vitoconnect

Offline pejonp

  • Hero Member
  • *****
  • Beiträge: 1318
Antw:VBus in fhem
« Antwort #816 am: 05 Oktober 2020, 22:04:39 »
@saschab

Hier mal ein kleines Beispiel.

defmod DataLogger HTTPMOD http://192.168.2.170/dlx/download/live?channel=1&sessionAuthUsername=admin&sessionAuthPassword=admin&outputType=json&source=current 60
attr DataLogger enableControlSet 1
attr DataLogger enableCookies 1
attr DataLogger handleRedirects 1
attr DataLogger reading02Name Vorlauf
attr DataLogger reading02Regex (?s)\"header_index\" : 3,.*?\"field_index\" : 0,[ \n\t].*?"value"[ : \t\"]+([\d.:\d.]+)
attr DataLogger reading03Name Temp4
attr DataLogger reading03Regex (?s)\"header_index\" : 5,.*?\"field_index\" : 0,[ \n\t].*?"value"[ : \t\"]+([\d.:\d.]+)
attr DataLogger room Solartherme
attr DataLogger verbose 5

setstate DataLogger 2020-10-05 21:57:42 Temp4 0
setstate DataLogger 2020-10-05 21:57:42 Vorlauf 41.8
setstate DataLogger 2020-10-05 11:39:03 language de


pejonp
LaCrossGW 868MHz:WT470+TFA+TX37-IT+EMT7110+W136+WH25A HP1003+WH2621
SignalD(CC1101):Bresser+WS-0101(868MHz WH1080)+Velux KLF200+MAX!+HM-MOD-UART:Smoke HM-SEC-SD+VITOSOLIC 200 RESOL VBUS-LAN+SolarEdge SE5K(Modbus)+Sonnen!eco8(10kWh)+TD3511+DRT710M(Modbus)+ZigBee+Z-Wave+MQTT+vitoconnect

Offline Schnuller

  • New Member
  • *
  • Beiträge: 5
Antw:VBus in fhem
« Antwort #817 am: 05 November 2020, 13:34:26 »
@Schnuller,

wie sehen den die Daten im VBUS-Portal aus ?
Es gibt die Möglichkeit über HTTPMod Daten von Webseiten auszulesen. Schau mal auf https://github.com/pejonp/vbus bei DL_2 (https://github.com/pejonp/vbus/blob/master/dl2_httpmod_fhem.cfg).
Es muss aber das Login/Password mitgegeben werden. Und die Abfrage sollte auch nicht im Sekundentakt erfolgen ;-).
Kannst ja mal hier schauen (https://forum.fhem.de/index.php/topic,106156.msg1000427.html#msg1000427). Da hatte ich versucht etwas aus einem anderen Portal auszulesen, ist aber nicht fertig geworden.

pejonp

Hallo,
hat schon jemand geschafft die Daten aus dem VBUS-Portal auszulesen?
Ich bekomme es über HTTPMOD nicht hin....
Login/Password habe ich mitgegeben 

VG Schnuller


Offline pejonp

  • Hero Member
  • *****
  • Beiträge: 1318
Antw:VBus in fhem
« Antwort #818 am: 06 November 2020, 20:52:46 »
@Schnuller

zeigt doch mal her was du bis jetzt gemacht hast. PW und Login kannst du ja unkenntlich machen.

pejonp

PS: schau mal hier vielleicht ist etwas dabei. (https://forum.fhem.de/index.php/topic,106156.msg1000427.html#msg1000427)
« Letzte Änderung: 06 November 2020, 21:04:25 von pejonp »
LaCrossGW 868MHz:WT470+TFA+TX37-IT+EMT7110+W136+WH25A HP1003+WH2621
SignalD(CC1101):Bresser+WS-0101(868MHz WH1080)+Velux KLF200+MAX!+HM-MOD-UART:Smoke HM-SEC-SD+VITOSOLIC 200 RESOL VBUS-LAN+SolarEdge SE5K(Modbus)+Sonnen!eco8(10kWh)+TD3511+DRT710M(Modbus)+ZigBee+Z-Wave+MQTT+vitoconnect

Offline Forstling

  • Jr. Member
  • **
  • Beiträge: 64
Antw:VBus in fhem
« Antwort #819 am: 16 Januar 2021, 13:30:05 »
Hallo

bei mir kommen Daten über den V-Bus. (in letzter Zeit sogar stabil)

Das Problem  liegt an der veralteten Version in FHEM

Am besten genau nach WIKI vorgehen.
https://wiki.fhem.de/wiki/Vbus

Ich weiß nicht ob ich die Module händig einkopiert habe.
hier mein 19_VBUSIF.pm
##############################################
# $Id: 19_VBUSIF.pm 20200506 2020-05-06 10:10:10Z pejonp $
#
# VBUS LAN Adapter Device
# 19_VBUSIF.pm
#
# (c) 2014 Arno Willig <akw@bytefeed.de>
# (c) 2015 Frank Wurdinger <frank@wurdinger.de>
# (c) 2015 Adrian Freihofer <adrian.freihofer gmail com>
# (c) 2016 Tobias Faust <tobias.faust gmx net>
# (c) 2016 Jörg (pejonp)
# (c) 20.04.2020 Anpassungen Perl (pejonp)
# (c) 06.05.2020 Fehlerbereinigung nach PBP (pejonp)
#
##############################################

package FHEM::VBUSIF;
use strict;
use warnings;
no if $] >= 5.017011, warnings => 'experimental::smartmatch';
#no warnings 'portable';    # Support for 64-bit ints required
use Data::Dumper;
use Device::SerialPort;
use GPUtils qw(GP_Import GP_Export);
use Time::HiRes qw(gettimeofday usleep);
use Scalar::Util qw(looks_like_number);
use feature qw/say switch/;
use Digest::MD5;
use FHEM::Meta;


## Import der FHEM Funktionen
#-- Run before package compilation
BEGIN {

    # Import from main context
    GP_Import(
        qw(
          readingsBulkUpdate
          readingsBeginUpdate
          readingsEndUpdate
          defs
          modules
          Log3
          attr
          readingFnAttributes
          AttrVal
          ReadingsVal
          Value
          FmtDateTime
          strftime
          GetTimeSpec
          InternalTimer
          AssignIoPort
          DevIo_CloseDev
          DevIo_OpenDev
          DevIo_SimpleWrite
          DevIo_SimpleRead
          RemoveInternalTimer
          getUniqueId
          getKeyValue
          setKeyValue
          TimeNow
          Dispatch
           )
    );
}

#-- Export to main context with different name
GP_Export(
    qw(
      Initialize
      )
);

sub Initialize() {
    my $hash = shift;
    require "$attr{global}{modpath}/FHEM/DevIo.pm";
 
    # Provider
    $hash->{ReadFn}     = \&Read;
    $hash->{WriteFn}    = \&Write;
    $hash->{ReadyFn}    = \&Ready;
    $hash->{UndefFn}    = \&Undef;
    #$hash->{ShutdownFn} = \&Undef;
    $hash->{SetFn}      = \&Set;
    $hash->{DefFn}      = \&Define;
    $hash->{AttrList}   = "dummy:1,0" .$readingFnAttributes;
    $hash->{AutoCreate} = {
        "VBUSDEF.*" => {
            ATTR   => "event-min-interval:.*:120 event-on-change-reading:.* ",
            FILTER => "%NAME"
        }
    };
    return;
}

######################################
sub Define() {
    my $hash = shift;
    my $def = shift;
    my @a = split( "[ \t]+", $def );

    if ( @a != 3 ) {
        my $msg =
          "wrong syntax: define <name> VBUSIF [<hostname:7053> or <dev>]";
        Log3 $hash, 2, $msg;
        return $msg;
    }

    #  if(@a != 3) {
    # return "wrong syntax: define <name> VBUSIF [<hostname:7053> or <dev>]";
    # }

    my $name = $a[0];
    my $dev  = $a[2];
    $hash->{Clients} = ":VBUSDEV:";
    my %matchList = ( "1:VBUSDEV" => ".*" );
    $hash->{MatchList} = \%matchList;

    Log3 $hash, 4, "$name:  Define: $hash->{MatchList} ";

    DevIo_CloseDev($hash);
    $hash->{DeviceName} = $dev;
    my @dev_name = split( '@', $dev );
    if ( -c ${dev_name}[0] ) {
        $hash->{DeviceType} = "Serial";
    }
    else {
        $hash->{DeviceType} = "Net";
    }
    my $ret = DevIo_OpenDev( $hash, 0, "FHEM::VBUSIF::Init" );
    return $ret;
}
###############################
sub Init() {
    my $hash = shift;
    if ( $hash->{DeviceType} eq "Net" ) {
        my $name = $hash->{NAME};
        my $pwd  = readPassword($hash);

        unless ( defined $pwd ) {
            Log3 $hash, 2,
"Error: No password set. Please define it (once) with 'set $name password YourPassword'";
            return;
        }

        delete $hash->{HANDLE};    # else reregister fails / RELEASE is deadly
        my $conn = $hash->{TCPDev};
        $conn->autoflush(1);
        $conn->getline();
        $conn->write( "PASS " . $pwd . "\n" );
        $conn->getline();
        $conn->write("DATA\n");
        $conn->getline();
        Log3 $hash, 4, "$name:  Define: InitIO ";
    }
    return;
}

sub Undef() {
    my $hash = shift;
    my $arg = shift;
    if ( $hash->{DeviceType} eq "Net" ) {
        Write( $hash, "QUIT\n", "" );    # RELEASE
    }
    DevIo_CloseDev($hash);
    return;
}

sub Write() {
    my $hash = shift;
    my $fn = shift;
    my $msg = shift;
    DevIo_SimpleWrite( $hash, $msg, 1 );
    return;
}

sub Read() {
    my $hash = shift;
    my $local = shift;
    my $regexp = shift;
    my $buf = ( $local ? $local : DevIo_SimpleRead($hash) );
    return "" if ( !defined($buf) );
    my $name = $hash->{NAME};
    $buf = unpack( 'H*', $buf );
    my $data = ( $hash->{PARTIAL} ? $hash->{PARTIAL} : "" );
    $data .= $buf;

    my $msg;
    my $msg2;
    my $idx;
    my $muster = "aa";
    $idx = index( $data, $muster );
    Log3 $hash, 4, "$name:  Read0: Data = $data";

    if ( $idx >= 0 ) {
        $msg2 = $data;
        $data = substr( $data, $idx );         # Cut off beginning
        $idx  = index( $data, $muster, 2 );    # Find next message

        if ( $idx > 0 ) {

            $idx += 1
              if ( substr( $data, $idx, 3 ) eq "aaa" );    # Message endet mit a

            $msg  = substr( $data, 0, $idx );
            $data = "";                                    #substr($data,$idx);
            my $protoVersion = substr( $msg, 10, 2 );
            Log3 $hash, 4, "$name:  Read1: protoVersion : $protoVersion";

            if ( $protoVersion == "10" && length($msg) >= 20 ) {
                my $frameCount = hex( substr( $msg, 16, 2 ) );
                my $headerCRC  = hex( substr( $msg, 18, 2 ) );
                my $crc        = 0;
                for ( my $j = 1 ; $j <= 8 ; $j++ ) {
                    $crc += hex( substr( $msg, $j * 2, 2 ) );
                }
                $crc = ( $crc ^ 0xff ) & 0x7f;
                if ( $headerCRC != $crc ) {
                    Log3 $hash, 3,
"$name:  Read2: Wrong checksum: $crc != $headerCRC";
                }
                else {
                    my $len = 20 + 12 * $frameCount;
                    Log3 $hash, 4,
                        "$name:  Read2a Len: "
                      . $len
                      . " Counter: "
                      . $frameCount;

# if ($len != length($msg)){
# Fehler bei aa1000277310000103414a7f1300071c00001401006a62023000016aaa000021732000050000000000000046a
#                                                                   ^ hier wird falsch getrennt
#    $msg = substr($msg2,0,$len);
#    Log3 $hash, 4,"$name: Read2b MSG: ".$msg;
# }

                    if ( $len != length($msg) ) {
                        Log3 $hash, 4,
                          "$name:  Read3: Wrong message length: $len != "
                          . length($msg);
                    }
                    else {
                        Log3 $hash, 4,
                          "$name:  Read4: OK message length: $len : "
                          . length($msg);
                        my $payload = DecodePayload( $hash, $msg );
                        if ( defined $payload ) {
                            $msg = substr( $msg, 0, 20 ) . $payload;
                            Log3 $hash, 4,
                                "$name:  Read6 MSG: "
                              . $msg
                              . " Payload: "
                              . $payload;
                            $hash->{"${name}_MSGCNT"}++;
                            $hash->{"${name}_TIME"} = TimeNow();
                            $hash->{RAWMSG}         = $msg;
                            my %addvals = ( RAWMSG => $msg );
                       #     Dispatch( $hash, $msg, \%addvals ) if ($init_done);
                            Dispatch( $hash, $msg, \%addvals );
                        }
                    }
                }
            }

            if ( $protoVersion == "20" ) {
                my $command    = substr( $msg, 14, 2 ) . substr( $msg, 12, 2 );
                my $dataPntId  = substr( $msg, 16, 4 );
                my $dataPntVal = substr( $msg, 20, 8 );
                my $septet     = substr( $msg, 28, 2 );
                my $checksum   = substr( $msg, 30, 2 );

                Log3 $hash, 4,
"$name:  Read7: Version : $protoVersion CMD: $command ID: $dataPntId Val: $dataPntVal tet: $septet CRC: $checksum ";

                # TODO use septet
                # TODO validate checksum
                # TODO Understand protocol

            }
            Log3 $hash, 4, "$name:  Read8: raus ";
        }
    }
    else {
        Log3 $hash->{NAME}, 4, "$name:  Read_Ende: $data ";
     #   return;
    }

    $hash->{PARTIAL} = $data;

    # return $msg if(defined($local));
    return;
}

sub Ready() {
    my $hash = shift;
    return DevIo_OpenDev( $hash, 1, "FHEM::VBUSIF::Init" )
      if ( $hash->{STATE} eq "disconnected" );
    return;
}

sub DecodePayload() {
    my $hash = shift;
    my $msg = shift;
   
    my $name = $hash->{NAME};

    my $frameCount = hex( substr( $msg, 16, 2 ) );
    my $payload    = "";
    for ( my $i = 0 ; $i < $frameCount ; $i++ ) {
        my $septet   = hex( substr( $msg, 28 + $i * 12, 2 ) );
        my $frameCRC = hex( substr( $msg, 30 + $i * 12, 2 ) );

        my $crc = ( 0x7f - $septet ) & 0x7f;
        for ( my $j = 0 ; $j < 4 ; $j++ ) {
            my $ch = hex( substr( $msg, 20 + $i * 12 + $j * 2, 2 ) );
            $ch |= 0x80 if ( $septet & ( 1 << $j ) );
            $crc = ( $crc - $ch ) & 0x7f;
            $payload .= chr($ch);
        }

        if ( $crc != $frameCRC ) {
            Log3 $hash, 4,
"$name:  DecodePayload0: Wrong checksum: $crc != $frameCRC";
            return;
        }
    }
    return unpack( 'H*', $payload );
}

sub Set() {
    my $hash = shift;
    my $name = shift;
    my $cmd = shift;
    my @val = shift;
    my $resultStr = "";
    my $list      = "password";

    if ( lc $cmd eq 'password' ) {
        if ( int @val == 1 ) {
            return storePassword( $hash, $val[0] );
        }
    }
    return "Unknown argument $cmd or wrong parameter(s), choose one of $list";
}    # end Set

#####################################
# checks and stores VBUS password used for telnet connection
sub storePassword() {
    my $hash = shift;
    my $password = shift;
    my $index = $hash->{TYPE} . "_" . $hash->{NAME} . "_passwd";
    my $key   = getUniqueId() . $index;
    my $enc_pwd = "";
    $key = Digest::MD5::md5_hex( unpack "H*", $key );
    $key .= Digest::MD5::md5_hex($key);

    for my $char ( split //, $password ) {
        my $encode = chop($key);
        $enc_pwd .= sprintf( "%.2x", ord($char) ^ ord($encode) );
        $key = $encode . $key;
    }

    my $err = setKeyValue( $index, $enc_pwd );
    return "error while saving the password - $err" if ( defined($err) );

    return "password successfully saved";
}    # end storePassword
#####################################
#####################################
# reads the VBUS password
sub readPassword() {
    my $hash = shift;
    my $name = $hash->{NAME};
    my $index = $hash->{TYPE} . "_" . $hash->{NAME} . "_passwd";
    my $key   = getUniqueId() . $index;
    my ( $password, $err );

    Log3 $hash, 5, "Read VBUS password from file";
    ( $err, $password ) = getKeyValue($index);

    if ( defined($err) ) {
        Log3 $hash, 4, "unable to read VBUS password from file: $err";
        return;
    }

    if ( defined($password) ) {
        $key = Digest::MD5::md5_hex( unpack "H*", $key );
        $key .= Digest::MD5::md5_hex($key);
        my $dec_pwd = '';

        for my $char ( map { pack( 'C', hex($_) ) } ( $password =~ /(..)/g ) ) {
            my $decode = chop($key);
            $dec_pwd .= chr( ord($char) ^ ord($decode) );
            $key = $decode . $key;
        }

        return $dec_pwd;
    }
    else {
        Log3 $hash, 4, "No password in file";
        return;
    }
}    # end VBUS_readPassword

1;

=pod
=item device
=item summary    connects to the RESOL VBUS LAN or Serial Port adapter
=item summary_DE verbindet sich mit einem RESOL VBUS LAN oder Seriell Adapter
=begin html

<a name="VBUSIF"></a>
<h3>VBUSIF</h3>
<ul>
  This module connects to the RESOL VBUS LAN or Serial Port adapter.
  It serves as the "physical" counterpart to the <a href="#VBUSDEV">VBUSDevice</a>
  devices.
  <br>
  It uses the perl modul Digest::MD5.
  <br/>
  <a name="Define"></a>
  <b>Define</b>
  <ul>
    <code>define &lt;name&gt; VBUSIF &lt;device&gt;</code>
  <br/>
  <br/>
  &lt;device&gt; is a &lt;host&gt;:&lt;port&gt; combination, where
  &lt;host&gt; is the address of the RESOL LAN Adapter and &lt;port&gt; 7053.
  <br/>
  Please note: the password of RESOL Device must be define with 'set &lt;name&gt; password YourPassword'
  <br/>
  Examples:
  <ul>
    <code>define vbus VBUSIF 192.168.1.69:7053</code>
    </ul>
    <ul>
    <code>define vbus VBUSIF  /dev/ttyS0</code>
  </ul>
  </ul>
  <br/>
</ul>

=end html
=cut

und der Anfang von 21_VBUSDEV.pm

##############################################
# $Id: 21_VBUSDEV.pm 20200919 2020-09-19 10:10:10Z pejonp $
#
# 21_VBUSDEV.pm
# VBUS Client Device
#
# (c) 2014 Arno Willig <akw@bytefeed.de>
# (c) 2015 Frank Wurdinger <frank@wurdinger.de>
# (c) 2015 Adrian Freihofer <adrian.freihofer gmail com>
# (c) 2016 Tobias Faust <tobias.faust gmx net>
# (c) 2016 - 2020 Jörg (pejonp)
# (c) 20.04.2020 Anpassungen Perl (pejonp)
# (c) 15.09.2020 Fehlerbereinigung: DoTrigger eingetragen (pejonp)
############################################## 

package FHEM::VBUSDEV;
use strict;
use warnings;
no if $] >= 5.017011, warnings => 'experimental::smartmatch';
#no warnings 'portable';    # Support for 64-bit ints required
use SetExtensions;
use Data::Dumper;
use Device::SerialPort;
use GPUtils qw(GP_Import GP_Export);
use Time::HiRes qw(gettimeofday usleep);
use Scalar::Util qw(looks_like_number);
use feature qw/say switch/;
use FHEM::Meta;
main::LoadModule('VBUSIF');

## Import der FHEM Funktionen
#-- Run before package compilation
BEGIN {

    # Import from main context
    GP_Import(
        qw(
          readingsBulkUpdate
          readingsBeginUpdate
          readingsEndUpdate
          defs
          modules
          Log3
          attr
          readingFnAttributes
          AttrVal
          ReadingsVal
          Value
          FmtDateTime
          strftime
          GetTimeSpec
          InternalTimer
          AssignIoPort
          DevIo_CloseDev
          DevIo_OpenDev
          DevIo_SimpleWrite
          DevIo_SimpleRead
          RemoveInternalTimer
          getUniqueId
          getKeyValue
          TimeNow
          Dispatch
          DoTrigger )
    );
}

#-- Export to main context with different name
GP_Export(
    qw(
      Initialize
      )
);


my %VBUS_devices = (
"0050" => {"name" => "DL_2", "cmd" => "0100", "fields" => [
{ "offset" => 0,"name" => "Resistor_Sensor_01", "bitSize" => 15, "factor" => 0.1, "unit" => "Ohm" },
{ "offset" => 2,"name" => "Resistor_Sensor_11", "bitSize" => 15, "factor" => 0.1, "unit" => "Ohm" },
{ "offset" => 4,"name" => "Resistor_Sensor_02", "bitSize" => 15, "factor" => 0.1, "unit" => "Ohm" },
{ "offset" => 6,"name" => "Resistor_Sensor_22", "bitSize" => 15, "factor" => 0.1, "unit" => "Ohm" },
{ "offset" => 8,"name" => "Resistor_Sensor_03", "bitSize" => 15, "factor" => 0.1, "unit" => "Ohm" },
{ "offset" => 10,"name" => "Resistor_Sensor_33", "bitSize" => 15, "factor" => 0.1, "unit" => "Ohm" },
{ "offset" => 12,"name" => "Current_Sensor_01", "bitSize" => 15, "factor" => 0.1, "unit" => "mA" },
{ "offset" => 14, "name" => "Current_Sensor_11", "bitSize" => 15, "factor" => 0.1, "unit" => "mA" },
{ "offset" => 28,"name" => "Temperatur_01","bitSize" => 15,"factor" => 0.1,"unit" => "°C" },
{ "offset" => 30,"name" => "Temperatur_02","bitSize" => 15,"factor" => 0.1,"unit" => "°C" },
{ "offset" => 32,"name" => "Temperatur_03","bitSize" => 15,"factor" => 0.1,"unit" => "°C" },
{ "offset" => 34,"name" => "Temperatur_04","bitSize" => 15,"factor" => 0.1,"unit" => "°C" },
]},
"0053" => {"name" => "DL_3", "cmd" => "0100", "fields" => [
{ "offset" => 0,"name" => "Resistor_Sensor_01", "bitSize" => 15, "factor" => 0.1, "unit" => "Ohm" },
{ "offset" => 2,"name" => "Resistor_Sensor_11", "bitSize" => 15, "factor" => 0.1, "unit" => "Ohm" },
{ "offset" => 4,"name" => "Resistor_Sensor_02", "bitSize" => 15, "factor" => 0.1, "unit" => "Ohm" },
{ "offset" => 6,"name" => "Resistor_Sensor_22", "bitSize" => 15, "factor" => 0.1, "unit" => "Ohm" },
{ "offset" => 8,"name" => "Resistor_Sensor_03", "bitSize" => 15, "factor" => 0.1, "unit" => "Ohm" },
{ "offset" => 10,"name" => "Resistor_Sensor_33", "bitSize" => 15, "factor" => 0.1, "unit" => "Ohm" },
{ "offset" => 12,"name" => "Current_Sensor_01", "bitSize" => 15, "factor" => 0.1, "unit" => "mA" },
{ "offset" => 14,"name" => "Current_Sensor_11", "bitSize" => 15, "factor" => 0.1, "unit" => "mA" },
{ "offset" => 28,"name" => "Temperatur_01","bitSize" => 15,"factor" => 0.1,"unit" => "°C" },
{ "offset" => 30,"name" => "Temperatur_02","bitSize" => 15,"factor" => 0.1,"unit" => "°C" },
{ "offset" => 32,"name" => "Temperatur_03","bitSize" => 15,"factor" => 0.1,"unit" => "°C" },
{ "offset" => 34,"name" => "Temperatur_04","bitSize" => 15,"factor" => 0.1,"unit" => "°C" },
]},
"1001" => {"name" => "DeltaSol_SLT", "cmd" => "0100", "fields" => [
{ "offset" => 0,"name" => "Systemdatum","bitSize" => 31 },
{ "offset" => 4,"name" => "Temperatur_01","bitSize" => 15,"factor" => 0.1,"unit" => "°C" },
{ "offset" => 6,"name" => "Temperatur_02","bitSize" => 15,"factor" => 0.1,"unit" => "°C" },
{ "offset" => 8,"name" => "Temperatur_03","bitSize" => 15,"factor" => 0.1,"unit" => "°C" },
{ "offset" => 10,"name" => "Temperatur_04","bitSize" => 15,"factor" => 0.1,"unit" => "°C" },
{ "offset" => 12,"name" => "Temperatur_05","bitSize" => 15,"factor" => 0.1,"unit" => "°C" },
{ "offset" => 14,"name" => "Temperatur_S06","bitSize" => 15,"factor" => 0.1,"unit" => "°C" },
{ "offset" => 16, "name" => "Volumenstrom_V40", "bitSize" => 31, "factor" => 1, "unit" => "1/h" },
{ "offset" => 20, "name" => "Volumenstrom_VFS_S06", "bitSize" => 31, "factor" => 1, "unit" => "1/h" },
{ "offset" => 24, "name" => "Volumenstrom_Flowrotor_S07", "bitSize" => 31, "factor" => 1, "unit" => "1/h" },
{ "offset" => 28, "name" => "Druck_RPS_S06", "bitSize" => 15, "factor" => 0.01, "unit" => "bar" },
{ "offset" => 30, "name" => "Drehzahl_Relais_1", "bitSize" => 7, "factor" => 1, "unit" => "%" },
{ "offset" => 31, "name" => "Drehzahl_Relais_2", "bitSize" => 7, "factor" => 1, "unit" => "%" },
{ "offset" => 32, "name" => "Drehzahl_Relais_3", "bitSize" => 7, "factor" => 1, "unit" => "%" },
{ "offset" => 33, "name" => "Drehzahl_Relais_4", "bitSize" => 7, "factor" => 1, "unit" => "%" },
{ "offset" => 34, "name" => "PWM_A", "bitSize" => 7, "factor" => 1, "unit" => "%" },
{ "offset" => 35, "name" => "PWM_B", "bitSize" => 7, "factor" => 1, "unit" => "%" },
{ "offset" => 36, "name" => "Fehlermaske", "bitSize" => 31, "factor" => 1 },
{ "offset" => 40, "name" => "Warnungsmaske", "bitSize" => 31, "factor" => 1 },
]},
"1011" => {"name" => "DeltaSol_SLT_WMZ", "cmd" => "0100", "fields" => [
{ "offset" => 0,"name" => "Waerme_gesamt","bitSize" => 31,"factor" => 1,"unit" => "Wh" },
{ "offset" => 4,"name" => "Waerme_heute","bitSize" => 31,"factor" => 1,"unit" => "Wh" },
{ "offset" => 8,"name" => "Waerme_gestern","bitSize" => 31,"factor" => 1,"unit" => "Wh" },
{ "offset" => 12,"name" => "Waerme_woche","bitSize" => 31,"factor" => 1,"unit" => "Wh" },
{ "offset" => 16,"name" => "Waerme_vorwoche","bitSize" => 31,"factor" => 1,"unit" => "Wh" },
{ "offset" => 20,"name" => "Waerme_monat","bitSize" => 31,"factor" => 1,"unit" => "Wh" },
{ "offset" => 24,"name" => "Waerme_vormonat","bitSize" => 31,"factor" => 1,"unit" => "Wh" },
{ "offset" => 28,"name" => "Waerme_jahr","bitSize" => 31,"factor" => 1,"unit" => "Wh" },
{ "offset" => 32,"name" => "Waerme_vorjahr","bitSize" => 31,"factor" => 1,"unit" => "Wh" },
{ "offset" => 36,"name" => "Volumen_gesamt", "bitSize" => 31, "factor" => 1, "unit" => "1/h" },
{ "offset" => 40,"name" => "Volumen_heute", "bitSize" => 31, "factor" => 1, "unit" => "l/h" },
{ "offset" => 44,"name" => "Volumen_gestern", "bitSize" => 31, "factor" => 1, "unit" => "1/h" },
{ "offset" => 48,"name" => "Volumen_woche", "bitSize" => 31, "factor" => 1, "unit" => "1/h" },
{ "offset" => 52,"name" => "Volumen_vorwoche","bitSize" => 31,"factor" => 1,"unit" => "l/h" },
{ "offset" => 56,"name" => "Volumen_monat", "bitSize" => 31, "factor" => 1, "unit" => "1/h" },
{ "offset" => 60,"name" => "Volumen_vormonat", "bitSize" => 31, "factor" => 1, "unit" => "1/h" },
{ "offset" => 64,"name" => "Volumen_jahr", "bitSize" => 31, "factor" => 1, "unit" => "1/h" },
{ "offset" => 68,"name" => "Volumen_vorjahr", "bitSize" => 31, "factor" => 1, "unit" => "1/h" },
{ "offset" => 72, "name" => "Leistung", "bitSize" => 31, "factor" => 0.001, "unit" => "kW" },
]},
"1059" => {"name" => "DeltaThermHC_mini_Regler", "cmd" => "0100", "fields" => [
{ "offset" => 0, "name" => "Temperatur_Sensor_1", "bitSize" => 15, "factor" => 0.1, "unit" => "°C" },
{ "offset" => 2, "name" => "Temperatur_Sensor_2", "bitSize" => 15, "factor" => 0.1, "unit" => "°C" },
{ "offset" => 4, "name" => "Temperatur_Sensor_3", "bitSize" => 15, "factor" => 0.1, "unit" => "°C" },
{ "offset" => 6, "name" => "Temperatur_Sensor_4", "bitSize" => 15, "factor" => 0.1, "unit" => "°C" },
{ "offset" => 8, "name" => "Temperatur_Sensor_5", "bitSize" => 15, "factor" => 0.1, "unit" => "°C" },
{ "offset" => 10, "name" => "Drehzahl_Relais_1", "bitSize" => 7, "factor" => 1, "unit" => "%" },
{ "offset" => 11, "name" => "Drehzahl_Relais_2", "bitSize" => 7, "factor" => 1, "unit" => "%" },
{ "offset" => 12, "name" => "Drehzahl_Relais_3", "bitSize" => 7, "factor" => 1, "unit" => "%" },
{ "offset" => 13, "name" => "Drehzahl_Relais_4", "bitSize" => 7, "factor" => 1, "unit" => "%" },
{ "offset" => 14, "name" => "Regler_Ausgang_1", "bitSize" => 7, "factor" => 1, "unit" => "%" },
{ "offset" => 15, "name" => "Regler_Ausgang_2", "bitSize" => 7, "factor" => 1, "unit" => "%" },
{ "offset" => 16,"name" => "Systemdatum","bitSize" => 31 },
{ "offset" => 20, "name" => "Fehlermaske", "bitSize" => 31, "factor" => 1 },
{ "offset" => 24, "name" => "Warnungsmaske", "bitSize" => 31, "factor" => 1 },
]},
"1060" => {"name" => "Vitosolic200_SD4", "cmd" => "0100", "fields" => [
{ "offset" =>  0,"name" => "temperature_T01","bitSize" => 15,"factor" => 0.1,"unit" => "°C" },
{ "offset" =>  2,"name" => "temperature_T02","bitSize" => 15,"factor" => 0.1,"unit" => "°C" },
{ "offset" =>  4,"name" => "temperature_T03","bitSize" => 15,"factor" => 0.1,"unit" => "°C" },
{ "offset" =>  6,"name" => "temperature_T04","bitSize" => 15,"factor" => 0.1,"unit" => "°C" },
{ "offset" =>  8,"name" => "temperature_T05","bitSize" => 15,"factor" => 0.1,"unit" => "°C" },
{ "offset" => 10,"name" => "temperature_T06","bitSize" => 15,"factor" => 0.1,"unit" => "°C" },
{ "offset" => 12,"name" => "temperature_T07","bitSize" => 15,"factor" => 0.1,"unit" => "°C" },
{ "offset" => 14,"name" => "temperature_T08","bitSize" => 15,"factor" => 0.1,"unit" => "°C" },
{ "offset" => 16,"name" => "temperature_T09","bitSize" => 15,"factor" => 0.1,"unit" => "°C" },
{ "offset" => 18,"name" => "temperature_T10","bitSize" => 15,"factor" => 0.1,"unit" => "°C" },
{ "offset" => 20,"name" => "temperature_T11","bitSize" => 15,"factor" => 0.1,"unit" => "°C" },
{ "offset" => 22,"name" => "temperature_T12","bitSize" => 15,"factor" => 0.1,"unit" => "°C" },
{ "offset" => 24,"name" => "insolation", "bitSize" => 15,"unit" => "W/qm" },
{ "offset" => 28,"name" => "impulse_I01","bitSize" => 31 },
{ "offset" => 32,"name" => "impulse_I02","bitSize" => 31 },
{ "offset" => 36,"name" => "sensorbrokemask","bitSize" => 16 },
{ "offset" => 38,"name" => "sensorshortmask","bitSize" => 16 },
{ "offset" => 40,"name" => "sensorusagemask","bitSize" => 16 },
{ "offset" => 44,"name" => "speed_R01","bitSize" => 8, "unit" => "%" },
{ "offset" => 45,"name" => "speed_R02","bitSize" => 8, "unit" => "%" },
{ "offset" => 46,"name" => "speed_R03","bitSize" => 8, "unit" => "%" },
{ "offset" => 47,"name" => "speed_R04","bitSize" => 8, "unit" => "%" },
{ "offset" => 48,"name" => "speed_R05","bitSize" => 8, "unit" => "%" },
{ "offset" => 49,"name" => "speed_R06","bitSize" => 8, "unit" => "%" },
{ "offset" => 50,"name" => "speed_R07","bitSize" => 8, "unit" => "%" },
{ "offset" => 51,"name" => "speed_R08","bitSize" => 8, "unit" => "%" },
{ "offset" => 52,"name" => "speed_R09","bitSize" => 8, "unit" => "%" },
{ "offset" => 58,"name" => "relaisusagemask","bitSize" => 16 },
{ "offset" => 60,"name" => "errormask","bitSize" => 16 },
{ "offset" => 62,"name" => "warningmask","bitSize" => 16 },
{ "offset" => 64,"name" => "SW-Version","bitSize" => 8,"factor" => 0.1 },
{ "offset" => 65,"name" => "Minorversion","bitSize" => 8,"factor" => 1 },
{ "offset" => 66,"name" => "systemtime","bitSize" => 16 },
]},
"1065" => {"name" => "Vitosolic200_WMZ1", "cmd" => "0100", "fields" => [
{ "offset" =>  0,"name" => "WMZ1_Vorlauf","bitSize" => 15,"factor" => 0.1,"unit" => "°C" },
{ "offset" =>  2,"name" => "WMZ1_Ruecklauf","bitSize" => 15,"factor" => 0.1,"unit" => "°C" },
{ "offset" =>  4,"name" => "WMZ1_volumeflow","bitSize" => 15,"unit" => "l/h" },
{ "offset" =>  6,"name" => "WMZ1_heatquantity1","bitSize" => 16,"factor" => 1,"unit" => "Wh" },
{ "offset" =>  8,"name" => "WMZ1_heatquantity2","bitSize" => 16,"unit" => "kWh" },
{ "offset" =>  10,"name" => "WMZ1_heatquantity3","bitSize" => 16,"unit" => "MWh" },
]},
"1066" => {"name" => "Vitosolic200_WMZ2", "cmd" => "0100", "fields" => [
{ "offset" =>  0,"name" => "WMZ1_Vorlauf","bitSize" => 15,"factor" => 0.1,"unit" => "°C" },
{ "offset" =>  2,"name" => "WMZ1_Ruecklauf","bitSize" => 15,"factor" => 0.1,"unit" => "°C" },
{ "offset" =>  4,"name" => "WMZ1_volumeflow","bitSize" => 15,"unit" => "l/h" },
{ "offset" =>  6,"name" => "WMZ1_heatquantity1","bitSize" => 16,"factor" => 1,"unit" => "Wh" },
{ "offset" =>  8,"name" => "WMZ1_heatquantity2","bitSize" => 16,"unit" => "kWh" },
{ "offset" =>  10,"name" => "WMZ1_heatquantity3","bitSize" => 16,"unit" => "MWh" },
]},
  "1121" => {"name" => "DeltaSol_CS2", "cmd" => "0100", "fields" => [
{ "offset" =>  0,"name" => "Temperatur_Sensor1","bitSize" => 15,"factor" => 0.1,"unit" => "°C" },
{ "offset" =>  2,"name" => "Temperatur_Sensor2","bitSize" => 15,"factor" => 0.1,"unit" => "°C" },
{ "offset" =>  4,"name" => "Temperatur_Sensor3","bitSize" => 15,"factor" => 0.1,"unit" => "°C" },
{ "offset" =>  6,"name" => "Temperatur_Sensor4","bitSize" => 15,"factor" => 0.1,"unit" => "°C" },
      { "offset" =>  8,"name" => "Temperatur_Sensor5","bitSize" => 15,"factor" => 0.1,"unit" => "°C" },
{ "offset" => 10, "name" => "Volumenstrom", "bitSize" => 31, "factor" => 1, "unit" => "1/min" },
{ "offset" => 12,"name" => "Drehzahl_Relais","bitSize" => 8,"unit" => "%"  },
      { "offset" => 14,"name" => "Betriebsstunden_Relais","bitSize" => 16, "unit" => "h" },
      { "offset" => 16,"name" => "UnitType","bitSize" => 8 },
      { "offset" => 24,"name" => "Waermemenge1","bitSize" => 8,"factor" => 1,"unit" => "Wh" },
{ "offset" => 25,"name" => "Waermemenge2","bitSize" => 8,"factor" => 100,"unit" => "Wh" },
      { "offset" => 26,"name" => "Waermemenge3","bitSize" => 8,"factor" => 10000,"unit" => "Wh" },
{ "offset" => 27,"name" => "Waermemenge4","bitSize" => 8,"factor" => 10000000,"unit" => "Wh" },
  ]},
"1140" => {"name" => "DeltaThermHC_mini_HK", "cmd" => "0100", "fields" => [
{ "offset" =>  0,"name" => "HK_VorlaufSoll","bitSize" => 15,"factor" => 0.1,"unit" => "°C" },
{ "offset" =>  2,"name" => "HK_Betriebsstatus","bitSize" => 8,"factor" => 1 },
{ "offset" =>  4,"name" => "HK_Betriebsart","bitSize" => 8,"factor" => 1 },
{ "offset" =>  6,"name" => "HK_Brennerstarts1","bitSize" => 8,"factor" => 1 },
{ "offset" =>  8,"name" => "HK_Brennerstarts2","bitSize" => 8,"factor" => 1 },
{ "offset" =>  10,"name" => "HK_Brennerstarts3","bitSize" => 8,"factor" => 1 },
]},
"1240" => {"name" => "Wagner_Sungo_100_Regler", "cmd" => "0100", "fields" => [
{ "offset" => 0, "name" => "Systemzeit", "bitSize" => 31, "timeRef" => 1 },
{ "offset" => 4, "name" => "Solar_Kollektortemp", "bitSize" => 15, "factor" => 0.1, "unit" => "°C" },
{ "offset" => 6, "name" => "Solar_Kesseltemp", "bitSize" => 15, "factor" => 0.1, "unit" => "°C" },
{ "offset" => 8, "name" => "Solar_VL", "bitSize" => 15, "factor" => 0.1, "unit" => "°C" },
{ "offset" => 10, "name" => "Solar_RL", "bitSize" => 15, "factor" => 0.1, "unit" => "°C" },
{ "offset" => 12, "name" => "Tage", "bitSize" => 15, "factor" => 1, "unit" => "T" },
{ "offset" => 16, "name" => "Volumenstrom_V40", "bitSize" => 31, "factor" => 1, "unit" => "1/h" },
{ "offset" => 20, "name" => "Drehzahl1", "bitSize" => 7, "factor" => 1, "unit" => "%" },
{ "offset" => 24, "name" => "Waermemenge", "bitSize" => 31, "factor" => 1, "unit" => "Wh" },
{ "offset" => 32, "name" => "Betriebstunden", "bitSize" => 31, "factor" => 1, "unit" => "h" },
{ "offset" => 44, "name" => "SW-Version", "bitSize" => 7, "factor" => 0.01 },
{ "offset" => 44, "name" => "Urlaubsfunktion", "bitSize" => 1, "factor" => 1 },
{ "offset" => 45, "name" => "Blockierschutz_1", "bitSize" => 7, "factor" => 1, "unit" => "%" },
{ "offset" => 69, "name" => "Speichermaximaltemperatur", "bitSize" => 1, "factor" => 1 },
{ "offset" => 72, "name" => "Fehlermaske", "bitSize" => 31, "factor" => 1 },
]},
"1241" => {"name" => "Wagner_Sungo_100_WMZ1", "cmd" => "0100", "fields" => [
{ "offset" => 0,"name" => "Wmz1_Wert_Wh","bitSize" => 31,"factor" => 1,"unit" => "Wh" },
{ "offset" => 4,"name" => "Wmz1_Leistung_W","bitSize" => 31,"factor" => 1,"unit" => "W" },
{ "offset" => 8,"name" => "Wmz1_WertHeute_Wh","bitSize" => 31,"factor" => 1,"unit" => "Wh" },
{ "offset" => 12,"name" => "Wmz1_WertWoche_Wh","bitSize" => 31,"factor" => 1,"unit" => "Wh" },
]},
"2211" => {"name" => "DeltaSol_CS_Plus", "cmd" => "0100", "fields" => [
{ "offset" =>  0,"name" => "Temperatur_Sensor1","bitSize" => 15,"factor" => 0.1,"unit" => "°C" },
{ "offset" =>  2,"name" => "Temperatur_Sensor2","bitSize" => 15,"factor" => 0.1,"unit" => "°C" },
{ "offset" =>  4,"name" => "Temperatur_Sensor3","bitSize" => 15,"factor" => 0.1,"unit" => "°C" },
{ "offset" =>  6,"name" => "Temperatur_Sensor4","bitSize" => 15,"factor" => 0.1,"unit" => "°C" },
{ "offset" =>  8,"name" => "Drehzahl_Relais1","bitSize" => 8, "unit" => "%" },
{ "offset" => 10,"name" => "Betriebsstunden_Relais1","bitSize" => 16, "unit" => "h" },
{ "offset" => 12,"name" => "Drehzahl_Relais2","bitSize" => 8,"unit" => "%"  },
{ "offset" => 14,"name" => "Betriebsstunden_Relais2","bitSize" => 16, "unit" => "h" },
{ "offset" => 16,"name" => "UnitType","bitSize" => 8 },
{ "offset" => 17,"name" => "System","bitSize" => 16 },
{ "offset" => 28,"name" => "Waermemenge1","bitSize" => 8,"factor" => 1,"unit" => "Wh" },
{ "offset" => 29,"name" => "Waermemenge2","bitSize" => 8,"factor" => 100,"unit" => "Wh" },
{ "offset" => 30,"name" => "Waermemenge3","bitSize" => 8,"factor" => 10000,"unit" => "Wh" },
{ "offset" => 31,"name" => "Waermemenge4","bitSize" => 8,"factor" => 10000000,"unit" => "Wh" },
]},
"2231" => {"name" => "Oranier_HK_Regler", "cmd" => "0100", "fields" => [
{ "offset" => 0, "name" => "Kollektor", "bitSize" => 15, "factor" => 1, "unit" => "°C" },
{ "offset" => 2, "name" => "Speicher_Solar", "bitSize" => 15, "factor" => 1, "unit" => "°C" },
{ "offset" => 4, "name" => "Ofen_KesselTemp", "bitSize" => 15, "factor" => 1, "unit" => "°C" },
{ "offset" => 6, "name" => "Speicher_unten", "bitSize" => 15, "factor" => 1, "unit" => "°C" },
{ "offset" => 8, "name" => "Ruecklauf_Heizkreis", "bitSize" => 15, "factor" => 1, "unit" => "°C" },
{ "offset" => 10, "name" => "Speicher_Entnahme", "bitSize" => 15, "factor" => 1, "unit" => "°C" },
{ "offset" => 12, "name" => "Brauchwasserspeicher", "bitSize" => 15, "factor" => 1, "unit" => "°C" },
{ "offset" => 14, "name" => "Zirkulation-Fuehler", "bitSize" => 15, "factor" => 1, "unit" => "°C" },
{ "offset" => 16, "name" => "Sensor_9", "bitSize" => 15, "factor" => 1, "unit" => "°C" },
{ "offset" => 18, "name" => "Sensor_10", "bitSize" => 15, "factor" => 1, "unit" => "°C" },
{ "offset" => 20, "name" => "Sensor_11", "bitSize" => 15, "factor" => 1, "unit" => "°C" },
{ "offset" => 22, "name" => "Sensor_12", "bitSize" => 15, "factor" => 1, "unit" => "°C" },
{ "offset" => 24, "name" => "Sensor_13", "bitSize" => 15, "factor" => 1, "unit" => "°C" },
{ "offset" => 26, "name" => "Vorlauftemperatur_HK1", "bitSize" => 15, "factor" => 1, "unit" => "°C" },
{ "offset" => 28, "name" => "Aussentemperatur", "bitSize" => 15, "factor" => 1, "unit" => "°C" },
{ "offset" => 30, "name" => "Abgastemperatur", "bitSize" => 15, "factor" => 1, "unit" => "°C" },
{ "offset" => 36,"name" => "Einstrahlung","bitSize" => 15,"factor" => 1,"unit" => "W/qm" },
{ "offset" => 38, "name" => "Impulseingang_1", "bitSize" => 31, "factor" => 1 },
{ "offset" => 42, "name" => "Impulseingang_2", "bitSize" => 15, "factor" => 1 },
{ "offset" => 44, "name" => "Umschaltventil_Kessel", "bitSize" => 7, "factor" => 1, "unit" => "%" },
{ "offset" => 45, "name" => "BW_Ladepumpe", "bitSize" => 7, "factor" => 1, "unit" => "%" },
{ "offset" => 46, "name" => "Zirkulationspumpe", "bitSize" => 7, "factor" => 1, "unit" => "%" },
{ "offset" => 47, "name" => "Relais_6", "bitSize" => 7, "factor" => 1, "unit" => "%" },
{ "offset" => 48, "name" => "Relais_7", "bitSize" => 7, "factor" => 1, "unit" => "%" },
{ "offset" => 49, "name" => "Relais_8", "bitSize" => 7, "factor" => 1, "unit" => "%" },
{ "offset" => 50, "name" => "Brennersperre_2", "bitSize" => 7, "factor" => 1, "unit" => "%" },
{ "offset" => 51, "name" => "Mischer_Auf", "bitSize" => 7, "factor" => 1, "unit" => "%" },
{ "offset" => 52, "name" => "Mischer_Zu", "bitSize" => 7, "factor" => 1, "unit" => "%" },
« Letzte Änderung: 16 Januar 2021, 13:32:42 von Forstling »

Offline pejonp

  • Hero Member
  • *****
  • Beiträge: 1318
Antw:VBus in fhem
« Antwort #820 am: 16 Januar 2021, 15:31:21 »
Hi Forstling,

was willst du uns damit sagen ? Wo gibt es ein Problem ?

Wenn du das WIKI gelesen hast, weist du ja wie du ein Update machen kannst !? Und FHEM neu starten !!

update all https://raw.githubusercontent.com/pejonp/vbus/master/controls_vbus.txt

pejonp
LaCrossGW 868MHz:WT470+TFA+TX37-IT+EMT7110+W136+WH25A HP1003+WH2621
SignalD(CC1101):Bresser+WS-0101(868MHz WH1080)+Velux KLF200+MAX!+HM-MOD-UART:Smoke HM-SEC-SD+VITOSOLIC 200 RESOL VBUS-LAN+SolarEdge SE5K(Modbus)+Sonnen!eco8(10kWh)+TD3511+DRT710M(Modbus)+ZigBee+Z-Wave+MQTT+vitoconnect

Offline Forstling

  • Jr. Member
  • **
  • Beiträge: 64
Antw:VBus in fhem
« Antwort #821 am: 17 Januar 2021, 17:10:10 »
war ne verspätete Antwort auf das vorherige Problem

Offline Fakenius

  • New Member
  • *
  • Beiträge: 36
    • Wusstest Du schon, dass man das so schreibt?
Antw:VBus in fhem
« Antwort #822 am: 25 Januar 2021, 13:33:41 »
Hallo,

das VBus-Protokoll gibt es ja auch in den Versionen 2 und 3. Wenn ich das richtig verstehe, werden die bisher nicht unterstützt. Ich könnte mir aber vorstellen, dass das Auslesen und Setzen von Parametern nicht uninteressant wäre.

Kann jemand etwas dazu sagen? Danke.

Offline HeikoE

  • Full Member
  • ***
  • Beiträge: 112
Antw:VBus in fhem
« Antwort #823 am: 25 Januar 2021, 20:14:36 »
Hallo,
ich habe (nach langer Zeit...) mal wieder ein Update gemacht und seitdem folgende Meldung im Log:
KG.HZ.Solaranlage: unknown attribute event-aggregator. Type 'attr KG.HZ.Solaranlage ?' for a detailed list.
Das bezieht sich auf diese Zeile in der Definition des VBUSDEV:
attr KG.HZ.Solaranlage event-aggregator [TQ]_.*:60:none:max
In der Version
# $Id: 21_VBUSDEV.pm 20192612 2019-26-12 10:10:10Z pejonp $
funktionierte der Event-Aggregator problemlos. Jetzt kann dieses Attribut auch im Gerät nicht mehr ausgewählt werden.
Eigentlich sollte es in jedem Gerät zur Verfügung stehen. Die sonstigen Funktionen, wie z.B. "event-on-update-reading", gehen nach wie vor problemlos.
Irgend eine Idee, warum das Attribut nicht mehr genutzt werden kann? Bei anderen Geräten geht es noch.
Ich hänge noch ein List an.
Schöne Grüße,
Heiko

Offline pejonp

  • Hero Member
  • *****
  • Beiträge: 1318
Antw:VBus in fhem
« Antwort #824 am: 26 Januar 2021, 08:34:35 »
@HeikoE
Nach Update FHEM neu starten !! Updateeinstellungen am besten dauerhaft hinter legen.

 Update add .... Doku fhem

update all https://raw.githubusercontent.com/pejonp/vbus/master/controls_vbus.txt

pejonp
LaCrossGW 868MHz:WT470+TFA+TX37-IT+EMT7110+W136+WH25A HP1003+WH2621
SignalD(CC1101):Bresser+WS-0101(868MHz WH1080)+Velux KLF200+MAX!+HM-MOD-UART:Smoke HM-SEC-SD+VITOSOLIC 200 RESOL VBUS-LAN+SolarEdge SE5K(Modbus)+Sonnen!eco8(10kWh)+TD3511+DRT710M(Modbus)+ZigBee+Z-Wave+MQTT+vitoconnect

 

decade-submarginal