Hello!
At this moment my rollershutters work like this:
rule "Schatten Auto Azimuth"
when
Item Astro_Azimuth changed
then
val int az_foyer_mitte_up = 168
val int az_gang_mitte_up = 207
val int az_kueche_up = 202
val int az_wz_front_up = 207
val int az_foyer_rechts_dn = 185
val int az_foyer_rechts_up = 251
val int az_gang_rechts_dn = 177
val int az_gang_rechts_up = 251 // noch genau zu definieren
val int az_buero_dn = 139
val int az_buero_up = 272
if ((Astro_Azimuth.state > az_foyer_rechts_dn) && (Astro_Azimuth.state < az_foyer_rechts_up) && (rs_foyer_rechts_auto.state == ON)) {
if (rs_foyer_rechts.state < 90) { // KNX stellt den Wert nicht genau auf 100, daher wird hier geprüft, ob der Wert nahe 100 ist. Ansonsten werden die Raffstore bei der Änderung Azimuth gestellt!
sendCommand(rs_foyer_rechts, 100)
}
if (rs_foyer_rechts_lm.state != 0) {
sendCommand(rs_foyer_rechts_lm, 0)
}
logInfo("Beschattung","Fassade Dorf EG Beschattung ein")
}
if ((Astro_Azimuth.state > az_gang_rechts_dn) && (Astro_Azimuth.state < az_gang_rechts_up) && (rs_gang_rechts_auto.state == ON)) {
if (rs_gang_rechts.state < 90) { // KNX stellt den Wert nicht genau auf 100, daher wird hier geprüft, ob der Wert nahe 100 ist. Ansonsten werden die Raffstore bei der Änderung Azimuth gestellt!
sendCommand(rs_gang_rechts, 100)
}
if (rs_gang_rechts_lm.state != 0) {
sendCommand(rs_gang_rechts_lm, 0)
}
logInfo("Beschattung","Fassade Dorf OG Beschattung ein")
}
if ((Astro_Azimuth.state > az_buero_dn) && (Astro_Azimuth.state < az_buero_up) && (rs_buero_auto.state == ON)) {
if (rs_buero.state < 90) { // KNX stellt den Wert nicht genau auf 100, daher wird hier geprüft, ob der Wert nahe 100 ist. Ansonsten werden die Raffstore bei der Änderung Azimuth gestellt!
sendCommand(rs_buero, 100)
}
if (rs_buero_lm.state != 0) {
sendCommand(rs_buero_lm, 0)
}
logInfo("Beschattung","Raffstore Buero wird automatisch gestellt")
}
if ((Astro_Azimuth.state > az_buero_dn) && (Astro_Azimuth.state < az_buero_up) && (rs_kino_auto.state == ON)) {
if (rs_kino.state < 90) { // KNX stellt den Wert nicht genau auf 100, daher wird hier geprüft, ob der Wert nahe 100 ist. Ansonsten werden die Raffstore bei der Änderung Azimuth gestellt!
sendCommand(rs_kino, 100)
}
if (rs_kino_lm.state != 0) {
sendCommand(rs_kino_lm, 0)
}
logInfo("Beschattung","Raffstore Kino wird automatisch gestellt")
}
}
(and there are more lines with even more items…)
basically the rule should to this for every item “x”:
if ((Astro_Azimuth.state > az_X_dn) && (Astro_Azimuth.state < az_X_up) && (rs_X_auto.state == ON)) {
if (rs_X.state < 90) {
sendCommand(rs_X, 100)
}
if (rs_X_lm.state != 0) {
sendCommand(rs_X_lm, 0)
}
logInfo("Beschattung","Fassade X Beschattung ein")
}
i’m pretty shure i read something familiar in another topic but i can’t find the topic anymore
i’d appreciate any input!