--- /dev/null
+KNX-SW-Projekte
+===============
+
+https://github.com/franckmarini/KnxDevice
+Adurino + TPUART = KNX-Device
+
+https://github.com/thelsing/knx
+Adurino/Linux KNX Device Stack
+
+https://github.com/takeshixx/knxmap
+Python IP/KNX Busmonitor
+
+https://github.com/calimero-project/calimero-core
+Java KNX-Access
+
+https://github.com/calimero-project/calimero-server
+Java KNX-Server
+
+https://github.com/mfussenegger/knx
+Python i/f to knxd
+
+https://github.com/open-homeautomation/pknx
+Python access to knx via KNX-IP-Interface
+
+Hardware
+========
+www.Freebus.org
+Selbstbau-KNX-Devices
+- 4-Kanal-Temperatursensor
+
+https://www.dehof.de/eib/DE/raspi.htm
+Einfachere TPUART-Schnittstelle
+
--- /dev/null
+##############################################
+# $Id: myUtilsTemplate.pm 7570 2015-01-14 18:31:44Z rudolfkoenig $
+#
+# Save this file as 99_myUtils.pm, and create your own functions in the new
+# file. They are then available in every Perl expression.
+
+package main;
+
+use strict;
+use warnings;
+use POSIX;
+
+sub
+myUtils_Initialize($$)
+{
+ my ($hash) = @_;
+}
+
+# Enter you functions below _this_ line.
+
+sub setHeizstatus {
+ my $heizstatus = shift;
+ my $force = shift;
+
+ # parameter check
+ die ("Ungültiger Heizstatus (1 .. 4)") if ($heizstatus < 1 or $heizstatus > 4);
+
+ # status check
+ my $hstat = Value("KNX_0000001");
+ if ($hstat == 4 or $hstat == 1) {
+ # Frostschutz/Aufheizen
+ if (!defined($force)) {
+ die "setHeizstatus nicht ausgeführt, da Frostschutz/Aufheizbetrieb. Setze mit '(F)orce'.";
+ }
+ }
+ fhem("set KNX_0000001 g1 $heizstatus");
+ Log(1, "Set Heizstatus to $heizstatus");
+ fhem("set KNX_LED1 g1 off");
+ fhem("set KNX_LED2 g1 off");
+ fhem("set KNX_LED3 g1 off");
+ fhem("set KNX_LED4 g1 off");
+
+ fhem("set KNX_LED1 g1 on") if ($heizstatus == 1);
+ fhem("set KNX_LED2 g1 on") if ($heizstatus == 2);
+ fhem("set KNX_LED3 g1 on") if ($heizstatus == 3);
+ fhem("set KNX_LED4 g1 on") if ($heizstatus == 4);
+}
+1;
--- /dev/null
+attr global userattr cmdIcon devStateIcon devStateIcon:textField-long devStateStyle icon sortby webCmd webCmdLabel:textField-long widgetOverride
+attr global autoload_undefined_devices 1
+attr global autosave 0
+attr global logfile ./log/fhem-%Y-%m.log
+attr global modpath .
+attr global motd SecurityCheck:\
+ telnetPort is not password protected\
+\
+Protect this FHEM installation by configuring the allowed device allowed_WEB\
+You can disable this message with attr global motd none
+attr global statefile ./log/fhem.save
+attr global verbose 3
+
+define WEB FHEMWEB 8083 global
+setuuid WEB 5d07a041-f33f-d703-bb00-f5a252e8b7a1a442
+attr WEB editConfig 1
+define allowed_WEB allowed
+setuuid allowed_WEB 5d07a041-f33f-d703-11a1-1b4c3372df08fe0f
+attr allowed_WEB basicAuth cmFpbmVyOkZpbmtlbndlZzU=
+attr allowed_WEB validFor WEB
+
+# Fake FileLog entry, to access the fhem log from FHEMWEB
+define Logfile FileLog ./log/fhem-%Y-%m.log fakelog
+setuuid Logfile 5d07a041-f33f-d703-9c49-a9ebbdff8eb16730
+
+define autocreate autocreate
+setuuid autocreate 5d07a041-f33f-d703-e88f-8ceeb477d5e04772
+attr autocreate filelog ./log/%NAME-%Y.log
+
+define eventTypes eventTypes ./log/eventTypes.txt
+setuuid eventTypes 5d07a041-f33f-d703-e43c-930c656ddea2cd5a
+
+# Disable this to avoid looking for new USB devices on startup
+define initialUsbCheck notify global:INITIALIZED usb create
+setuuid initialUsbCheck 5d07a041-f33f-d703-f259-0751a20adc04fee2
+define RPi GPIO4 BUSMASTER
+setuuid RPi 5d07a041-f33f-d703-88e1-d3df5301a9a2810c
+define KellerTemp GPIO4 28-00000a54cd2a
+setuuid KellerTemp 5d07a041-f33f-d703-1079-da21805d0c596460
+attr KellerTemp model DS18B20
+attr KellerTemp room Temperaturen
+attr KellerTemp tempOffset -1.0
+define KNX TUL tul:/dev/ttyACM0@57600 1.1.255
+setuuid KNX 5d07a18b-f33f-d703-97fe-8c0cc64740b9ed0b
+define KNX_0000003 KNX 0/0/3:dpt9.001
+setuuid KNX_0000003 5d07a2ce-f33f-d703-92d0-f28f6329df06b1bd
+attr KNX_0000003 IODev KNX
+attr KNX_0000003 alias WohnzimmerTemp
+attr KNX_0000003 room KNX,Temperaturen
+define FileLog_KNX_0000003 FileLog ./log/KNX_0000003-%m.%Y.log KNX_0000003
+setuuid FileLog_KNX_0000003 5d07a3fa-f33f-d703-dea3-fe2cadc45a732339
+attr FileLog_KNX_0000003 logtype text
+attr FileLog_KNX_0000003 room KNX
+define KNX_0000001 KNX 0/0/1:dpt6
+setuuid KNX_0000001 5d07a446-f33f-d703-512c-cdd3a079a055c862
+attr KNX_0000001 IODev KNX
+attr KNX_0000001 room KNX
+define KNX_0000002 KNX 0/0/2:dpt9
+setuuid KNX_0000002 5d07a44c-f33f-d703-ce64-672cadeabf414018
+attr KNX_0000002 IODev KNX
+attr KNX_0000002 room KNX
+define FileLog_KNX_0000001 FileLog ./log/KNX_0000001-%Y.log KNX_0000001
+setuuid FileLog_KNX_0000001 5d07a44c-f33f-d703-6fee-cbbab18f34c5eb89
+attr FileLog_KNX_0000001 logtype text
+attr FileLog_KNX_0000001 room KNX
+define KNX_LED2 KNX 0/1/2:dpt1.001
+setuuid KNX_LED2 5d07b290-f33f-d703-f038-0ddf855521469d08
+attr KNX_LED2 IODev KNX
+attr KNX_LED2 room KNX
+define KNX_LED3 KNX 0/1/3:dpt1.001
+setuuid KNX_LED3 5d07b298-f33f-d703-5783-d5d6fb7d3b39a5ff
+attr KNX_LED3 IODev KNX
+attr KNX_LED3 room KNX
+define KNX_LED4 KNX 0/1/4:dpt1.001
+setuuid KNX_LED4 5d07b2a2-f33f-d703-7018-de5d38adf8813077
+attr KNX_LED4 IODev KNX
+attr KNX_LED4 room KNX
+define KNX_LED1 KNX 0/1/1:dpt1.001
+setuuid KNX_LED1 5d07b2c5-f33f-d703-9842-8a48f65177f4c666
+attr KNX_LED1 IODev KNX
+attr KNX_LED1 room KNX
+define FileLog_KNX_0000002 FileLog ./log/KNX_0000002-%Y.log KNX_0000002
+setuuid FileLog_KNX_0000002 5d07b42b-f33f-d703-fcc1-a4ef9876715dea5f
+attr FileLog_KNX_0000002 logtype text
+attr FileLog_KNX_0000002 room KNX
+define KNX_0000002_notify_1 notify KNX_0000001:getG1:..* \
+\
+{ \
+my $heizstatus = $EVTPART1;;\
+Log 1, "processing $heizstatus";;\
+fhem("set KNX_LED1 g1 off");;\
+Log 1, "LED1 off";;\
+fhem("set KNX_LED2 g1 off");;\
+Log 1, "LED2 off";;\
+fhem("set KNX_LED3 g1 off");;\
+Log 1, "LED3 off";;\
+fhem("set KNX_LED4 g1 off");;\
+Log 1, "LED4 off";;\
+\
+fhem("set KNX_LED1 g1 on") if ($heizstatus == 1);;\
+fhem("set KNX_LED2 g1 on") if ($heizstatus == 2);;\
+fhem("set KNX_LED3 g1 on") if ($heizstatus == 3);;\
+fhem("set KNX_LED4 g1 on") if ($heizstatus == 4);;\
+Log 1, "LED set";;\
+}\
+
+setuuid KNX_0000002_notify_1 5d07f609-f33f-d703-d7ab-35661dde8ebe4b02
+define KNX_0003188 KNX 0/3/188:MODEL_NOT_DEFINED
+setuuid KNX_0003188 5d08b7d7-f33f-d703-97e6-db5c03954880ba87
+attr KNX_0003188 IODev KNX
+attr KNX_0003188 room KNX
+define FileLog_KNX_0003188 FileLog ./log/KNX_0003188-%Y.log KNX_0003188
+setuuid FileLog_KNX_0003188 5d08b7d7-f33f-d703-edc8-4501566baeec6d7c
+attr FileLog_KNX_0003188 logtype text
+attr FileLog_KNX_0003188 room KNX
+define telnetPort telnet 7072 global
+setuuid telnetPort 5df68b4a-f33f-d703-4f7b-cb3742bcd8220943
--- /dev/null
+Sysal-Stub installieren
+
+!|test.util.CallScript|
+|call script|sudo bin/install-sysal-stub|
+
+Anmerkung: Falls eine komplett neue Installation des sysal-stub erzwungen werden soll:
+sudo rm /etc/apache2/sites-available/sysal_stub.conf
+ausführen.
--- /dev/null
+<?xml version="1.0"?>
+<properties>
+ <Edit>true</Edit>
+ <Files>true</Files>
+ <Properties>true</Properties>
+ <RecentChanges>true</RecentChanges>
+ <Refactor>true</Refactor>
+ <Search>true</Search>
+ <Test/>
+ <Versions>true</Versions>
+ <WhereUsed>true</WhereUsed>
+</properties>
--- /dev/null
+Install Watchdog
+
+!|test.util.CallScript|
+|call script|xfhem define watchdog localhost|
+
+Entferne Sysal-Stub-Output
+|call script|!-sudo rm /var/test/sysal-stub.out || true -!|
+
+Verkürze Zeit
+|call script|/opt/fhem/fhem.pl 7072 "modify watchdog +*00:00:05"|
+
+Warte Auslösezeit
+|call script|sleep 6|
+
+Prüfe Watchdog
+|call script|grep rwd /var/test/sysal-stub.out|
+
+Entferne Watchdog
+|call script|xfhem delete watchdog|
+
--- /dev/null
+<?xml version="1.0"?>
+<properties>
+ <Edit>true</Edit>
+ <Files>true</Files>
+ <Properties>true</Properties>
+ <RecentChanges>true</RecentChanges>
+ <Refactor>true</Refactor>
+ <Search>true</Search>
+ <Test>true</Test>
+ <Versions>true</Versions>
+ <WhereUsed>true</WhereUsed>
+</properties>
--- /dev/null
+#!contents -R2 -g -p -f -h
+!contents
--- /dev/null
+<?xml version="1.0"?>
+<properties>
+ <Edit/>
+ <Files/>
+ <Help></Help>
+ <Properties/>
+ <RecentChanges/>
+ <Refactor/>
+ <Search/>
+ <Suite/>
+ <Suites></Suites>
+ <Versions/>
+ <WhereUsed/>
+</properties>
--- /dev/null
+#!/bin/bash
+set -e
+
+# test if apache-conf already installed
+if [ -e /etc/apache2/sites-enabled/sysal_stub.conf ]
+then
+ exit
+fi
+
+mkdir -p /var/test
+chmod 777 /var/test
+
+cwd=$(pwd)
+# write apache conf
+echo "# Apache conf for sysal stub
+Alias /sysal/rest/AlarmInterface/RemoteWatchdog $cwd/bin/sysal-stub.pl
+<Directory $cwd/bin>
+ Require all granted
+ Options +ExecCGI
+ AddHandler cgi-script .pl
+</Directory>
+" > /etc/apache2/sites-available/sysal_stub.conf
+a2ensite sysal_stub
+a2enmod cgi
+
+systemctl restart apache2
+
--- /dev/null
+#!/usr/bin/perl -w
+
+print "Content-type: text/html\n\n";
+print "<html><body>\n";
+
+
+open (OUT, ">/var/test/sysal-stub.out");
+while (my $line = <STDIN>) {
+ print OUT "$line\n";
+ print "$line\n";
+}
+
+print "</body></html>\n";
+
--- /dev/null
+attr global userattr cmdIcon devStateIcon devStateStyle icon sortby webCmd webCmdLabel:textField-long widgetOverride
+attr global autoload_undefined_devices 1
+attr global logfile ./log/fhem-%Y-%m.log
+attr global modpath .
+attr global motd none
+attr global statefile ./log/fhem.save
+attr global updateInBackground 1
+attr global verbose 3
+
+define telnetPort telnet 7072 global
+
+define WEB FHEMWEB 8083 global
+attr WEB icon it_i-net
+
+define WEBphone FHEMWEB 8084 global
+attr WEBphone stylesheetPrefix smallscreen
+
+define WEBtablet FHEMWEB 8085 global
+attr WEBtablet stylesheetPrefix touchpad
+
+# Fake FileLog entry, to access the fhem log from FHEMWEB
+define Logfile FileLog ./log/fhem-%Y-%m.log fakelog
+
+define autocreate autocreate
+attr autocreate filelog ./log/%NAME-%Y.log
+
+define eventTypes eventTypes ./log/eventTypes.txt
+
+# Disable this to avoid looking for new USB devices on startup
+define initialUsbCheck notify global:INITIALIZED usb create
+define hmUART HMUARTLGW /dev/ttyAMA0
+attr hmUART hmId 651487
+attr hmUART room CUL_HM
+define HM.Saal.Wandthermostat CUL_HM 633FF9
+attr HM.Saal.Wandthermostat IODev hmUART
+attr HM.Saal.Wandthermostat actCycle 000:10
+attr HM.Saal.Wandthermostat actStatus alive
+attr HM.Saal.Wandthermostat autoReadReg 4_reqStatus
+attr HM.Saal.Wandthermostat expert 3_allReg+raw
+attr HM.Saal.Wandthermostat firmware 1.3
+attr HM.Saal.Wandthermostat model HM-TC-IT-WM-W-EU
+attr HM.Saal.Wandthermostat msgRepeat 1
+attr HM.Saal.Wandthermostat room Heizung,CUL_HM
+attr HM.Saal.Wandthermostat serialNr OEQ1675256
+attr HM.Saal.Wandthermostat subType thermostat
+attr HM.Saal.Wandthermostat webCmd getConfig:clear msgEvents
+define FileLog_HM.Saal.Wandthermostat FileLog ./log/HM.Saal.Wandthermostat-%Y.%m.log HM.Saal.Wandthermostat
+attr FileLog_HM.Saal.Wandthermostat logtype text
+attr FileLog_HM.Saal.Wandthermostat room Logfiles
+define HM.Saal.Wandthermostat_Weather CUL_HM 633FF901
+attr HM.Saal.Wandthermostat_Weather model HM-TC-IT-WM-W-EU
+attr HM.Saal.Wandthermostat_Weather peerIDs 00000000,
+define HM.Saal.Wandthermostat_Climate CUL_HM 633FF902
+attr HM.Saal.Wandthermostat_Climate model HM-TC-IT-WM-W-EU
+attr HM.Saal.Wandthermostat_Climate peerIDs 00000000,
+attr HM.Saal.Wandthermostat_Climate room Heizung
+define HM.Saal.Wandthermostat_WindowRec CUL_HM 633FF903
+attr HM.Saal.Wandthermostat_WindowRec model HM-TC-IT-WM-W-EU
+attr HM.Saal.Wandthermostat_WindowRec peerIDs 00000000,
+attr HM.Saal.Wandthermostat_WindowRec stateFormat last:trigLast
+define HM.Saal.Wandthermostat_remote CUL_HM 633FF906
+attr HM.Saal.Wandthermostat_remote model HM-TC-IT-WM-W-EU
+attr HM.Saal.Wandthermostat_remote peerIDs 00000000,
+define HM.Saal.Wandthermostat_SwitchTr CUL_HM 633FF907
+attr HM.Saal.Wandthermostat_SwitchTr model HM-TC-IT-WM-W-EU
+attr HM.Saal.Wandthermostat_SwitchTr peerIDs 00000000,
+define ActionDetector CUL_HM 000000
+attr ActionDetector event-on-change-reading .*
+attr ActionDetector model ActionDetector
+define EIB TUL tul:/dev/ttyACM0@57600 1.1.255
+attr EIB room KNX
+define HzTimer at *03:59 set HM.Saal.Wandthermostat_Climate controlMode auto
+attr HzTimer room Timer,Heizung
+attr HzTimer webCmd active:inactive
+define SetSollTemp KNX 1/1/0:dpt9.001
+attr SetSollTemp IODev EIB
+attr SetSollTemp room Heizung,KNX
+define SetIstTemp KNX 1/1/1:dpt9.001
+attr SetIstTemp IODev EIB
+attr SetIstTemp room Heizung,KNX
+define TimerIst at +*00:01:00 set SetIstTemp value [HM.Saal.Wandthermostat:measured-temp]
+attr TimerIst room Heizung,Timer
+attr TimerIst webCmd active:inactive
+define HeizActor FileLog ./log/HeizActor-%Y.%m.log SetIstTemp:.*|SetSollTemp:.*
+attr HeizActor room Logfiles
+define TempSollSetter notify HM.Saal.Wandthermostat set SetSollTemp value [HM.Saal.Wandthermostat:desired-temp]
+attr TempSollSetter room Heizung,Timer
+define BewegungsmelderWC KNX 1/0/1:dpt1.001
+attr BewegungsmelderWC IODev EIB
+attr BewegungsmelderWC room KNX
+define FileLog_BewegungsmelderWC FileLog ./log/BewegungsmelderWC-%Y.%m.log BewegungsmelderWC
+attr FileLog_BewegungsmelderWC logtype text
+attr FileLog_BewegungsmelderWC room KNX,Logfiles
+define KNX_0100002 KNX 1/0/2:MODEL_NOT_DEFINED
+attr KNX_0100002 IODev EIB
+attr KNX_0100002 room KNX
+define allowed_WEB allowed
+attr allowed_WEB basicAuth aGF1c3ZlcndhbHRlcjp2aW5kZWxpY2lhKg==
+attr allowed_WEB validFor WEB,WEBphone,WEBtablet,telnetPort
+define KNX_1112017 KNX 11/12/17:MODEL_NOT_DEFINED
+attr KNX_1112017 IODev EIB
+attr KNX_1112017 room KNX
+define FileLog_KNX_1112017 FileLog ./log/KNX_1112017-%Y.log KNX_1112017
+attr FileLog_KNX_1112017 logtype text
+attr FileLog_KNX_1112017 room KNX
+define FileLog_KNX_0100002 FileLog ./log/KNX_0100002-%Y.log KNX_0100002
+attr FileLog_KNX_0100002 logtype text
+attr FileLog_KNX_0100002 room KNX
+
--- /dev/null
+smart-home (0.1-%BUILD%) unstable; urgency=medium
+ * WagnerTech utilities for FHEM
+ -- Michael Wagner <michael@wagnertech.de> Fri, 12 Apr 2019 10:00:00 +0100
--- /dev/null
+Source: smart-home
+Section: main
+Priority: optional
+Maintainer: Michael Wagner <michael@wagnertech.de>
+Build-Depends: git,build-essential
+
+Package: xfhem
+Architecture: all
+Depends: fhem,sysal-util
+Description: WagnerTech utilities for FHEM
+
--- /dev/null
+#!/bin/bash
+set -e
+
+mkdir -p $1/usr/bin/
+cp xfhem/bin/xfhem $1/usr/bin/
+
+mkdir -p $1/opt/fhem/
+cp xfhem/etc/wagnertech.cfg $1/opt/fhem/
+
+
--- /dev/null
+#!/bin/bash
+set -e
+
+chown fhem:dialout /opt/fhem/wagnertech.cfg
+
+if ! grep wagnertech.cfg /opt/fhem/fhem.cfg >/dev/null
+then
+ echo >> /opt/fhem/fhem.cfg
+ echo "# include from xfhem package" >> /opt/fhem/fhem.cfg
+ echo "include wagnertech.cfg" >> /opt/fhem/fhem.cfg
+ systemctl restart fhem
+fi
+
--- /dev/null
+#!/bin/bash
+
+usage="xfhem [define|delete] watchdog [SERVER]"
+
+PATH="/opt/fhem:$PATH"
+
+function process_watchdog {
+ server=$1
+ case $operation in
+ define)
+ if [ -z "$server" ]
+ then
+ echo "SERVER required for define operation"
+ echo $usage
+ exit 1
+ fi
+ fhem.pl 7072 "define watchdog at +*00:10:00 \"/usr/share/sysal/bin/triggerWatchdog_REST http://$server/sysal/rest rwd-$hostname $hostname\""
+ ;;
+ delete)
+ fhem.pl 7072 "delete watchdog"
+ ;;
+ *)
+ echo "invalid operation $operation"
+ echo $usage
+ exit 1
+ ;;
+ esac
+}
+
+if [ $# -lt 2 ]
+then
+ echo $usage
+ exit 1
+fi
+
+operation=$1
+object=$2
+
+hostname=$(hostname)
+
+case $2 in
+watchdog)
+ process_watchdog $3
+ ;;
+*)
+ echo "invalid object $2"
+ echo $usage
+ exit 1
+ ;;
+esac
+
--- /dev/null
+define telnetPort telnet 7072
+