ソースを参照

FHEM Basis-Konfiguration

Matthias Kleine 8 年 前
コミット
dd830a6262

+ 7 - 2
.gitignore

@@ -1,6 +1,11 @@
 .DS_Store
 .idea
 !.gitkeep
-/fhem/data/fhem.cfg
-/fhem/log/*
+/fhem/core/FHEM/FhemUtils/uniqueID
+/fhem/core/backup/*
+/fhem/core/cache/*
+/fhem/core/log/*
+/fhem/core/restoreDir/*
 /mysql/data/*
+/mqtt/log/*
+/mqtt/data/*

+ 6 - 8
README.md

@@ -3,7 +3,7 @@
 ## Contains
 
 - FHEM + haus-automatisierung.com FHEM frontend style + Tablet UI + ABFALL Module
-- Homebridge + FHEM Homebridge
+- MQTT configured
 - mySQL-Logging
 
 ## Requirements
@@ -16,17 +16,15 @@
 ```
 git clone https://github.com/klein0r/fhem-docker.git fhem-docker
 cd fhem-docker
-cp ./fhem/data/fhem.cfg.example ./fhem/data/fhem.cfg
-docker-compose up
+docker-compose up -d
 ```
 
+FHEM: http://<ip>:8083/fhem
+Node-Red: http://<ip>:1880/
+
 ## Defaults
 
 - FHEM-WEB: 8083 (8084 and 8085 have been deleted)
 - mySQL-User: fhemuser
 - mySQL-Password: 2jRHnEi3WuNSQAcX7
-- Homekit-Pairing-Code: 012-34-567
-
-## Updating FHEM
-
-Since all data in the container is static, you have to delete the container and recreate it to update fhem.
+- Homekit-Pairing-Code: 012-34-567

+ 44 - 13
docker-compose.yml

@@ -2,6 +2,7 @@ version: '2'
 
 services:
     fhem:
+        restart: always
         expose:
             - "8083"
             - "7072"
@@ -10,22 +11,16 @@ services:
             - "7072:7072"
         build: fhem
         privileged: true
-        devices:
-          - "/dev/ttyUSB0:/dev/ttyUSB0"
         volumes:
-            - ./fhem/start.sh:/opt/fhem/start.sh
-            - ./fhem/log/:/opt/fhem/log
-            - ./fhem/backup/:/opt/fhem/backup
-            - ./fhem/data/fhem.cfg:/opt/fhem/fhem.cfg
-            - ./fhem/data/FHEM/controls.txt:/opt/fhem/FHEM/controls.txt
-            - ./fhem/data/FHEM/99_myUtils.pm:/opt/fhem/FHEM/99_myUtils.pm
-            - ./fhem/data/contrib/dblog/db.conf:/opt/fhem/contrib/dblog/db.conf
+            - ./fhem/core/:/opt/fhem/
         networks:
-            - code-network
+            - fhem-network
         depends_on:
             - "mysql"
+            - "mqtt"
 
     homebridge:
+        restart: always
         expose:
             - "51826"
             - "8282"
@@ -39,11 +34,17 @@ services:
             - ./homebridge/start.sh:/root/start.sh
             - ./homebridge/config.json:/root/.homebridge/config.json
         networks:
-            - code-network
+            - fhem-network
         depends_on:
             - "fhem"
 
+    habridge:
+        restart: always
+        build: habridge
+        network_mode: host
+
     mysql:
+        restart: always
         expose:
             - "3306"
             - "33060"
@@ -57,8 +58,38 @@ services:
         environment:
             - MYSQL_RANDOM_ROOT_PASSWORD=yes
         networks:
-            - code-network
+            - fhem-network
+
+    mqtt:
+        restart: always
+        expose:
+            - "1883"
+            - "9001"
+        ports:
+            - "1883:1883"
+            - "9001:9001"
+        image: toke/mosquitto
+        networks:
+            - fhem-network
+        volumes:
+            - ./mqtt/config/:/mqtt/config/
+            - ./mqtt/log/:/mqtt/log/
+            - ./mqtt/data/:/mqtt/data/
+
+    nodered:
+        restart: always
+        expose:
+            - "1880"
+        ports:
+            - "1880:1880"
+        image: nodered/node-red-docker:0.17.5
+        volumes:
+            - ./nodered/data/:/data/
+        networks:
+            - fhem-network
+        depends_on:
+            - "mqtt"
 
 networks:
-    code-network:
+    fhem-network:
         driver: bridge

+ 4 - 4
fhem/core/contrib/configDB/configDB.conf

@@ -1,5 +1,5 @@
 %dbconfig= (
-connection => "SQLite:dbname=/opt/fhem/configDB.db",
-user => "",
-password => ""
-);
+    connection => "mysql:database=fhem;host=mysql;port=3306",
+    user => "fhemuser",
+    password => "2jRHnEi3WuNSQAcX7"
+);

+ 64 - 5
fhem/core/fhem.cfg

@@ -1,6 +1,7 @@
-attr global userattr DbLogExclude DbLogInclude cmdIcon devStateIcon devStateStyle genericDeviceType:security,ignore,switch,outlet,light,blind,thermometer,thermostat,contact,garage,window,lock homebridgeMapping:textField-long icon sortby webCmd webCmdLabel:textField-long widgetOverride
+attr global userattr DbLogExclude DbLogInclude cmdIcon devStateIcon devStateStyle genericDeviceType:security,ignore,switch,outlet,light,blind,thermometer,thermostat,contact,garage,window,lock homebridgeMapping:textField-long icon siriName sortby webCmd webCmdLabel:textField-long widgetOverride
 attr global autoload_undefined_devices 1
-attr global icon it_network
+attr global group System
+attr global icon rc_WEB
 attr global logfile -
 attr global modpath .
 attr global motd none
@@ -13,25 +14,83 @@ attr global updateInBackground 0
 attr global verbose 2
 
 define telnetPort telnet 7072 global
+attr telnetPort group System
+attr telnetPort icon it_telephone
+attr telnetPort room System
 
 define WEB FHEMWEB 8083 global
 attr WEB JavaScripts codemirror/fhem_codemirror.js hausautomatisierung-com/custom.js
+attr WEB alias WEB (8083)
+attr WEB codemirrorParam { "lineWrapping": true, "height": "auto" }
+attr WEB confirmDelete 0
+attr WEB confirmJSError 0
 attr WEB editConfig 1
+attr WEB group Web-Access
+attr WEB hiddenroom Everything
 attr WEB icon it_i-net
-attr WEB menuEntries haus-automatisierung.com,https://haus-automatisierung.com/
+attr WEB menuEntries DOIFtools,/fhem?detail=DOIFtools,haus-automatisierung.com,https://haus-automatisierung.com/
 attr WEB plotWeekStartDay 1
 attr WEB room System
-attr WEB roomIcons Homekit:audio_audio Log:edit_paste System:it_network Save.config:message_attention Everything:it_i-net Unsorted:unknown Commandref:system_fhem Remote.doc:message_mail Edit.files:edit_copy Select.style:edit_open Event.monitor:edit_settings
+attr WEB roomIcons Homekit:audio_audio Log:edit_paste Logfile:edit_paste System:it_network Save.config:message_attention Everything:it_i-net Unsorted:unknown Commandref:system_fhem Remote.doc:message_mail Edit.files:edit_copy Select.style:edit_open Event.monitor:edit_settings DOIFtools:helper_doiftools haus-automatisierung.com:it_internet
 attr WEB stylesheetPrefix hausautomatisierung_com
-attr WEB title FHEM Docker (haus-automatisierung.com)
+attr WEB title { if ($FW_room) { "FHEM: $FW_room" } elsif ($FW_detail) { "FHEM: $FW_detail" } else { "FHEM" } }
 
 # Fake FileLog entry, to access the fhem log from FHEMWEB 
 define Logfile FileLog ./log/fhem-%Y-%m.log fakelog
+attr Logfile group Logging
+attr Logfile icon edit_paste
+attr Logfile room System
 
 define autocreate autocreate
 attr autocreate filelog ./log/%NAME-%Y.log
+attr autocreate group System
+attr autocreate icon edit_settings
+attr autocreate room System
 
 define eventTypes eventTypes ./log/eventTypes.txt
+attr eventTypes group System
+attr eventTypes icon control_home
+attr eventTypes room System
 
 # Disable this to avoid looking for new USB devices on startup
 define initialUsbCheck notify global:INITIALIZED usb create
+attr initialUsbCheck group System
+attr initialUsbCheck icon rc_USB
+attr initialUsbCheck room System
+define DBLogging DbLog /opt/fhem/contrib/dblog/db.conf .*:.*
+attr DBLogging DbLogSelectionMode Exclude/Include
+attr DBLogging DbLogType Current/History
+attr DBLogging alias Database-Log
+attr DBLogging group Logging
+attr DBLogging icon system_backup
+attr DBLogging room System
+define Mosquitto MQTT mqtt:1883
+attr Mosquitto room Interfaces
+define TabletUi HTTPSRV ftui/ ./www/tablet/ Tablet-UI
+attr TabletUi alias Tablet UI
+attr TabletUi group Web-Access
+attr TabletUi icon smartphone
+attr TabletUi room System
+define at_DbLoggingReduce at *03:00:00 set DBLogging reduceLogNbl 90 average
+attr at_DbLoggingReduce alias Database-Log Reduce
+attr at_DbLoggingReduce group Logging
+attr at_DbLoggingReduce icon system_fhem_update
+attr at_DbLoggingReduce room System
+define Siri siri
+attr Siri room Interfaces
+define DBLogging_Reopen at +*00:15:00 set DBLogging reopen
+attr DBLogging_Reopen alias Database-Log Reopen
+attr DBLogging_Reopen group Logging
+attr DBLogging_Reopen icon time_timer
+attr DBLogging_Reopen room System
+define allowed_WEB allowed
+attr allowed_WEB alias WEB (Permissions)
+attr allowed_WEB group Web-Access
+attr allowed_WEB icon scene_keyboard
+attr allowed_WEB room System
+attr allowed_WEB validFor WEB
+define DOIFtools DOIFtools associated DOIF: 
+attr DOIFtools DOIFtoolsMenuEntry 1
+attr DOIFtools group System
+attr DOIFtools icon helper_doiftools
+attr DOIFtools room System

+ 298 - 0
fhem/core/www/tablet/index.html

@@ -0,0 +1,298 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+    <!--
+     /* FHEM tablet ui */
+     /*
+     * UI builder framework for FHEM
+     *
+     * Version: 2.5.*
+     * URL: https://github.com/knowthelist/fhem-tablet-ui
+     *
+     * Copyright (c) 2015-2017 Mario Stephan <mstephan@shared-files.de>
+     * Under MIT License (http://www.opensource.org/licenses/mit-license.php)
+     *
+     * - create a new folder named 'tablet' in /<fhem-path>/www
+     * - copy all files incl. sub folders into /<fhem-path>/www/tablet
+     * - add 'define TABLETUI HTTPSRV ftui ./www/tablet Tablet' in fhem.cfg
+     * - Tadaaa! A new fhem ui in http://<fhem-url>:8083/fhem/tablet/
+     */
+    -->
+    <link rel="icon" href="favicon.ico" type="image/x-icon" />
+
+    <!-- define your personal style here, it wont be overwritten  -->
+    <!-- link rel="stylesheet" href="css/fhem-green-ui.css" / -->
+    <!-- link rel="stylesheet" href="css/fhem-tablet-ui-user.css" / -->
+
+    <script src="js/fhem-tablet-ui.js" defer></script>
+
+
+    <!-- Remove this line to enable for usage with WebViewControl
+    <script defer>var wvcDevices = {'12345': 'Tablet'}; var wvcUserCssFile="webviewcontrol.css"</script>
+    <script src="../pgm2/cordova-2.3.0.js" defer></script>
+    <script src="../pgm2/webviewcontrol.js" defer></script>
+    <!-- End for WebViewControl -->
+
+    <title>FHEM-Tablet-UI</title>
+</head>
+
+<body>
+
+    <div class="gridster">
+        <ul>
+            <li data-row="1" data-col="1" data-sizey="1" data-sizex="1">
+                <header>TREND</header>
+                <div class="sheet">
+                    <div class="row">
+                        <div class="cell">
+                            <div data-type="symbol" data-device="dummy1" data-icons='["fa-arrow-up","fa-arrow-right","fa-arrow-down"]' data-on-colors='["#32a054","#6666cc","#ad3333"]' data-get-on='["Wert1","Wert2","Wert3"]' class=""></div>
+                            <div data-type="label" class="small narrow darker">Status</div>
+                        </div>
+                    </div>
+                </div>
+            </li>
+            <li data-row="2" data-col="1" data-sizex="1" data-sizey="4">
+                <header>GARTEN</header>
+                <div class="sheet">
+                    <div class="row">
+                        <div class="cell">
+                            <div data-type="switch" data-device="GartenLicht" class=""></div>
+                            <div data-type="label" class="">Licht</div>
+                            <div data-type="symbol" data-device="Eingangstuer" class="big"></div>
+                            <div data-type="label" class="">T&#252;r</div>
+                            <div data-type="label" data-device="OutTemp" data-part="2" data-fix="1" data-limits='[-73,10,23]' data-colors='["#6699FF","#AA6900","#FF0000"]' data-unit="%B0C%0A" class="bigger thin top-space-2x"></div>
+                            <div data-type="label" class="">Temperatur</div>
+                            <div data-type="label" class=" darker top-space">Heute</div>
+                            <div data-type="weather" data-device="AgroWeather" data-get="fc0_weatherDay" class=" big"></div>
+                            <div data-type="label" data-device="AgroWeather" data-get="fc0_weatherDay" class="narrow"></div>
+                            <div data-type="label" data-device="AgroWeather" data-get="fc0_tempMax" data-unit="%B0C%0A" class="large"></div>
+                            <div data-type="label" class="darker top-space">Morgen</div>
+                            <div data-type="weather" data-device="AgroWeather" data-get="fc1_weatherDay" class="big"></div>
+                            <div data-type="label" data-device="AgroWeather" data-get="fc1_weatherDay" class="narrow"></div>
+                            <div data-type="label" data-device="AgroWeather" data-get="fc1_tempMax" data-unit="%B0C%0A" class="large"></div>
+                        </div>
+                    </div>
+                </div>
+            </li>
+            <li data-row="1" data-col="2" data-sizey="1" data-sizex="2">
+                <header>BAD</header>
+                <div class="sheet">
+                    <div class="row">
+                        <div class="cell" data-type="thermostat" data-device="BadHeizung_Clima" data-valve="ValvePosition"></div>
+                        <div class="cell">
+                            <div class="big" data-type="symbol" data-device="BadFenster"></div>
+                            <div data-type="label" class="top-narrow  darker small">Fenster</div>
+                        </div>
+                    </div>
+                </div>
+            </li>
+            <li data-row="1" data-col="3" data-sizey="1" data-sizex="2">
+                <header>SCHLAFZIMMER</header>
+                <div class="sheet">
+                    <div class="row">
+                        <div class="cell" data-type="thermostat" data-device="SchlafzimmerHeizung_Clima" data-valve="ValvePosition"></div>
+                        <div class="cell">
+                            <div class="big" data-type="symbol" data-device="SchlafzimmerFenster"></div>
+                            <div data-type="label" class="top-narrow darker small">Fenster</div>
+                        </div>
+                    </div>
+                </div>
+            </li>
+            <li data-row="1" data-col="4" data-sizey="1" data-sizex="2">
+                <header>KINDERZIMMER</header>
+                <div class="sheet">
+                    <div class="row">
+                        <div class="cell" data-type="thermostat" data-device="KinderzimmerHeizung_Clima" data-valve="ValvePosition"></div>
+                        <div class="cell">
+                            <div class="big" data-type="symbol" data-device="KinderzimmerFenster"></div>
+                            <div class="top-narrow  darker small">Fenster</div>
+                        </div>
+                    </div>
+                </div>
+            </li>
+            <li data-row="1" data-col="8" data-sizey="1" data-sizex="1">
+                <header>GALERIE</header>
+                <div data-type="switch" data-device="GalerieLicht" class="cell"></div>
+                <div data-type="label" class="cell">Licht</div>
+            </li>
+            <li data-row="2" data-col="2" data-sizey="2" data-sizex="2">
+                <header>KUECHE</header>
+                <div class="sheet">
+                    <div class="row">
+                        <div class="cell" data-type="thermostat" data-device="KuecheHeizung_Clima" data-valve="ValvePosition"></div>
+                        <div class="cell">
+                            <div data-type="switch" data-device="HerdLicht_Sw"></div>
+                            <div data-type="label">HerdLicht</div>
+                        </div>
+                    </div>
+                    <div class="row">
+                        <div class="cell" data-type="thermostat" data-device="KuecheHeizung2_Clima" data-valve="ValvePosition"></div>
+                        <div class="cell">
+                            <div class="big" data-type="symbol" data-device="KuechenFenster"></div>
+                            <div class="top-narrow  darker small">Fenster</div>
+                        </div>
+                    </div>
+                </div>
+            </li>
+            <li data-row="4" data-col="2" data-sizey="2" data-sizex="2">
+                <header>HOMESTATUS</header>
+                <div class="sheet">
+                    <div class="row">
+                        <div data-type="homestatus" data-device='HomeStatus' data-version='' class="cell"></div>
+                    </div>
+                </div>
+            </li>
+            <li data-row="2" data-col="4" data-sizey="2" data-sizex="4">
+                <header>WOHNZIMMER</header>
+                <div class="sheet">
+                    <div class="row">
+                        <div class="cell" data-type="thermostat" data-device="WohnzimmerHeizung_Clima" data-valve="ValvePosition" data-get="desired-temp" data-temp="measured-temp"></div>
+                        <div class="cell">
+                            <div data-type="label" data-device="THSensorWZ" data-get="temperature" data-limits='[-73,19,23]' data-colors='["#6699FF","#aa6900","#bb6242"]' data-unit="%B0C%0A" class="bigger thin"></div>
+                            <div>Temperatur</div>
+                        </div>
+                        <div class="cell">
+                            <div data-type="label" data-device="THSensorWZ" data-fix="0" data-part="4" data-limits='[0,40,60]' data-colors='["#bb6242","#aa6900","#bb6242"]' data-unit="%" class="bigger thin"></div>
+                            <div>Luftfeuchte</div>
+                        </div>
+                        <div class="cell">
+                            <div data-type="switch" data-device="PowerAV_Sw" class=""></div>
+                            <div>SchrankLicht</div>
+                        </div>
+                    </div>
+                    <div class="row">
+                        <div class="cell" data-type="thermostat" data-device="WohnzimmerHeizung2_Clima" data-valve="ValvePosition" data-get="desired-temp" data-temp="measured-temp"></div>
+                        <div class="cell" data-type="popup" data-width="450px">
+                            <div data-type="simplechart" data-device="THSensorWZ" data-logdevice="FileLog_THSensorWZ" data-columnspec="4:temperature" data-minvalue="15" data-maxvalue="25" data-height="60" data-width="90" class="noticks">
+                            </div>
+                            <div class="dialog">
+                                <header>TEMPERATURE</header>
+                                <div data-type="simplechart" data-device="THSensorWZ" data-logdevice="FileLog_THSensorWZ" data-columnspec="4:temperature" data-minvalue="15" data-maxvalue="25" data-yticks="2" data-height="250">
+                                </div>
+                            </div>
+                        </div>
+                        <div class="cell" data-type="popup" data-width="450px">
+                            <div data-type="simplechart" data-device="THSensorWZ" data-logdevice="FileLog_THSensorWZ" data-columnspec="4:humidity" data-minvalue="0" data-maxvalue="100" data-height="60" data-width="90" class="noticks">
+                            </div>
+                            <div class="dialog">
+                                <header>HUMIDITY</header>
+                                <div data-type="simplechart" data-device="THSensorWZ" data-logdevice="FileLog_THSensorWZ" data-columnspec="4:humidity" data-minvalue="0" data-maxvalue="100" data-yticks="20" data-height="250">
+                                </div>
+                            </div>
+                        </div>
+                        <div class="cell">
+                            <div data-type="dimmer" data-device="HUEDevice1" data-get-on="!off" data-get-off="off" data-set="pct"></div>
+                            <div>Philips</div>
+                        </div>
+
+                    </div>
+                </div>
+            </li>
+            <li data-row="4" data-col="4" data-sizey="2" data-sizex="4">
+                <header>MULTIMEDIA</header>
+                <div class="sheet">
+                    <div class="row-60">
+                        <div class="cell">
+                            <!--left up -->
+                            <div class="sheet">
+                                <div class="row">
+
+                                    <div class="cell-25">Badradio</div>
+                                    <div class="cell-25x" data-type="switch" data-device="BadRadio" data-icon="fa-music"></div>
+                                    <div class="cell-50" data-type="select" data-device="AvReceiverZ2" data-items='["Airplay","Webradio","BD/DVD","PHONO"]' data-get="input" data-set="input"></div>
+                                </div>
+                                <div class="row">
+                                    <div class="cell-25">Radio</div>
+                                    <div class="cell-25" data-type="switch" data-device="RadioAtTablet" data-icon="fa-music"></div>
+                                    <div class="cell-50" data-type="select" data-device="AvReceiver" data-list="inputs" data-get="input" data-set="input"></div>
+                                </div>
+                            </div>
+                            <!-- end left cell -->
+                        </div>
+                        <div class="cell">
+                            <div class="large top-space" data-type="volume" data-device='AvReceiver' data-get='volume' data-set='volume'></div>
+                        </div>
+                    </div>
+                    <div class="row-40">
+                        <div class="cell">
+                            <!--left down -->
+                            <div class="sheet">
+                                <div class="row">
+                                    <div class="cell" data-type="push" data-device="WebRadio" data-icon="fa-step-backward" data-set-on="Prev"></div>
+                                    <div class="cell" data-type="label" data-device="WebRadio">radio</div>
+                                    <div class="cell" data-type="push" data-device="WebRadio" data-icon="fa-step-forward" data-set-on="Next"></div>
+                                </div>
+                            </div>
+                        </div>
+                        <div class="cell">
+                            <!--right down -->
+                            <div class="sheet">
+                                <div class="row">
+                                    <div class="cell">
+                                        <div data-type="switch" data-device="Fernsehen" data-icon="fa-film"></div>
+                                        <div>TV</div>
+                                    </div>
+                                    <div class="cell">
+                                        <div data-type="circlemenu">
+                                            <ul>
+                                                <li>
+                                                    <div data-type="push" data-icon="fa-wrench"></div>
+                                                </li>
+                                                <li>
+                                                    <div data-type="push" data-device="AvReceiver" data-set="remoteControl subwoofer-temporary-level -6" data-icon="">-6</div>
+                                                </li>
+                                                <li>
+                                                    <div data-type="push" data-device="AvReceiver" data-set="remoteControl subwoofer-temporary-level -2" data-icon="">-2</div>
+                                                </li>
+                                                <li>
+                                                    <div data-type="push" data-device="AvReceiver" data-set="remoteControl subwoofer-temporary-level 0" data-icon="">0</div>
+                                                </li>
+                                                <li>
+                                                    <div data-type="push" data-device="AvReceiver" data-set="remoteControl subwoofer-temporary-level +3" data-icon="">2</div>
+                                                </li>
+                                                <li>
+                                                    <div data-type="push" data-device="AvReceiver" data-set="remoteControl subwoofer-temporary-level +9" data-icon="">9</div>
+                                                </li>
+                                                <li>
+                                                    <div data-type="push" data-device="AvReceiver" data-set="remoteControl subwoofer-temporary-level +C" data-icon="">12</div>
+                                                </li>
+                                            </ul>
+                                        </div>
+                                        <div>Woofer</div>
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </li>
+            <li data-row="2" data-col="8" data-sizey="4" data-sizex="1">
+                <header>LIGHTS</header>
+                <div class="sheet">
+                    <div class="row">
+                        <div class="cell">
+                            <div data-type="slider" data-device='Testschalter' data-min="10" data-max="90"></div>
+                            <div>Light1</div>
+                        </div>
+                    </div>
+                    <div class="row">
+                        <div class="cell">
+                            <div data-type="volume" data-device="HUEDevice1" data-min="0" data-max="65353" data-get="hue" data-set="hue" class="hue-tick mini"></div>
+                            <div>Color</div>
+                        </div>
+                    </div>
+                    <div class="row">
+                        <div class="cell">
+                            <div data-type="dimmer" data-device="HUEDevice1" data-get-on="!off" data-get-off="off" data-set="pct" class=""></div>
+                            <div>Hell</div>
+                        </div>
+                    </div>
+                </div>
+
+            </li>
+        </ul>
+    </div>
+</body>
+
+</html>

+ 0 - 5
fhem/data/contrib/dblog/db.conf

@@ -1,5 +0,0 @@
-%dbconfig= (
-	connection => "mysql:database=fhem;host=mysql;port=3306",
-	user => "fhemuser",
-	password => "2jRHnEi3WuNSQAcX7",
-);

+ 0 - 52
fhem/data/fhem.cfg.example

@@ -1,52 +0,0 @@
-attr global userattr DbLogExclude DbLogInclude cmdIcon devStateIcon devStateStyle genericDeviceType:security,ignore,switch,outlet,light,blind,thermometer,thermostat,contact,garage,window,lock homebridgeMapping:textField-long icon sortby webCmd widgetOverride
-attr global autoload_undefined_devices 1
-attr global icon it_network
-attr global logfile -
-attr global modpath .
-attr global motd none
-attr global room System
-attr global sendStatistics onUpdate
-attr global statefile ./log/fhem.save
-attr global updateInBackground 0
-attr global verbose 2
-attr global nofork 1
-attr global perlSyntaxCheck 1
-
-define telnetPort telnet 7072 global
-attr telnetPort room System
-
-define WEB FHEMWEB 8083 global
-attr WEB JavaScripts codemirror/fhem_codemirror.js
-attr WEB editConfig 1
-attr WEB icon it_i-net
-attr WEB menuEntries haus-automatisierung.com,https://haus-automatisierung.com/
-attr WEB plotWeekStartDay 1
-attr WEB room System
-attr WEB roomIcons Homekit:audio_audio Log:edit_paste System:it_network Save.config:message_attention Everything:it_i-net Unsorted:unknown Commandref:system_fhem Remote.doc:message_mail Edit.files:edit_copy Select.style:edit_open Event.monitor:edit_settings
-attr WEB title FHEM Docker (haus-automatisierung.com)
-
-# Fake FileLog entry, to access the fhem log from FHEMWEB
-define Logfile FileLog ./log/fhem-%Y-%m.log fakelog
-attr Logfile icon edit_paste
-attr Logfile room Log
-
-define autocreate autocreate
-attr autocreate filelog ./log/%NAME-%Y.log
-attr autocreate room System
-
-define eventTypes eventTypes ./log/eventTypes.txt
-attr eventTypes room System
-
-# Disable this to avoid looking for new USB devices on startup
-define initialUsbCheck notify global:INITIALIZED usb create
-attr initialUsbCheck room System
-define DBLogging DbLog /opt/fhem/contrib/dblog/db.conf .*:.*
-attr DBLogging icon time_note
-attr DBLogging room Log
-define DBLogging_Reopen at +*00:15:00 set DBLogging reopen
-attr DBLogging_Reopen room Log
-define testSwitch dummy
-attr testSwitch genericDeviceType switch
-attr testSwitch room Homekit
-attr testSwitch setList on off
-attr testSwitch webCmd on:off

+ 1 - 1
fhem/habridge/Dockerfile

@@ -8,4 +8,4 @@ RUN echo Europe/Berlin > /etc/timezone && dpkg-reconfigure tzdata
 
 WORKDIR "/opt/habridge"
 
-CMD java -jar ha-bridge-4.1.4.jar
+CMD java -jar ha-bridge-4.1.4.jar

+ 2 - 0
mqtt/config/conf.d/websockets.conf

@@ -0,0 +1,2 @@
+listener 9001
+protocol websockets

+ 16 - 0
mqtt/config/mosquitto.conf

@@ -0,0 +1,16 @@
+# Place your local configuration in /mqtt/config/conf.d/
+
+pid_file /var/run/mosquitto.pid
+
+persistence true
+persistence_location /mqtt/data/
+
+user root
+
+# Port to use for the default listener.
+port 1883
+
+log_dest file /mqtt/log/mosquitto.log
+log_dest stdout
+
+include_dir /mqtt/config/conf.d

fhem/backup/.gitkeep → mqtt/data/.gitkeep


+ 0 - 0
mqtt/log/.gitkeep


+ 11 - 9
mysql/init.sql

@@ -12,22 +12,24 @@ USE `fhem`;
 
 CREATE TABLE history (
     TIMESTAMP TIMESTAMP,
-    DEVICE varchar(32),
-    TYPE varchar(32),
+    DEVICE varchar(64),
+    TYPE varchar(64),
     EVENT varchar(512),
-    READING varchar(32),
-    VALUE varchar(32),
+    READING varchar(64),
+    VALUE varchar(255),
     UNIT varchar(32),
-    KEY `IDX_HISTORY` (`DEVICE`,`READING`,`TIMESTAMP`,`VALUE`)
+    KEY `IDX_HISTORY` (`DEVICE`,`READING`,`TIMESTAMP`,`VALUE`),
+    KEY `IDX_DEVICE` (`DEVICE`,`READING`),
+    KEY `IDX_REPORT` (`TIMESTAMP`,`READING`) USING BTREE
 );
 
 CREATE TABLE current (
     TIMESTAMP TIMESTAMP,
-    DEVICE varchar(32),
-    TYPE varchar(32),
+    DEVICE varchar(64),
+    TYPE varchar(64),
     EVENT varchar(512),
-    READING varchar(32),
-    VALUE varchar(32),
+    READING varchar(64),
+    VALUE varchar(255),
     UNIT varchar(32)
 );
 

+ 496 - 0
nodered/data/.config.json

@@ -0,0 +1,496 @@
+{
+ "nodes": {
+  "node-red": {
+   "name": "node-red",
+   "version": "0.17.5",
+   "local": false,
+   "nodes": {
+    "sentiment": {
+     "name": "sentiment",
+     "types": [
+      "sentiment"
+     ],
+     "enabled": true,
+     "local": false,
+     "module": "node-red",
+     "file": "/usr/src/node-red/node_modules/node-red/nodes/core/analysis/72-sentiment.js"
+    },
+    "inject": {
+     "name": "inject",
+     "types": [
+      "inject"
+     ],
+     "enabled": true,
+     "local": false,
+     "module": "node-red",
+     "file": "/usr/src/node-red/node_modules/node-red/nodes/core/core/20-inject.js"
+    },
+    "catch": {
+     "name": "catch",
+     "types": [
+      "catch"
+     ],
+     "enabled": true,
+     "local": false,
+     "module": "node-red",
+     "file": "/usr/src/node-red/node_modules/node-red/nodes/core/core/25-catch.js"
+    },
+    "status": {
+     "name": "status",
+     "types": [
+      "status"
+     ],
+     "enabled": true,
+     "local": false,
+     "module": "node-red",
+     "file": "/usr/src/node-red/node_modules/node-red/nodes/core/core/25-status.js"
+    },
+    "debug": {
+     "name": "debug",
+     "types": [
+      "debug"
+     ],
+     "enabled": true,
+     "local": false,
+     "module": "node-red",
+     "file": "/usr/src/node-red/node_modules/node-red/nodes/core/core/58-debug.js"
+    },
+    "link": {
+     "name": "link",
+     "types": [
+      "link in",
+      "link out"
+     ],
+     "enabled": true,
+     "local": false,
+     "module": "node-red",
+     "file": "/usr/src/node-red/node_modules/node-red/nodes/core/core/60-link.js"
+    },
+    "exec": {
+     "name": "exec",
+     "types": [
+      "exec"
+     ],
+     "enabled": true,
+     "local": false,
+     "module": "node-red",
+     "file": "/usr/src/node-red/node_modules/node-red/nodes/core/core/75-exec.js"
+    },
+    "function": {
+     "name": "function",
+     "types": [
+      "function"
+     ],
+     "enabled": true,
+     "local": false,
+     "module": "node-red",
+     "file": "/usr/src/node-red/node_modules/node-red/nodes/core/core/80-function.js"
+    },
+    "template": {
+     "name": "template",
+     "types": [
+      "template"
+     ],
+     "enabled": true,
+     "local": false,
+     "module": "node-red",
+     "file": "/usr/src/node-red/node_modules/node-red/nodes/core/core/80-template.js"
+    },
+    "delay": {
+     "name": "delay",
+     "types": [
+      "delay"
+     ],
+     "enabled": true,
+     "local": false,
+     "module": "node-red",
+     "file": "/usr/src/node-red/node_modules/node-red/nodes/core/core/89-delay.js"
+    },
+    "trigger": {
+     "name": "trigger",
+     "types": [
+      "trigger"
+     ],
+     "enabled": true,
+     "local": false,
+     "module": "node-red",
+     "file": "/usr/src/node-red/node_modules/node-red/nodes/core/core/89-trigger.js"
+    },
+    "comment": {
+     "name": "comment",
+     "types": [
+      "comment"
+     ],
+     "enabled": true,
+     "local": false,
+     "module": "node-red",
+     "file": "/usr/src/node-red/node_modules/node-red/nodes/core/core/90-comment.js"
+    },
+    "unknown": {
+     "name": "unknown",
+     "types": [
+      "unknown"
+     ],
+     "enabled": true,
+     "local": false,
+     "module": "node-red",
+     "file": "/usr/src/node-red/node_modules/node-red/nodes/core/core/98-unknown.js"
+    },
+    "rpi-gpio": {
+     "name": "rpi-gpio",
+     "types": [
+      "rpi-gpio in",
+      "rpi-gpio out",
+      "rpi-mouse",
+      "rpi-keyboard"
+     ],
+     "enabled": true,
+     "local": false,
+     "module": "node-red",
+     "file": "/usr/src/node-red/node_modules/node-red/nodes/core/hardware/36-rpi-gpio.js"
+    },
+    "tls": {
+     "name": "tls",
+     "types": [
+      "tls-config"
+     ],
+     "enabled": true,
+     "local": false,
+     "module": "node-red",
+     "file": "/usr/src/node-red/node_modules/node-red/nodes/core/io/05-tls.js"
+    },
+    "mqtt": {
+     "name": "mqtt",
+     "types": [
+      "mqtt in",
+      "mqtt out",
+      "mqtt-broker"
+     ],
+     "enabled": true,
+     "local": false,
+     "module": "node-red",
+     "file": "/usr/src/node-red/node_modules/node-red/nodes/core/io/10-mqtt.js"
+    },
+    "httpin": {
+     "name": "httpin",
+     "types": [
+      "http in",
+      "http response"
+     ],
+     "enabled": true,
+     "local": false,
+     "module": "node-red",
+     "file": "/usr/src/node-red/node_modules/node-red/nodes/core/io/21-httpin.js"
+    },
+    "httprequest": {
+     "name": "httprequest",
+     "types": [
+      "http request"
+     ],
+     "enabled": true,
+     "local": false,
+     "module": "node-red",
+     "file": "/usr/src/node-red/node_modules/node-red/nodes/core/io/21-httprequest.js"
+    },
+    "websocket": {
+     "name": "websocket",
+     "types": [
+      "websocket in",
+      "websocket out",
+      "websocket-listener",
+      "websocket-client"
+     ],
+     "enabled": true,
+     "local": false,
+     "module": "node-red",
+     "file": "/usr/src/node-red/node_modules/node-red/nodes/core/io/22-websocket.js"
+    },
+    "watch": {
+     "name": "watch",
+     "types": [
+      "watch"
+     ],
+     "enabled": true,
+     "local": false,
+     "module": "node-red",
+     "file": "/usr/src/node-red/node_modules/node-red/nodes/core/io/23-watch.js"
+    },
+    "tcpin": {
+     "name": "tcpin",
+     "types": [
+      "tcp in",
+      "tcp out",
+      "tcp request"
+     ],
+     "enabled": true,
+     "local": false,
+     "module": "node-red",
+     "file": "/usr/src/node-red/node_modules/node-red/nodes/core/io/31-tcpin.js"
+    },
+    "udp": {
+     "name": "udp",
+     "types": [
+      "udp in",
+      "udp out"
+     ],
+     "enabled": true,
+     "local": false,
+     "module": "node-red",
+     "file": "/usr/src/node-red/node_modules/node-red/nodes/core/io/32-udp.js"
+    },
+    "switch": {
+     "name": "switch",
+     "types": [
+      "switch"
+     ],
+     "enabled": true,
+     "local": false,
+     "module": "node-red",
+     "file": "/usr/src/node-red/node_modules/node-red/nodes/core/logic/10-switch.js"
+    },
+    "change": {
+     "name": "change",
+     "types": [
+      "change"
+     ],
+     "enabled": true,
+     "local": false,
+     "module": "node-red",
+     "file": "/usr/src/node-red/node_modules/node-red/nodes/core/logic/15-change.js"
+    },
+    "range": {
+     "name": "range",
+     "types": [
+      "range"
+     ],
+     "enabled": true,
+     "local": false,
+     "module": "node-red",
+     "file": "/usr/src/node-red/node_modules/node-red/nodes/core/logic/16-range.js"
+    },
+    "split": {
+     "name": "split",
+     "types": [
+      "split",
+      "join"
+     ],
+     "enabled": true,
+     "local": false,
+     "module": "node-red",
+     "file": "/usr/src/node-red/node_modules/node-red/nodes/core/logic/17-split.js"
+    },
+    "CSV": {
+     "name": "CSV",
+     "types": [
+      "csv"
+     ],
+     "enabled": true,
+     "local": false,
+     "module": "node-red",
+     "file": "/usr/src/node-red/node_modules/node-red/nodes/core/parsers/70-CSV.js"
+    },
+    "HTML": {
+     "name": "HTML",
+     "types": [
+      "html"
+     ],
+     "enabled": true,
+     "local": false,
+     "module": "node-red",
+     "file": "/usr/src/node-red/node_modules/node-red/nodes/core/parsers/70-HTML.js"
+    },
+    "JSON": {
+     "name": "JSON",
+     "types": [
+      "json"
+     ],
+     "enabled": true,
+     "local": false,
+     "module": "node-red",
+     "file": "/usr/src/node-red/node_modules/node-red/nodes/core/parsers/70-JSON.js"
+    },
+    "XML": {
+     "name": "XML",
+     "types": [
+      "xml"
+     ],
+     "enabled": true,
+     "local": false,
+     "module": "node-red",
+     "file": "/usr/src/node-red/node_modules/node-red/nodes/core/parsers/70-XML.js"
+    },
+    "YAML": {
+     "name": "YAML",
+     "types": [
+      "yaml"
+     ],
+     "enabled": true,
+     "local": false,
+     "module": "node-red",
+     "file": "/usr/src/node-red/node_modules/node-red/nodes/core/parsers/70-YAML.js"
+    },
+    "tail": {
+     "name": "tail",
+     "types": [
+      "tail"
+     ],
+     "enabled": true,
+     "local": false,
+     "module": "node-red",
+     "file": "/usr/src/node-red/node_modules/node-red/nodes/core/storage/28-tail.js"
+    },
+    "file": {
+     "name": "file",
+     "types": [
+      "file",
+      "file in"
+     ],
+     "enabled": true,
+     "local": false,
+     "module": "node-red",
+     "file": "/usr/src/node-red/node_modules/node-red/nodes/core/storage/50-file.js"
+    }
+   }
+  },
+  "node-red-node-base64": {
+   "name": "node-red-node-base64",
+   "version": "0.0.8",
+   "local": false,
+   "nodes": {
+    "base64": {
+     "name": "base64",
+     "types": [
+      "base64"
+     ],
+     "enabled": true,
+     "local": false,
+     "module": "node-red-node-base64",
+     "file": "/usr/src/node-red/node_modules/node-red-node-base64/70-base64.js"
+    }
+   }
+  },
+  "node-red-node-email": {
+   "name": "node-red-node-email",
+   "version": "0.1.24",
+   "local": false,
+   "nodes": {
+    "email": {
+     "name": "email",
+     "types": [
+      "e-mail",
+      "e-mail in"
+     ],
+     "enabled": true,
+     "local": false,
+     "module": "node-red-node-email",
+     "file": "/usr/src/node-red/node_modules/node-red-node-email/61-email.js"
+    }
+   }
+  },
+  "node-red-node-feedparser": {
+   "name": "node-red-node-feedparser",
+   "version": "0.1.8",
+   "local": false,
+   "nodes": {
+    "feedparse": {
+     "name": "feedparse",
+     "types": [
+      "feedparse"
+     ],
+     "enabled": true,
+     "local": false,
+     "module": "node-red-node-feedparser",
+     "file": "/usr/src/node-red/node_modules/node-red-node-feedparser/32-feedparse.js"
+    }
+   }
+  },
+  "node-red-node-msgpack": {
+   "name": "node-red-node-msgpack",
+   "version": "1.0.1",
+   "local": false,
+   "nodes": {
+    "msgpack": {
+     "name": "msgpack",
+     "types": [
+      "msgpack"
+     ],
+     "enabled": true,
+     "local": false,
+     "module": "node-red-node-msgpack",
+     "file": "/usr/src/node-red/node_modules/node-red-node-msgpack/70-msgpack.js"
+    }
+   }
+  },
+  "node-red-node-random": {
+   "name": "node-red-node-random",
+   "version": "0.0.8",
+   "local": false,
+   "nodes": {
+    "random": {
+     "name": "random",
+     "types": [
+      "random"
+     ],
+     "enabled": true,
+     "local": false,
+     "module": "node-red-node-random",
+     "file": "/usr/src/node-red/node_modules/node-red-node-random/random.js"
+    }
+   }
+  },
+  "node-red-node-rbe": {
+   "name": "node-red-node-rbe",
+   "version": "0.1.13",
+   "local": false,
+   "nodes": {
+    "rbe": {
+     "name": "rbe",
+     "types": [
+      "rbe"
+     ],
+     "enabled": true,
+     "local": false,
+     "module": "node-red-node-rbe",
+     "file": "/usr/src/node-red/node_modules/node-red-node-rbe/rbe.js"
+    }
+   }
+  },
+  "node-red-node-suncalc": {
+   "name": "node-red-node-suncalc",
+   "version": "0.0.10",
+   "local": false,
+   "nodes": {
+    "suncalc": {
+     "name": "suncalc",
+     "types": [
+      "sunrise"
+     ],
+     "enabled": true,
+     "local": false,
+     "module": "node-red-node-suncalc",
+     "file": "/usr/src/node-red/node_modules/node-red-node-suncalc/79-suncalc.js"
+    }
+   }
+  },
+  "node-red-node-twitter": {
+   "name": "node-red-node-twitter",
+   "version": "0.1.12",
+   "local": false,
+   "nodes": {
+    "twitter": {
+     "name": "twitter",
+     "types": [
+      "twitter-credentials",
+      "twitter in",
+      "twitter out"
+     ],
+     "enabled": true,
+     "local": false,
+     "module": "node-red-node-twitter",
+     "file": "/usr/src/node-red/node_modules/node-red-node-twitter/27-twitter.js"
+    }
+   }
+  }
+ },
+ "_credentialSecret": "1eccf44c4ad441ad0f1ba0b4dcdf82700e8a3daa858586d3572acb875ece039f"
+}

+ 1 - 0
nodered/data/.gitignore

@@ -0,0 +1 @@
+.sessions.json

+ 1 - 0
nodered/data/flows.json

@@ -0,0 +1 @@
+[{"id":"d71dd7af.4738c8","type":"tab","label":"Flow 1"},{"id":"55d1bc8.84d6444","type":"mqtt-broker","z":"","broker":"mqtt","port":"1883","clientid":"node-red","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""}]

+ 1 - 0
nodered/data/flows_cred.json

@@ -0,0 +1 @@
+{"$":"e44db47a3a1f368b8ea5fa468f219a45hb2t/mHXd9v4YJx3awtyFx0AJqO/YA=="}

+ 5 - 0
nodered/data/package.json

@@ -0,0 +1,5 @@
+{
+    "name": "node-red-project",
+    "description": "A Node-RED Project",
+    "version": "0.0.1"
+}

+ 232 - 0
nodered/data/settings.js

@@ -0,0 +1,232 @@
+/**
+ * Copyright JS Foundation and other contributors, http://js.foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ **/
+
+// The `https` setting requires the `fs` module. Uncomment the following
+// to make it available:
+//var fs = require("fs");
+
+module.exports = {
+    // the tcp port that the Node-RED web server is listening on
+    uiPort: process.env.PORT || 1880,
+
+    // By default, the Node-RED UI accepts connections on all IPv4 interfaces.
+    // The following property can be used to listen on a specific interface. For
+    // example, the following would only allow connections from the local machine.
+    //uiHost: "127.0.0.1",
+
+    // Retry time in milliseconds for MQTT connections
+    mqttReconnectTime: 15000,
+
+    // Retry time in milliseconds for Serial port connections
+    serialReconnectTime: 15000,
+
+    // Retry time in milliseconds for TCP socket connections
+    //socketReconnectTime: 10000,
+
+    // Timeout in milliseconds for TCP server socket connections
+    //  defaults to no timeout
+    //socketTimeout: 120000,
+
+    // Timeout in milliseconds for HTTP request connections
+    //  defaults to 120 seconds
+    //httpRequestTimeout: 120000,
+
+    // The maximum length, in characters, of any message sent to the debug sidebar tab
+    debugMaxLength: 1000,
+
+    // To disable the option for using local files for storing keys and certificates in the TLS configuration
+    //  node, set this to true
+    //tlsConfigDisableLocalFiles: true,
+
+    // Colourise the console output of the debug node
+    //debugUseColors: true,
+
+    // The file containing the flows. If not set, it defaults to flows_<hostname>.json
+    //flowFile: 'flows.json',
+
+    // To enabled pretty-printing of the flow within the flow file, set the following
+    //  property to true:
+    //flowFilePretty: true,
+
+    // By default, credentials are encrypted in storage using a generated key. To
+    // specify your own secret, set the following property.
+    // If you want to disable encryption of credentials, set this property to false.
+    // Note: once you set this property, do not change it - doing so will prevent
+    // node-red from being able to decrypt your existing credentials and they will be
+    // lost.
+    //credentialSecret: "a-secret-key",
+
+    // By default, all user data is stored in the Node-RED install directory. To
+    // use a different location, the following property can be used
+    //userDir: '/home/nol/.node-red/',
+
+    // Node-RED scans the `nodes` directory in the install directory to find nodes.
+    // The following property can be used to specify an additional directory to scan.
+    //nodesDir: '/home/nol/.node-red/nodes',
+
+    // By default, the Node-RED UI is available at http://localhost:1880/
+    // The following property can be used to specifiy a different root path.
+    // If set to false, this is disabled.
+    //httpAdminRoot: '/admin',
+
+    // Some nodes, such as HTTP In, can be used to listen for incoming http requests.
+    // By default, these are served relative to '/'. The following property
+    // can be used to specifiy a different root path. If set to false, this is
+    // disabled.
+    //httpNodeRoot: '/red-nodes',
+
+    // The following property can be used in place of 'httpAdminRoot' and 'httpNodeRoot',
+    // to apply the same root to both parts.
+    //httpRoot: '/red',
+
+    // When httpAdminRoot is used to move the UI to a different root path, the
+    // following property can be used to identify a directory of static content
+    // that should be served at http://localhost:1880/.
+    //httpStatic: '/home/nol/node-red-static/',
+
+    // The maximum size of HTTP request that will be accepted by the runtime api.
+    // Default: 5mb
+    //apiMaxLength: '5mb',
+
+    // If you installed the optional node-red-dashboard you can set it's path
+    // relative to httpRoot
+    //ui: { path: "ui" },
+
+    // Securing Node-RED
+    // -----------------
+    // To password protect the Node-RED editor and admin API, the following
+    // property can be used. See http://nodered.org/docs/security.html for details.
+    //adminAuth: {
+    //    type: "credentials",
+    //    users: [{
+    //        username: "admin",
+    //        password: "$2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN.",
+    //        permissions: "*"
+    //    }]
+    //},
+
+    // To password protect the node-defined HTTP endpoints (httpNodeRoot), or
+    // the static content (httpStatic), the following properties can be used.
+    // The pass field is a bcrypt hash of the password.
+    // See http://nodered.org/docs/security.html#generating-the-password-hash
+    //httpNodeAuth: {user:"user",pass:"$2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN."},
+    //httpStaticAuth: {user:"user",pass:"$2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN."},
+
+    // The following property can be used to enable HTTPS
+    // See http://nodejs.org/api/https.html#https_https_createserver_options_requestlistener
+    // for details on its contents.
+    // See the comment at the top of this file on how to load the `fs` module used by
+    // this setting.
+    //
+    //https: {
+    //    key: fs.readFileSync('privatekey.pem'),
+    //    cert: fs.readFileSync('certificate.pem')
+    //},
+
+    // The following property can be used to cause insecure HTTP connections to
+    // be redirected to HTTPS.
+    //requireHttps: true
+
+    // The following property can be used to disable the editor. The admin API
+    // is not affected by this option. To disable both the editor and the admin
+    // API, use either the httpRoot or httpAdminRoot properties
+    //disableEditor: false,
+
+    // The following property can be used to configure cross-origin resource sharing
+    // in the HTTP nodes.
+    // See https://github.com/troygoode/node-cors#configuration-options for
+    // details on its contents. The following is a basic permissive set of options:
+    //httpNodeCors: {
+    //    origin: "*",
+    //    methods: "GET,PUT,POST,DELETE"
+    //},
+
+    // If you need to set an http proxy please set an environment variable
+    // called http_proxy (or HTTP_PROXY) outside of Node-RED in the operating system.
+    // For example - http_proxy=http://myproxy.com:8080
+    // (Setting it here will have no effect)
+    // You may also specify no_proxy (or NO_PROXY) to supply a comma separated
+    // list of domains to not proxy, eg - no_proxy=.acme.co,.acme.co.uk
+
+    // The following property can be used to add a custom middleware function
+    // in front of all http in nodes. This allows custom authentication to be
+    // applied to all http in nodes, or any other sort of common request processing.
+    //httpNodeMiddleware: function(req,res,next) {
+    //    // Handle/reject the request, or pass it on to the http in node by calling next();
+    //    // Optionally skip our rawBodyParser by setting this to true;
+    //    //req.skipRawBodyParser = true;
+    //    next();
+    //},
+
+    // The following property can be used to verify websocket connection attempts.
+    // This allows, for example, the HTTP request headers to be checked to ensure
+    // they include valid authentication information.
+    //webSocketNodeVerifyClient: function(info) {
+    //    // 'info' has three properties:
+    //    //   - origin : the value in the Origin header
+    //    //   - req : the HTTP request
+    //    //   - secure : true if req.connection.authorized or req.connection.encrypted is set
+    //    //
+    //    // The function should return true if the connection should be accepted, false otherwise.
+    //    //
+    //    // Alternatively, if this function is defined to accept a second argument, callback,
+    //    // it can be used to verify the client asynchronously.
+    //    // The callback takes three arguments:
+    //    //   - result : boolean, whether to accept the connection or not
+    //    //   - code : if result is false, the HTTP error status to return
+    //    //   - reason: if result is false, the HTTP reason string to return
+    //},
+
+    // Anything in this hash is globally available to all functions.
+    // It is accessed as context.global.
+    // eg:
+    //    functionGlobalContext: { os:require('os') }
+    // can be accessed in a function block as:
+    //    context.global.os
+
+    functionGlobalContext: {
+        // os:require('os'),
+        // octalbonescript:require('octalbonescript'),
+        // jfive:require("johnny-five"),
+        // j5board:require("johnny-five").Board({repl:false})
+    },
+
+    // The following property can be used to order the categories in the editor
+    // palette. If a node's category is not in the list, the category will get
+    // added to the end of the palette.
+    // If not set, the following default order is used:
+    //paletteCategories: ['subflows', 'input', 'output', 'function', 'social', 'mobile', 'storage', 'analysis', 'advanced'],
+
+    // Configure the logging output
+    logging: {
+        // Only console logging is currently supported
+        console: {
+            // Level of logging to be recorded. Options are:
+            // fatal - only those errors which make the application unusable should be recorded
+            // error - record errors which are deemed fatal for a particular request + fatal errors
+            // warn - record problems which are non fatal + errors + fatal errors
+            // info - record information about the general running of the application + warn + error + fatal errors
+            // debug - record information which is more verbose than info + info + warn + error + fatal errors
+            // trace - record very detailed logging + debug + info + warn + error + fatal errors
+            // off - turn off all logging (doesn't affect metrics or audit)
+            level: "info",
+            // Whether or not to include metric events in the log output
+            metrics: false,
+            // Whether or not to include audit events in the log output
+            audit: false
+        }
+    }
+}