Hi!
I just moved in a new house with KNX and started with OH to get a DAY/NIGHT object for the KNX system, but I don’t get the “DAY/NIGHT-object” to work…
The different versions of Openhab really confuse me!
I tried it in paper ui first, but don’t get how to make rules here. The Astro binding seems to work though
KNX connection works as well as I am able to switch channels of the KNX-actuators on and off with OH
I switched to Visual Studio code.
Astro.items
Number SunElevation "Sonnenhöhe [%.1f °]" <sun> (Astro) { channel="astro:sun:kork:position#elevation" }
Switch es_ist_TAG "TAG [%s]"
Switch es_ist_NACHT "NACHT [%s]"
Switch es_ist_DAEMMRIG "DÄMMERUNG [%s]"
Switch KNX_TAG_NACHT_DG "Tag=1 Nacht=0 Umschaltung" {knx="4/4/0+"}
rules\Tag_Nacht_Dämmerung.rules
rule "Astro Regeln Tag Nacht Umschaltung"
when
Item SunElevation changed or System started
then
if (SunElevation.state < -6) {
sendCommand(KNX_TAG_NACHT_DG, ON)
if (es_ist_TAG.state==ON || es_ist_TAG.state==NULL) {
logInfo("Astro Regeln", "Sonnenstand < -6 Grad - Nacht")
sendCommand(es_ist_DAEMMRIG, OFF)
sendCommand(es_ist_TAG, OFF)
sendCommand(es_ist_NACHT, ON)
}
}
if (SunElevation.state >= -6 && SunElevation.state <= 0) {
sendCommand(KNX_TAG_NACHT_DG, ON)
if (es_ist_TAG.state==ON || es_ist_TAG.state==NULL) {
logInfo("Astro Regeln", "-6 Grad <= Sonnenstand <= 0 Grad - Dämmerung")
sendCommand(es_ist_DAEMMRIG, ON)
sendCommand(es_ist_TAG, OFF)
sendCommand(es_ist_NACHT, ON)
}
}
if (SunElevation.state > 0) {
sendCommand(KNX_TAG_NACHT_DG, OFF)
if (es_ist_TAG.state==OFF || es_ist_TAG.state==NULL) {
logInfo("Astro Regeln", "Sonnenstand > 0 Grad - Tag")
sendCommand(es_ist_DAEMMRIG, OFF)
sendCommand(es_ist_TAG, ON)
sendCommand(es_ist_NACHT, OFF)
}
}
end
In ETS5 for KNX I added the GA 4.4.0 “Tag/Nacht”, but the status does not change there.
Does anyone has an idea how to solve my problem?
Thanks a lot,
Jan