Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
GVach78 opened this issue Jan 6, 2024 · 1 comment
Open

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

GVach78 opened this issue Jan 6, 2024 · 1 comment

Comments

@GVach78
Copy link

GVach78 commented Jan 6, 2024

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 == $size2) {
$sp -= (2 ** ($size
8)) if $sp >= (2 ** ($size*8-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
Copy link
Author

GVach78 commented Jan 6, 2024

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°

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant