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
Fehlerhaft Math.round Funktion #42
Comments
Hallo,
Grüße Matthias |
Nochmal Hallo, Habe durch eigenrecherche herausgefunden das dies richtig ist, also Sorry für das "angebrachter". Aber mal zum eigentlichen Problem, Ich nutze die Sollwertkorrektur automatisiert um auf starke Temperaturstürze oder auch anstiege zu reagieren, jedoch funktionieren nur ganze Schritte um 1 bei Schritten um 0,5 kommt ein sehr großes Durcheinander zustande das z.B. der Heizkreis plötzlich auf -4 & der Mischerkreis seltsamerweise auf 0,4 steht was ja eigentlich nicht sein darf. Grüße Silvio |
Neue Erkenntnisse zu dem Thema im IoBroker Forum gefunden. https://forum.iobroker.net/topic/31440/wolf-adapter-sollwertkorrektur-in-0-5er-schritten?_=1619967470092 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days. Please check if the issue is still relevant in the most current version of the adapter and tell us. Also check that all relevant details, logs and reproduction steps are included and update them if needed. Thank you for your contributions. |
This issue has been automatically closed because of inactivity. Please open a new issue if still relevant and make sure to include all relevant details, logs and reproduction steps. Thank you for your contributions. |
Kann im Code der main.js die Schrittweite die in der Bedienungsanleitung steht angepasst werden?
Hier wird die Math.round Funktion mit *2 ) /2 gemacht, für die Schrittweite von 0,5 wäre aber *10)/10 angebrachter.
Auszug Bedienungsanleitung ISM8:
IDs Datenpunkt Einheit Wertebereich Schrittweite
65 / 78 / 91 / 104 Sollwertkorrektur K -4K - +4K 0,5K
66 / 79 / 92 / 105 Sparfaktor K 0K - 10K 0,5K
Codeauszug:
} else if (type === 'DPT_Tempd' && name === 'Sollwertkorrektur') {
val = Math.round(data * 2) / 2;
if (val > 4) {
val = 4
}
if (val < -4) {
val = 4
}
return [enc.encodeDPT9(data), val];
} else if (type === 'DPT_Tempd' && name === 'Sparfaktor') {
val = Math.round(data * 2) / 2;
if (val > 10) {
val = 10
}
if (val < 0) {
val = 0
}
return [enc.encodeDPT9(data), val];
Danke und MfG Silvio
The text was updated successfully, but these errors were encountered: