-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hcanhab: Schnittstelle fuer die Bedienung der Heizung erweitert
- Loading branch information
ingo
authored and
ingo
committed
Jan 8, 2018
1 parent
35e6e9f
commit c0d0925
Showing
10 changed files
with
51 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 15 additions & 6 deletions
21
hcanhab2_mqtt/staticConfigurations/fix/transform/getHeizmodeState.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,22 @@ | ||
/* Bsp. input: '148/H/aus/16°C' mit 148=gruppe | ||
output Mode: 1, 2, 3 als String */ | ||
var res = input.split("/",3); | ||
/* Bsp. input: '148/H/therm/16.5/2.8' mit 148=gruppe | ||
output Mode: 1,2,3,33,4,5 als String */ | ||
var res = input.split("/",5); | ||
var rtn = "ng"; | ||
|
||
// Mode ermitteln: | ||
if (res[2] === "aus") rtn = "1"; | ||
else if (res[2] === "auto") rtn = "2"; | ||
else if (res[2] === "therm") { | ||
// TODO genauer unterscheiden: Frostschutz, kurz, theorisch abh von Zeit und Temp | ||
rtn = "3"; | ||
else if (res[2] === "therm") | ||
{ | ||
if (res[3] > 10.0) | ||
{ | ||
if (Math.round(res[4]) === 0.0) rtn = "3"; // 0= dauer unbegrenzt | ||
else rtn = "33"; // sonst vermutlich 3h | ||
} | ||
else | ||
{ | ||
if (Math.round(res[4]) === 0.0) rtn = "4"; // 0= dauer unbegrenzt | ||
else rtn = "34"; // sonst vermutlich 3h | ||
} | ||
} | ||
rtn; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.