diff --git a/.gitignore b/.gitignore index 5c199eb..a372d3b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ -# ---> Ansible -*.retry - +# ---> VSCode +*.vscode \ No newline at end of file diff --git a/html/index.html b/html/index.html new file mode 100644 index 0000000..58ba0e9 --- /dev/null +++ b/html/index.html @@ -0,0 +1,5 @@ + +

openHAB user provided static content

+

Serve your own static html pages or resources from here. Files stored in the openHAB configuration subfolder html will be available through the HTTP server of openHAB, e.g. http://device-address:8080/static/image.png.

+

Resources for sitemap elements (image, video,...) can also be provided though this folder.

+ diff --git a/html/readme.txt b/html/readme.txt new file mode 100644 index 0000000..5eeeb99 --- /dev/null +++ b/html/readme.txt @@ -0,0 +1,3 @@ +Serve your own static html pages or resources from here. +Files stored in this folder will be available through the HTTP server of openHAB, e.g. "http://device-address:8080/static/image.png". +Resources for sitemap elements (image, video,...) can also be provided though this folder. diff --git a/icons/classic/dwd.png b/icons/classic/dwd.png new file mode 100644 index 0000000..82ec86f Binary files /dev/null and b/icons/classic/dwd.png differ diff --git a/icons/classic/dwdwarnung-0.png b/icons/classic/dwdwarnung-0.png new file mode 100644 index 0000000..a44c43a Binary files /dev/null and b/icons/classic/dwdwarnung-0.png differ diff --git a/icons/classic/dwdwarnung-1.png b/icons/classic/dwdwarnung-1.png new file mode 100644 index 0000000..51c32d0 Binary files /dev/null and b/icons/classic/dwdwarnung-1.png differ diff --git a/icons/classic/dwdwarnung-2.png b/icons/classic/dwdwarnung-2.png new file mode 100644 index 0000000..9a4f280 Binary files /dev/null and b/icons/classic/dwdwarnung-2.png differ diff --git a/icons/classic/dwdwarnung-3.png b/icons/classic/dwdwarnung-3.png new file mode 100644 index 0000000..0a23033 Binary files /dev/null and b/icons/classic/dwdwarnung-3.png differ diff --git a/icons/classic/dwdwarnung-4.png b/icons/classic/dwdwarnung-4.png new file mode 100644 index 0000000..8ff7f4b Binary files /dev/null and b/icons/classic/dwdwarnung-4.png differ diff --git a/icons/classic/fire_station.png b/icons/classic/fire_station.png new file mode 100644 index 0000000..65cb539 Binary files /dev/null and b/icons/classic/fire_station.png differ diff --git a/icons/classic/fire_truck.png b/icons/classic/fire_truck.png new file mode 100644 index 0000000..5d85b85 Binary files /dev/null and b/icons/classic/fire_truck.png differ diff --git a/icons/classic/flame.png b/icons/classic/flame.png new file mode 100644 index 0000000..61cddc3 Binary files /dev/null and b/icons/classic/flame.png differ diff --git a/icons/classic/headphones.png b/icons/classic/headphones.png new file mode 100644 index 0000000..f768d99 Binary files /dev/null and b/icons/classic/headphones.png differ diff --git a/icons/classic/kalender.png b/icons/classic/kalender.png new file mode 100644 index 0000000..b4b5a43 Binary files /dev/null and b/icons/classic/kalender.png differ diff --git a/icons/classic/lightning.png b/icons/classic/lightning.png new file mode 100644 index 0000000..5572869 Binary files /dev/null and b/icons/classic/lightning.png differ diff --git a/icons/classic/pushover.png b/icons/classic/pushover.png new file mode 100644 index 0000000..525831f Binary files /dev/null and b/icons/classic/pushover.png differ diff --git a/icons/classic/rain.png b/icons/classic/rain.png new file mode 100644 index 0000000..10321f0 Binary files /dev/null and b/icons/classic/rain.png differ diff --git a/icons/classic/readme.txt b/icons/classic/readme.txt new file mode 100644 index 0000000..7fc793f --- /dev/null +++ b/icons/classic/readme.txt @@ -0,0 +1,6 @@ +Your additional icons go here. +Icons can be provided as png (32x32) or preferably as svg files. +ClassicUI and BasicUI can be configured to accept svg (default) or png icons. + +Check out the openHAB documentation for more details: +https://www.openhab.org/docs/configuration/items.html#icons diff --git a/icons/classic/road_closed.jpg b/icons/classic/road_closed.jpg new file mode 100644 index 0000000..5d17db7 Binary files /dev/null and b/icons/classic/road_closed.jpg differ diff --git a/icons/classic/road_closed.png b/icons/classic/road_closed.png new file mode 100644 index 0000000..93e5a76 Binary files /dev/null and b/icons/classic/road_closed.png differ diff --git a/icons/classic/warnung.png b/icons/classic/warnung.png new file mode 100644 index 0000000..17efe9b Binary files /dev/null and b/icons/classic/warnung.png differ diff --git a/icons/classic/zugfuehrer.png b/icons/classic/zugfuehrer.png new file mode 100644 index 0000000..386477c Binary files /dev/null and b/icons/classic/zugfuehrer.png differ diff --git a/items/HTTP.items b/items/HTTP.items new file mode 100644 index 0000000..76da364 --- /dev/null +++ b/items/HTTP.items @@ -0,0 +1,2 @@ +String REMCAM001Record "Aufzeichnung Starten" (gHistory) { http="<[http://10.112.30.31/control/control?read§ion=recording&recording_activ{Authorization=Basic YWRtaW46cnQ4cWZmOHBwa21hODJienhxMnZjeTNtMw==}:60000:REGEX(recording_activ=(.*))] >[enable:GET:http://10.112.30.31/control/control?set§ion=recording&recording_activ=enable{Authorization=Basic YWRtaW46cnQ4cWZmOHBwa21hODJienhxMnZjeTNtMw==}] >[disable:GET:http://10.112.30.31/control/control?set§ion=recording&recording_activ=disable{Authorization=Basic YWRtaW46cnQ4cWZmOHBwa21hODJienhxMnZjeTNtMw==}]" } +String REMCAM002Record "Aufzeichnung Starten" (gHistory) { http="<[http://10.112.30.32/control/control?read§ion=recording&recording_activ{Authorization=Basic YWRtaW46cGRncWE2MnY0ZjRiZDl0cm12cDd6N3Q4OA==}:60000:REGEX(recording_activ=(.*))] >[enable:GET:http://10.112.30.32/control/control?set§ion=recording&recording_activ=enable{Authorization=Basic YWRtaW46cGRncWE2MnY0ZjRiZDl0cm12cDd6N3Q4OA==}] >[disable:GET:http://10.112.30.32/control/control?set§ion=recording&recording_activ=disable{Authorization=Basic YWRtaW46cGRncWE2MnY0ZjRiZDl0cm12cDd6N3Q4OA==}]" } \ No newline at end of file diff --git a/items/readme.txt b/items/readme.txt new file mode 100644 index 0000000..b214510 --- /dev/null +++ b/items/readme.txt @@ -0,0 +1,5 @@ +Your item definitions go here. +All items files have to have the ".items" file extension and must follow a special syntax. + +Check out the openHAB documentation for more details: +https://www.openhab.org/docs/configuration/items.html diff --git a/persistence/jdbc.persist b/persistence/jdbc.persist new file mode 100644 index 0000000..88f1a18 --- /dev/null +++ b/persistence/jdbc.persist @@ -0,0 +1,7 @@ +Strategies { + everyMinute : "0 * * * * ?" +} + +Items { + gHistory* : strategy = everyChange, restoreOnStartup +} diff --git a/persistence/readme.txt b/persistence/readme.txt new file mode 100644 index 0000000..b1df35b --- /dev/null +++ b/persistence/readme.txt @@ -0,0 +1,5 @@ +Your persistence configuration goes here. +All persistence files have to have the ".persist" file extension and must follow a special syntax. + +Check out the openHAB documentation for more details: +https://www.openhab.org/docs/configuration/persistence.html diff --git a/rules/Camera.rules b/rules/Camera.rules new file mode 100644 index 0000000..505ebe3 --- /dev/null +++ b/rules/Camera.rules @@ -0,0 +1,26 @@ +rule "Play Cam Sound" +when + Item CamPlaySound received update ON +then + logInfo("Play Cam Sound", "RULE GETRIGGERT: " + CamSoundLocSelection.state.toString) + switch(CamSoundLocSelection.state.toString) { + case "0": { + logInfo("CamSoundLocSelection", "Nur vorne: " + CamSoundLocSelection.state.toString) + sendHttpGetRequest("http://admin:rt8qff8ppkma82bzxq2vcy3m3@10.112.30.31/control/rcontrol?action=sound&soundfile="+CamSoundTone.state.toString+"&speakerlevel="+CamSoundVolume.state.toString+"") + } + case "1": { + logInfo("CamSoundLocSelection", "Nur hinten: " + CamSoundLocSelection.state.toString) + sendHttpGetRequest("http://admin:pdgqa62v4f4bd9trmvp7z7t88@10.112.30.32/control/rcontrol?action=sound&soundfile="+CamSoundTone.state.toString+"&speakerlevel="+CamSoundVolume.state.toString+"") + } + case "2": { + logInfo("CamSoundLocSelection", "Vorne und hinten: " + CamSoundLocSelection.state.toString) + sendHttpGetRequest("http://admin:rt8qff8ppkma82bzxq2vcy3m3@10.112.30.31/control/rcontrol?action=sound&soundfile="+CamSoundTone.state.toString+"&speakerlevel="+CamSoundVolume.state.toString+"") + sendHttpGetRequest("http://admin:pdgqa62v4f4bd9trmvp7z7t88@10.112.30.32/control/rcontrol?action=sound&soundfile="+CamSoundTone.state.toString+"&speakerlevel="+CamSoundVolume.state.toString+"") + } + } + // if (CamSoundLocSelection.state.toString == "3" ) + // sendHttpGetRequest("http://admin:rt8qff8ppkma82bzxq2vcy3m3@10.112.30.31/control/rcontrol?action=sound&soundfile=Cuckooclock") + // sendHttpGetRequest("http://admin:pdgqa62v4f4bd9trmvp7z7t88@10.112.30.32/control/rcontrol?action=sound&soundfile=Cuckooclock&speakerlevel=30") + // } + +end \ No newline at end of file diff --git a/rules/Dienste.rules b/rules/Dienste.rules new file mode 100644 index 0000000..0cbf8e2 --- /dev/null +++ b/rules/Dienste.rules @@ -0,0 +1,13 @@ +rule "DWD Warnungen" +when + //Time cron "0 */30 * ? * *" //every 30 Minutes + Time cron "0 * * ? * *" //every 1 Minute +then + logInfo("HTTPGET", "Abfragr Erfolgt") + var String jsonString = sendHttpGetRequest("https://fms.ffhstm.de/dienste_lesen_json.php") + postUpdate(FFDienstZVD,transform("JSONPATH", "$.DIENSTE.C", jsonString)) + postUpdate(FFDienstIUK2,transform("JSONPATH", "$.DIENSTE.D", jsonString)) + // postUpdate(FFDienstIUK3,transform("JSONPATH", "$.DIENSTE.F", jsonString)) + postUpdate(FFDienstIUK3,transform("JSONPATH", "$.DIENSTE.E", jsonString)) + postUpdate(FFSperrungen,transform("JSONPATH", "$.SPERRUNG", jsonString)) +end diff --git a/rules/FFRAlarm.rules b/rules/FFRAlarm.rules new file mode 100644 index 0000000..46c5377 --- /dev/null +++ b/rules/FFRAlarm.rules @@ -0,0 +1,92 @@ +import java.util.concurrent.locks.ReentrantLock +var ReentrantLock lockState = new ReentrantLock() +var Timer FFAlarmTimer = null + +rule "FFAlarmRuleJSON" +when + Item FFAlarmJSON changed +then + logInfo("FFAlarmJSON","Vor FFAlarmEinsatznummer") + postUpdate(FFAlarmEinsatznummer,transform("JSONPATH", "$.Einsatznummer", FFAlarmJSON.state.toString)) + logInfo("FFAlarmJSON","Vor FFAlarmOrt") + postUpdate(FFAlarmOrt,transform("JSONPATH", "$.Ort", FFAlarmJSON.state.toString)) + logInfo("FFAlarmJSON","Vor FFAlarmOrtsteil") + postUpdate(FFAlarmOrtsteil,transform("JSONPATH", "$.Ortsteil", FFAlarmJSON.state.toString)) + logInfo("FFAlarmJSON","Vor FFAlarmStrasse") + postUpdate(FFAlarmStrasse,transform("JSONPATH","$.Strasse",FFAlarmJSON.state.toString)) + logInfo("FFAlarmJSON","Vor FFAlarmObjekt") + postUpdate(FFAlarmObjekt,transform("JSONPATH","$.Objekt",FFAlarmJSON.state.toString)) + logInfo("FFAlarmJSON","Vor FFAlarmEStelleZusatz") + // postUpdate(FFAlarmEStelleZusatz,transform("JSONPATH","$.E-Stelle-Zusatz",FFAlarmJSON.state.toString)) + logInfo("FFAlarmJSON","Vor FFAlarmEStelleBem") + postUpdate(FFAlarmEStelleBem,transform("JSONPATH","$.E-Stelle-Bem",FFAlarmJSON.state.toString)) + logInfo("FFAlarmJSON","Vor FFAlarmKoordinate") + postUpdate(FFAlarmKoordinate,transform("JSONPATH","$.Koordinate",FFAlarmJSON.state.toString)) + logInfo("FFAlarmJSON","Vor FFAlarmStichwort") + postUpdate(FFAlarmStichwort,transform("JSONPATH","$.Stichwort",FFAlarmJSON.state.toString)) + logInfo("FFAlarmJSON","Vor FFAlarmMeldebild") + postUpdate(FFAlarmMeldebild,transform("JSONPATH","$.Meldebild",FFAlarmJSON.state.toString)) + logInfo("FFAlarmJSON","Vor FFAlarmAlarmierungszeit") + postUpdate(FFAlarmAlarmierungszeit,transform("JSONPATH", "$.Alarmierungszeit", FFAlarmJSON.state.toString)) + logInfo("FFAlarmJSON","Vor FFAlarmBemerkung") + postUpdate(FFAlarmBemerkung,transform("JSONPATH","$.Bemerkung",FFAlarmJSON.state.toString)) + logInfo("FFAlarmJSON","Vor FFAlarmMeldender") + postUpdate(FFAlarmMeldender,transform("JSONPATH", "$.Meldender", FFAlarmJSON.state.toString)) + logInfo("FFAlarmJSON","Vor FFAlarmEinsatzmittel") + postUpdate(FFAlarmEinsatzmittel,transform("JSONPATH","$.Einsatzmittel",FFAlarmJSON.state.toString)) + logInfo("FFAlarmJSON","Vor ") + postUpdate(FFAlarmTrigger,transform("JSONPATH","$.AlarmTrigger",FFAlarmJSON.state.toString)) +end + +rule "FFAlarmTrigger OF" +when + Item FFAlarmTrigger changed to ON +then + postUpdate(FHZPush,"ON") + postUpdate(REMCAM001Record,"ON") + postUpdate(REMCAM002Record,"ON") + FFAlarmTimer = createTimer(now.plusMinutes(60)) [| + postUpdate(FFAlarmTrigger,"OFF") + postUpdate(FHZPush,"OFF") + postUpdate(REMCAM001Record,"OFF") + postUpdate(REMCAM002Record,"OFF") + FFAlarmTimer.cancel() + FFAlarmTimer = null + ] +end + +rule "FFAlarmTrigger OF" +when + Item FFAlarmTrigger changed to OFF +then + postUpdate(FHZPush,"OFF") +end + +rule "Fahrzeug Status 3" +when + Member of gFHZ changed +then +Thread::sleep(300) +if (!lockState.isLocked) { + lockState.lock() + try { + logInfo("Testing","gNetwork received update") + val member = gFHZ.members.filter[d | d.lastUpdate("jdbc") !== null].sortBy[lastUpdate("jdbc")].last + val name = member.label.toString + if (FFAlarmTrigger.state == ON && FHZPush.state == ON && member.state.toString == "3") { + logInfo("GroupTest", "Member "+ name +" to " + member.state ) + sendPushoverMessage(pushoverBuilder(name + " ist aus zur E-Stelle").withSound("siren").withUser("upgb55kps8rx2xotn7dvdg3w2yjpt6")) + sendPushoverMessage(pushoverBuilder(name + " ist aus zur E-Stelle").withSound("siren").withUser("u8s32g4yym8xbk7yqn66cokjys13mf")) + } + if (FFAlarmTrigger.state == ON && FHZPush.state == ON && member.state.toString == "4") { + logInfo("GroupTest", "Member "+ name +" to " + member.state ) + sendPushoverMessage(pushoverBuilder(name + " an der E-Stelle angekommen").withSound("siren").withUser("upgb55kps8rx2xotn7dvdg3w2yjpt6")) + sendPushoverMessage(pushoverBuilder(name + " an der E-Stelle angekommen").withSound("siren").withUser("u8s32g4yym8xbk7yqn66cokjys13mf")) + } + } finally { + lockState.unlock() + } +} else { + logInfo("Testing","Locked, update ignored") +} +end \ No newline at end of file diff --git a/rules/Wetterwarnung.rules b/rules/Wetterwarnung.rules new file mode 100644 index 0000000..3e5d96b --- /dev/null +++ b/rules/Wetterwarnung.rules @@ -0,0 +1,34 @@ +rule "DWD Warnungen" +when + // Time cron "0 */30 * ? * *" //every 30 Minutes + Time cron "0 * * ? * *" //every 1 Minute +then + var String jsonString = sendHttpGetRequest("https://www.dwd.de/DWD/warnungen/warnapp/json/warnings.json") + var String newString = transform("JS", "Wetter_DWD_getWarningsJSON.js", jsonString) + if (newString !="NULL") { + var String newStart = transform("JSONPATH", "$.start", newString) + var DateTime timestart = new DateTime(Long::parseLong(newStart)) + DWD_Warnung_start.postUpdate(new DateTimeType(timestart.toString)) + var String newEnd = transform("JSONPATH", "$.end", newString) + if (newEnd !==null) { + var DateTime timeend = new DateTime(Long::parseLong(newEnd)) + DWD_Warnung_end.postUpdate(new DateTimeType(timeend.toString)) + } + + DWD_Warnung_level.postUpdate(transform("JSONPATH","$.level",newString)) + DWD_Warnung_description.postUpdate(transform("JSONPATH","$.description",newString)) + DWD_Warnung_headline.postUpdate(transform("JSONPATH","$.headline",newString)) + DWD_Warnung_instruction.postUpdate(transform("JSONPATH","$.instruction",newString)) + DWD_Warnung_event.postUpdate(transform("JSONPATH","$.event",newString)) + } + + if (newString =="NULL") { + DWD_Warnung_start.postUpdate("NULL") + DWD_Warnung_end.postUpdate("NULL") + DWD_Warnung_level.postUpdate(0) + DWD_Warnung_description.postUpdate("-") + DWD_Warnung_headline.postUpdate("derzeit keine Warnungen") + DWD_Warnung_instruction.postUpdate("-") + DWD_Warnung_event.postUpdate("-") + } +end \ No newline at end of file diff --git a/rules/readme.txt b/rules/readme.txt new file mode 100644 index 0000000..f7952e1 --- /dev/null +++ b/rules/readme.txt @@ -0,0 +1,5 @@ +Your rules go here. +All rule files have to have the ".rules" file extension and must follow a special syntax. + +Check out the openHAB documentation for more details: +https://www.openhab.org/docs/configuration/rules-dsl.html diff --git a/scripts/readme.txt b/scripts/readme.txt new file mode 100644 index 0000000..0faff68 --- /dev/null +++ b/scripts/readme.txt @@ -0,0 +1,5 @@ +Your scripts go here. +All script files have to have the ".script" file extension and must follow a special syntax. + +Check out the openHAB documentation for more details: +https://www.openhab.org/docs/configuration/rules-dsl.html#scripts diff --git a/services/addons.cfg b/services/addons.cfg new file mode 100644 index 0000000..a72c3ad --- /dev/null +++ b/services/addons.cfg @@ -0,0 +1,50 @@ +# The installation package of this openHAB instance +# Note: This is only regarded at the VERY FIRST START of openHAB +# Note: If you want to specify your add-ons yourself through entries below, set the package to "minimal" +# as otherwise your definition might be in conflict with what the installation package defines. +# +# Optional. If not set, the dashboard (https://:8080/) will ask you to choose a package. +# +# Valid options: +# - minimal : Installation only with dashboard, but no UIs or other add-ons. Use this for custom setups. +# - simple : Setup for using openHAB purely through UIs - you need to expect MANY constraints in functionality! +# - standard : Default setup for normal users, best for textual setup +# - expert : Setup for expert users, especially for people migrating from openHAB 1.x +# - demo : A demo setup which includes UIs, a few bindings, config files etc. +# +# See https://www.openhab.org/docs/configuration/packages.html for a detailed explanation of these packages. +# +#package = minimal + +# Access Remote Add-on Repository +# Defines whether the remote openHAB add-on repository should be used for browsing and installing add-ons. +# This not only makes latest snapshots of add-ons available, it is also required for the installation of +# any legacy 1.x add-on. (default is true) +# +#remote = true + +# Include legacy 1.x bindings. If set to true, it also allows the installation of 1.x bindings for which there is +# already a 2.x version available (requires remote repo access, see above). (default is false) +# +#legacy = true + +# A comma-separated list of bindings to install (e.g. "binding = sonos,knx,zwave") +#binding = + +# A comma-separated list of UIs to install (e.g. "ui = basic,paper") +#ui = + +# A comma-separated list of persistence services to install (e.g. "persistence = rrd4j,jpa") +#persistence = + +# A comma-separated list of actions to install (e.g. "action = mail,pushover") +#action = + +# A comma-separated list of transformation services to install (e.g. "transformation = map,jsonpath") +#transformation = + +# A comma-separated list of voice services to install (e.g. "voice = marytts,freetts") +#voice = + +# A comma-separated list of miscellaneous services to install (e.g. "misc = myopenhab") +#misc = diff --git a/services/http.cfg b/services/http.cfg new file mode 100644 index 0000000..6bb3e36 --- /dev/null +++ b/services/http.cfg @@ -0,0 +1,18 @@ +# timeout in milliseconds for the http requests (optional, defaults to 5000) +#timeout= + +# the interval in milliseconds when to find new refresh candidates +# (optional, defaults to 1000) +#granularity= + +# whether to substitute the current time or state value into the URL +# (optional, defaults to true) +#format= + +# configuration of the first cache item +#.url= +#.updateInterval= + +# configuration of the second cache item +#.url= +#.updateInterval= diff --git a/services/jdbc.cfg b/services/jdbc.cfg new file mode 100644 index 0000000..99a575a --- /dev/null +++ b/services/jdbc.cfg @@ -0,0 +1,81 @@ +############################ JDBC Persistence Service ################################## +# I N S T A L L J D B C P E R S I S T E N C E S E R V I C E +# +# https://github.com/openhab/openhab/wiki/JDBC-Persistence +# +# Tested databases/url-prefix: jdbc:derby, jdbc:h2, jdbc:hsqldb, jdbc:mariadb, jdbc:mysql, jdbc:postgresql, jdbc:sqlite +# +# derby, h2, hsqldb, sqlite can be embedded, +# If no database is available it will be created, for example the url 'jdbc:h2:./testH2' creates a new DB in OpenHab Folder. +# +# Create new database, for example on a MySQL-Server use: +# CREATE DATABASE 'yourDB' CHARACTER SET utf8 COLLATE utf8_general_ci; + +# D A T A B A S E C O N F I G +# Some URL-Examples, 'service' identifies and activates internally the correct jdbc driver. +# required database url like 'jdbc::[:;]' +# url=jdbc:derby:./testDerby;create=true +# url=jdbc:h2:./testH2 +# url=jdbc:hsqldb:./testHsqlDb +# url=jdbc:mariadb://192.168.0.1:3306/testMariadb +url=jdbc:mysql://10.112.30.17:3306/openhab_ffr +# url=jdbc:postgresql://192.168.0.1:5432/testPostgresql +# url=jdbc:sqlite:./testSqlite.db +# url= + +# required database user +user=openhab_ffr + +# required database password +password=112PAlokasAwu2013 + +# E R R O R H A N D L I N G +# optional when Service is deactivated (optional, default: 0 -> ignore) +#errReconnectThreshold= + +# I T E M O P E R A T I O N S +# optional tweaking SQL datatypes +# see: https://mybatis.github.io/mybatis-3/apidocs/reference/org/apache/ibatis/type/JdbcType.html +# see: http://www.h2database.com/html/datatypes.html +# see: http://www.postgresql.org/docs/9.3/static/datatype.html +# defaults: +#sqltype.CALL = VARCHAR(200) +#sqltype.COLOR = VARCHAR(70) +#sqltype.CONTACT = VARCHAR(6) +#sqltype.DATETIME = DATETIME +#sqltype.DIMMER = TINYINT +#sqltype.LOCATION = VARCHAR(30) +#sqltype.NUMBER = DOUBLE +#sqltype.ROLLERSHUTTER = TINYINT +#sqltype.STRING = VARCHAR(65500) +#sqltype.SWITCH = VARCHAR(6) + +# For Itemtype "Number" default decimal digit count (optional, default: 3) +#numberDecimalcount= + +# T A B L E O P E R A T I O N S +# Tablename Prefix String (optional, default: "item") +# for Migration from MYSQL-Bundle set to 'Item'. +#tableNamePrefix=Item + +# Tablename Prefix generation, using Item real names or "item" (optional, default: false -> "item") +# If true, 'tableNamePrefix' is ignored. +tableUseRealItemNames=true + +# Tablename Suffix length (optional, default: 4 -> 0001-9999) +# for Migration from MYSQL-Bundle set to 0. +#tableIdDigitCount= + +# Rename existing Tables using tableUseRealItemNames and tableIdDigitCount (optional, default: false) +# USE WITH CARE! Deactivate after Renaming is done! +#rebuildTableNames=true + +# D A T A B A S E C O N N E C T I O N S +# Some embeded Databases can handle only one Connection (optional, default: configured per database in packet org.openhab.persistence.jdbc.db.* ) +# see: https://github.com/brettwooldridge/HikariCP/issues/256 +# jdbc.maximumPoolSize = 1 +# jdbc.minimumIdle = 1 + +# T I M E K E E P I N G +# (optional, default: false) +enableLogTime=true \ No newline at end of file diff --git a/services/pushover.cfg b/services/pushover.cfg new file mode 100644 index 0000000..f8e3376 --- /dev/null +++ b/services/pushover.cfg @@ -0,0 +1,30 @@ +# The timeout for the communication with the Pushover service (optional, defaults +# to 10000 milliseconds) +#defaultTimeout= + +# You need to provide a Pushover API token to send to devices. If not here, than during +# the action call itself. +defaultToken=abq4e4ok9n6zdf7ut32fm929ki338y + +# You need to provide a Pushover User Key to send to devices. If not here, than during +# the action call itself. +#defaultUser= + +# Name of the sending application (optional). Defaults to 'openHAB'. +defaultTitle=openHAB + +# The priority to use for messages if not specified otherwise. Can range from +# -2 (lowest) to 2 (highest) +#defaultPriority= + +# Url to attach to the message if not specified in the command (optional). Can be left empty. +#defaultUrl= + +# Url Title to attach to the message if not specified in the command (optional). Can be left empty. +#defaultUrlTitle= + +# When priority is high priority (2), how often in seconds should messages be resent. Defaults to 300 seconds. +#defaultRetry= + +# When priority is high priority (2), how long to continue resending messages until acknowledged. Defaults to 3600 seconds. +#defaultExpire= \ No newline at end of file diff --git a/services/readme.txt b/services/readme.txt new file mode 100644 index 0000000..62ba811 --- /dev/null +++ b/services/readme.txt @@ -0,0 +1,6 @@ +Your service configurations will reside here. +All configuration files have to have the ".cfg" file extension. +Service configuration files are automatically created as soon as you install an add-on that can be configured. + +Check out the openHAB documentation for more details: +https://www.openhab.org/docs/configuration/services.html diff --git a/services/runtime.cfg b/services/runtime.cfg new file mode 100644 index 0000000..358a5be --- /dev/null +++ b/services/runtime.cfg @@ -0,0 +1,73 @@ +##################### LOCALE #################### + +# The default language that should be used. If not specified, the system default locale is used. +# The ISO 639 alpha-2 or alpha-3 language code (if there is no alpha-2 one). +# Example: "en" (English), "de" (German), "ja" (Japanese), "kok" (Konkani) +# +#org.eclipse.smarthome.core.localeprovider:language= + +# The region that should be used. +# ISO 3166 alpha-2 country code or UN M.49 numeric-3 area code. +# Example: "US" (United States), "DE" (Germany), "FR" (France), "029" (Caribbean) +# +#org.eclipse.smarthome.core.localeprovider:region= + +################ PERSISTENCE #################### + +# The persistence service to use if no other is specified. +# +#org.eclipse.smarthome.persistence:default= + +################### AUDIO ####################### + +# This parameter defines the default audio source to use (if not set, the first available one will be used. +# +#org.eclipse.smarthome.audio:defaultSource= + +# This parameter defines the default audio sink to use (if not set, the first available one will be used. +# +#org.eclipse.smarthome.audio:defaultSink= + +##################### VOICE #################### + +# This parameter defines the default text-to-speech service to use (if not set, the first available one will be used. +# +#org.eclipse.smarthome.voice:defaultTTS= + +# This parameter defines the default speech-to-text service to use (if not set, the first available one will be used. +# +#org.eclipse.smarthome.voice:defaultSTT= + +# The default voice to use if no specific TTS service or voice is specified. +# +#org.eclipse.smarthome.voice:defaultVoice= + +# The default human language interpreter to use if no other is specified. +# +#org.eclipse.smarthome.voice:defaultHLI= + +################ MISCELLANOUS #################### + +# The karaf sshHost parameter configures the bind address for the ssh login to karaf. +# Default is 127.0.0.1 (localhost), so it is only possible to login from the local machine. +# +# Setting this to the address of another network interfaces will allow login from this network. +# Setting this to 0.0.0.0 will allow login from all network interfaces. +# +# !!! Security warning !!! +# Remember to change default login/password, if you allow external login. +# See https://www.openhab.org/docs/administration/console.html for details. +# +#org.apache.karaf.shell:sshHost = 0.0.0.0 + +# Setting this to true will automatically approve all inbox entries and create Things for them, +# so that they are immediately available in the system (default is false) +# +#org.eclipse.smarthome.inbox:autoApprove=true + +# This setting allows to switch between a "simple" and an "advanced" mode for item management. +# In simple mode (autoLinks=true), links and their according items are automatically created for new Things. +# In advanced mode (autoLinks=false), the user has the full control about which items channels are linked to. +# Existing links will remain untouched. (default is true) +# +#org.eclipse.smarthome.links:autoLinks=false diff --git a/sitemaps/default.sitemap b/sitemaps/default.sitemap new file mode 100644 index 0000000..bcf1851 --- /dev/null +++ b/sitemaps/default.sitemap @@ -0,0 +1,146 @@ +sitemap default label="Feuerwehr Rembrücken" { + + Frame label="ALARM" { + Switch item=FFAlarmTrigger label="Alarminfos" mappings=[ON="Anzeigen", OFF="VERSTECKEN"] + Text label="Einsatzdaten" icon="alarm" visibility=[FFAlarmTrigger==ON] { + Text item=FFAlarmEinsatznummer icon="alarm" visibility=[FFAlarmEinsatznummer!=NULL] + Text item=FFAlarmAlarmierungszeit icon="alarm" visibility=[FFAlarmAlarmierungszeit!=NULL] + Text item=FFAlarmStichwort icon="alarm" visibility=[FFAlarmStichwort!=NULL] + Text item=FFAlarmStrasse icon="alarm" visibility=[FFAlarmStrasse!=NULL] + Text item=FFAlarmOrt icon="alarm" visibility=[FFAlarmOrt!=NULL] + Text item=FFAlarmOrtsteil icon="alarm" visibility=[FFAlarmOrtsteil!=NULL] + Text item=FFAlarmMeldebild icon="alarm" visibility=[FFAlarmMeldebild!=NULL] + Text item=FFAlarmBemerkung icon="alarm" visibility=[FFAlarmBemerkung!=NULL] + Text item=FFAlarmObjekt icon="alarm" visibility=[FFAlarmObjekt!=NULL] + Text item=FFAlarmEStelleZusatz icon="alarm" visibility=[FFAlarmEStelleZusatz!=NULL] + Text item=FFAlarmEStelleBem icon="alarm" visibility=[FFAlarmEStelleBem!=NULL] + Mapview item=FFAlarmKoordinate icon="alarm" visibility=[FFAlarmKoordinate!=NULL] + Text item=FFAlarmMeldender icon="alarm" visibility=[FFAlarmMeldender!=NULL] + Text item=FFAlarmEinsatzmittel icon="alarm" visibility=[FFAlarmEinsatzmittel!=NULL] + } // Close Text Einsatzdaten + Text label="Fahrzeuge Anfahrt" icon="fire_truck" visibility=[FFAlarmTrigger==ON] { + Text item=FFStatus67641319 label="MTF 1 (3-19-1) [MAP(status.map):%s]" icon="" visibility=[FFStatus67641319==3] + Text item=FFStatus67641317 label="MTF 2 (3-19-2) [MAP(status.map):%s]" icon="" visibility=[FFStatus67641317==3] + Text item=FFStatus67641342 label="LF 8/6-1 (3-42-1) [MAP(status.map):%s]" icon="" visibility=[FFStatus67641342==3] + Text item=FFStatus67641349 label="LF 8/6-2 (3-42-2) [MAP(status.map):%s]" icon="" visibility=[FFStatus67641349==3] + Text item=FFStatus67641351 label="RW1 (3-51-1) [MAP(status.map):%s]" icon="" visibility=[FFStatus67641351==3] + Text item=FFStatus67641211 label="ELW (2-11-1) [MAP(status.map):%s]" icon="" visibility=[FFStatus67641211==3] + Text item=FFStatus67641216 label="PKW (2-16-1) [MAP(status.map):%s]" icon="" visibility=[FFStatus67641216==3] + Text item=FFStatus67641219 label="MTF (2-19-1) [MAP(status.map):%s]" icon="" visibility=[FFStatus67641219==3] + Text item=FFStatus67641230 label="DLK (2-30-1) [MAP(status.map):%s]" icon="" visibility=[FFStatus67641230==3] + Text item=FFStatus67641240 label="StLF 20/25 (2-40-1) [MAP(status.map):%s]" icon="" visibility=[FFStatus67641240==3] + Text item=FFStatus67641244 label="LF 16/12 (2-44-1) [MAP(status.map):%s]" icon="" visibility=[FFStatus67641244==3] + Text item=FFStatus67641259 label="GW-U (2-59-1) [MAP(status.map):%s]" icon="" visibility=[FFStatus67641259==3] + Text item=FFStatus67641272 label="GW-N (2-64-1) [MAP(status.map):%s]" icon="" visibility=[FFStatus67641272==3] + } + Text label="Fahrzeuge E-Stelle" icon="fire_truck" visibility=[FFAlarmTrigger==ON] { + Text item=FFStatus67641319 label="MTF 1 (3-19-1) [MAP(status.map):%s]" icon="" visibility=[FFStatus67641319==4] + Text item=FFStatus67641317 label="MTF 2 (3-19-2) [MAP(status.map):%s]" icon="" visibility=[FFStatus67641317==4] + Text item=FFStatus67641342 label="LF 8/6-1 (3-42-1) [MAP(status.map):%s]" icon="" visibility=[FFStatus67641342==4] + Text item=FFStatus67641349 label="LF 8/6-2 (3-42-2) [MAP(status.map):%s]" icon="" visibility=[FFStatus67641349==4] + Text item=FFStatus67641351 label="RW1 (3-51-1) [MAP(status.map):%s]" icon="" visibility=[FFStatus67641351==4] + Text item=FFStatus67641211 label="ELW (2-11-1) [MAP(status.map):%s]" icon="" visibility=[FFStatus67641211==4] + Text item=FFStatus67641216 label="PKW (2-16-1) [MAP(status.map):%s]" icon="" visibility=[FFStatus67641216==4] + Text item=FFStatus67641219 label="MTF (2-19-1) [MAP(status.map):%s]" icon="" visibility=[FFStatus67641219==4] + Text item=FFStatus67641230 label="DLK (2-30-1) [MAP(status.map):%s]" icon="" visibility=[FFStatus67641230==4] + Text item=FFStatus67641240 label="StLF 20/25 (2-40-1) [MAP(status.map):%s]" icon="" visibility=[FFStatus67641240==4] + Text item=FFStatus67641244 label="LF 16/12 (2-44-1) [MAP(status.map):%s]" icon="" visibility=[FFStatus67641244==4] + Text item=FFStatus67641259 label="GW-U (2-59-1) [MAP(status.map):%s]" icon="" visibility=[FFStatus67641259==4] + Text item=FFStatus67641272 label="GW-N (2-64-1) [MAP(status.map):%s]" icon="" visibility=[FFStatus67641272==4] + } + Switch item=FHZPush label="Fahrzeug Push" visibility=[FFAlarmTrigger==ON] + } + Frame label="Status Informationen" { + Text label="StBI" icon="man_1" { + Text item=FFStatus67641201 icon="" + Text item=FFStatus67641202 icon="" + Text item=FFStatus67641203 icon="" + } + Text label="Zentralen" icon="fire_station" { + Text item=FFStatus67641300 icon="fire_station" + Text item=FFStatus67641200 icon="fire_station" + } + + Text label=Fahrzeugstati icon="fire_truck" { + Frame label="Rembrücken"{ + Text item=FFStatus67641319 label="MTF 1 (3-19-1) [MAP(status.map):%s]" icon="" valuecolor=["1"="#31CF31", "2"="#31CF31", "3"="#FF8E00", "4"="#840000", "6"="#000000"] + Text item=FFStatus67641317 label="MTF 2 (3-19-2) [MAP(status.map):%s]" icon="" valuecolor=["1"="#31CF31", "2"="#31CF31", "3"="#FF8E00", "4"="#840000", "6"="#000000"] + Text item=FFStatus67641342 label="LF 8/6-1 (3-42-1) [MAP(status.map):%s]" icon="" valuecolor=["1"="#31CF31", "2"="#31CF31", "3"="#FF8E00", "4"="#840000", "6"="#000000"] + Text item=FFStatus67641349 label="LF 8/6-2 (3-42-2) [MAP(status.map):%s]" icon="" valuecolor=["1"="#31CF31", "2"="#31CF31", "3"="#FF8E00", "4"="#840000", "6"="#000000"] + Text item=FFStatus67641351 label="RW1 (3-51-1) [MAP(status.map):%s]" icon="" valuecolor=["1"="#31CF31", "2"="#31CF31", "3"="#FF8E00", "4"="#840000", "6"="#000000"] + } + Frame label="Heusenstamm" { + Text item=FFStatus67641211 label="ELW (2-11-1) [MAP(status.map):%s]" icon="" valuecolor=["1"="#31CF31", "2"="#31CF31", "3"="#FF8E00", "4"="#840000", "6"="#000000"] + Text item=FFStatus67641216 label="PKW (2-16-1) [MAP(status.map):%s]" icon="" valuecolor=["1"="#31CF31", "2"="#31CF31", "3"="#FF8E00", "4"="#840000", "6"="#000000"] + Text item=FFStatus67641219 label="MTF (2-19-1) [MAP(status.map):%s]" icon="" valuecolor=["1"="#31CF31", "2"="#31CF31", "3"="#FF8E00", "4"="#840000", "6"="#000000"] + Text item=FFStatus67641230 label="DLK (2-30-1) [MAP(status.map):%s]" icon="" valuecolor=["1"="#31CF31", "2"="#31CF31", "3"="#FF8E00", "4"="#840000", "6"="#000000"] + Text item=FFStatus67641240 label="StLF 20/25 (2-40-1) [MAP(status.map):%s]" icon="" valuecolor=["1"="#31CF31", "2"="#31CF31", "3"="#FF8E00", "4"="#840000", "6"="#000000"] + Text item=FFStatus67641244 label="LF 16/12 (2-44-1) [MAP(status.map):%s]" icon="" valuecolor=["1"="#31CF31", "2"="#31CF31", "3"="#FF8E00", "4"="#840000", "6"="#000000"] + Text item=FFStatus67641259 label="GW-U (2-59-1) [MAP(status.map):%s]" icon="" valuecolor=["1"="#31CF31", "2"="#31CF31", "3"="#FF8E00", "4"="#840000", "6"="#000000"] + Text item=FFStatus67641272 label="GW-N (2-64-1) [MAP(status.map):%s]" icon="" valuecolor=["1"="#31CF31", "2"="#31CF31", "3"="#FF8E00", "4"="#840000", "6"="#000000"] + } + } + Text label="Dienste" icon="kalender" { + Text item=FFDienstZVD + Text item=FFDienstIUK2 + Text item=FFDienstIUK3 + } + Text label="Straßensperrung" icon="road_closed" { + Text item=FFSperrungen + } + } + Frame label="Sonstiges" { + Text label="Webcams" icon="camera" { + Frame label="Anzeige" { + Switch item=CamSelection label="Auswahl" mappings=[0="Vorne", 1="Hinten"] + Video url="http://admin:rt8qff8ppkma82bzxq2vcy3m3@10.112.30.31/record/current.jpg" encoding="mjpeg" visibility=[CamSelection==0, CamSelection=="Uninitialized"] + Switch item=REMCAM001Record label="Aufzeichung" mappings=[enable="Aktiv", disable="Inaktiv"] visibility=[CamSelection==0, CamSelection=="Uninitialized"] + + Video url="http://admin:pdgqa62v4f4bd9trmvp7z7t88@10.112.30.32/record/current.jpg" encoding="mjpeg" visibility=[CamSelection==1] + Switch item=REMCAM002Record label="Aufzeichung" mappings=[enable="Aktiv", disable="Inaktiv"] visibility=[CamSelection==1] + } + Frame label="Sound" { + Switch item=CamSoundLocSelection label="Auswahl" mappings=[0="Vorne", 1="Hinten", 2="Beide"] + Selection item=CamSoundTone label="Ton" mappings=["Alarm"="Alarm", "AnsKeyNoFunction"="AnsKeyNoFunction", "AnsMsgBell"="AnsMsgBell", "AnsMsgKeypad"="AnsMsgKeypad", "AnsMsgNoAnswer"="AnsMsgNoAnswer", "Beep"="Beep", "Busy"="Busy", "Cuckooclock"="Cuckooclock", "Default"="Default", "DoorBell"="DoorBell", "Phonering"="Phonering", "Standard"="Standard"] + Setpoint item=CamSoundVolume label="Lautstärke" minValue=0 maxValue=30 step=1 + Switch item=CamPlaySound label="Auswahl" mappings=[ON="Abspielen"] + } + } + } + Frame label="Wetter" { + Text label="Blitzkarte" icon="lightning" { + Image url="http://www.blids.de/spion/bilder/aktkartegergrau.jpg" refresh=60000 + Image url="https://www.industry.siemens.com/services/global/de/portfolio/plant-data-services/blids/PublishingImages/BLIDS-Spion_Legende.png" refresh=60000 + } + Text label="Regenradar" icon="rain" { + // Image url="https://www.dwd.de/DWD/wetter/radar/rad_brd_akt.jpg" refresh=900000 + Image url="http://www.wettergefahren.de/DWD/wetter/radar/Radarfilm_WEB_DL.gif" refresh=900000 + // Image url="https://www.dwd.de/DE/leistungen/radarbild_film/legende_radar_wx.png?__blob=normal&v=8" refresh=900000 + Image url="http://www.wettergefahren.de/stat/wetter/legende_niederschlagsradar.png" refresh=900000 + } + Text label="Wetterwarnung" icon="dwd" { + Frame label="Wetterwarnung" { + Text item=DWD_Warnung_headline label=" [%s]" valuecolor=[DWD_Warnung_level==1="yellow", DWD_Warnung_level==2="orange", DWD_Warnung_level==3="red", DWD_Warnung_level==4="maroon"] + Text item=DWD_Warnung_level visibility=[DWD_Warnung_level!=0] valuecolor=[1="yellow", 2="orange", 3="red", 4="maroon"] + Text item=DWD_Warnung_start visibility=[DWD_Warnung_start!="NULL"] + Text item=DWD_Warnung_end visibility=[DWD_Warnung_end!="NULL"] + } + Frame label=" " { + Text item=DWD_Warnung_description visibility=[DWD_Warnung_description!="-"] + Text item=DWD_Warnung_instruction icon="null" visibility=[DWD_Warnung_instruction!="-"] + } + Frame label=" "{ + Text item=DWD_Warnung_event visibility=[DWD_Warnung_event!="-"] valuecolor=[DWD_Warnung_level==1="yellow", DWD_Warnung_level==2="orange", DWD_Warnung_level==3="red", DWD_Warnung_level==4="maroon"] + } + Frame label="Warnkarte Deutschland" { + Image url="https://www.dwd.de/DWD/warnungen/warnapp_gemeinden/json/warnungen_gemeinde_map_hes.png" refresh=900000 + } + } + Text label="Waldbrand-Gefahrenindex" icon="flame" { + Text label="Waldbrand-Gefahrenindex WBI" icon="" + Image url="http://www.wettergefahren.de/DWD/warnungen/agrar/wbx/wbx_stationen.png" refresh=60000 + Text label="Grasland - Feuerindex" icon="" + Image url="http://www.wettergefahren.de/DWD/warnungen/agrar/glfi/glfi_stationen.png" refresh=60000 + } + } +} \ No newline at end of file diff --git a/sitemaps/readme.txt b/sitemaps/readme.txt new file mode 100644 index 0000000..85c7a47 --- /dev/null +++ b/sitemaps/readme.txt @@ -0,0 +1,5 @@ +Your sitemap definitions go here. +All sitemap files have to have the ".sitemap" file extension and must follow a special syntax. + +Check out the openHAB documentation for more details: +https://www.openhab.org/docs/configuration/sitemaps.html diff --git a/sounds/barking.mp3 b/sounds/barking.mp3 new file mode 100644 index 0000000..5a3c41d Binary files /dev/null and b/sounds/barking.mp3 differ diff --git a/sounds/doorbell.mp3 b/sounds/doorbell.mp3 new file mode 100644 index 0000000..7a8a5a3 Binary files /dev/null and b/sounds/doorbell.mp3 differ diff --git a/things/readme.txt b/things/readme.txt new file mode 100644 index 0000000..27b6689 --- /dev/null +++ b/things/readme.txt @@ -0,0 +1,5 @@ +Your thing definitions go here. +All thing files have to have the ".things" file extension and must follow a special syntax. + +Check out the openHAB documentation for more details: +https://www.openhab.org/docs/configuration/things.html diff --git a/transform/Wetter_DWD.map b/transform/Wetter_DWD.map new file mode 100644 index 0000000..983ecd3 --- /dev/null +++ b/transform/Wetter_DWD.map @@ -0,0 +1,6 @@ +0=Keine Warnung (0) +1=Wetterwarnung (1) +2=markantes Wetter (2) +3=Unwetterwarnung (3) +4=extremes Unwetter (4) +10=Hitzewarnung (10) \ No newline at end of file diff --git a/transform/Wetter_DWD_getWarningsJSON.js b/transform/Wetter_DWD_getWarningsJSON.js new file mode 100644 index 0000000..8b50c18 --- /dev/null +++ b/transform/Wetter_DWD_getWarningsJSON.js @@ -0,0 +1,10 @@ +(function(jsonString) { + var newString = jsonString.replace('warnWetter.loadWarnings(',''); + newString = newString.replace(');',''); + var newJSON = JSON.parse(newString); + var jsonResult = ""; + if (newJSON.warnings.hasOwnProperty('906438999')) { + jsonResult =JSON.stringify(newJSON.warnings['906438999'][0]); + } else jsonResult = 'NULL' + return jsonResult; +})(input) \ No newline at end of file diff --git a/transform/de.map b/transform/de.map new file mode 100644 index 0000000..8cc1579 --- /dev/null +++ b/transform/de.map @@ -0,0 +1,3 @@ +CLOSED=zu +OPEN=offen +NULL=undefiniert diff --git a/transform/en.map b/transform/en.map new file mode 100644 index 0000000..bd08f17 --- /dev/null +++ b/transform/en.map @@ -0,0 +1,4 @@ +CLOSED=closed +OPEN=open +NULL=unknown + \ No newline at end of file diff --git a/transform/readme.txt b/transform/readme.txt new file mode 100644 index 0000000..6933c16 --- /dev/null +++ b/transform/readme.txt @@ -0,0 +1,5 @@ +Transformations like map or jsonpath can utilize configuration files with data definitions. +These files have their specific file extensions and syntax definition. + +Check out the openHAB documentation for more details: +https://www.openhab.org/docs/configuration/transformations.html diff --git a/transform/status.map b/transform/status.map new file mode 100644 index 0000000..8ed425d --- /dev/null +++ b/transform/status.map @@ -0,0 +1,7 @@ +1=Einsatzbereit über Funk +2=Einsatzbereit auf Wache +3=Auf Anfahrt zur E-Stelle +4=An E-Stelle eingetroffen +5=Sprechwunsch +6=nicht einsatzbereit +NULL=Unbekannt \ No newline at end of file