All,
it took me quite a while and lots of “googleing” as well as try and error to find out how to integrate CUL_V3, FS20, FHT, S300TH in openHAB ( version 1.7.0).
As a backup for me and to minimize efforts for others I will post my configuration here.
If there still are errors, misunderstandings or if you have other best practices, do not hesitate to post your setup here.
The starting point is the openhab.cfg with the most critical part for the components mentioned above:
Some bindings (openhab.cfg):
CUL/FS20/FHT Binding
fht:housecode=DC69 # (or whatever you have, I don’t think that this is necessary)
fht:device=serial:/dev/ttyACM0
fs20:device=serial:/dev/ttyACM0
s300th:device=serial:/dev/ttyACM0
CUL Intertechno Binding
using a hand made “CUL” (http://www.fhemwiki.de/wiki/Selbstbau_CUL, in german only) @/dev/ttyACM0
culintertechno:device=serial:/dev/ttyUSB0
Items (default.items)
/***********************************************************************************/
/ gpio /
/***********************************************************************************/
Switch mpdAMP “MPC Ampifier” (Audio) { exec=">[ON:/usr/local/bin/gpio -g mode 5 out ] >[OFF:/usr/local/bin/gpio -g mode 5 in]" }
/***********************************************************************************/
/ FHT80B - Funk-Heizkörperthermostate /
/ binding: fht=“housecode=;address=;datapoint=” /
/ items: Switch, Number /
/ datapoint:DESIRED_TEMP, MEASURED_TEMP, VALVE, BATTERY /
/ FHTState: BATTERY_LOW /
/***********************************************************************************/
Number HeizungMultiraumDesired “Multiraum Soll-Temp. [%.1f °C]” (Heating, logger) { fht=“housecode=552D;datapoint=DESIRED_TEMP” }
Number HeizungErdgeschossDesired “Erdgeschoss Soll-Temp. [%.1f °C]” (Heating, logger) { fht=“housecode=1621;datapoint=DESIRED_TEMP” }
Number HeizungMultiraumMeasured “Multiraum Ist-Temp. [%.1f °C]” (Heating) { fht=“housecode=552D;datapoint=MEASURED_TEMP” }
Number HeizungErdgeschossMeasured “Erggeschoss Ist-Temp. [%.1f °C]” (Heating) { fht=“housecode=1621;datapoint=MEASURED_TEMP” }
Number HeizungMultiraumValve “Multiraum Ventil [%.1f %%]” (Heating) { fht=“housecode=552D;address=00;datapoint=VALVE” }
Number HeizungErdgeschossValve “Erdgeschoss Ventil [%.1f %%]” (Heating) { fht=“housecode=1621;address=00;datapoint=VALVE” }
Switch HeizungMultiraumBattery “Multiraum Heizung Batterie [%s]” (Heating, Battery) { fht=“housecode=552D;datapoint=BATTERY” }
Switch HeizungErdgeschossBattery “Erdgeschoss Heizung Batterie [%s]” (Heating, Battery) { fht=“housecode=1621;datapoint=BATTERY” }
/***********************************************************************************/
/ FHT 80TF-2 - Funk-Tür-Fenster-Melder /
/ binding: fht=“housecode=;address=;datapoint=WINDOW” /
/ items: Contact /
/ datapoint:WINDOW /
/ FHTState: WINDOW_OPEN, WINDOW_CLOSED /
/***********************************************************************************/
Contact FenstersensorMultiraum “Multiraum [MAP(de.map):%s]” (Windows, logger) { fht=“housecode=52FB;address=7B;datapoint=WINDOW” }
Contact FenstersensorNico “Nico [MAP(de.map):%s]” (Windows, logger) { fht=“housecode=7D66;address=C0;datapoint=WINDOW” }
/***********************************************************************************/
/ FS20 Licht/Schalter /
/***********************************************************************************/
Switch LichtKueche “Licht Küche” (Lights, Indoor, logger) { fs20=“DC6900” }
Switch LichtAussenwand “Licht Aussenwand” (Lights, Outdoor, logger) { fs20=“DC6901” }
Switch LichtKellerflur “Licht Kellerflur” (Lights, Indoor, logger) { fs20=“DC6902” }
Switch LichtGartentor “Licht Gartentor” (Lights, Outdoor, logger) { fs20=“DC6903” }
Switch Klingel “Klingel [%s]” (Outdoor, logger) { fs20=“536200” }
Switch PirAussenwand “Bewegung Aussenwand [%s]” (Outdoor, Motion, logger) { fs20=“A7A300” }
Switch PirGartentor “Bewegung Gartentor [%s]” (Outdoor, Motion, logger) { fs20=“557A00” }
Number Motion_Chart_Period “Chart Zeitraum”
String Motion_Panel “Bewegungsmelder [%s]”
/***********************************************************************************/
/ Intertechno Licht/Schalter /
/***********************************************************************************/
Switch LichtA “Licht A” (nLights) {culintertechno=“type=raw;address=0FFF0F0F;commandOn=FF;commandOff=F0”}
Switch LichtB “Licht B” (nLights) {culintertechno=“type=raw;address=0FFF0FF0;commandOn=FF;commandOff=F0”}
Switch LichtC “Licht C” (nLights) {culintertechno=“type=raw;address=0FFF0FFF;commandOn=FF;commandOff=F0”}
Switch LichtD “Licht D” (nLights) {culintertechno=“type=raw;address=0FFF00FF;commandOn=FF;commandOff=F0”}
/***********************************************************************************/
/ S 300 TH - Funk-Temperatur-/ Luftfeuchte-Sensor /
/***********************************************************************************/
Number S300TerrasseTemp “Terrasse Temperatur [%.1f C]” (Outdoor, Weather, Weather_Chart, logger) {s300th=“address=1;datapoint=TEMPERATURE”}
Number S300TerrasseHumi “Terrasse Luftfeuchtigkeit [%.1f %%]” (Outdoor, Weather, logger) {s300th=“address=1;datapoint=HUMIDITY”}
Number S300GartenTemp “Garten Temperatur [%.1f C]” (Outdoor, Weather, Weather_Chart, logger) {s300th=“address=5;datapoint=TEMPERATURE”}
Number S300GartenHumi “Garten Luftfeuchtigkeit [%.1f %%]” (Outdoor, Weather, logger) {s300th=“address=5;datapoint=HUMIDITY”}
Sitemap (default.sitemap)
/***********************************************************************************/
/ /
/***********************************************************************************/
sitemap default label=“home”
{
Frame {
Text item=Date
}
Frame {
Text item=ConcatInfo {
Switch item=mpdAMP
}
}
Frame {
Text item=S300TerrasseTemp label=“Wetter [%.1f °C]” icon=“sun” valuecolor=[Weather_LastUpdate==“Uninitialized”=“lightgray”,Weather_LastUpdate>90=“lightgray”,>25=“orange”,>15=“green”,>5=“orange”,<=5=“blue”]
}
Frame {
Text label=“Erdgeschoss [%.1f °C]” item=HeizungErdgeschossMeasured icon=“heating” {
Setpoint item=HeizungErdgeschossDesired minValue=6 maxValue=30 step=0.5
Text item=HeizungErdgeschossMeasured
Text item=HeizungErdgeschossValve
Text item=HeizungErdgeschossBattery
Text item=FenstersensorKueche
}
Text label=“Multiraum [%.1f °C]” item=HeizungMultiraumMeasured icon=“heating” {
Setpoint item=HeizungMultiraumDesired minValue=6 maxValue=30 step=0.5
Text item=HeizungMultiraumMeasured
Text item=HeizungMultiraumValve
Text item=HeizungMultiraumBattery
Text item=FenstersensorMultiraum
}
}
Frame {
Group item=Motion label=“Bewegungsmelder [%s]” icon=“motion” {
Frame {
Switch item=Motion_Chart_Period label=“Chart Period” mappings=[0=“Stunde”, 1=“Tag”, 2=“Woche”]
Chart item=Motion_Chart period=h refresh=6000 visibility=[Motion_Chart_Period==0, Motion_Chart_Period==“Uninitialized”]
Chart item=Motion_Chart period=D refresh=30000 visibility=[Motion_Chart_Period==1]
Chart item=Motion_Chart period=W refresh=30000 visibility=[Motion_Chart_Period==2]
}
}
}
Frame {
Group item=Battery
}
}
Rules (at least some of them):
rule AussenlichtZeitschalter
when
Item PirAussenwand received update
then
logInfo(“RULES”, “Aussenlicht-Zeitschalter: an für 10 Minuten”)
pushover(“Aussenlicht-Zeitschalter an für 10 Minuten”)
sendCommand(LichtAussenwand, ON)
createTimer(now.plusMinutes(10)) [|
sendCommand(LichtAussenwand, OFF)
]
end
rule “HaustuereAuf”
when
Item FenstersensorHaustuere changed from CLOSED to OPEN
then
logInfo(“RULES”, “Haustüre (” + FenstersensorHaustuere.state + “)”)
pushover(“Die Haustüre wurde geöffnet (” + FenstersensorHaustuere.state + “)”)
end
rule “HaustüreZu”
when
Item FenstersensorHaustuere changed from OPEN to CLOSE
then
logInfo(“RULES”, "Haustüre: " + FenstersensorHaustuere.state.toString())
pushover(“Die Haustüre wurde geschlossen (” + FenstersensorHaustuere.state.toString() + “)”)
end
rule “TerrassentüreAuf”
when
Item FenstersensorKueche changed from CLOSED to OPEN
then
var DateTime daystart = new DateTime((dawnStart.state as DateTimeType).calendar.timeInMillis)
var DateTime dayend = new DateTime((duskEnd.state as DateTimeType).calendar.timeInMillis)
val boolean isdark = now.isBefore(daystart) || now.isAfter(dayend)
logInfo("RULES", "Terrassentüre: " + FenstersensorKueche.state.toString() + ", isAfterSunset: " + isdark.toString())
pushover("Die Terrassentüre wurde geöffnet")
if ( isdark )
{
pushover("Terrassentüre nach Sonnenuntergang: Küchenlicht an für 10 Minuten")
sendCommand(LichtKueche, ON)
tenMinTimerState = true
tenMinTimer = createTimer(now.plusMinutes(10))[|
tenMinTimerState = false
sendCommand(LichtKueche, OFF)
pushover("Terrassentüre: Küchenlicht wieder aus nach 10 Minuten.")
]
}
end
rule “TerrassentüreZu”
when
Item FenstersensorKueche changed from OPEN to CLOSE
then
logInfo(“RULES”, "Terrassentüre: " + FenstersensorKueche.state.toString())
pushover(“Die Terrassentüre wurde geschlossen (” + FenstersensorKueche.state.toString() + “)”)
end
//*****************************************************************************
// http://kaikreuzer.blogspot.de/2012/05/xtext-xbase-quartz-joda-time-perfect.html
rule KellerlichtZeitschalter
when
Item LichtKellerflur received update ON
then
logInfo(“RULES”, “LichtKellerflur-Zeitschalter: an für 5 Minuten”)
createTimer(now.plusMinutes(5)) [|
sendCommand(LichtKellerflur, OFF)
]
end
//*****************************************************************************
//Rule at sunrise, Sonnenaufgang:
// ok, funktioniert
rule “Rule at sunrise”
when
Item Sunrise_Event received update ON
then
logInfo(“RULES”,“Sunrise_Event received command ON”)
pushover(“Sonnenaufgang: alle Aussenlampen ausgeschaltet.”)
sendCommand(LichtAussenwand, OFF)
sendCommand(LichtGartentor, OFF)
end