mhop / fhem-mirror

Branch 'master' is an unofficial read-only-mirror of https://svn.fhem.de/fhem/trunk which is updated once a day. (branch sf_old a mirror of the old repo: svn://svn.code.sf.net/p/fhem/code/trunk)
106 stars 127 forks source link

10_ZWave.pm ZMNKIDx OnOff Thermostat 2 report of 3 digit #63

Open GVach78 opened 8 months ago

GVach78 commented 8 months ago

Hello,

The new ZMNKIDx OnOff Thermostat 2 report of 3 digit so there is report of THERMOSTAT_SETPOINT_REPORT wrong number of bytes received my sugested update ligne 1614

my $length1 = length($3); my $sp = hex($3); my $msb = (hex($3)>>4*$length1-1); # most significant bit ( 0 = pos, 1 = neg )

if ($length1 == $size*2) { $sp -= (2 ($size*8)) if $sp >= (2 * ($size8-1)); $sp = $sp / (10 $prec);

} elsif ($length1 == $size*3){ $sp = $msb ? -(256 - ((hex($3) & 0x00ff00)>>8)) : (hex($3)>>8); # 2's complement $sp = $sp / 10 ;

} else { Log3 $name, 1, "$name: THERMOSTAT_SETPOINT_REPORT " ."wrong number of bytes received"; return; }

GVach78 commented 8 months ago

Data of this module of $3 and calcul

111111110001000000000000 ff0600 06 -25° = (06-256) / 10 111111110000011000000000 ff1000 10 -24° = (16 -256) / 10 111111110001010100000000 ff1500 15 -23.5° = (21-256)/ 10 111111111111011000000000 ff0600 06 -1° (246−256) / 10 111111111111101100000000 fffb00 fb -0.5° ( 251−256) / 10 000000001111111100000000 00ff00 0° 110010000000000000 032000 0320h 800d 80° 100010011000000000 022600 0226h 550d 55.0° 011111010000000000 01f400 01f4h 500d 50.0° 011100001000000000 01c200 01c2h 450d 45.0° 000000010100000000 000500 0005h 5d 0.5°