openHAB 3: Einbinden Froggit WH4000SE WeeWX

Hinweis: Wir haben in diesem Artikel möglicherweise Provisions-Links verwendet und sie durch (*) gekennzeichnet. Erfolgt über diese Links eine Bestellung, erhält maffert.net eine Provision. Es entstehen für Sie keine Nachteile beim Kauf oder Preis.

Hier zeige ich euch wir ihr die Wetterstation „*WH4000SE*“ von Froggit via WeeWX  in openHAB (aktuell 3) integrieren könnt.

Vorraussetzung:
Installation WeeWX
Integration der Wetterstation in WeeWX
Funktionierender MQTT Broker in openHAB

Das Ergebniss sieht bei mir so aus:
openhab_wh4000se_froggit

mqtt.things erstellen bzw. ergänzen:
       Thing topic weewx "WeeWX Weather Station" @ "MQTT"  {
       Channels:
        Type number : weather_dateTime "weather/dateTime" [stateTopic="weather/dateTime"]
        Type number : weather_outTemp_C "weather/outTemp_C" [stateTopic="weather/outTemp_C"]
        Type number : weather_inHumidity "inHumidity" [stateTopic="weather/inHumidity"]
        Type number : weather_outHumidity "weather/outHumidity" [stateTopic="weather/outHumidity"]
        Type number : weather_pressure_mbar "pressure_mbar" [stateTopic="weather/pressure_mbar"]
        Type number : weather_inTemp_C "inTemp_C" [stateTopic="weather/inTemp_C"]
        Type number : weather_windSpeed_kph "weather/windSpeed_kph" [stateTopic="weather/windSpeed_kph"]
        Type number : weather_windDir "weather/windDir" [stateTopic="weather/windDir"]
        Type number : weather_windGust_kph "weather/windGust_kph" [stateTopic="weather/windGust_kph"]
        Type number : weather_hourRain_mm "weather/hourRain_mm" [stateTopic="weather/hourRain_mm"]
        Type number : weather_rain24_mm "weather/rain24_mm" [stateTopic="weather/rain24_mm"]
        Type number : weather_dayRain_mm "weather/dayRain_mm" [stateTopic="weather/dayRain_mm"]
        Type number : weather_interval_minute "weather/interval_minute" [stateTopic="weather/interval_minute"]
        Type number : weather_ET_mm "weather/ET_mm" [stateTopic="weather/ET_mm"]
        Type number : weather_windrun_km "weather/windrun_km" [stateTopic="weather/windrun_km"]
        Type number : weather_windchill_C "weather/windchill_C" [stateTopic="weather/windchill_C"]
        Type number : weather_inDewpoint_C "weather/inDewpoint_C" [stateTopic="weather/inDewpoint_C"]
        Type number : weather_humidex_C "weather/humidex_C" [stateTopic="weather/humidex_C"]
        Type number : weather_heatindex_C "weather/heatindex_C" [stateTopic="weather/heatindex_C"]
        Type number : weather_dewpoint_C "weather/dewpoint_C" [stateTopic="weather/dewpoint_C"]
        Type number : weather_cloudbase_meter "weather/cloudbase_meter" [stateTopic="weather/cloudbase_meter"]
        Type number : weather_barometer_mbar "weather/barometer_mbar" [stateTopic="weather/barometer_mbar"]
        Type number : weather_appTemp_C "weather/appTemp_C" [stateTopic="weather/appTemp_C"]
        Type number : weather_altimeter_mbar "weather/altimeter_mbar" [stateTopic="weather/altimeter_mbar"]
        Type number : weather_UV "weather/UV" [stateTopic="weather/UV"] 
        Type number : weather_rainRate_mm_per_hour "weather/rainRate_mm_per_hour" [stateTopic="weather/rainRate_mm_per_hour"]
        Type number : weather_rain_mm "weather/rain_mm" [stateTopic="weather/rain_mm"]
        Type number : weather_radiation_Wpm2 "weather/radiation_Wpm2" [stateTopic="weather/radiation_Wpm2"]
        Type number : weather_windGustDir "weather/windGustDir" [stateTopic="weather/windGustDir"]
        }
mqtt.items erstellen bzw. ergänzen:
Number:Length DIV_WeeWX_hourRain_mm "Regen letzte Stunde [%.02f mm]" <rain> {channel="mqtt:topic:mqttbroker:weewx:weather_hourRain_mm"}
Number:Length DIV_WeeWX_rain24_mm "Rain Today [%.2f mm]" <rain> {channel="mqtt:topic:mqttbroker:weewx:weather_rain24_mm"}
Number DIV_WeeWX_dayRain_mm "Regen heute [%.2f mm]" <rain> {channel="mqtt:topic:mqttbroker:weewx:weather_dayRain_mm"}
Number DIV_WeeWX_ET_mm "Evapotranspiration [%.2f mm/d]" <temperature> {channel="mqtt:topic:mqttbroker:weewx:weather_ET_mm"}
Number:Speed DIV_WeeWX_rainRate_mm_per_hour "Regenrate [%.1f mm/h]" <rain> {channel="mqtt:topic:mqttbroker:weewx:weather_rainRate_mm_per_hour"}
Number:Length DIV_WeeWX_rain_mm "Regen [%.02f mm]" <rain> {channel="mqtt:topic:mqttbroker:weewx:weather_rain_mm"}
Number:Pressure DIV_WeeWX_pressure_mbar "Luftdruck [%.1f %unit%]" <pressure> {channel="mqtt:topic:mqttbroker:weewx:weather_pressure_mbar"}
Number:Dimensionless DIV_WeeWX_inHumidity "Luftfeuchtigkeit Innen [%.1f %%]" <humidity> {channel="mqtt:topic:mqttbroker:weewx:weather_inHumidity"}
Number DIV_WeeWX_usUnits  "WeeWX usUnits " {channel="mqtt:topic:mqttbroker:weewx:weather_usUnits "}
DateTime DIV_WeeWX_dateTime "Zeitpunkt Messung [%1$td.%1$tm.%1$tY %1$tH:%1$tM]" <calendar> {channel="mqtt:topic:mqttbroker:weewx:weather_dateTime"}
Number:Dimensionless DIV_WeeWX_outHumidity "Luftfeuchtigkeit Außen [%.1f %%]" <humidity> {channel="mqtt:topic:mqttbroker:weewx:weather_outHumidity"}
Number:Temperature DIV_WeeWX_outTemp_C "Temperatur Außen [%.1f %unit%]" <temperature> {channel="mqtt:topic:mqttbroker:weewx:weather_outTemp_C"}
Number:Temperature DIV_WeeWX_inTemp_C "Temperatur Innen [%.1f %unit%]" <temperature> {channel="mqtt:topic:mqttbroker:weewx:weather_inTemp_C"}
Number:Speed DIV_WeeWX_windSpeed_kph "Windgeschwindigkeit [%.1f %unit%]" <wind> {channel="mqtt:topic:mqttbroker:weewx:weather_windSpeed_kph"}
Number:Angle DIV_WeeWX_windDir "Windrichtung [%.0f %unit%]" <wind> {channel="mqtt:topic:mqttbroker:weewx:weather_windDir"}
Number DIV_WeeWX_windDir2 "Windrichtung" <wind> {channel="mqtt:topic:mqttbroker:weewx:weather_windDir"}
String DIV_Wetter_Windrichtung "Windrichtung [%s]" <wind>
Number:Speed DIV_WeeWX_windGust_kph "Böengeschwindigkeit [%.1f %unit%]" <wind> {channel="mqtt:topic:mqttbroker:weewx:weather_windGust_kph"}
Number:Angle DIV_WeeWX_windGustDir "Böenrichtung [%d %unit%]" <wind> {channel="mqtt:topic:mqttbroker:weewx:weather_windGustDir"}
Number DIV_WeeWX_windGustDir2 "Böenrichtung" <wind> {channel="mqtt:topic:mqttbroker:weewx:weather_windGustDir"}
String DIV_Wetter_Boenrichtung "Böenrichtung [%s]" <wind>
Number DIV_WeeWX_altimeter_mbar "Höhenmesser [%.1f mbar]" <sun_clouds> {channel="mqtt:topic:mqttbroker:weewx:weather_altimeter_mbar"}
Number:Temperature DIV_WeeWX_appTemp_C "gefühlte Temp. Außen [%.1f %unit%]" <temperature> {channel="mqtt:topic:mqttbroker:weewx:weather_appTemp_C"}
Number DIV_WeeWX_barometer_mbar "Barometer [%.1f mbar]" <sun_clouds> {channel="mqtt:topic:mqttbroker:weewx:weather_barometer_mbar"}
Number:Length DIV_WeeWX_cloudbase_meter "Wolkenuntergrenze [%.1f %unit%]" <sun_clouds> {channel="mqtt:topic:mqttbroker:weewx:weather_cloudbase_meter"}
Number:Temperature DIV_WeeWX_dewpoint_C "Taupunkt Außen [%.1f %unit%]" <temperature> {channel="mqtt:topic:mqttbroker:weewx:weather_dewpoint_C"}
Number:Temperature DIV_WeeWX_windchill_C "Windtemperatur [%.1f %unit%]" <temperature> {channel="mqtt:topic:mqttbroker:weewx:weather_windchill_C"}
Number:Temperature DIV_WeeWX_humidex_C "Humindex [%.1f %unit%]" <temperature_hot> {channel="mqtt:topic:mqttbroker:weewx:weather_humidex_C"}
Number:Temperature DIV_WeeWX_heatindex_C "Hitzeindex [%.1f %unit%]" <temperature_hot> {channel="mqtt:topic:mqttbroker:weewx:weather_heatindex_C"}
Number:Temperature DIV_WeeWX_inDewpoint_C "Taupunkt Innen [%.1f %unit%]" <temperature_cold> {channel="mqtt:topic:mqttbroker:weewx:weather_inDewpoint_C"}
Number DIV_WeeWX_UV "UV Index [%.0f]" <Sun> {channel="mqtt:topic:mqttbroker:weewx:weather_UV"}
Number:Intensity DIV_WeeWX_radiation_Wpm2 "Sonneneinstrahlung [%.0f %unit%]" <sun> {channel="mqtt:topic:mqttbroker:weewx:weather_radiation_Wpm2"}
wetter.rules erstellen:
rule "Windrichtung"
 when
   Item DIV_WeeWX_windDir2 changed
then

if (DIV_WeeWX_windDir2.state < 11.5 || DIV_WeeWX_windDir2.state  >= 349)  DIV_Wetter_Windrichtung.postUpdate("Nord")
 else if (DIV_WeeWX_windDir2.state >= 11.5 && DIV_WeeWX_windDir2.state < 34) DIV_Wetter_Windrichtung.postUpdate("NordNordOst")
 else if (DIV_WeeWX_windDir2.state >= 34 && DIV_WeeWX_windDir2.state < 56.5) DIV_Wetter_Windrichtung.postUpdate("NordOst")
 else if (DIV_WeeWX_windDir2.state >= 56.5 && DIV_WeeWX_windDir2.state < 79) DIV_Wetter_Windrichtung.postUpdate("OstNordOst")
 else if (DIV_WeeWX_windDir2.state >= 79 && DIV_WeeWX_windDir2.state < 101.5) DIV_Wetter_Windrichtung.postUpdate("Ost")
 else if (DIV_WeeWX_windDir2.state >= 101.5 && DIV_WeeWX_windDir2.state < 103) DIV_Wetter_Windrichtung.postUpdate("OstSüdOst")
 else if (DIV_WeeWX_windDir2.state >= 103 && DIV_WeeWX_windDir2.state < 147.5) DIV_Wetter_Windrichtung.postUpdate("SüdOst")
 else if (DIV_WeeWX_windDir2.state >= 147.5 && DIV_WeeWX_windDir2.state < 169) DIV_Wetter_Windrichtung.postUpdate("SüdSüdOst")
 else if (DIV_WeeWX_windDir2.state >= 169 && DIV_WeeWX_windDir2.state < 191.5) DIV_Wetter_Windrichtung.postUpdate("Süd")
 else if (DIV_WeeWX_windDir2.state >= 191.5 && DIV_WeeWX_windDir2.state < 214) DIV_Wetter_Windrichtung.postUpdate("SüdSüdWest")
 else if (DIV_WeeWX_windDir2.state >= 214 && DIV_WeeWX_windDir2.state < 236.5) DIV_Wetter_Windrichtung.postUpdate("SüdWest")
 else if (DIV_WeeWX_windDir2.state >= 236.5 && DIV_WeeWX_windDir2.state < 259) DIV_Wetter_Windrichtung.postUpdate("WestSüdWest")
 else if (DIV_WeeWX_windDir2.state >= 259 && DIV_WeeWX_windDir2.state < 281.5) DIV_Wetter_Windrichtung.postUpdate("West")
 else if (DIV_WeeWX_windDir2.state >= 281.5 && DIV_WeeWX_windDir2.state < 304) DIV_Wetter_Windrichtung.postUpdate("WestNordWest")
 else if (DIV_WeeWX_windDir2.state >= 304 && DIV_WeeWX_windDir2.state < 326.5) DIV_Wetter_Windrichtung.postUpdate("NordWest")
 else if (DIV_WeeWX_windDir2.state >= 326.5 && DIV_WeeWX_windDir2.state < 349) DIV_Wetter_Windrichtung.postUpdate("NordNordWest")
end

rule "Boenrichtung"
 when
   Item DIV_WeeWX_windGustDir2 changed
then

if (DIV_WeeWX_windGustDir2.state < 11.5 || DIV_WeeWX_windGustDir2.state  >= 349)  DIV_Wetter_Boenrichtung.postUpdate("Nord")
 else if (DIV_WeeWX_windGustDir2.state >= 11.5 && DIV_WeeWX_windGustDir2.state < 34) DIV_Wetter_Boenrichtung.postUpdate("NordNordOst")
 else if (DIV_WeeWX_windGustDir2.state >= 34 && DIV_WeeWX_windGustDir2.state < 56.5) DIV_Wetter_Boenrichtung.postUpdate("NordOst")
 else if (DIV_WeeWX_windGustDir2.state >= 56.5 && DIV_WeeWX_windGustDir2.state < 79) DIV_Wetter_Boenrichtung.postUpdate("OstNordOst")
 else if (DIV_WeeWX_windGustDir2.state >= 79 && DIV_WeeWX_windGustDir2.state < 101.5) DIV_Wetter_Boenrichtung.postUpdate("Ost")
 else if (DIV_WeeWX_windGustDir2.state >= 101.5 && DIV_WeeWX_windGustDir2.state < 103) DIV_Wetter_Boenrichtung.postUpdate("OstSüdOst")
 else if (DIV_WeeWX_windGustDir2.state >= 103 && DIV_WeeWX_windGustDir2.state < 147.5) DIV_Wetter_Boenrichtung.postUpdate("SüdOst")
 else if (DIV_WeeWX_windGustDir2.state >= 147.5 && DIV_WeeWX_windGustDir2.state < 169) DIV_Wetter_Boenrichtung.postUpdate("SüdSüdOst")
 else if (DIV_WeeWX_windGustDir2.state >= 169 && DIV_WeeWX_windGustDir2.state < 191.5) DIV_Wetter_Boenrichtung.postUpdate("Süd")
 else if (DIV_WeeWX_windGustDir2.state >= 191.5 && DIV_WeeWX_windGustDir2.state < 214) DIV_Wetter_Boenrichtung.postUpdate("SüdSüdWest")
 else if (DIV_WeeWX_windGustDir2.state >= 214 && DIV_WeeWX_windGustDir2.state < 236.5) DIV_Wetter_Boenrichtung.postUpdate("SüdWest")
 else if (DIV_WeeWX_windGustDir2.state >= 236.5 && DIV_WeeWX_windGustDir2.state < 259) DIV_Wetter_Boenrichtung.postUpdate("WestSüdWest")
 else if (DIV_WeeWX_windGustDir2.state >= 259 && DIV_WeeWX_windGustDir2.state < 281.5) DIV_Wetter_Boenrichtung.postUpdate("West")
 else if (DIV_WeeWX_windGustDir2.state >= 281.5 && DIV_WeeWX_windGustDir2.state < 304) DIV_Wetter_Boenrichtung.postUpdate("WestNordWest")
 else if (DIV_WeeWX_windGustDir2.state >= 304 && DIV_WeeWX_windGustDir2.state < 326.5) DIV_Wetter_Boenrichtung.postUpdate("NordWest")
 else if (DIV_WeeWX_windGustDir2.state >= 326.5 && DIV_WeeWX_windGustDir2.state < 349) DIV_Wetter_Boenrichtung.postUpdate("NordNordWest")
end
die Items in die die jeweilige .sitemap eintragen:
		Text label="Wetterstation" icon="sun_clouds" {
			Frame label="WeeWX Infos" {
				Default item=DIV_WeeWX_dateTime
				Default item=DIV_WeeWX_outHumidity
				Default item=DIV_WeeWX_inHumidity
				Default item=DIV_WeeWX_UV
				Default item=DIV_WeeWX_radiation_Wpm2
				Default item=DIV_WeeWX_altimeter_mbar
				Default item=DIV_WeeWX_barometer_mbar
				Default item=DIV_WeeWX_cloudbase_meter
				Default item=DIV_WeeWX_pressure_mbar
				Default item=DIV_WeeWX_ET_mm
			}
			Frame label="WeeWX - Temperatur" {
				Default item=DIV_WeeWX_outTemp_C
				Default item=DIV_WeeWX_inTemp_C
				Default item=DIV_WeeWX_appTemp_C
				Default item=DIV_WeeWX_windchill_C
				Default item=DIV_WeeWX_dewpoint_C
				Default item=DIV_WeeWX_inDewpoint_C
				Default item=DIV_WeeWX_humidex_C
				Default item=DIV_WeeWX_heatindex_C
			}
			Frame label="WeeWX - Wind" {
				Default item=DIV_WeeWX_windSpeed_kph
				Default item=DIV_WeeWX_windDir
				Default item=DIV_Wetter_Windrichtung
				Default item=DIV_WeeWX_windGust_kph
				Default item=DIV_WeeWX_windGustDir	
				Default item=DIV_Wetter_Boenrichtung
			}
			Frame label="WeeWX - Regen" {
				Default item=DIV_WeeWX_rain_mm
				Default item=DIV_WeeWX_rainRate_mm_per_hour
				Default item=DIV_WeeWX_dayRain_mm
				//Default item=DIV_WeeWX_rain24_mm
				Default item=DIV_WeeWX_hourRain_mm
			}
    }

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert