diff --git a/CODEOWNERS b/CODEOWNERS
index 8a543c1dda52b..a66d2aedaa64e 100644
--- a/CODEOWNERS
+++ b/CODEOWNERS
@@ -5,58 +5,6 @@
* @openhab/2-x-add-ons-maintainers
# Add-on maintainers:
-/addons/binding/org.openhab.binding.bluetooth/ @cdjackson @kaikreuzer
-/addons/binding/org.openhab.binding.bluetooth.bluegiga/ @cdjackson @kaikreuzer
-/addons/binding/org.openhab.binding.bluetooth.bluegiga.test/ @cdjackson @kaikreuzer
-/addons/binding/org.openhab.binding.bluetooth.bluez/ @cdjackson @kaikreuzer
-/addons/binding/org.openhab.binding.bluetooth.blukii/ @kaikreuzer
-/addons/binding/org.openhab.binding.bluetooth.ruuvitag @ssalonen
-/addons/binding/org.openhab.binding.bluetooth.test/ @cdjackson @kaikreuzer
-/addons/binding/org.openhab.binding.boschindego/ @jofleck
-/addons/binding/org.openhab.binding.chromecast/ @kaikreuzer
-/addons/binding/org.openhab.binding.chromecast.test/ @kaikreuzer
-/addons/binding/org.openhab.binding.dsmr/ @Hilbrand
-/addons/binding/org.openhab.binding.dsmr.test/ @Hilbrand
-/addons/binding/org.openhab.binding.enocean/ @fruggy83
-/addons/binding/org.openhab.binding.exec/ @kgoderis
-/addons/binding/org.openhab.binding.feed/ @svilenvul
-/addons/binding/org.openhab.binding.feed.test/ @svilenvul
-/addons/binding/org.openhab.binding.ftpupload/ @paulianttila
-/addons/binding/org.openhab.binding.ihc/ @paulianttila
-/addons/binding/org.openhab.binding.ihc.test/ @paulianttila
-/addons/binding/org.openhab.binding.innogysmarthome/ @ollie-dev
-/addons/binding/org.openhab.binding.lgwebos/ @sprehn
-/addons/binding/org.openhab.binding.loxone/ @ppieczul
-/addons/binding/org.openhab.binding.modbus/ @ssalonen
-/addons/binding/org.openhab.binding.modbus.test/ @ssalonen
-/addons/binding/org.openhab.binding.netatmo/ @clinique @cweitkamp @lolodomo
-/addons/binding/org.openhab.binding.nikohomecontrol/ @mherwege
-/addons/binding/org.openhab.binding.onewiregpio/ @aogorek
-/addons/binding/org.openhab.binding.onkyo/ @pail23 @paulianttila
-/addons/binding/org.openhab.binding.orvibo/ @tavalin
-/addons/binding/org.openhab.binding.samsungtv/ @paulianttila
-/addons/binding/org.openhab.binding.smartmeter/ @msteigenberger
-/addons/binding/org.openhab.binding.smartmeter.test/ @msteigenberger
-/addons/binding/org.openhab.binding.systeminfo/ @svilenvul
-/addons/binding/org.openhab.binding.systeminfo.test/ @svilenvul
-/addons/binding/org.openhab.binding.yamahareceiver/ @davidgraeff @zarusz
-/addons/binding/org.openhab.binding.yamahareceiver.test/ @davidgraeff @zarusz
-/addons/binding/org.openhab.binding.zoneminder/ @Mr-Eskildsen
-/addons/io/org.openhab.io.azureiothub/ @nikotanghe
-/addons/io/org.openhab.io.homekit/ @beowulfe
-/addons/io/org.openhab.io.hueemulation/ @davidgraeff @digitaldan
-/addons/io/org.openhab.io.hueemulation.test/ @davidgraeff @digitaldan
-/addons/io/org.openhab.io.imperihome/ @pdegeus
-/addons/io/org.openhab.io.javasound/ @kaikreuzer
-/addons/io/org.openhab.io.mqttembeddedbroker/ @davidgraeff
-/addons/io/org.openhab.io.mqttembeddedbroker.test/ @davidgraeff
-/addons/io/org.openhab.io.openhabcloud/ @kaikreuzer
-/addons/io/org.openhab.io.sound/ @kaikreuzer
-/addons/io/org.openhab.io.transport.feed/ @svilenvul
-/addons/io/org.openhab.io.transport.modbus/ @ssalonen
-/addons/io/org.openhab.io.transport.modbus.test/ @ssalonen
-/addons/voice/org.openhab.voice.kaldi/ @kaikreuzer
-/addons/voice/org.openhab.voice.pollytts/ @hillmanr
/bundles/org.openhab.binding.airquality/ @kubawolanin
/bundles/org.openhab.binding.airvisualnode/ @3cky
/bundles/org.openhab.binding.allplay/ @dominicdesun
@@ -67,7 +15,15 @@
/bundles/org.openhab.binding.autelis/ @digitaldan
/bundles/org.openhab.binding.avmfritz/ @cweitkamp
/bundles/org.openhab.binding.bigassfan/ @mhilbush
+/bundles/org.openhab.binding.bluetooth/ @cdjackson @kaikreuzer
+/bundles/org.openhab.binding.bluetooth.bluegiga/ @cdjackson @kaikreuzer
+/bundles/org.openhab.binding.bluetooth.bluez/ @cdjackson @kaikreuzer
+/bundles/org.openhab.binding.bluetooth.blukii/ @kaikreuzer
+/bundles/org.openhab.binding.bluetooth.ruuvitag @ssalonen
+/bundles/org.openhab.binding.boschindego/ @jofleck
/bundles/org.openhab.binding.bosesoundtouch/ @marvkis @tratho
+/bundles/org.openhab.binding.buienradar/ @gedejong
+/bundles/org.openhab.binding.chromecast/ @kaikreuzer
/bundles/org.openhab.binding.cm11a/ @BobRak
/bundles/org.openhab.binding.coolmasternet/ @projectgus
/bundles/org.openhab.binding.daikin/ @caffineehacker
@@ -79,14 +35,19 @@
/bundles/org.openhab.binding.dlinksmarthome/ @MikeJMajor
/bundles/org.openhab.binding.dmx/ @J-N-K
/bundles/org.openhab.binding.dscalarm/ @RSStephens
+/bundles/org.openhab.binding.dsmr/ @Hilbrand
/bundles/org.openhab.binding.dwdunwetter/ @limdul79
/bundles/org.openhab.binding.elerotransmitterstick/ @vbier
+/bundles/org.openhab.binding.enocean/ @fruggy83
/bundles/org.openhab.binding.evohome/ @Nebula83
+/bundles/org.openhab.binding.exec/ @kgoderis
+/bundles/org.openhab.binding.feed/ @svilenvul
/bundles/org.openhab.binding.feican/ @Hilbrand
/bundles/org.openhab.binding.folding/ @fa2k
/bundles/org.openhab.binding.freebox/ @lolodomo
/bundles/org.openhab.binding.fronius/ @trokohl
/bundles/org.openhab.binding.fsinternetradio/ @paphko
+/bundles/org.openhab.binding.ftpupload/ @paulianttila
/bundles/org.openhab.binding.gardena/ @gerrieg
/bundles/org.openhab.binding.globalcache/ @mhilbush
/bundles/org.openhab.binding.gpstracker/ @gbicskei
@@ -99,6 +60,8 @@
/bundles/org.openhab.binding.hue/ @cweitkamp
/bundles/org.openhab.binding.hyperion/ @tavalin
/bundles/org.openhab.binding.icloud/ @pgfeller
+/bundles/org.openhab.binding.ihc/ @paulianttila
+/bundles/org.openhab.binding.innogysmarthome/ @ollie-dev
/bundles/org.openhab.binding.ipp/ @peuter
/bundles/org.openhab.binding.irtrans/ @kgoderis
/bundles/org.openhab.binding.jeelink/ @vbier
@@ -111,10 +74,13 @@
/bundles/org.openhab.binding.lametrictime/ @syphr42
/bundles/org.openhab.binding.leapmotion/ @kaikreuzer
/bundles/org.openhab.binding.lgtvserial/ @fa2k
+/bundles/org.openhab.binding.lgwebos/ @sprehn
/bundles/org.openhab.binding.lifx/ @wborn
/bundles/org.openhab.binding.lirc/ @kabili207
/bundles/org.openhab.binding.logreader/ @paulianttila
+/bundles/org.openhab.binding.loxone/ @ppieczul
/bundles/org.openhab.binding.lutron/ @actong
+/bundles/org.openhab.binding.mail/ @J-N-K
/bundles/org.openhab.binding.max/ @marcelrv
/bundles/org.openhab.binding.mcp23017/ @aogorek
/bundles/org.openhab.binding.meteoblue/ @9037568
@@ -124,6 +90,7 @@
/bundles/org.openhab.binding.miio/ @marcelrv
/bundles/org.openhab.binding.milight/ @davidgraeff
/bundles/org.openhab.binding.minecraft/ @ibaton
+/bundles/org.openhab.binding.modbus/ @ssalonen
/bundles/org.openhab.binding.mqtt/ @davidgraeff
/bundles/org.openhab.binding.mqtt.generic/ @davidgraeff
/bundles/org.openhab.binding.mqtt.homeassistant/ @davidgraeff
@@ -136,14 +103,18 @@
/bundles/org.openhab.binding.network/ @davidgraeff @mettke
/bundles/org.openhab.binding.nibeheatpump/ @paulianttila
/bundles/org.openhab.binding.nibeuplink/ @alexf2015
+/bundles/org.openhab.binding.nikohomecontrol/ @mherwege
/bundles/org.openhab.binding.ntp/ @marcelrv
/bundles/org.openhab.binding.nuki/ @mkatter
/bundles/org.openhab.binding.oceanic/ @kgoderis
/bundles/org.openhab.binding.onebusaway/ @sdwilsh
+/bundles/org.openhab.binding.onewiregpio/ @aogorek
/bundles/org.openhab.binding.onewire/ @J-N-K
+/bundles/org.openhab.binding.onkyo/ @pail23 @paulianttila
/bundles/org.openhab.binding.opensprinkler/ @CrackerStealth
/bundles/org.openhab.binding.openuv/ @clinique
/bundles/org.openhab.binding.openweathermap/ @cweitkamp
+/bundles/org.openhab.binding.orvibo/ @tavalin
/bundles/org.openhab.binding.pentair/ @jsjames
/bundles/org.openhab.binding.phc/ @gnlpfjh
/bundles/org.openhab.binding.pioneeravr/ @Stratehm
@@ -157,6 +128,7 @@
/bundles/org.openhab.binding.robonect/ @reyem
/bundles/org.openhab.binding.rotelra1x/ @fa2k
/bundles/org.openhab.binding.russound/ @tmrobert8
+/bundles/org.openhab.binding.samsungtv/ @paulianttila
/bundles/org.openhab.binding.satel/ @druciak
/bundles/org.openhab.binding.seneye/ @nikotanghe
/bundles/org.openhab.binding.sensebox/ @hakan42
@@ -164,6 +136,7 @@
/bundles/org.openhab.binding.silvercrestwifisocket/ @jmvaz
/bundles/org.openhab.binding.sleepiq/ @syphr42
/bundles/org.openhab.binding.smaenergymeter/ @monnimeter
+/bundles/org.openhab.binding.smartmeter/ @msteigenberger
/bundles/org.openhab.binding.solaredge/ @alexf2015
/bundles/org.openhab.binding.solarlog/ @johannrichard
/bundles/org.openhab.binding.somfytahoma/ @octa22
@@ -172,6 +145,7 @@
/bundles/org.openhab.binding.spotify/ @Hilbrand
/bundles/org.openhab.binding.squeezebox/ @digitaldan @mhilbush
/bundles/org.openhab.binding.synopanalyzer/ @clinique
+/bundles/org.openhab.binding.systeminfo/ @svilenvul
/bundles/org.openhab.binding.tado/ @dfrommi
/bundles/org.openhab.binding.tankerkoenig/ @dolic @JueBag
/bundles/org.openhab.binding.tellstick/ @jarlebh
@@ -188,13 +162,24 @@
/bundles/org.openhab.binding.wemo/ @hmerk
/bundles/org.openhab.binding.wifiled/ @rvt @xylo
/bundles/org.openhab.binding.windcentrale/ @marcelrv
+/bundles/org.openhab.binding.xmltv/ @clinique
+/bundles/org.openhab.binding.xmppclient/ @pavel-gololobov
+/bundles/org.openhab.binding.yamahareceiver/ @davidgraeff @zarusz
/bundles/org.openhab.binding.yeelight/ @claell
+/bundles/org.openhab.binding.zoneminder/ @Mr-Eskildsen
/bundles/org.openhab.binding.zway/ @pathec
/bundles/org.openhab.extensionservice.marketplace/ @kaikreuzer
/bundles/org.openhab.extensionservice.marketplace.automation/ @kaikreuzer
+/bundles/org.openhab.io.azureiothub/ @nikotanghe
+/bundles/org.openhab.io.homekit/ @beowulfe
+/bundles/org.openhab.io.hueemulation/ @davidgraeff @digitaldan
+/bundles/org.openhab.io.hueemulation.test/ @davidgraeff @digitaldan
/bundles/org.openhab.io.imperihome/ @pdegeus
/bundles/org.openhab.io.javasound/ @kaikreuzer
+/bundles/org.openhab.io.mqttembeddedbroker/ @davidgraeff
/bundles/org.openhab.io.neeo/ @tmrobert8
+/bundles/org.openhab.io.openhabcloud/ @kaikreuzer
+/bundles/org.openhab.io.transport.modbus/ @ssalonen
/bundles/org.openhab.io.webaudio/ @kaikreuzer
/bundles/org.openhab.persistence.mapdb/ @mkhl
/bundles/org.openhab.transform.exec/ @openhab/2-x-add-ons-maintainers
@@ -210,17 +195,19 @@
/bundles/org.openhab.voice.mactts/ @kaikreuzer
/bundles/org.openhab.voice.marytts/ @kaikreuzer
/bundles/org.openhab.voice.picotts/ @FlorianSW
+/bundles/org.openhab.voice.pollytts/ @hillmanr
/bundles/org.openhab.voice.voicerss/ @JochenHiller
/itests/org.openhab.binding.astro.tests/ @gerrieg
/itests/org.openhab.binding.avmfritz.tests/ @cweitkamp
/itests/org.openhab.binding.dmx.tests/ @J-N-K
+/itests/org.openhab.binding.feed.tests/ @svilenvul
/itests/org.openhab.binding.hue.tests/ @cweitkamp
/itests/org.openhab.binding.max.tests/ @marcelrv
/itests/org.openhab.binding.mqtt.homeassistant.tests/ @davidgraeff
/itests/org.openhab.binding.mqtt.homie.tests/ @davidgraeff
/itests/org.openhab.binding.nest.tests/ @wborn
/itests/org.openhab.binding.ntp.tests/ @marcelrv
-/itests/org.openhab.binding.onewire.tests/ @J-N-K
+/itests/org.openhab.binding.systeminfo.tests/ @svilenvul
/itests/org.openhab.binding.tradfri.tests/ @cweitkamp @kaikreuzer
/itests/org.openhab.binding.wemo.tests/ @hmerk
/itests/org.openhab.persistence.mapdb.tests/ @mkhl
diff --git a/README.md b/README.md
index fc024b82b99e7..076cec6bd5049 100644
--- a/README.md
+++ b/README.md
@@ -28,8 +28,6 @@ You find the following repository structure:
```
.
-+-- addons/ Legacy addons that are currently ported to the new buildsystem
-|
+-- bom Maven buildsystem: Bill of materials
| +-- openhab-addons Lists all extensions for other repos to reference them
| +-- ... Other boms
@@ -39,7 +37,7 @@ You find the following repository structure:
| +-- org.openhab.binding.astro
| +-- ...
|
-+-- features/karaf An extension usually has dependencies (at least openHAB core).
++-- features/ An extension usually has dependencies (at least openHAB core).
| | In those feature files are the dependencies for the OSGi container declared.
| +-- openhab-addons-external/src/main/feature/feature.xml
| +-- openhab-addons/src/main/feature/feature.xml
@@ -49,7 +47,6 @@ You find the following repository structure:
| +-- org.openhab.binding.avmfritz.tests
| +-- ...
|
-+-- poms Maven buildsystem files
+-- src/etc Auxilary buildsystem files: The license header for automatic checks for example
+-- tools Static code analyser instructions
|
diff --git a/addons/archetype-settings.xml b/addons/archetype-settings.xml
deleted file mode 100644
index 2ec2ddd3aaa8c..0000000000000
--- a/addons/archetype-settings.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
- smarthome-snapshots
-
-
- archetype
- https://repo.eclipse.org/content/repositories/smarthome-snapshots/
-
-
-
-
-
- smarthome-snapshots
-
-
diff --git a/addons/binding/create_openhab_binding_skeleton.cmd b/addons/binding/create_openhab_binding_skeleton.cmd
deleted file mode 100644
index 1f51cad870e6a..0000000000000
--- a/addons/binding/create_openhab_binding_skeleton.cmd
+++ /dev/null
@@ -1,39 +0,0 @@
-@echo off
-
-SETLOCAL
-SET ARGC=0
-
-FOR %%x IN (%*) DO SET /A ARGC+=1
-
-IF %ARGC% NEQ 2 (
- echo Usage: %0 BindingIdInCamelCase Author
- exit /B 1
-)
-
-SET BindingVersion="2.5.0-SNAPSHOT"
-SET ArchetypeVersion="0.11.0-SNAPSHOT"
-
-SET BindingIdInCamelCase=%~1
-SET BindingIdInLowerCase=%BindingIdInCamelCase%
-SET Author=%~2
-
-call :LoCase BindingIdInLowerCase
-
-call mvn -s ../archetype-settings.xml archetype:generate -N -DarchetypeGroupId=org.eclipse.smarthome.archetype -DarchetypeArtifactId=org.eclipse.smarthome.archetype.binding -DarchetypeVersion=%ArchetypeVersion% -DgroupId=org.openhab.binding -DartifactId=org.openhab.binding.%BindingIdInLowerCase% -Dpackage=org.openhab.binding.%BindingIdInLowerCase% -Dversion=%BindingVersion% -DbindingId=%BindingIdInLowerCase% -DbindingIdCamelCase=%BindingIdInCamelCase% -DvendorName=openHAB -Dnamespace=org.openhab -Dauthor="%Author%"
-
-COPY ..\..\src\etc\NOTICE org.openhab.binding.%BindingIdInLowerCase%\
-
-(SET BindingIdInLowerCase=)
-(SET BindingIdInCamelCase=)
-(SET Author=)
-
-GOTO:EOF
-
-
-:LoCase
-:: Subroutine to convert a variable VALUE to all lower case.
-:: The argument for this subroutine is the variable NAME.
-FOR %%i IN ("A=a" "B=b" "C=c" "D=d" "E=e" "F=f" "G=g" "H=h" "I=i" "J=j" "K=k" "L=l" "M=m" "N=n" "O=o" "P=p" "Q=q" "R=r" "S=s" "T=t" "U=u" "V=v" "W=w" "X=x" "Y=y" "Z=z") DO CALL SET "%1=%%%1:%%~i%%"
-GOTO:EOF
-
-ENDLOCAL
diff --git a/addons/binding/create_openhab_binding_skeleton.sh b/addons/binding/create_openhab_binding_skeleton.sh
deleted file mode 100755
index 6db16a78aab20..0000000000000
--- a/addons/binding/create_openhab_binding_skeleton.sh
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/bash
-
-[ $# -lt 2 ] && { echo "Usage: $0 "; exit 1; }
-
-bindingVersion=2.5.0-SNAPSHOT
-archetypeVersion=0.11.0-SNAPSHOT
-
-camelcaseId=$1
-id=`echo $camelcaseId | tr '[:upper:]' '[:lower:]'`
-
-author=$2
-
-mvn -s ../archetype-settings.xml archetype:generate -N \
- -DarchetypeGroupId=org.eclipse.smarthome.archetype \
- -DarchetypeArtifactId=org.eclipse.smarthome.archetype.binding \
- -DarchetypeVersion=$archetypeVersion \
- -DgroupId=org.openhab.binding \
- -DartifactId=org.openhab.binding.$id \
- -Dpackage=org.openhab.binding.$id \
- -Dversion=$bindingVersion \
- -DbindingId=$id \
- -DbindingIdCamelCase=$camelcaseId \
- -DvendorName=openHAB \
- -Dnamespace=org.openhab \
- -Dauthor="$author"
-
-directory="org.openhab.binding.$id/"
-
-cp ../../src/etc/NOTICE "$directory"
-
diff --git a/addons/binding/create_openhab_binding_test_skeleton.cmd b/addons/binding/create_openhab_binding_test_skeleton.cmd
deleted file mode 100644
index c4da0292dcef7..0000000000000
--- a/addons/binding/create_openhab_binding_test_skeleton.cmd
+++ /dev/null
@@ -1,44 +0,0 @@
-@echo off
-
-SETLOCAL
-SET ARGC=0
-
-FOR %%x IN (%*) DO SET /A ARGC+=1
-
-IF %ARGC% NEQ 2 (
- echo Usage: %0 BindingIdInCamelCase Author
- exit /B 1
-)
-
-SET BindingVersion="2.5.0-SNAPSHOT"
-SET ArchetypeVersion="0.11.0-SNAPSHOT"
-
-SET BindingIdInCamelCase=%1
-SET BindingIdInLowerCase=%BindingIdInCamelCase%
-SET Author=%2
-
-call :LoCase BindingIdInLowerCase
-
-If NOT exist "org.openhab.binding.%BindingIdInLowerCase%" (
- echo The binding with the id must exist: org.openhab.binding.%BindingIdInLowerCase%
- exit /B 1
-)
-
-call mvn -s ../archetype-settings.xml archetype:generate -N -DarchetypeGroupId=org.eclipse.smarthome.archetype -DarchetypeArtifactId=org.eclipse.smarthome.archetype.binding.test -DarchetypeVersion=%ArchetypeVersion% -DgroupId=org.openhab.binding -DartifactId=org.openhab.binding.%BindingIdInLowerCase%.test -Dpackage=org.openhab.binding.%BindingIdInLowerCase% -Dversion=%BindingVersion% -DbindingId=%BindingIdInLowerCase% -DbindingIdCamelCase=%BindingIdInCamelCase% -DvendorName=openHAB -Dnamespace=org.openhab -Dauthor="%Author%"
-
-COPY ..\..\src\etc\NOTICE org.openhab.binding.%BindingIdInLowerCase%.test\
-
-(SET BindingIdInLowerCase=)
-(SET BindingIdInCamelCase=)
-(SET Author=)
-
-GOTO:EOF
-
-
-:LoCase
-:: Subroutine to convert a variable VALUE to all lower case.
-:: The argument for this subroutine is the variable NAME.
-FOR %%i IN ("A=a" "B=b" "C=c" "D=d" "E=e" "F=f" "G=g" "H=h" "I=i" "J=j" "K=k" "L=l" "M=m" "N=n" "O=o" "P=p" "Q=q" "R=r" "S=s" "T=t" "U=u" "V=v" "W=w" "X=x" "Y=y" "Z=z") DO CALL SET "%1=%%%1:%%~i%%"
-GOTO:EOF
-
-ENDLOCAL
diff --git a/addons/binding/create_openhab_binding_test_skeleton.sh b/addons/binding/create_openhab_binding_test_skeleton.sh
deleted file mode 100755
index e9f188dce956e..0000000000000
--- a/addons/binding/create_openhab_binding_test_skeleton.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/bash
-
-[ $# -lt 2 ] && { echo "Usage: $0 "; exit 1; }
-
-bindingVersion=2.5.0-SNAPSHOT
-archetypeVersion=0.11.0-SNAPSHOT
-
-camelcaseId=$1
-id=`echo $camelcaseId | tr '[:upper:]' '[:lower:]'`
-
-author=$2
-
-[ -d org.openhab.binding.$id ] || { echo "The binding with the id must exist: org.openhab.binding.$id"; exit 1; }
-
-mvn -s ../archetype-settings.xml archetype:generate -N \
- -DarchetypeGroupId=org.eclipse.smarthome.archetype \
- -DarchetypeArtifactId=org.eclipse.smarthome.archetype.binding.test \
- -DarchetypeVersion=$archetypeVersion \
- -DgroupId=org.openhab.binding \
- -DartifactId=org.openhab.binding.$id.test \
- -Dpackage=org.openhab.binding.$id \
- -Dversion=$bindingVersion \
- -DbindingId=$id \
- -DbindingIdCamelCase=$camelcaseId \
- -DvendorName=openHAB \
- -Dnamespace=org.openhab \
- -Dauthor="$author"
-
-directory="org.openhab.binding.$id.test/"
-
-cp ../../src/etc/NOTICE "$directory"
-
diff --git a/addons/binding/org.openhab.binding.bluetooth.bluegiga.test/.classpath b/addons/binding/org.openhab.binding.bluetooth.bluegiga.test/.classpath
deleted file mode 100644
index 64777f25c82a4..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth.bluegiga.test/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.bluetooth.bluegiga.test/.project b/addons/binding/org.openhab.binding.bluetooth.bluegiga.test/.project
deleted file mode 100644
index 727adac7d54a3..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth.bluegiga.test/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
- org.openhab.binding.bluetooth.bluegiga.test
-
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- org.eclipse.pde.ManifestBuilder
-
-
-
-
- org.eclipse.pde.SchemaBuilder
-
-
-
-
-
- org.eclipse.pde.PluginNature
- org.eclipse.jdt.core.javanature
-
-
diff --git a/addons/binding/org.openhab.binding.bluetooth.bluegiga.test/META-INF/MANIFEST.MF b/addons/binding/org.openhab.binding.bluetooth.bluegiga.test/META-INF/MANIFEST.MF
deleted file mode 100644
index 3fea9ec08ca1a..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth.bluegiga.test/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,21 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Bluetooth BlueGiga Binding Tests
-Bundle-SymbolicName:
- org.openhab.binding.bluetooth.bluegiga.test;singleton:=true
-Bundle-Vendor: openHAB
-Bundle-Version: 2.5.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Fragment-Host: org.openhab.binding.bluetooth.bluegiga
-Import-Package: org.openhab.binding.bluetooth,
- org.eclipse.smarthome.core.events,
- org.eclipse.smarthome.core.thing.util,
- org.eclipse.smarthome.test.java,
- org.eclipse.smarthome.test.storage,
- org.hamcrest;core=split,
- org.junit;version="4.0.0",
- org.mockito,
- org.osgi.framework,
- org.osgi.service.device,
- org.slf4j
-Automatic-Module-Name: org.openhab.binding.bluetooth.bluegiga.test
diff --git a/addons/binding/org.openhab.binding.bluetooth.bluegiga.test/build.properties b/addons/binding/org.openhab.binding.bluetooth.bluegiga.test/build.properties
deleted file mode 100644
index 271c737ba0384..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth.bluegiga.test/build.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-source.. = src/test/java/
-output.. = target/classes
-bin.includes = META-INF/,\
- .,\
- NOTICE
-
diff --git a/addons/binding/org.openhab.binding.bluetooth.bluegiga.test/org.openhab.binding.bluetooth.bluegiga.test.launch b/addons/binding/org.openhab.binding.bluetooth.bluegiga.test/org.openhab.binding.bluetooth.bluegiga.test.launch
deleted file mode 100644
index cad834f6b3dbd..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth.bluegiga.test/org.openhab.binding.bluetooth.bluegiga.test.launch
+++ /dev/null
@@ -1,142 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.bluetooth.bluegiga.test/pom.xml b/addons/binding/org.openhab.binding.bluetooth.bluegiga.test/pom.xml
deleted file mode 100644
index e11783ad6efde..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth.bluegiga.test/pom.xml
+++ /dev/null
@@ -1,119 +0,0 @@
-
-
-
- 4.0.0
-
-
- org.openhab.binding
- pom
- 2.5.0-SNAPSHOT
-
-
- org.openhab.binding.bluetooth.bluegiga.test
-
- eclipse-test-plugin
-
- Bluetooth BlueGiga Tests
-
-
-
-
- ${tycho-groupid}
- target-platform-configuration
-
-
-
-
-
- eclipse-plugin
- org.eclipse.equinox.event
- 0.0.0
-
-
- eclipse-plugin
- org.eclipse.equinox.ds
- 0.0.0
-
-
- eclipse-plugin
- org.openhab.core.config.xml
- 0.0.0
-
-
- eclipse-plugin
- org.openhab.core.thing.xml
- 0.0.0
-
-
- eclipse-plugin
- org.openhab.core.binding.xml
- 0.0.0
-
-
-
-
-
-
- ${tycho-groupid}
- tycho-surefire-plugin
-
-
-
- eclipse-plugin
- ch.qos.logback.classic
- 0.0.0
-
-
- eclipse-plugin
- ch.qos.logback.core
- 0.0.0
-
-
- eclipse-plugin
- ch.qos.logback.slf4j
- 0.0.0
-
-
-
-
- org.eclipse.equinox.ds
- 1
- true
-
-
- org.eclipse.equinox.event
- 2
- true
-
-
- org.openhab.core
- 4
- true
-
-
- org.openhab.core.thing
- 4
- true
-
-
- org.openhab.core.config.xml
- 4
- true
-
-
- org.openhab.core.thing.xml
- 4
- true
-
-
- org.openhab.core.binding.xml
- 4
- true
-
-
-
-
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.bluetooth.bluegiga/.classpath b/addons/binding/org.openhab.binding.bluetooth.bluegiga/.classpath
deleted file mode 100644
index 7f457fa4138d1..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth.bluegiga/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.bluetooth.bluegiga/.project b/addons/binding/org.openhab.binding.bluetooth.bluegiga/.project
deleted file mode 100644
index c966d044ca33f..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth.bluegiga/.project
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
- org.openhab.binding.bluetooth.bluegiga
-
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- org.eclipse.pde.ManifestBuilder
-
-
-
-
- org.eclipse.pde.SchemaBuilder
-
-
-
-
- org.eclipse.pde.ds.core.builder
-
-
-
-
-
- org.eclipse.pde.PluginNature
- org.eclipse.jdt.core.javanature
-
-
diff --git a/addons/binding/org.openhab.binding.bluetooth.bluegiga/META-INF/MANIFEST.MF b/addons/binding/org.openhab.binding.bluetooth.bluegiga/META-INF/MANIFEST.MF
deleted file mode 100644
index 2aac070bc07c4..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth.bluegiga/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,30 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: BlueGiga Bluetooth Adapter
-Bundle-SymbolicName: org.openhab.binding.bluetooth.bluegiga
-Bundle-Vendor: openHAB
-Bundle-Version: 2.5.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Import-Package: org.eclipse.jdt.annotation;resolution:=optional,
- org.eclipse.smarthome.config.core,
- org.eclipse.smarthome.config.discovery,
- org.eclipse.smarthome.core.common,
- org.eclipse.smarthome.core.common.registry,
- org.eclipse.smarthome.core.library.types,
- org.eclipse.smarthome.core.thing,
- org.eclipse.smarthome.core.thing.binding,
- org.eclipse.smarthome.core.thing.binding.builder,
- org.eclipse.smarthome.core.thing.type,
- org.eclipse.smarthome.core.types,
- org.eclipse.smarthome.io.transport.serial,
- org.openhab.binding.bluetooth,
- org.openhab.binding.bluetooth.bluegiga,
- org.openhab.binding.bluetooth.bluegiga.handler,
- org.openhab.binding.bluetooth.discovery,
- org.openhab.binding.bluetooth.notification,
- org.osgi.framework,
- org.slf4j
-Service-Component: OSGI-INF/*.xml
-Export-Package: org.openhab.binding.bluetooth.bluegiga,
- org.openhab.binding.bluetooth.bluegiga.handler
-Automatic-Module-Name: org.openhab.binding.bluetooth.bluegiga
diff --git a/addons/binding/org.openhab.binding.bluetooth.bluegiga/OSGI-INF/.gitignore b/addons/binding/org.openhab.binding.bluetooth.bluegiga/OSGI-INF/.gitignore
deleted file mode 100644
index b878e882aca37..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth.bluegiga/OSGI-INF/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/*.xml
diff --git a/addons/binding/org.openhab.binding.bluetooth.bluegiga/build.properties b/addons/binding/org.openhab.binding.bluetooth.bluegiga/build.properties
deleted file mode 100644
index d3ebb210cc859..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth.bluegiga/build.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-source..=src/main/java/
-output..=target/classes
-bin.includes = META-INF/,\
- .,\
- OSGI-INF/,\
- ESH-INF/,\
- NOTICE
diff --git a/addons/binding/org.openhab.binding.bluetooth.bluegiga/pom.xml b/addons/binding/org.openhab.binding.bluetooth.bluegiga/pom.xml
deleted file mode 100644
index 3e67b5c68384a..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth.bluegiga/pom.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
- 4.0.0
-
-
- org.openhab.binding
- pom
- 2.5.0-SNAPSHOT
-
-
- org.openhab.binding.bluetooth.bluegiga
- eclipse-plugin
-
- BlueGiga Bluetooth Adapter
-
-
diff --git a/addons/binding/org.openhab.binding.bluetooth.bluez/.classpath b/addons/binding/org.openhab.binding.bluetooth.bluez/.classpath
deleted file mode 100644
index fdbb371ce27da..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth.bluez/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.bluetooth.bluez/.project b/addons/binding/org.openhab.binding.bluetooth.bluez/.project
deleted file mode 100644
index f55733257ef3a..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth.bluez/.project
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
- org.openhab.binding.bluetooth.bluez
-
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- org.eclipse.pde.ManifestBuilder
-
-
-
-
- org.eclipse.pde.SchemaBuilder
-
-
-
-
- org.eclipse.pde.ds.core.builder
-
-
-
-
-
- org.eclipse.pde.PluginNature
- org.eclipse.jdt.core.javanature
-
-
diff --git a/addons/binding/org.openhab.binding.bluetooth.bluez/86_64/libjavatinyb.so b/addons/binding/org.openhab.binding.bluetooth.bluez/86_64/libjavatinyb.so
deleted file mode 100644
index 308abed357c2a..0000000000000
Binary files a/addons/binding/org.openhab.binding.bluetooth.bluez/86_64/libjavatinyb.so and /dev/null differ
diff --git a/addons/binding/org.openhab.binding.bluetooth.bluez/86_64/libtinyb.so b/addons/binding/org.openhab.binding.bluetooth.bluez/86_64/libtinyb.so
deleted file mode 100644
index 430f3b6c44495..0000000000000
Binary files a/addons/binding/org.openhab.binding.bluetooth.bluez/86_64/libtinyb.so and /dev/null differ
diff --git a/addons/binding/org.openhab.binding.bluetooth.bluez/META-INF/MANIFEST.MF b/addons/binding/org.openhab.binding.bluetooth.bluez/META-INF/MANIFEST.MF
deleted file mode 100644
index ab345b621936b..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth.bluez/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,38 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: BlueZ Bluetooth Adapter
-Bundle-SymbolicName:
- org.openhab.binding.bluetooth.bluez;singleton:=true
-Bundle-Vendor: openHAB
-Bundle-Version: 2.5.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Bundle-ClassPath: .,
- lib/tinyb-0.5.1.jar
-Bundle-NativeCode:
- lib/armv6hf/libjavatinyb.so;lib/armv6hf/libtinyb.so;
- processor=arm;osname=linux,
- *
-Import-Package: org.eclipse.jdt.annotation;resolution:=optional,
- org.eclipse.smarthome.config.core,
- org.eclipse.smarthome.config.discovery,
- org.eclipse.smarthome.core.common,
- org.eclipse.smarthome.core.common.registry,
- org.eclipse.smarthome.core.library.types,
- org.eclipse.smarthome.core.thing,
- org.eclipse.smarthome.core.thing.binding,
- org.eclipse.smarthome.core.thing.binding.builder,
- org.eclipse.smarthome.core.thing.type,
- org.eclipse.smarthome.core.types,
- org.eclipse.smarthome.core.util,
- org.openhab.binding.bluetooth,
- org.openhab.binding.bluetooth.bluez,
- org.openhab.binding.bluetooth.bluez.handler,
- org.openhab.binding.bluetooth.discovery,
- org.openhab.binding.bluetooth.notification,
- org.osgi.framework,
- org.slf4j
-Service-Component: OSGI-INF/*.xml
-Export-Package: org.openhab.binding.bluetooth.bluez,
- org.openhab.binding.bluetooth.bluez.handler
-Bundle-ActivationPolicy: lazy
-Automatic-Module-Name: org.openhab.binding.bluetooth.bluez
diff --git a/addons/binding/org.openhab.binding.bluetooth.bluez/OSGI-INF/.gitignore b/addons/binding/org.openhab.binding.bluetooth.bluez/OSGI-INF/.gitignore
deleted file mode 100644
index b878e882aca37..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth.bluez/OSGI-INF/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/*.xml
diff --git a/addons/binding/org.openhab.binding.bluetooth.bluez/build.properties b/addons/binding/org.openhab.binding.bluetooth.bluez/build.properties
deleted file mode 100644
index 2846a025d2f8b..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth.bluez/build.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-source..=src/main/java/
-output..=target/classes
-bin.includes = META-INF/,\
- .,\
- OSGI-INF/,\
- ESH-INF/,\
- NOTICE,\
- lib/
diff --git a/addons/binding/org.openhab.binding.bluetooth.bluez/lib/armv6hf/libjavatinyb.so b/addons/binding/org.openhab.binding.bluetooth.bluez/lib/armv6hf/libjavatinyb.so
deleted file mode 100644
index b1b5da17fc90b..0000000000000
Binary files a/addons/binding/org.openhab.binding.bluetooth.bluez/lib/armv6hf/libjavatinyb.so and /dev/null differ
diff --git a/addons/binding/org.openhab.binding.bluetooth.bluez/lib/armv6hf/libtinyb.so b/addons/binding/org.openhab.binding.bluetooth.bluez/lib/armv6hf/libtinyb.so
deleted file mode 100644
index bf444a7f101d5..0000000000000
Binary files a/addons/binding/org.openhab.binding.bluetooth.bluez/lib/armv6hf/libtinyb.so and /dev/null differ
diff --git a/addons/binding/org.openhab.binding.bluetooth.bluez/lib/tinyb-0.5.1.jar b/addons/binding/org.openhab.binding.bluetooth.bluez/lib/tinyb-0.5.1.jar
deleted file mode 100644
index dca6d7ad8bd83..0000000000000
Binary files a/addons/binding/org.openhab.binding.bluetooth.bluez/lib/tinyb-0.5.1.jar and /dev/null differ
diff --git a/addons/binding/org.openhab.binding.bluetooth.bluez/pom.xml b/addons/binding/org.openhab.binding.bluetooth.bluez/pom.xml
deleted file mode 100644
index 4d66bc72cc17e..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth.bluez/pom.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
- 4.0.0
-
-
- org.openhab.binding
- pom
- 2.5.0-SNAPSHOT
-
-
- org.openhab.binding.bluetooth.bluez
- eclipse-plugin
-
- BlueZ Bluetooth Adapter
-
-
diff --git a/addons/binding/org.openhab.binding.bluetooth.blukii/.classpath b/addons/binding/org.openhab.binding.bluetooth.blukii/.classpath
deleted file mode 100644
index 7f457fa4138d1..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth.blukii/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.bluetooth.blukii/.project b/addons/binding/org.openhab.binding.bluetooth.blukii/.project
deleted file mode 100644
index aeb861016a5c5..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth.blukii/.project
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
- org.openhab.binding.bluetooth.blukii
-
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- org.eclipse.pde.ManifestBuilder
-
-
-
-
- org.eclipse.pde.SchemaBuilder
-
-
-
-
- org.eclipse.pde.ds.core.builder
-
-
-
-
-
- org.eclipse.pde.PluginNature
- org.eclipse.jdt.core.javanature
-
-
diff --git a/addons/binding/org.openhab.binding.bluetooth.blukii/META-INF/MANIFEST.MF b/addons/binding/org.openhab.binding.bluetooth.blukii/META-INF/MANIFEST.MF
deleted file mode 100644
index e3493116d67a5..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth.blukii/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,34 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Blukii Binding
-Bundle-SymbolicName: org.openhab.binding.bluetooth.blukii
-Bundle-Vendor: openHAB
-Bundle-Version: 2.5.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Bundle-ClassPath: .
-Import-Package:
- javax.measure,
- javax.measure.quantity,
- org.eclipse.jdt.annotation;resolution:=optional,
- org.eclipse.smarthome.config.core,
- org.eclipse.smarthome.config.discovery,
- org.eclipse.smarthome.core.common.registry,
- org.eclipse.smarthome.core.library.types,
- org.eclipse.smarthome.core.library.unit,
- org.eclipse.smarthome.core.thing,
- org.eclipse.smarthome.core.thing.binding,
- org.eclipse.smarthome.core.thing.binding.builder,
- org.eclipse.smarthome.core.thing.binding.firmware,
- org.eclipse.smarthome.core.thing.type,
- org.eclipse.smarthome.core.types,
- org.eclipse.smarthome.core.util,
- org.openhab.binding.bluetooth,
- org.openhab.binding.bluetooth.discovery,
- org.openhab.binding.bluetooth.notification,
- org.slf4j
-Service-Component: OSGI-INF/*.xml
-Export-Package:
- org.openhab.binding.bluetooth.blukii,
- org.openhab.binding.bluetooth.blukii.handler
-Bundle-ActivationPolicy: lazy
-Automatic-Module-Name: org.openhab.binding.bluetooth.blukii
diff --git a/addons/binding/org.openhab.binding.bluetooth.blukii/OSGI-INF/.gitignore b/addons/binding/org.openhab.binding.bluetooth.blukii/OSGI-INF/.gitignore
deleted file mode 100644
index b878e882aca37..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth.blukii/OSGI-INF/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/*.xml
diff --git a/addons/binding/org.openhab.binding.bluetooth.blukii/build.properties b/addons/binding/org.openhab.binding.bluetooth.blukii/build.properties
deleted file mode 100644
index a6cfff567c9b1..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth.blukii/build.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-source..=src/main/java/
-output..=target/classes
-bin.includes=META-INF/,\
- .,\
- OSGI-INF/,\
- ESH-INF/,\
- NOTICE
diff --git a/addons/binding/org.openhab.binding.bluetooth.blukii/pom.xml b/addons/binding/org.openhab.binding.bluetooth.blukii/pom.xml
deleted file mode 100644
index 57dff0b766f26..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth.blukii/pom.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
- 4.0.0
-
-
- org.openhab.binding
- pom
- 2.5.0-SNAPSHOT
-
-
- org.openhab.binding.bluetooth.blukii
- eclipse-plugin
-
- Blukii Binding
-
-
diff --git a/addons/binding/org.openhab.binding.bluetooth.ruuvitag/.classpath b/addons/binding/org.openhab.binding.bluetooth.ruuvitag/.classpath
deleted file mode 100644
index c519ec1b24a4a..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth.ruuvitag/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.bluetooth.ruuvitag/.project b/addons/binding/org.openhab.binding.bluetooth.ruuvitag/.project
deleted file mode 100644
index 474e2dd6c7181..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth.ruuvitag/.project
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
- org.openhab.binding.bluetooth.ruuvitag
-
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- org.eclipse.pde.ManifestBuilder
-
-
-
-
- org.eclipse.pde.SchemaBuilder
-
-
-
-
- org.eclipse.pde.ds.core.builder
-
-
-
-
-
- org.eclipse.pde.PluginNature
- org.eclipse.jdt.core.javanature
-
-
diff --git a/addons/binding/org.openhab.binding.bluetooth.ruuvitag/META-INF/MANIFEST.MF b/addons/binding/org.openhab.binding.bluetooth.ruuvitag/META-INF/MANIFEST.MF
deleted file mode 100644
index cdbc19c210087..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth.ruuvitag/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,31 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: RuuviTag Binding
-Bundle-SymbolicName: org.openhab.binding.bluetooth.ruuvitag
-Bundle-Vendor: openHAB
-Bundle-Version: 2.5.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Bundle-ClassPath: .,
- lib/ruuvitag-common-1.0.0.jar
-Import-Package:
- javax.measure,
- javax.measure.quantity,
- org.eclipse.jdt.annotation;resolution:=optional,
- org.eclipse.smarthome.config.core,
- org.eclipse.smarthome.config.discovery,
- org.eclipse.smarthome.core.common.registry,
- org.eclipse.smarthome.core.library.types,
- org.eclipse.smarthome.core.library.unit,
- org.eclipse.smarthome.core.thing,
- org.eclipse.smarthome.core.thing.binding,
- org.eclipse.smarthome.core.types,
- org.openhab.binding.bluetooth,
- org.openhab.binding.bluetooth.discovery,
- org.openhab.binding.bluetooth.notification,
- org.slf4j
-Service-Component: OSGI-INF/*.xml
-Export-Package:
- org.openhab.binding.bluetooth.ruuvitag,
- org.openhab.binding.bluetooth.ruuvitag.handler
-Bundle-ActivationPolicy: lazy
-Automatic-Module-Name: org.openhab.binding.bluetooth.ruuvitag
diff --git a/addons/binding/org.openhab.binding.bluetooth.ruuvitag/OSGI-INF/.gitignore b/addons/binding/org.openhab.binding.bluetooth.ruuvitag/OSGI-INF/.gitignore
deleted file mode 100644
index b878e882aca37..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth.ruuvitag/OSGI-INF/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/*.xml
diff --git a/addons/binding/org.openhab.binding.bluetooth.ruuvitag/build.properties b/addons/binding/org.openhab.binding.bluetooth.ruuvitag/build.properties
deleted file mode 100644
index b939b44256240..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth.ruuvitag/build.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-source..=src/main/java/
-output..=target/classes
-bin.includes=META-INF/,\
- .,\
- OSGI-INF/,\
- ESH-INF/,\
- NOTICE,\
- lib/ruuvitag-common-1.0.0.jar
diff --git a/addons/binding/org.openhab.binding.bluetooth.ruuvitag/pom.xml b/addons/binding/org.openhab.binding.bluetooth.ruuvitag/pom.xml
deleted file mode 100644
index 37e504713f59f..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth.ruuvitag/pom.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
- 4.0.0
-
-
- org.openhab.binding
- pom
- 2.5.0-SNAPSHOT
-
-
- org.openhab.binding.bluetooth.ruuvitag
- eclipse-plugin
-
- RuuviTag Binding
-
-
diff --git a/addons/binding/org.openhab.binding.bluetooth.test/.classpath b/addons/binding/org.openhab.binding.bluetooth.test/.classpath
deleted file mode 100644
index 64777f25c82a4..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth.test/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.bluetooth.test/.project b/addons/binding/org.openhab.binding.bluetooth.test/.project
deleted file mode 100644
index 346bafd98afb3..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth.test/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
- org.openhab.binding.bluetooth.test
-
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- org.eclipse.pde.ManifestBuilder
-
-
-
-
- org.eclipse.pde.SchemaBuilder
-
-
-
-
-
- org.eclipse.pde.PluginNature
- org.eclipse.jdt.core.javanature
-
-
diff --git a/addons/binding/org.openhab.binding.bluetooth.test/META-INF/MANIFEST.MF b/addons/binding/org.openhab.binding.bluetooth.test/META-INF/MANIFEST.MF
deleted file mode 100644
index 899d5603b8568..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth.test/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,21 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Bluetooth Binding Tests
-Bundle-SymbolicName:
- org.openhab.binding.bluetooth.test;singleton:=true
-Bundle-Vendor: openHAB
-Bundle-Version: 2.5.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Fragment-Host: org.openhab.binding.bluetooth
-Import-Package: org.eclipse.smarthome.core.events,
- org.eclipse.smarthome.core.thing.util,
- org.eclipse.smarthome.test.java,
- org.eclipse.smarthome.test.storage,
- org.hamcrest;core=split,
- org.junit;version="4.0.0",
- org.mockito,
- org.openhab.binding.bluetooth,
- org.osgi.framework,
- org.osgi.service.device,
- org.slf4j
-Automatic-Module-Name: org.openhab.binding.bluetooth.test
diff --git a/addons/binding/org.openhab.binding.bluetooth.test/build.properties b/addons/binding/org.openhab.binding.bluetooth.test/build.properties
deleted file mode 100644
index 271c737ba0384..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth.test/build.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-source.. = src/test/java/
-output.. = target/classes
-bin.includes = META-INF/,\
- .,\
- NOTICE
-
diff --git a/addons/binding/org.openhab.binding.bluetooth.test/org.openhab.binding.bluetooth.test.launch b/addons/binding/org.openhab.binding.bluetooth.test/org.openhab.binding.bluetooth.test.launch
deleted file mode 100644
index a7eeac182571f..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth.test/org.openhab.binding.bluetooth.test.launch
+++ /dev/null
@@ -1,141 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.bluetooth.test/pom.xml b/addons/binding/org.openhab.binding.bluetooth.test/pom.xml
deleted file mode 100644
index b15315cdf12c2..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth.test/pom.xml
+++ /dev/null
@@ -1,119 +0,0 @@
-
-
-
- 4.0.0
-
-
- org.openhab.binding
- pom
- 2.5.0-SNAPSHOT
-
-
- org.openhab.binding.bluetooth.test
-
- eclipse-test-plugin
-
- Bluetooth Binding Tests
-
-
-
-
- ${tycho-groupid}
- target-platform-configuration
-
-
-
-
-
- eclipse-plugin
- org.eclipse.equinox.event
- 0.0.0
-
-
- eclipse-plugin
- org.eclipse.equinox.ds
- 0.0.0
-
-
- eclipse-plugin
- org.openhab.core.config.xml
- 0.0.0
-
-
- eclipse-plugin
- org.openhab.core.thing.xml
- 0.0.0
-
-
- eclipse-plugin
- org.openhab.core.binding.xml
- 0.0.0
-
-
-
-
-
-
- ${tycho-groupid}
- tycho-surefire-plugin
-
-
-
- eclipse-plugin
- ch.qos.logback.classic
- 0.0.0
-
-
- eclipse-plugin
- ch.qos.logback.core
- 0.0.0
-
-
- eclipse-plugin
- ch.qos.logback.slf4j
- 0.0.0
-
-
-
-
- org.eclipse.equinox.ds
- 1
- true
-
-
- org.eclipse.equinox.event
- 2
- true
-
-
- org.openhab.core
- 4
- true
-
-
- org.openhab.core.thing
- 4
- true
-
-
- org.openhab.core.config.xml
- 4
- true
-
-
- org.openhab.core.thing.xml
- 4
- true
-
-
- org.openhab.core.binding.xml
- 4
- true
-
-
-
-
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.bluetooth/.classpath b/addons/binding/org.openhab.binding.bluetooth/.classpath
deleted file mode 100644
index 7f457fa4138d1..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.bluetooth/.project b/addons/binding/org.openhab.binding.bluetooth/.project
deleted file mode 100644
index 01c57782f5ec7..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth/.project
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
- org.openhab.binding.bluetooth
-
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- org.eclipse.pde.ManifestBuilder
-
-
-
-
- org.eclipse.pde.SchemaBuilder
-
-
-
-
- org.eclipse.pde.ds.core.builder
-
-
-
-
-
- org.eclipse.pde.PluginNature
- org.eclipse.jdt.core.javanature
-
-
diff --git a/addons/binding/org.openhab.binding.bluetooth/META-INF/MANIFEST.MF b/addons/binding/org.openhab.binding.bluetooth/META-INF/MANIFEST.MF
deleted file mode 100644
index ce4834d19a04c..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,30 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Bluetooth Binding
-Bundle-SymbolicName:
- org.openhab.binding.bluetooth;singleton:=true
-Bundle-Vendor: openHAB
-Bundle-Version: 2.5.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Bundle-ClassPath: .
-Import-Package:
- org.eclipse.jdt.annotation;resolution:=optional,
- org.eclipse.smarthome.config.core,
- org.eclipse.smarthome.config.discovery,
- org.eclipse.smarthome.core.common.registry,
- org.eclipse.smarthome.core.library.types,
- org.eclipse.smarthome.core.thing,
- org.eclipse.smarthome.core.thing.binding,
- org.eclipse.smarthome.core.thing.binding.builder,
- org.eclipse.smarthome.core.thing.type,
- org.eclipse.smarthome.core.types,
- org.openhab.binding.bluetooth,
- org.openhab.binding.bluetooth.discovery,
- org.openhab.binding.bluetooth.notification,
- org.slf4j
-Service-Component: OSGI-INF/*.xml
-Export-Package: org.openhab.binding.bluetooth,
- org.openhab.binding.bluetooth.discovery,
- org.openhab.binding.bluetooth.notification
-Bundle-ActivationPolicy: lazy
-Automatic-Module-Name: org.openhab.binding.bluetooth
diff --git a/addons/binding/org.openhab.binding.bluetooth/OSGI-INF/.gitignore b/addons/binding/org.openhab.binding.bluetooth/OSGI-INF/.gitignore
deleted file mode 100644
index b878e882aca37..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth/OSGI-INF/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/*.xml
diff --git a/addons/binding/org.openhab.binding.bluetooth/build.properties b/addons/binding/org.openhab.binding.bluetooth/build.properties
deleted file mode 100644
index a6cfff567c9b1..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth/build.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-source..=src/main/java/
-output..=target/classes
-bin.includes=META-INF/,\
- .,\
- OSGI-INF/,\
- ESH-INF/,\
- NOTICE
diff --git a/addons/binding/org.openhab.binding.bluetooth/pom.xml b/addons/binding/org.openhab.binding.bluetooth/pom.xml
deleted file mode 100644
index 7e96b9b1d9f6d..0000000000000
--- a/addons/binding/org.openhab.binding.bluetooth/pom.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
- 4.0.0
-
-
- org.openhab.binding
- pom
- 2.5.0-SNAPSHOT
-
-
- org.openhab.binding.bluetooth
- eclipse-plugin
-
- Bluetooth Binding
-
-
diff --git a/addons/binding/org.openhab.binding.boschindego/.classpath b/addons/binding/org.openhab.binding.boschindego/.classpath
deleted file mode 100644
index f32868aa4cb61..0000000000000
--- a/addons/binding/org.openhab.binding.boschindego/.classpath
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.boschindego/.gitignore b/addons/binding/org.openhab.binding.boschindego/.gitignore
deleted file mode 100644
index 496ee2ca6a2f0..0000000000000
--- a/addons/binding/org.openhab.binding.boschindego/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-.DS_Store
\ No newline at end of file
diff --git a/addons/binding/org.openhab.binding.boschindego/.project b/addons/binding/org.openhab.binding.boschindego/.project
deleted file mode 100644
index 0ba62a861b635..0000000000000
--- a/addons/binding/org.openhab.binding.boschindego/.project
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
- org.openhab.binding.boschindego
-
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- org.eclipse.pde.ManifestBuilder
-
-
-
-
- org.eclipse.pde.SchemaBuilder
-
-
-
-
- org.eclipse.pde.ds.core.builder
-
-
-
-
-
- org.eclipse.pde.PluginNature
- org.eclipse.jdt.core.javanature
-
-
diff --git a/addons/binding/org.openhab.binding.boschindego/META-INF/MANIFEST.MF b/addons/binding/org.openhab.binding.boschindego/META-INF/MANIFEST.MF
deleted file mode 100644
index 20de2a54648a5..0000000000000
--- a/addons/binding/org.openhab.binding.boschindego/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,32 +0,0 @@
-Manifest-Version: 1.0
-Automatic-Module-Name: org.openhab.binding.boschindego
-Bundle-ActivationPolicy: lazy
-Bundle-ClassPath:
- .,
- lib/bosch-indego-controller-lib-0.8.jar,
- lib/httpclient-4.5.2.jar,
- lib/httpcore-4.4.4.jar,
- lib/jackson-annotations-2.8.6.jar,
- lib/jackson-core-2.8.6.jar,
- lib/jackson-databind-2.8.6.jar
-Bundle-ManifestVersion: 2
-Bundle-Name: BoschIndego Binding
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Bundle-SymbolicName: org.openhab.binding.boschindego;singleton:=true
-Bundle-Vendor: openHAB
-Bundle-Version: 2.5.0.qualifier
-Import-Package:
- org.apache.commons.codec,
- org.apache.commons.codec.binary,
- org.apache.commons.logging,
- org.eclipse.jdt.annotation;resolution:=optional,
- org.eclipse.smarthome.config.core,
- org.eclipse.smarthome.core.library.types,
- org.eclipse.smarthome.core.thing,
- org.eclipse.smarthome.core.thing.binding,
- org.eclipse.smarthome.core.thing.binding.builder,
- org.eclipse.smarthome.core.thing.type,
- org.eclipse.smarthome.core.types,
- org.osgi.framework,
- org.slf4j
-Service-Component: OSGI-INF/*.xml
diff --git a/addons/binding/org.openhab.binding.boschindego/OSGI-INF/.gitignore b/addons/binding/org.openhab.binding.boschindego/OSGI-INF/.gitignore
deleted file mode 100644
index b878e882aca37..0000000000000
--- a/addons/binding/org.openhab.binding.boschindego/OSGI-INF/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/*.xml
diff --git a/addons/binding/org.openhab.binding.boschindego/build.properties b/addons/binding/org.openhab.binding.boschindego/build.properties
deleted file mode 100644
index 71f69309a27f0..0000000000000
--- a/addons/binding/org.openhab.binding.boschindego/build.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-source.. = src/main/java/
-output.. = target/classes
-bin.includes = META-INF/,\
- .,\
- OSGI-INF/,\
- ESH-INF/,\
- lib/bosch-indego-controller-lib-0.8.jar,\
- lib/httpclient-4.5.2.jar,\
- lib/httpcore-4.4.4.jar,\
- lib/jackson-annotations-2.8.6.jar,\
- lib/jackson-core-2.8.6.jar,\
- lib/jackson-databind-2.8.6.jar,\
- NOTICE
-
diff --git a/addons/binding/org.openhab.binding.boschindego/lib/bosch-indego-controller-lib-0.8.jar b/addons/binding/org.openhab.binding.boschindego/lib/bosch-indego-controller-lib-0.8.jar
deleted file mode 100644
index 1c2394f1404e3..0000000000000
Binary files a/addons/binding/org.openhab.binding.boschindego/lib/bosch-indego-controller-lib-0.8.jar and /dev/null differ
diff --git a/addons/binding/org.openhab.binding.boschindego/lib/httpclient-4.5.2.jar b/addons/binding/org.openhab.binding.boschindego/lib/httpclient-4.5.2.jar
deleted file mode 100644
index 701609fcc8469..0000000000000
Binary files a/addons/binding/org.openhab.binding.boschindego/lib/httpclient-4.5.2.jar and /dev/null differ
diff --git a/addons/binding/org.openhab.binding.boschindego/lib/httpcore-4.4.4.jar b/addons/binding/org.openhab.binding.boschindego/lib/httpcore-4.4.4.jar
deleted file mode 100644
index ac4a8773022b9..0000000000000
Binary files a/addons/binding/org.openhab.binding.boschindego/lib/httpcore-4.4.4.jar and /dev/null differ
diff --git a/addons/binding/org.openhab.binding.boschindego/lib/jackson-annotations-2.8.6.jar b/addons/binding/org.openhab.binding.boschindego/lib/jackson-annotations-2.8.6.jar
deleted file mode 100644
index bf07bcb1cf645..0000000000000
Binary files a/addons/binding/org.openhab.binding.boschindego/lib/jackson-annotations-2.8.6.jar and /dev/null differ
diff --git a/addons/binding/org.openhab.binding.boschindego/lib/jackson-core-2.8.6.jar b/addons/binding/org.openhab.binding.boschindego/lib/jackson-core-2.8.6.jar
deleted file mode 100644
index 2b10bf3030f99..0000000000000
Binary files a/addons/binding/org.openhab.binding.boschindego/lib/jackson-core-2.8.6.jar and /dev/null differ
diff --git a/addons/binding/org.openhab.binding.boschindego/lib/jackson-databind-2.8.6.jar b/addons/binding/org.openhab.binding.boschindego/lib/jackson-databind-2.8.6.jar
deleted file mode 100644
index 2784d1f827605..0000000000000
Binary files a/addons/binding/org.openhab.binding.boschindego/lib/jackson-databind-2.8.6.jar and /dev/null differ
diff --git a/addons/binding/org.openhab.binding.boschindego/pom.xml b/addons/binding/org.openhab.binding.boschindego/pom.xml
deleted file mode 100644
index 543b86236efdc..0000000000000
--- a/addons/binding/org.openhab.binding.boschindego/pom.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
- 4.0.0
-
-
- org.openhab.binding
- pom
- 2.5.0-SNAPSHOT
-
-
- org.openhab.binding.boschindego
- eclipse-plugin
-
- BoschIndego Binding
-
-
diff --git a/addons/binding/org.openhab.binding.chromecast.test/.classpath b/addons/binding/org.openhab.binding.chromecast.test/.classpath
deleted file mode 100644
index 64777f25c82a4..0000000000000
--- a/addons/binding/org.openhab.binding.chromecast.test/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.chromecast.test/.project b/addons/binding/org.openhab.binding.chromecast.test/.project
deleted file mode 100644
index ac3ede2174e88..0000000000000
--- a/addons/binding/org.openhab.binding.chromecast.test/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
- org.openhab.binding.chromecast.test
-
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- org.eclipse.pde.ManifestBuilder
-
-
-
-
- org.eclipse.pde.SchemaBuilder
-
-
-
-
-
- org.eclipse.pde.PluginNature
- org.eclipse.jdt.core.javanature
-
-
diff --git a/addons/binding/org.openhab.binding.chromecast.test/META-INF/MANIFEST.MF b/addons/binding/org.openhab.binding.chromecast.test/META-INF/MANIFEST.MF
deleted file mode 100644
index 660292638ab07..0000000000000
--- a/addons/binding/org.openhab.binding.chromecast.test/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,30 +0,0 @@
-Manifest-Version: 1.0
-Automatic-Module-Name: org.openhab.binding.chromecast.test
-Bundle-ActivationPolicy: lazy
-Bundle-ManifestVersion: 2
-Bundle-Name: Chromecast Binding Tests
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Bundle-SymbolicName: org.openhab.binding.chromecast.test;singleton:=true
-Bundle-Vendor: openHAB
-Bundle-Version: 2.5.0.qualifier
-Fragment-Host: org.openhab.binding.chromecast
-Import-Package:
- org.eclipse.jdt.annotation;resolution:=optional,
- org.eclipse.smarthome.core.common.registry,
- org.eclipse.smarthome.core.events,
- org.eclipse.smarthome.core.thing,
- org.eclipse.smarthome.core.thing.binding,
- org.eclipse.smarthome.core.thing.binding.builder,
- org.eclipse.smarthome.core.thing.util,
- org.eclipse.smarthome.test.java,
- org.eclipse.smarthome.test.storage,
- org.hamcrest;core=split,
- org.hamcrest.core,
- org.junit;version="4.0.0",
- org.mockito,
- org.mockito.invocation,
- org.mockito.stubbing,
- org.osgi.framework,
- org.osgi.service.component,
- org.osgi.service.device,
- org.slf4j
diff --git a/addons/binding/org.openhab.binding.chromecast.test/build.properties b/addons/binding/org.openhab.binding.chromecast.test/build.properties
deleted file mode 100644
index 64491e243ba70..0000000000000
--- a/addons/binding/org.openhab.binding.chromecast.test/build.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-source.. = src/test/java/
-output.. = target/test-classes
-bin.includes = META-INF/,\
- .,\
- NOTICE
diff --git a/addons/binding/org.openhab.binding.chromecast.test/org.openhab.binding.chromecast.test.launch b/addons/binding/org.openhab.binding.chromecast.test/org.openhab.binding.chromecast.test.launch
deleted file mode 100644
index aab0549699ce3..0000000000000
--- a/addons/binding/org.openhab.binding.chromecast.test/org.openhab.binding.chromecast.test.launch
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.chromecast.test/pom.xml b/addons/binding/org.openhab.binding.chromecast.test/pom.xml
deleted file mode 100644
index 0dc2f31230cb8..0000000000000
--- a/addons/binding/org.openhab.binding.chromecast.test/pom.xml
+++ /dev/null
@@ -1,158 +0,0 @@
-
-
- 4.0.0
-
-
- org.openhab.binding
- pom
- 2.5.0-SNAPSHOT
-
-
- org.openhab.binding.chromecast.test
- eclipse-test-plugin
-
- Chromecast Binding Tests
-
-
-
-
- ${tycho-groupid}
- target-platform-configuration
-
-
-
-
- eclipse-plugin
- org.eclipse.equinox.ds
- 0.0.0
-
-
- eclipse-plugin
- org.eclipse.equinox.event
- 0.0.0
-
-
- eclipse-plugin
- org.eclipse.equinox.http.jetty
- 0.0.0
-
-
- eclipse-plugin
- org.eclipse.equinox.http.servlet
- 0.0.0
-
-
- eclipse-plugin
- org.eclipse.jetty.http
- 0.0.0
-
-
- eclipse-plugin
- org.eclipse.jetty.osgi.httpservice
- 0.0.0
-
-
- eclipse-plugin
- org.eclipse.jetty.server
- 0.0.0
-
-
- eclipse-plugin
- org.eclipse.jetty.servlet
- 0.0.0
-
-
- eclipse-plugin
- org.openhab.core.config.core
- 0.0.0
-
-
- eclipse-plugin
- org.openhab.core
- 0.0.0
-
-
- eclipse-plugin
- org.openhab.core.thing
- 0.0.0
-
-
- eclipse-plugin
- org.openhab.core.thing.xml
- 0.0.0
-
-
-
-
-
-
- ${tycho-groupid}
- tycho-surefire-plugin
-
-
-
- org.eclipse.equinox.ds
- 1
- true
-
-
- org.eclipse.equinox.event
- 2
- true
-
-
- org.eclipse.equinox.http.jetty
- 4
- true
-
-
- org.eclipse.equinox.http.servlet
- 4
- true
-
-
- org.eclipse.jetty.http
- 4
- true
-
-
- org.eclipse.jetty.osgi.httpservice
- 4
- true
-
-
- org.eclipse.jetty.server
- 4
- true
-
-
- org.eclipse.jetty.servlet
- 4
- true
-
-
- org.openhab.core.config.core
- 4
- true
-
-
- org.openhab.core
- 4
- true
-
-
- org.openhab.core.thing
- 4
- true
-
-
- org.openhab.core.thing.xml
- 4
- true
-
-
-
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.chromecast.test/src/test/java/org/openhab/binding/chromecast/internal/handler/ChromecastOSGiTest.java b/addons/binding/org.openhab.binding.chromecast.test/src/test/java/org/openhab/binding/chromecast/internal/handler/ChromecastOSGiTest.java
deleted file mode 100644
index e6258afdfefec..0000000000000
--- a/addons/binding/org.openhab.binding.chromecast.test/src/test/java/org/openhab/binding/chromecast/internal/handler/ChromecastOSGiTest.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.chromecast.internal.handler;
-
-import static org.hamcrest.CoreMatchers.*;
-import static org.hamcrest.core.Is.is;
-import static org.junit.Assert.assertThat;
-import static org.openhab.binding.chromecast.internal.ChromecastBindingConstants.*;
-
-import org.eclipse.smarthome.config.core.Configuration;
-import org.eclipse.smarthome.core.thing.ManagedThingProvider;
-import org.eclipse.smarthome.core.thing.Thing;
-import org.eclipse.smarthome.core.thing.ThingProvider;
-import org.eclipse.smarthome.core.thing.binding.ThingHandler;
-import org.eclipse.smarthome.core.thing.binding.builder.ThingBuilder;
-import org.eclipse.smarthome.test.java.JavaOSGiTest;
-import org.eclipse.smarthome.test.storage.VolatileStorageService;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * Tests for {@link ChromecastHandler}.
- *
- * @author François Pelsser, Wouter Born - Initial contribution
- */
-public class ChromecastOSGiTest extends JavaOSGiTest {
-
- private ManagedThingProvider managedThingProvider;
- private VolatileStorageService volatileStorageService = new VolatileStorageService();
-
- @Before
- public void setUp() {
- registerService(volatileStorageService);
-
- managedThingProvider = getService(ThingProvider.class, ManagedThingProvider.class);
- assertThat(managedThingProvider, is(notNullValue()));
- }
-
- @After
- public void tearDown() {
- unregisterService(volatileStorageService);
- }
-
- @Test
- public void creationOfChromecastHandler() {
- ChromecastHandler handler = getService(ThingHandler.class, ChromecastHandler.class);
- assertThat(handler, is(nullValue()));
-
- Configuration configuration = new Configuration();
- configuration.put(HOST, "hostname");
-
- Thing thing = ThingBuilder.create(THING_TYPE_CHROMECAST, "tv").withConfiguration(configuration).build();
- managedThingProvider.add(thing);
-
- waitForAssert(() -> assertThat(thing.getHandler(), notNullValue()));
- assertThat(thing.getConfiguration(), is(notNullValue()));
- assertThat(thing.getHandler(), is(instanceOf(ChromecastHandler.class)));
- }
-}
diff --git a/addons/binding/org.openhab.binding.chromecast/.classpath b/addons/binding/org.openhab.binding.chromecast/.classpath
deleted file mode 100644
index d87cc26b5634f..0000000000000
--- a/addons/binding/org.openhab.binding.chromecast/.classpath
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.chromecast/.project b/addons/binding/org.openhab.binding.chromecast/.project
deleted file mode 100644
index aae99edb3088b..0000000000000
--- a/addons/binding/org.openhab.binding.chromecast/.project
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
- org.openhab.binding.chromecast
-
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- org.eclipse.pde.ManifestBuilder
-
-
-
-
- org.eclipse.pde.SchemaBuilder
-
-
-
-
- org.eclipse.pde.ds.core.builder
-
-
-
-
-
- org.eclipse.pde.PluginNature
- org.eclipse.jdt.core.javanature
-
-
diff --git a/addons/binding/org.openhab.binding.chromecast/META-INF/MANIFEST.MF b/addons/binding/org.openhab.binding.chromecast/META-INF/MANIFEST.MF
deleted file mode 100644
index 8e51de761cde7..0000000000000
--- a/addons/binding/org.openhab.binding.chromecast/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,37 +0,0 @@
-Manifest-Version: 1.0
-Automatic-Module-Name: org.openhab.binding.chromecast
-Bundle-ActivationPolicy: lazy
-Bundle-ClassPath:
- .,
- lib/protobuf-java-2.6.0.jar,
- lib/api-v2-0.10.6.jar,
- lib/jackson-core-asl-1.9.2.jar,
- lib/jackson-mapper-asl-1.9.2.jar
-Bundle-ManifestVersion: 2
-Bundle-Name: Chromecast Binding
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Bundle-SymbolicName: org.openhab.binding.chromecast;singleton:=true
-Bundle-Vendor: openHAB
-Bundle-Version: 2.5.0.qualifier
-Import-Package:
- javax.jmdns,
- javax.measure.quantity,
- org.apache.commons.lang,
- org.eclipse.jdt.annotation;resolution:=optional,
- org.eclipse.smarthome.config.core,
- org.eclipse.smarthome.config.discovery,
- org.eclipse.smarthome.config.discovery.mdns,
- org.eclipse.smarthome.core.audio,
- org.eclipse.smarthome.core.library.types,
- org.eclipse.smarthome.core.library.unit,
- org.eclipse.smarthome.core.net,
- org.eclipse.smarthome.core.thing,
- org.eclipse.smarthome.core.thing.binding,
- org.eclipse.smarthome.core.thing.binding.builder,
- org.eclipse.smarthome.core.thing.type,
- org.eclipse.smarthome.core.types,
- org.eclipse.smarthome.io.net.http,
- org.osgi.framework,
- org.osgi.service.component,
- org.slf4j
-Service-Component: OSGI-INF/*.xml
diff --git a/addons/binding/org.openhab.binding.chromecast/OSGI-INF/.gitignore b/addons/binding/org.openhab.binding.chromecast/OSGI-INF/.gitignore
deleted file mode 100644
index b878e882aca37..0000000000000
--- a/addons/binding/org.openhab.binding.chromecast/OSGI-INF/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/*.xml
diff --git a/addons/binding/org.openhab.binding.chromecast/build.properties b/addons/binding/org.openhab.binding.chromecast/build.properties
deleted file mode 100644
index f3b3ec62e305b..0000000000000
--- a/addons/binding/org.openhab.binding.chromecast/build.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-output.. = target/classes
-bin.includes = META-INF/,\
- .,\
- OSGI-INF/,\
- ESH-INF/,\
- lib/,\
- NOTICE
-source.. = src/main/java/
diff --git a/addons/binding/org.openhab.binding.chromecast/lib/api-v2-0.10.6.jar b/addons/binding/org.openhab.binding.chromecast/lib/api-v2-0.10.6.jar
deleted file mode 100644
index 6418219b03010..0000000000000
Binary files a/addons/binding/org.openhab.binding.chromecast/lib/api-v2-0.10.6.jar and /dev/null differ
diff --git a/addons/binding/org.openhab.binding.chromecast/lib/jackson-core-asl-1.9.2.jar b/addons/binding/org.openhab.binding.chromecast/lib/jackson-core-asl-1.9.2.jar
deleted file mode 100644
index c50656724bba0..0000000000000
Binary files a/addons/binding/org.openhab.binding.chromecast/lib/jackson-core-asl-1.9.2.jar and /dev/null differ
diff --git a/addons/binding/org.openhab.binding.chromecast/lib/jackson-mapper-asl-1.9.2.jar b/addons/binding/org.openhab.binding.chromecast/lib/jackson-mapper-asl-1.9.2.jar
deleted file mode 100644
index 6407dc05911e1..0000000000000
Binary files a/addons/binding/org.openhab.binding.chromecast/lib/jackson-mapper-asl-1.9.2.jar and /dev/null differ
diff --git a/addons/binding/org.openhab.binding.chromecast/lib/protobuf-java-2.6.0.jar b/addons/binding/org.openhab.binding.chromecast/lib/protobuf-java-2.6.0.jar
deleted file mode 100644
index 4bfbd4b71abcc..0000000000000
Binary files a/addons/binding/org.openhab.binding.chromecast/lib/protobuf-java-2.6.0.jar and /dev/null differ
diff --git a/addons/binding/org.openhab.binding.chromecast/pom.xml b/addons/binding/org.openhab.binding.chromecast/pom.xml
deleted file mode 100644
index 0b0c274de0e39..0000000000000
--- a/addons/binding/org.openhab.binding.chromecast/pom.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
- 4.0.0
-
-
- org.openhab.binding
- pom
- 2.5.0-SNAPSHOT
-
-
- org.openhab.binding.chromecast
- eclipse-plugin
-
- Chromecast Binding
-
-
diff --git a/addons/binding/org.openhab.binding.dsmr.test/.classpath b/addons/binding/org.openhab.binding.dsmr.test/.classpath
deleted file mode 100644
index a0838479442e1..0000000000000
--- a/addons/binding/org.openhab.binding.dsmr.test/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.dsmr.test/.project b/addons/binding/org.openhab.binding.dsmr.test/.project
deleted file mode 100644
index 62c24d5f1d135..0000000000000
--- a/addons/binding/org.openhab.binding.dsmr.test/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
- org.openhab.binding.dsmr.test
-
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- org.eclipse.pde.ManifestBuilder
-
-
-
-
- org.eclipse.pde.SchemaBuilder
-
-
-
-
-
- org.eclipse.pde.PluginNature
- org.eclipse.jdt.core.javanature
-
-
diff --git a/addons/binding/org.openhab.binding.dsmr.test/META-INF/MANIFEST.MF b/addons/binding/org.openhab.binding.dsmr.test/META-INF/MANIFEST.MF
deleted file mode 100644
index 30f6f17cf7443..0000000000000
--- a/addons/binding/org.openhab.binding.dsmr.test/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,38 +0,0 @@
-Automatic-Module-Name: org.openhab.binding.dsmr.test
-Manifest-Version: 1.0
-Bundle-ClassPath: .
-Bundle-ManifestVersion: 2
-Bundle-Name: DSMR Binding Tests
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Bundle-SymbolicName: org.openhab.binding.dsmr.test;singleton:=true
-Bundle-Vendor: openHAB
-Bundle-Version: 2.5.0.qualifier
-Fragment-Host: org.openhab.binding.dsmr
-Import-Package:
- org.apache.commons.io,
- org.eclipse.jdt.annotation;resolution:=optional,
- org.eclipse.smarthome.core.common,
- org.eclipse.smarthome.core.common.registry,
- org.eclipse.smarthome.core.events,
- org.eclipse.smarthome.core.thing,
- org.eclipse.smarthome.core.thing.binding,
- org.eclipse.smarthome.core.thing.binding.builder,
- org.eclipse.smarthome.core.thing.util,
- org.eclipse.smarthome.io.transport.serial,
- org.eclipse.smarthome.test,
- org.eclipse.smarthome.test.java,
- org.eclipse.smarthome.test.storage,
- org.hamcrest;core=split,
- org.hamcrest.core,
- org.junit,
- org.mockito,
- org.mockito.hamcrest,
- org.mockito.invocation,
- org.mockito.stubbing,
- org.osgi.framework,
- org.osgi.service.component,
- org.osgi.service.device,
- org.slf4j
-Require-Bundle:
- org.hamcrest,
- org.junit
diff --git a/addons/binding/org.openhab.binding.dsmr.test/build.properties b/addons/binding/org.openhab.binding.dsmr.test/build.properties
deleted file mode 100644
index ce15f22529e21..0000000000000
--- a/addons/binding/org.openhab.binding.dsmr.test/build.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-source.. = src/test/java/,src/test/resources/
-output.. = target/test-classes
-bin.includes = META-INF/,\
- .,\
- NOTICE
diff --git a/addons/binding/org.openhab.binding.dsmr.test/org.openhab.binding.dsmr.test.launch b/addons/binding/org.openhab.binding.dsmr.test/org.openhab.binding.dsmr.test.launch
deleted file mode 100644
index 6bac0ee1f82ba..0000000000000
--- a/addons/binding/org.openhab.binding.dsmr.test/org.openhab.binding.dsmr.test.launch
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.dsmr.test/pom.xml b/addons/binding/org.openhab.binding.dsmr.test/pom.xml
deleted file mode 100644
index e961c9090d668..0000000000000
--- a/addons/binding/org.openhab.binding.dsmr.test/pom.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-
- 4.0.0
-
-
- org.openhab.binding
- pom
- 2.5.0-SNAPSHOT
-
-
- org.openhab.binding.dsmr.test
- eclipse-test-plugin
-
- DSMR Binding Tests
-
-
-
-
- ${tycho-groupid}
- target-platform-configuration
-
-
-
-
- eclipse-plugin
- org.eclipse.equinox.ds
- 0.0.0
-
-
- eclipse-plugin
- org.eclipse.equinox.event
- 0.0.0
-
-
- eclipse-plugin
- org.openhab.core.config.discovery
- 0.0.0
-
-
- eclipse-plugin
- org.openhab.core.config.xml
- 0.0.0
-
-
- eclipse-plugin
- org.openhab.core.thing.xml
- 0.0.0
-
-
- eclipse-plugin
- org.openhab.core.binding.xml
- 0.0.0
-
-
-
-
-
-
- ${tycho-groupid}
- tycho-surefire-plugin
-
-
-
- eclipse-plugin
- ch.qos.logback.classic
- 0.0.0
-
-
- eclipse-plugin
- ch.qos.logback.core
- 0.0.0
-
-
- eclipse-plugin
- ch.qos.logback.slf4j
- 0.0.0
-
-
-
-
- org.eclipse.equinox.ds
- 1
- true
-
-
- org.eclipse.equinox.event
- 2
- true
-
-
- org.openhab.core
- 4
- true
-
-
- org.openhab.core.thing
- 4
- true
-
-
- org.openhab.core.config.discovery
- 4
- true
-
-
- org.openhab.core.config.xml
- 4
- true
-
-
- org.openhab.core.core.thing
- 4
- true
-
-
- org.openhab.core.core.thing.xml
- 4
- true
-
-
-
-
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.dsmr/.classpath b/addons/binding/org.openhab.binding.dsmr/.classpath
deleted file mode 100644
index 7f457fa4138d1..0000000000000
--- a/addons/binding/org.openhab.binding.dsmr/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.dsmr/.project b/addons/binding/org.openhab.binding.dsmr/.project
deleted file mode 100644
index da5034fb07f73..0000000000000
--- a/addons/binding/org.openhab.binding.dsmr/.project
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
- org.openhab.binding.dsmr
-
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- org.eclipse.pde.ManifestBuilder
-
-
-
-
- org.eclipse.pde.SchemaBuilder
-
-
-
-
- org.eclipse.pde.ds.core.builder
-
-
-
-
-
- org.eclipse.pde.PluginNature
- org.eclipse.jdt.core.javanature
-
-
diff --git a/addons/binding/org.openhab.binding.dsmr/ESH-INF/binding/binding.xml b/addons/binding/org.openhab.binding.dsmr/ESH-INF/binding/binding.xml
deleted file mode 100644
index c3c815539778c..0000000000000
--- a/addons/binding/org.openhab.binding.dsmr/ESH-INF/binding/binding.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
- DSMR Binding
- This binding integrates Dutch Smart Meters
- Marcel Volaart, Hilbrand Bouwkamp
-
diff --git a/addons/binding/org.openhab.binding.dsmr/ESH-INF/i18n/dsmr_en.properties b/addons/binding/org.openhab.binding.dsmr/ESH-INF/i18n/dsmr_en.properties
deleted file mode 100644
index 2243333db9bb3..0000000000000
--- a/addons/binding/org.openhab.binding.dsmr/ESH-INF/i18n/dsmr_en.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-# Text used in the source code.
-
-# meter kind names
-meterKind.invalid.label = Invalid Meter
-meterKind.device.label = Generic DSMR Device
-meterKind.main_electricity.label = Main Electricity Meter
-meterKind.gas.label = Gas Meter
-meterKind.heating.label = Heating Meter
-meterKind.cooling.label = Cooling Meter
-meterKind.water.label = Water Meter
-meterKind.generic.label = Generic Meter
-meterKind.gj.label = GJ Meter
-meterKind.m3.label = M3 Meter
-meterKind.slave_electricity1.label = Slave Electricity Meter
-meterKind.slave_electricity2.label = Slave Electricity Meter 2
-
-# Connector error messages
-error.bridge.nodata = Not receiving data from meter.
-error.configuration.invalidmetertype = The thing could not be initialized. Delete and re-add thing if the problem persists.
-error.configuration.incomplete = Incomplete configuration. Not all required configuration settings are set.
-error.thing.nodata = Not receiving data from meter.
-error.connector.dont_exists = Serial port does not exist.
-error.connector.in_use = Serial port is already in use.
-error.connector.internal_error = Unexpected error, possible bug. Please report.
-error.connector.not_compatible = Serial port is not compatible.
-error.connector.read_error = Read error.
diff --git a/addons/binding/org.openhab.binding.dsmr/ESH-INF/thing/channeltypes_electricity.xml b/addons/binding/org.openhab.binding.dsmr/ESH-INF/thing/channeltypes_electricity.xml
deleted file mode 100644
index 271930c0d85ac..0000000000000
--- a/addons/binding/org.openhab.binding.dsmr/ESH-INF/thing/channeltypes_electricity.xml
+++ /dev/null
@@ -1,249 +0,0 @@
-
-
-
-
- Number:Energy
-
- The total amount of electricity used.
-
-
-
- Number:Energy
-
- The total amount of electricity used for tariff 0.
-
-
-
- Number:Energy
-
- The total amount of electricity used for tariff 1.
-
-
-
- Number:Energy
-
- The total amount of electricity used for tariff 2.
-
-
-
- Number:Energy
-
- The total amount of electricity used for tariff 0 (anti fraud).
-
-
-
- Number
-
- The total amount of electricity used for tariff 1 (anti fraud).
-
-
-
- Number:Energy
-
- The total amount of electricity used for tariff 2 (anti fraud).
-
-
-
- Number:Energy
-
- The total amount of electricity produced for tariff 0.
-
-
-
- Number:Energy
-
- The total amount of electricity produced for tariff 1.
-
-
-
- Number:Energy
-
- The total amount of electricity produced for tariff 2.
-
-
-
- String
-
- The current tariff indicator.
-
-
-
- Number:Power
-
- The aggregate active import power.
-
-
-
- Number:Power
-
- The current power delivery.
-
-
-
- Number:Power
-
- The current power production.
-
-
-
- Number:ElectricCurrent
-
- The actual threshold.
-
-
-
- Number:Power
-
- The actual threshold.
-
-
-
- Number
-
- The switch position.
-
-
-
- Number
-
- The number of power failures.
-
-
-
- Number
-
- The number of long power failures.
-
-
-
- Number
-
- Number of log entries.
-
-
-
- DateTime
-
- Timestamp when the power failure ended. There can be multiple log entries.
-Each entry has its own channel (emeter_power_failure_log_timestamp*x*, *x* = 0 - 9)
-
-
-
- Number:Time
-
- Duration of the power failure.
-Each entry has its own channel (emeter_power_failure_log_duration*x*, *x* = 0 - 9)
-
-
-
- Number
-
- The number of voltage sags L1.
-
-
-
- Number
-
- The number of voltage sags L2.
-
-
-
- Number
-
- The number of voltage sags L3.
-
-
-
- Number
-
- The number of voltage swells L1.
-
-
-
- Number
-
- The number of voltage swells L2.
-
-
-
- Number
-
- The number of voltage swells L3.
-
-
-
- Number:ElectricCurrent
-
- The instant current L1.
-
-
-
- Number:ElectricCurrent
-
- The instant current L2.
-
-
-
- Number:ElectricCurrent
-
- The instant current L3.
-
-
-
- Number:Power
-
- The instant power delivery L1.
-
-
-
- Number:Power
-
- The instant power delivery L2.
-
-
-
- Number
-
- The instant power delivery L3.
-
-
-
- Number:Power
-
- The instant power production L1.
-
-
-
- Number:Power
-
- The instant power production L2.
-
-
-
- Number:Power
-
- The instant power production L3.
-
-
-
- Number:ElectricPotential
-
- The instant voltage L1.
-
-
-
- Number:ElectricPotential
-
- The instant voltage L2.
-
-
-
- Number:ElectricPotential
-
- The instant voltage L3.
-
-
-
diff --git a/addons/binding/org.openhab.binding.dsmr/META-INF/MANIFEST.MF b/addons/binding/org.openhab.binding.dsmr/META-INF/MANIFEST.MF
deleted file mode 100644
index 3b4e94a3ca023..0000000000000
--- a/addons/binding/org.openhab.binding.dsmr/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,30 +0,0 @@
-Automatic-Module-Name: org.openhab.binding.dsmr
-Manifest-Version: 1.0
-Bundle-ActivationPolicy: lazy
-Bundle-ClassPath: .
-Bundle-ManifestVersion: 2
-Bundle-Name: DSMR Binding
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Bundle-SymbolicName: org.openhab.binding.dsmr;singleton:=true
-Bundle-Vendor: openHAB
-Bundle-Version: 2.5.0.qualifier
-Import-Package:
- javax.measure,
- javax.measure.quantity,
- org.apache.commons.lang,
- org.eclipse.jdt.annotation;resolution:=optional,
- org.eclipse.smarthome.config.core,
- org.eclipse.smarthome.config.discovery,
- org.eclipse.smarthome.core.common,
- org.eclipse.smarthome.core.i18n,
- org.eclipse.smarthome.core.library.types,
- org.eclipse.smarthome.core.library.unit,
- org.eclipse.smarthome.core.thing,
- org.eclipse.smarthome.core.thing.binding,
- org.eclipse.smarthome.core.thing.binding.builder,
- org.eclipse.smarthome.core.thing.type,
- org.eclipse.smarthome.core.types,
- org.eclipse.smarthome.io.transport.serial,
- org.osgi.framework,
- org.slf4j
-Service-Component: OSGI-INF/*.xml
diff --git a/addons/binding/org.openhab.binding.dsmr/OSGI-INF/.gitignore b/addons/binding/org.openhab.binding.dsmr/OSGI-INF/.gitignore
deleted file mode 100644
index 6722cd96e785a..0000000000000
--- a/addons/binding/org.openhab.binding.dsmr/OSGI-INF/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-*.xml
diff --git a/addons/binding/org.openhab.binding.dsmr/README.md b/addons/binding/org.openhab.binding.dsmr/README.md
deleted file mode 100644
index 4cb7786517c1e..0000000000000
--- a/addons/binding/org.openhab.binding.dsmr/README.md
+++ /dev/null
@@ -1,302 +0,0 @@
-# DSMR Binding
-
-The DSMR-binding is targeted towards Dutch users having a smart meter (Dutch: 'Slimme meter').
-Data of Dutch smart meters can be obtained via the P1-port.
-When connecting this port from a serial port the data can be read out.
-
-This binding reads the P1-port of the Dutch Smart Meters that comply to NTA8130, DSMR v2.1, DSMR v2.2, DSMR v3.0, DSMR v4.0, DSMR v4.04, and DSMR 5.0.
-Although DSMR v4.2 is not an official specification, the binding has support for this version.
-
-If you are not living in the Netherlands but do want to read a meter please have look at the [SmartMeter Binding](https://www.openhab.org/addons/bindings/smartmeter).
-Because the Dutch Meter standard is based on the IEC-62056-21 standard it might be desirable to build support for other country metering systems based on that standard in this binding.
-
-## Serial Port Configuration
-
-The P1-port is a serial port. To configure the serial port within openHAB see the [general documentation about serial port configuration](/docs/administration/serial.html).
-
-## Supported Things
-
-`dsmrBridge`: This is the device that communicated between the binding (serial) and its internal meters.
-You always have to have a 'Dutch Smart Meter'-bridge. The bridge contains the serial port configuration.
-Specific meters are bound via the bridge to the smart meter. A smart meter consists typically out of minimal 2 meters.
-A generic meter and the electricity meter. Each meter is bound to the DSMR protocol the physical meter supports.
-For each meter it is possible to set a refresh rate at which the status is updated.
-The physical meter might update with a high frequency per second, while it's desired to have only values per minute.
-
-## Discovery
-
-Both bridges and meters can be discovered via the discovery process.
-If a bridge is manually configured it is possible to auto detect available meters.
-
-### Configuration
-
-The configuration for the Bridge consists of the following parameters:
-
-| Parameter | Description |
-|---------------------|-------------------------------------------------------------------------------------------------------------|
-| serialPort | The serial port where the P1-port is connected to (e.g. Linux: `/dev/ttyUSB1`, Windows: `COM2`) (mandatory) |
-| receivedTimeout | The time out period in which messages are expected to arrive, default is 120 seconds. |
-| baudrate | Baudrate when no auto detect. valid values: 4800, 9600, 19200, 38400, 57600, 115200 |
-| databits | Data bits when no auto detect. valid values: 5, 6, 7, 8 |
-| parity | Parity when no auto detect. valid values: E(ven), N(one), O(dd) |
-| stopbits | Stop bits when no auto detect. valid values: 1, 1.5, 2 |
-
-**Note:** *The manual configuration is only needed if the DSMR-device requires non DSMR-standard Serial Port parameters (i.e. something different then `115200 8N1` or `9600 7E1`)*
-
-### Troubleshooting
-
-If there are unexpected configuration issues.
-For example a meter could not be found or not all channels expected are available.
-Than run the discovery process and look into the log file.
-There are extra checks that can give more information about what might be wrong.
-
-## Meters
-
-The information in this paragraph in necessary if you choose to configure the meters manually in a `.things` file.
-
-Supported meters:
-
-| Meter Thing | Thing type ID | M-Bus channel | Refresh rate |
-|-------------------------------------------------|------------------------------|---------------|--------------|
-| DSMR V2 / V3 Device | `device_v2_v3` | -1 | 10 seconds |
-| DSMR V4 Device | `device_v4` | -1 | 10 seconds |
-| DSMR V5 Device | `device_v5` | -1 | 10 seconds |
-| ACE4000 GTMM Mk3 Electricity meter | `electricity_ace4000` | 0 | 10 seconds |
-| DSMR V2.1 Electricity meter | `electricity_v2_1` | 0 | 10 seconds |
-| DSMR V2.2 Electricity meter | `electricity_v2_2` | 0 | 10 seconds |
-| DSMR V3 Electricity meter | `electricity_v3_0` | 0 | 10 seconds |
-| DSMR V4.0 Electricity meter | `electricity_v4_0` | 0 | 10 seconds |
-| DSMR V4.0.4 Electricity meter | `electricity_v4_0_4` | 0 | 10 seconds |
-| DSMR V4.2 Electricity meter | `electricity_v4_2` | 0 | 10 seconds |
-| DSMR V5 Electricity meter | `electricity_v5_0` | 0 | 10 seconds |
-| ACE4000 GTMM Mk3 Gas meter | `gas_ace4000` | 3 | 1 hour |
-| DSMR V2.1 Gas meter | `gas_v2_1` | 0 | 24 hours |
-| DSMR V2.2 Gas meter | `gas_v2_2` | 0 | 24 hours |
-| DSMR V3.0 Gas meter | `gas_v3_0` | *note 1* | 1 hour |
-| ACE4000 GTMM Mk3 Cooling meter | `cooling_ace4000` | 6 | 1 hour |
-| DSMR V2.2 Cooling meter | `cooling_v2_2` | 0 | 1 hour |
-| ACE4000 GTMM Mk3 Heating meter | `heating_ace4000` | 4 | 1 hour |
-| DSMR V2.2 Heating meter | `heating_v2_2` | 0 | 1 hour |
-| ACE4000 GTMM Mk3 Water meter | `water_ace4000` | 5 | 1 hour |
-| DSMR V2.2 Water meter | `water_v2_2` | 0 | 1 hour |
-| DSMR V3.0 Water meter | `water_v3_0` | *note 1* | 1 hour |
-| ACE4000 GTMM Mk3 1st Slave Electricity meter | `slave_electricity1_ace4000` | 1 | 1 hour |
-| ACE4000 GTMM Mk3 2nd Slave Electricity meter | `slave_electricity2_ace4000` | 2 | 1 hour |
-| DSMR V4.x Slave Electricity meter | `slave_electricity_v4` | *note 1* | 1 hour |
-| DSMR V5 Slave Electricity meter | `slave_electricity_v5` | *note 1* | 5 minutes |
-| DSMR V3.0 Generic meter | `generic_v3_0` | *note 1* | 1 hour |
-| DSMR V3.0 Giga Joule meter (heating or cooling) | `gj_v3_0` | *note 1* | 1 hour |
-| DSMR V4.x Giga Joule meter (heating or cooling) | `gj_v4` | *note 1* | 1 hour |
-| DSMR V5 Giga Joule meter (heating or cooling) | `gj_v5_0` | *note 1* | 5 minutes |
-| DSMR V4.x m3 meter (gas or water) | `m3_v4` | *note 1* | 1 hour |
-| DSMR V5 m3 meter (gas or water) | `m3_v5_0` | *note 1* | 5 minutes |
-
-*note 1*. The channel of these meters is dependent on the physical installation and corresponds to the M-Bus channel.
-You can ask your supplier / installer for this information or you can retrieve it from the logfiles (see *Determine M-Bus channel*).
-
-#### Configuration
-
-The configuration for the meters consists of the following parameters:
-
-| Parameter | Description |
-|---------------------|--------------------------------------------------------------------------------------|
-| refresh | Time in seconds with which the state of the device is updated. Default is 60 seconds |
-| channel | M-Bus channel. See the table above |
-
-
-**Examples**
-
-```
-Bridge dsmr:dsmrBridge:myDSMRDevice [serialPort="/dev/ttyUSB0"] {
- Things:
- device_v5 dsmrDeviceV5 [channel=-1]
- electricity_v5_0 electricityV5 [channel=0]
-}
-```
-
-### Channels
-
-#### Item configuration
-
-Paper UI. Item configuration can be done in the regular way.
-
-Manual configuration:
-The following channels are supported:
-
-- Y channel is supported
-- \- channel is not supported
-- O channel is supported only if the device has this functionality
-
-
-| Channel Type ID | Item Type | Description | Ace4000 | DSMR V2.1 | DSMR V2.2 | DSMR V3.0 | DSMR V4.0 | DSMR V4.0.4 | DSMR V4.2 | DSMR V5 |
-|--------------------------------------------------|-----------|------------------------------------------------------------------------|---------|-----------|-----------|-----------|-----------|-------------|-----------|---------|
-| | | **Channels for the generic device** | | | | | | | | |
-| `p1_text_code` | String | Text code from the device | - | Y | Y | Y | Y | Y | Y | - |
-| `p1_text_string` | String | Text string from the device | - | Y | Y | Y | Y | Y | Y | Y |
-| `p1_version_output` | String | Version information (most times this refers to the DSMR specification) | - | - | - | - | Y | Y | Y | Y |
-| `p1_timestamp` | DateTime | Timestamp of the last device reading | - | - | - | - | Y | Y | Y | Y |
-| | | **Channels for the cooling meter** | | | | | | | | |
-| `cmeter_value_v2` | Number | The total amount of cooling used in the past period (GJ) | Y | - | Y | - | - | - | - | - |
-| `cmeter_value_v2_timestamp` | DateTime | Timestamp of the last meter reading | Y | - | Y | - | - | - | - | - |
-| `cmeter_equipment_identifier_v2_2` | String | Equipment identifier | - | - | Y | - | - | - | - | - |
-| | | **Channels for the main electricity meter** | | | | | | | | |
-| `emeter_equipment_identifier_v2_x` | String | Electricity Equipment identifier | - | Y | Y | - | - | - | - | - |
-| `emeter_equipment_identifier` | String | Electricity Equipment identifier | - | - | - | Y | Y | Y | Y | Y |
-| `emeter_delivery_tariff0` | Number | Total amount of electricity used for tariff 0 (kWh) | Y | - | - | - | - | - | - | - |
-| `emeter_delivery_tariff1` | Number | Total amount of electricity used for tariff 1 (kWh) | Y | Y | Y | Y | Y | Y | Y | Y |
-| `emeter_delivery_tariff2` | Number | Total amount of electricity used for tariff 2 (kWh) | Y | Y | Y | Y | Y | Y | Y | Y |
-| `emeter_production_tariff0` | Number | Total amount of electricity produced for tariff 0 (kWh) | Y | - | - | - | - | - | - | - |
-| `emeter_production_tariff1` | Number | Total amount of electricity produced for tariff 1 (kWh) | Y | Y | Y | Y | Y | Y | Y | Y |
-| `emeter_production_tariff2` | Number | Total amount of electricity produced for tariff 2 (kWh) | Y | Y | Y | Y | Y | Y | Y | Y |
-| `emeter_delivery_tariff0_antifraud` | Number | Total amount of electricity used for tariff 2 [antifraud] (kWh) | Y | - | - | - | - | - | - | - |
-| `emeter_delivery_tariff1_antifraud` | Number | Total amount of electricity used for tariff 1 [antifraud] (kWh) | Y | - | - | - | - | - | - | - |
-| `emeter_delivery_tariff2_antifraud` | Number | Total amount of electricity used for tariff 2 [antifraud] (kWh) | Y | - | - | - | - | - | - | - |
-| `emeter_tariff_indicator` | String | Current tariff indicator | Y | Y | Y | Y | Y | Y | Y | Y |
-| `emeter_treshold_a_v2_1` | Number | Actual treshold (A) | - | Y | - | - | - | - | - | - |
-| `emeter_treshold_a` | Number | Actual treshold (A) | Y | - | Y | Y | - | - | - | - |
-| `emeter_treshold_kwh` | Number | Actual treshold (kW) | - | - | - | - | Y | Y | - | - |
-| `emeter_switch_position_v2_1` | Number | Switch position | - | Y | - | - | - | - | - | - |
-| `emeter_switch_position` | Number | Switch position | Y | - | Y | Y | Y | Y | - | - |
-| `emeter_active_import_power` | Number | Aggregate active import power (W) | Y | - | - | - | - | - | - | - |
-| `emeter_actual_delivery` | Number | Current power delivery (kW) | - | Y | Y | Y | Y | Y | Y | Y |
-| `emeter_actual_production` | Number | Current power production (kW) | - | - | - | Y | Y | Y | Y | Y |
-| `emeter_power_failures` | Number | Number of power failures | - | - | - | - | Y | Y | Y | Y |
-| `emeter_long_power_failures` | Number | Number of long power failures | - | - | - | - | Y | Y | Y | Y |
-| `emeter_power_failure_log_entries` | Number | Number of entries in the power failure log | - | - | - | - | Y | Y | Y | Y |
-| `emeter_power_failure_log_timestamp[x]` *note 2* | Number | Number of entries in the power failure log | - | - | - | - | Y | Y | Y | Y |
-| `emeter_power_failure_log_duration[x]` *note 2* | Number | Number of entries in the power failure log | - | - | - | - | Y | Y | Y | Y |
-| `emeter_voltage_sags_l1` | Number | Number of voltage sags L1 | - | - | - | - | Y | Y | Y | Y |
-| `emeter_voltage_sags_l2` | Number | Number of voltage sags L2 | - | - | - | - | O | O | O | O |
-| `emeter_voltage_sags_l3` | Number | Number of voltage sags L3 | - | - | - | - | O | O | O | O |
-| `emeter_voltage_swells_l1` | Number | Number of voltage swells L1 | - | - | - | - | Y | Y | Y | Y |
-| `emeter_voltage_swells_l2` | Number | Number of voltage swells L2 | - | - | - | - | O | O | O | O |
-| `emeter_voltage_swells_l3` | Number | Number of voltage swells L3 | - | - | - | - | O | O | O | O |
-| `emeter_instant_current_l1` | Number | Instant Current L1 (A) | - | - | - | - | Y | Y | Y | Y |
-| `emeter_instant_current_l2` | Number | Instant Current L2 (A) | - | - | - | - | O | O | O | O |
-| `emeter_instant_current_l3` | Number | Instant Current L3 (A) | - | - | - | - | O | O | O | O |
-| `emeter_instant_power_delivery_l1` | Number | Instant Power Delivery L1 (kW) | - | - | - | - | Y | Y | Y | Y |
-| `emeter_instant_power_delivery_l2` | Number | Instant Power Delivery L2 (kW) | - | - | - | - | O | O | O | O |
-| `emeter_instant_power_delivery_l3` | Number | Instant Power Delivery L3 (kW) | - | - | - | - | O | O | O | O |
-| `emeter_instant_power_production_l1` | Number | Instant Power Production L1 (kW) | - | - | - | - | Y | Y | Y | Y |
-| `emeter_instant_power_production_l2` | Number | Instant Power Production L2 (kW) | - | - | - | - | O | O | O | O |
-| `emeter_instant_power_production_l3` | Number | Instant Power Production L3 (kW) | - | - | - | - | O | O | O | O |
-| `emeter_instant_voltage_l1` | Number | Instant Voltage L1 (V) | - | - | - | - | - | - | - | Y |
-| `emeter_instant_voltage_l2` | Number | Instant Voltage L2 (V) | - | - | - | - | - | - | - | O |
-| `emeter_instant_voltage_l3` | Number | Instant Voltage L3 (V) | - | - | - | - | - | - | - | O |
-| | | **Channels for the slave electricity meter** | | | | | | | | |
-| `meter_device_type` | String | Slave Electricity Meter Device Type | - | - | - | - | Y | Y | Y | Y |
-| `meter_equipment_identifier` | String | Slave Electricity Meter ID | - | - | - | - | Y | Y | Y | Y |
-| `emeter_delivery_tariff0` | Number | Total amount of slave electricity used for tariff 0 (kWh) | Y | - | - | - | - | - | - | - |
-| `emeter_delivery_tariff1` | Number | Total amount of slave electricity used for tariff 1 (kWh) | Y | - | - | - | - | - | - | - |
-| `emeter_delivery_tariff2` | Number | Total amount of slave electricity used for tariff 2 (kWh) | Y | - | - | - | - | - | - | - |
-| `emeter_production_tariff0` | Number | Total amount of slave electricity produced for tariff 0 (kWh) | Y | - | - | - | - | - | - | - |
-| `emeter_production_tariff1` | Number | Total amount of slave electricity produced for tariff 1 (kWh) | Y | - | - | - | - | - | - | - |
-| `emeter_production_tariff2` | Number | Total amount of slave electricity produced for tariff 2 (kWh) | Y | - | - | - | - | - | - | - |
-| `emeter_tariff_indicator` | String | Current slave tariff indicator | Y | - | - | - | - | - | - | - |
-| `emeter_treshold_a` | Number | Actual slave treshold (A) | Y | - | - | - | - | - | - | - |
-| `meter_switch_position` | Number | Slave electricity switch position | Y | - | - | Y | Y | Y | - | - |
-| `emeter_active_import_power` | Number | Slave aggregate active import power (W) | Y | - | - | - | - | - | - | - |
-| `emeter_value` | Number | Slave electricity usage (kWh) in the past period | - | - | - | - | Y | Y | Y | Y |
-| `emeter_value_timestamp` | DateTime | Timestamp of the last reading | - | - | - | - | Y | Y | Y | Y |
-| `meter_device_type` | String | Gas Meter Device Type | - | - | - | Y | - | - | - | - |
-| `meter_equipment_identifier` | String | Gas Meter ID | Y | - | - | Y | - | - | - | - |
-| | | **Channels for the gas meter** | | | | | | | | |
-| `gmeter_equipment_identifier_v2` | String | Gas Meter ID | - | Y | Y | - | - | - | - | - |
-| `gmeter_24h_delivery_v2` | Number | Gas Delivery past 24 hours | Y | Y | Y | - | - | - | - | - |
-| `gmeter_24h_delivery_v2_timestamp` | DateTime | Timestamp of the last reading | Y | Y | Y | - | - | - | - | - |
-| `gmeter_24h_delivery_compensated_v2` | Number | Gas Delivery past 24 hours (compensated) | - | Y | Y | - | - | - | - | - |
-| `gmeter_24h_delivery_compensated_v2_timestamp` | DateTime | Timestamp of the last reading | - | Y | Y | - | - | - | - | - |
-| `gmeter_value_v3` | Number | Gas Delivery past period | - | - | - | Y | - | - | - | - |
-| `gmeter_value_v3_timestamp` | DateTime | Timestamp of the last reading | - | - | - | Y | - | - | - | - |
-| `gmeter_valve_position_v2_1` | Number | Gas Valve position | - | Y | - | - | - | - | - | - |
-| `gmeter_valve_position_v2_2` | Number | Gas Valve position | Y | - | Y | - | - | - | - | - |
-| | | **Channels for the generic meter** | | | | | | | | |
-| `meter_valve_switch_position` | Number | Gas Valve position | - | - | - | Y | - | - | - | - |
-| `meter_device_type` | String | Generic Meter Device Type | - | - | - | Y | - | - | - | - |
-| `gmeter_equipment_identifier` | String | Generic Meter ID | - | - | - | Y | - | - | - | - |
-| `genmeter_value_v3` | Number | Delivery past period | - | - | - | Y | - | - | - | - |
-| `meter_valve_switch_position` | Number | Generic Meter Valve/Switch position | - | - | - | Y | - | - | - | - |
-| | | **Channels for the GJ meter (Heating or Cooling)** | | | | | | | | |
-| `meter_device_type` | String | GJ Meter Device Type | - | - | - | Y | Y | Y | Y | Y |
-| `meter_equipment_identifier` | Number | GJ Meter ID | - | - | - | Y | Y | Y | Y | Y |
-| `gjmeter_value_v3` | Number | GJ Delivery past period | - | - | - | Y | - | - | - | - |
-| `gjmeter_value_v3_timestamp` | DateTime | Timestamp of the last reading | - | - | - | Y | - | - | - | - |
-| `gjmeter_value_v4` | Number | GJ Delivery past period | - | - | - | - | Y | Y | Y | Y |
-| `gjmeter_value_v4_timestamp` | DateTime | Timestamp of the last reading | - | - | - | - | Y | Y | Y | Y |
-| | | **Channels for the heating meter** | | | | | | | | |
-| `meter_valve_switch_position` | Number | GJ Meter Valve position | - | - | - | Y | Y | Y | Y | - |
-| `meter_equipment_identifier` | String | Heating Meter ID | Y | - | - | - | - | - | - | - |
-| `hmeter_equipment_identifier_v2_2` | String | Heating Meter ID | - | - | Y | - | - | - | - | - |
-| `hmeter_value_v2` | Number | Heating Delivery past period | Y | - | Y | - | - | - | - | - |
-| `hmeter_value_v2_timestamp` | DateTime | Timestamp of the last reading | Y | - | Y | - | - | - | - | - |
-| | | **Channels for the m3 meter (Gas or Water)** | | | | | | | | |
-| `meter_device_type` | String | m3 Meter Device Type | - | - | - | - | Y | Y | Y | Y |
-| `meter_equipment_identifier` | String | m3 Meter ID | - | - | - | - | Y | Y | Y | Y |
-| `m3meter_value` | Number | m3 Delivery past period | - | - | - | - | Y | Y | Y | Y |
-| `meter_valve_switch_position` | Number | m3 Meter Valve position | - | - | - | - | Y | Y | Y | - |
-| | | **Channels for the water meter** | | | | | | | | |
-| `meter_device_type` | String | Water Meter Device Type | - | - | - | Y | - | - | - | - |
-| `meter_equipment_identifier` | String | Water Meter ID | Y | - | - | Y | - | - | - | - |
-| `wmeter_equipment_identifier_v2_2` | String | Water Meter ID | - | - | Y | - | - | - | - | - |
-| `wmeter_value_v2` | Number | Water Delivery past period | Y | - | Y | - | - | - | - | - |
-| `wmeter_value_v2_timestamp` | DateTime | Timestamp of the last reading | Y | - | Y | - | - | - | - | - |
-| `wmeter_value_v3` | Number | Water Delivery past period | - | - | - | Y | - | - | - | - |
-| `meter_valve_switch_position` | Number | Water Meter Valve position | - | - | - | Y | - | - | - | - |
-
-*note 2*. The power failure log has a dynamic number of entries starting at `0`.
-So `emeter_power_failure_log_timestamp0`, `emeter_power_failure_log_duration0` refers to the first entry,
-`emeter_power_failure_log_timestamp1`, `emeter_power_failure_log_duration1` refers to the second entry, etc.
-
-Channel identifier: `dsmr::::`
-
-- ThingTypeID. See table with supported meters
-- BridgeID. The configured id for the bridge
-- id. The configured id for the ThingType you want to address
-- channel type id. The channel type id
-
-The following configuration must to be added to a item configuration file. E.g. `things/dsmr.items`
-
-```
-ItemType "" () {channel=""}
-```
-
-**Examples**
-
-```
-Number MeterDeliveryTariff0 "Total electricity delivered to the resident during low tariff period [%.3f kWh]" {channel="dsmr:electricity_v5_0:mysmartmeter:electricityV5:emeter_delivery_tariff1}
-```
-
-## Full configuration example
-
-`things/dsmr.things`
-
-```
-Bridge dsmr:dsmrBridge:mysmartmeter [serialPort="/dev/ttyUSB0"] {
- Things:
- device_v5 dsmrV5Device [channel=-1]
- electricity_v5_0 electricityV5 [channel=0]
-}
-```
-
-`things/dsmr.items`
-
-```
-String P1Version "P1 Version output" {channel="dsmr:device_v5:mysmartmeter:dsmrV5Device:p1_version_output"}
-Number MeterDeliveryTariff0 "Total electricity delivered to the resident during low tariff period [%.3f kWh]" {channel="dsmr:device_v5:mysmartmeter:electricityV5:emeter_delivery_tariff1}
-Number MeterDeliveryTariff1 "Total electricity delivered to the resident during high tariff period [%.3f kWh]" {channel="dsmr:device_v5:mysmartmeter:electricityV5:emeter_delivery_tariff2}
-```
-
-## Determine M-Bus channel
-
-By manually trigger the discovery process, e.g. via PaperUI, you can use the logging to find out a M-Bus channel. Look for the following logfile line:
-` [INFO ] [] - New compatible meter: [Meter type: M3_V5_0, channel: 1, Meter type: ELECTRICITY_V5, channel: 0]`
-
-Here you find the ThingTypeID (it is stated only in capitals) and the M-Bus channel. The above example would lead to the following Thing definition
-
-```
-Bridge definition {
- Things:
- m3_v5_0 mygasmeter [channel=1]
- electricity_v5 [channel=0]
-}
-```
diff --git a/addons/binding/org.openhab.binding.dsmr/build.properties b/addons/binding/org.openhab.binding.dsmr/build.properties
deleted file mode 100644
index 0f6636e9de4f6..0000000000000
--- a/addons/binding/org.openhab.binding.dsmr/build.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-source.. = src/main/java/
-output.. = target/classes
-bin.includes = META-INF/,\
- .,\
- OSGI-INF/,\
- ESH-INF/,\
- NOTICE
diff --git a/addons/binding/org.openhab.binding.dsmr/pom.xml b/addons/binding/org.openhab.binding.dsmr/pom.xml
deleted file mode 100644
index d05eb8c90d726..0000000000000
--- a/addons/binding/org.openhab.binding.dsmr/pom.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
- 4.0.0
-
-
- org.openhab.binding
- pom
- 2.5.0-SNAPSHOT
-
-
- org.openhab.binding.dsmr
- eclipse-plugin
-
- DSMR Binding
-
-
diff --git a/addons/binding/org.openhab.binding.dsmr/src/main/java/org/openhab/binding/dsmr/internal/DSMRBindingConstants.java b/addons/binding/org.openhab.binding.dsmr/src/main/java/org/openhab/binding/dsmr/internal/DSMRBindingConstants.java
deleted file mode 100644
index ffcd350fa8bd2..0000000000000
--- a/addons/binding/org.openhab.binding.dsmr/src/main/java/org/openhab/binding/dsmr/internal/DSMRBindingConstants.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.dsmr.internal;
-
-import org.eclipse.jdt.annotation.NonNullByDefault;
-import org.eclipse.smarthome.core.thing.ThingTypeUID;
-
-/**
- * This class defines common constants, which are used across the whole binding.
- *
- * @author M. Volaart - Initial contribution
- * @author Hilbrand Bouwkamp - Removed time constants
- */
-@NonNullByDefault
-public final class DSMRBindingConstants {
- /**
- * Binding id.
- */
- public static final String BINDING_ID = "dsmr";
-
- /**
- * Key to use to identify serial port.
- */
- public static final String DSMR_PORT_NAME = "org.openhab.binding.dsmr";
-
- /**
- * Bridge device thing
- */
- public static final ThingTypeUID THING_TYPE_DSMR_BRIDGE = new ThingTypeUID(BINDING_ID, "dsmrBridge");
-
- private DSMRBindingConstants() {
- // Constants class
- }
-}
diff --git a/addons/binding/org.openhab.binding.dsmr/src/main/java/org/openhab/binding/dsmr/internal/device/p1telegram/P1Telegram.java b/addons/binding/org.openhab.binding.dsmr/src/main/java/org/openhab/binding/dsmr/internal/device/p1telegram/P1Telegram.java
deleted file mode 100644
index 09d8f2edf630d..0000000000000
--- a/addons/binding/org.openhab.binding.dsmr/src/main/java/org/openhab/binding/dsmr/internal/device/p1telegram/P1Telegram.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.dsmr.internal.device.p1telegram;
-
-import java.util.List;
-
-import org.eclipse.jdt.annotation.NonNullByDefault;
-import org.openhab.binding.dsmr.internal.device.cosem.CosemObject;
-
-/**
- * Data class containing a Telegram with CosemObjects and TelegramState and if in lenient mode also the raw telegram
- * data.
- *
- * @author Hilbrand Bouwkamp - Initial contribution
- */
-@NonNullByDefault
-public class P1Telegram {
-
- /**
- * The TelegramState described the meta data of the P1Telegram
- */
- public enum TelegramState {
- /**
- * OK. Telegram was successful received and CRC16 checksum is verified (CRC16 only for DSMR V4 and up)
- */
- OK("P1 telegram received OK"),
- /**
- * CRC_ERROR. CRC16 checksum failed (only DSMR V4 and up)
- */
- CRC_ERROR("CRC checksum failed for received P1 telegram"),
- /**
- * DATA_CORRUPTION. The P1 telegram has syntax errors.
- */
- DATA_CORRUPTION("Received P1 telegram is corrupted");
-
- /**
- * public accessible state details
- */
- public final String stateDetails;
-
- /**
- * Constructs a new TelegramState enum
- *
- * @param stateDetails String containing the details of this TelegramState
- */
- private TelegramState(String stateDetails) {
- this.stateDetails = stateDetails;
- }
- }
-
- private final List cosemObjects;
- private final TelegramState telegramState;
- private final String rawTelegram;
-
- public P1Telegram(List cosemObjects, TelegramState telegramState, String rawTelegram) {
- this.cosemObjects = cosemObjects;
- this.telegramState = telegramState;
- this.rawTelegram = rawTelegram;
- }
-
- /**
- * @return The list of CosemObjects
- */
- public List getCosemObjects() {
- return cosemObjects;
- }
-
- /**
- * @return The raw telegram data
- */
- public String getRawTelegram() {
- return rawTelegram;
- }
-
- /**
- * @return The state of the telegram
- */
- public TelegramState getTelegramState() {
- return telegramState;
- }
-}
diff --git a/addons/binding/org.openhab.binding.enocean/.classpath b/addons/binding/org.openhab.binding.enocean/.classpath
deleted file mode 100644
index 7f457fa4138d1..0000000000000
--- a/addons/binding/org.openhab.binding.enocean/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.enocean/.project b/addons/binding/org.openhab.binding.enocean/.project
deleted file mode 100644
index b252d42d434fd..0000000000000
--- a/addons/binding/org.openhab.binding.enocean/.project
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
- org.openhab.binding.enocean
-
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- org.eclipse.pde.ManifestBuilder
-
-
-
-
- org.eclipse.pde.SchemaBuilder
-
-
-
-
- org.eclipse.pde.ds.core.builder
-
-
-
-
-
- org.eclipse.pde.PluginNature
- org.eclipse.jdt.core.javanature
-
-
diff --git a/addons/binding/org.openhab.binding.enocean/META-INF/MANIFEST.MF b/addons/binding/org.openhab.binding.enocean/META-INF/MANIFEST.MF
deleted file mode 100644
index a9c67aaca04e4..0000000000000
--- a/addons/binding/org.openhab.binding.enocean/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,35 +0,0 @@
-Manifest-Version: 1.0
-Automatic-Module-Name: org.openhab.binding.enocean
-Bundle-ActivationPolicy: lazy
-Bundle-ClassPath: .
-Bundle-ManifestVersion: 2
-Bundle-Name: EnOcean Binding
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Bundle-SymbolicName: org.openhab.binding.enocean;singleton:=true
-Bundle-Vendor: openHAB
-Bundle-Version: 2.5.0.qualifier
-Import-Package:
- javax.measure.quantity,
- org.apache.commons.io,
- org.eclipse.jdt.annotation;resolution:=optional,
- org.eclipse.smarthome.config.core,
- org.eclipse.smarthome.config.core.status,
- org.eclipse.smarthome.config.discovery,
- org.eclipse.smarthome.config.discovery.usbserial,
- org.eclipse.smarthome.core.items,
- org.eclipse.smarthome.core.library,
- org.eclipse.smarthome.core.library.types,
- org.eclipse.smarthome.core.library.unit,
- org.eclipse.smarthome.core.thing,
- org.eclipse.smarthome.core.thing.binding,
- org.eclipse.smarthome.core.thing.binding.builder,
- org.eclipse.smarthome.core.thing.profiles,
- org.eclipse.smarthome.core.thing.type,
- org.eclipse.smarthome.core.transform,
- org.eclipse.smarthome.core.transform.actions,
- org.eclipse.smarthome.core.types,
- org.eclipse.smarthome.core.util,
- org.eclipse.smarthome.io.transport.serial,
- org.osgi.framework,
- org.slf4j
-Service-Component: OSGI-INF/*.xml
diff --git a/addons/binding/org.openhab.binding.enocean/OSGI-INF/.gitignore b/addons/binding/org.openhab.binding.enocean/OSGI-INF/.gitignore
deleted file mode 100644
index 6722cd96e785a..0000000000000
--- a/addons/binding/org.openhab.binding.enocean/OSGI-INF/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-*.xml
diff --git a/addons/binding/org.openhab.binding.enocean/README.md b/addons/binding/org.openhab.binding.enocean/README.md
deleted file mode 100644
index 441e0ab6a42b1..0000000000000
--- a/addons/binding/org.openhab.binding.enocean/README.md
+++ /dev/null
@@ -1,354 +0,0 @@
-# EnOcean Binding
-
-The EnOcean binding connects openHAB to the EnOcean ecosystem.
-
-The binding uses an EnOcean gateway to retrieve sensor data and control actuators.
-For _bidirectional_ actuators it is even possible to update the openHAB item state if the actuator gets modified outside of openHAB.
-This binding has been developed on an USB300 gateway and was also tested with an EnOceanPi.
-As this binding implements a full EnOcean stack, we have full control over these gateways.
-This binding can enable the repeater function (level 1 or 2) of these gateways and retrieve detailed information about them.
-
-## Concepts/Configuration
-
-First of all you have to configure an EnOcean transceiver (gateway).
-A directly connected USB300 can be auto discovered, an EnOceanPi has to be added manually to openHAB.
-Both gateways are represented by an _EnOcean gateway_ in openHAB.
-If you want to place the gateway for better reception apart from your openHAB server, you can forward its serial messages over TCP/IP (_ser2net_). In this case you have to define the path to the gateway like this rfc2217://x.x.x.x:3001.
-If everything is running fine you should see the _base id_ of your gateway in the properties of your bridge.
-
-The vast majority of EnOcean messages are sent as broadcast messages without an explicit receiver address.
-However each EnOcean device is identified by an unique id, called EnOceanId, which is used as the sender address in these messages.
-To receive messages from an EnOcean device you have to determine its EnOceanId and add an appropriate thing to openHAB.
-
-If the device is an actuator which you want to control with your gateway from openHAB, you also have to create an unique sender id and announce it to the actuator (_teach-in_).
-For security reasons you cannot choose a random id, instead each gateway has 127 unique ids build in, from which you can choose.
-A SenderId of your gateway is made up its base id and a number between 1 and 127.
-This number can be chosen manually or the next free/unused number can be determined by the binding.
-
-## Supported Things
-
-This binding is developed on and tested with the following devices
-
- * USB300 and EnOceanPi gateways
- * The following Eltako actuators:
- * FSR14 (light switch)
- * FSB14 (rollershutter)
- * FUD14 (dimmer)
- * FSSA-230V (smart plug)
- * FWZ12-65A (energy meter)
- * FTKE (window / door contact)
- * TF-FGB (window handle)
- * TF-FKB (window contact)
- * TF-AHDSB (outdoor brightness sensor)
- * FAFT60 (outdoor temperature & humidity sensor)
- * The following Opus actuators:
- * GN-A-R12V-SR-4 (light)
- * GN-A-R12V-MF-2 (light)
- * GN-A-R12V-LZ/UD (dimmer)
- * GN-A-R12V-JRG-2 (rollershutter)
- * GN-A-U230V-JRG (rollershutter)
- * OPUS-FUNK PLUS Jalousieaktor 1fach UP (rollershutter)
- * OPUS-Funk PLUS Steckdosenleiste (smart multiple socket)
- * NodOn:
- * Smart Plug (ASP-2-1-10)
- * In Wall Switch (SIN-2-2-00, SIN-2-1-0x)
- * Temperature & humidity sensor (STPH-2-1-05)
- * Permundo
- * PSC234 (smart plug with metering) = Afriso APR234
- * PSC132 (smart switch actor with metering)
- * PSC152 (smart blinds control)
- * Thermokon SR04 room control
- * Hoppe SecuSignal window handles
- * Rocker switches (NodOn, Eltako FT55 etc)
-
-However, because of the standardized EnOcean protocol it is more important which EEP this binding supports.
-Hence if your device supports one of the following EEPs the chances are good that your device is also supported by this binding.
-
-|Thing type | EEP family | EEP Types | Channels¹ | Devices² | Pairing |
-|---------------------------------|-------------|---------------|------------------------------|--------------------------------|-----------|
-| bridge | - | - | repeaterMode, setBaseId | USB300, EnOceanPi | - |
-| pushButton | F6-01 | 0x01 | pushButton | | Manually |
-| rockerSwitch | F6-02 | 0x01-02 | rockerswitchA, rockerswitchB | Eltako FT55 | Discovery |
-| mechanicalHandle | F6-10 | 0x00-01 | windowHandleState, contact | Hoppe SecuSignal handles, Eltako TF-FGB | Discovery |
-| contact | D5-00 | 0x01 | contact | Eltako FTK(E) & TF-FKB | Discovery |
-| temperatureSensor | A5-02 | 0x01-30 | temperature | Thermokon SR65 | Discovery |
-| temperatureHumiditySensor | A5-04 | 0x01-03 | humidity, temperature | Eltako FTSB | Discovery |
-| occupancySensor | A5-07 | 0x01-03 | illumination, batteryVoltage, motionDetection | NodON PIR-2-1-01 | Discovery |
-| lightTemperatureOccupancySensor | A5-08 | 0x01-03 | illumination, temperature, occupancy, motionDetection | Eltako FABH | Discovery |
-| lightSensor | A5-06 | 0x01 | illumination | Eltako TF-AHDSB | Discovery |
-| roomOperatingPanel | A5-10 | 0x01-23 | temperature, setPoint, fanSpeedStage, occupancy | Thermokon SR04 | Discovery |
-| automatedMeterSensor | A5-12 | 0x00-03 | counter, currentNumber, instantpower, totalusage, amrLitre, amrCubicMetre | FWZ12 | Discovery |
-| centralCommand | A5-38 | 0x08 | dimmer, generalSwitch | Eltako FUD14, FSR14 | Teach-in |
-| rollershutter | A5-3F/D2-05/A5-38 | 0x7F/00/08 | rollershutter | Eltako FSB14, NodOn SIN-2-RS-01| Teach-in/Discovery |
-| measurementSwitch | D2-01 | 0x00-0F,11,12 | generalSwitch(/A/B), instantpower, totalusage, repeaterMode | NodOn In Wall Switch | Discovery |
-| classicDevice | F6-02 | 0x01-02 | virtualRockerswitchA, virtualRockerswitchB | - | Teach-in |
-
-¹ Not all channels are supported by all devices, it depends which specific EEP type is used by the device, all thing types additionally support `rssi`, `repeatCount` and `lastReceived` channels
-
-² These are just examples of supported devices
-
-Furthermore following supporting EEP family is available too: A5-11, types 0x03 (rollershutter position status) and 0x04 (extended light status).
-
-A `rockerSwitch` is used to receive messages from a physical EnOcean Rocker Switch.
-A `classicDevice` is used to for older EnOcean devices which react only on rocker switch messages (like Opus GN-A-R12V-SR-4).
-As these devices do not send their current status, you have to add additional listener channels for each physical Rocker Switch to your thing.
-In this way you can still sync your item status with the physical status of your device whenever it gets modified by a physical rocker switch.
-The classic device simulates a physical Rocker Switch.
-Per default the classic device uses the channel A of the simulated rocker switch.
-If you want to use channel B you have to use virtualRockerswitchB in conjunction with rules to send commands.
-
-## Pairing
-
-Most of the EnOcean devices can be automatically created and configured as an openHAB thing through the discovery service.
-The EnOcean protocol defines a so called "teach-in" process to announce the abilities and services of an EnOcean device and pair devices.
-To pair an EnOcean device with its openHAB thing representation, you have to differentiate between sensors and actuators.
-
-### Sensors
-
-To pair a sensor with its thing, you first have to start the discovery scan for this binding in PaperUI.
-Then press the "teach-in" button of the sensor.
-The sensor sends a teach-in message which contains the information about the EEP and the EnOceanId of the sensor.
-If the EEP is known by this binding the thing representation of the device is created.
-The corresponding channels are created dynamically, too.
-
-### Actuators
-
-If the actuator supports UTE teach-in, the corresponding thing can be created and paired automatically.
-First you have to **start the discovery scan for a gateway** in PaperUI.
-Then press the teach-in button of the actuator.
-If the EEP of the actuator is known, the binding sends an UTE teach-in response with a new SenderId and creates a new thing with its channels.
-
-If the actuator does not support UTE teach-ins, you have to create, configure and choose the right EEP of the thing manually.
-It is important to link the teach-in channel of this thing to a switch item.
-Afterwards you have to **activate the pairing mode of the actuator**.
-Then switch on the teach-in item to send a teach-in message to the actuator.
-If the pairing was successful, you can control the actuator and unlink the teach-in channel now.
-The content of this teach-in message is device specific and can be configured through the teach-in channel.
-
-To pair a classicDevice with an EnOcean device, you first have to activate the pairing mode of the actuator.
-Then switch the virtualRockerSwitchA On/Off.
-
-Each EnOcean gateway supports 127 unique SenderIds.
-The SenderId of a thing can be set manually or determined automatically by the binding.
-In case of an UTE teach-in the next unused SenderId is taken automatically.
-To set this SenderId to a specific one, you have to use the nextSenderId parameter of your gateway.
-
-## Thing Configuration
-
-The pairing process of an openHAB thing and an EnOcean device has to be triggered within Paper UI.
-Therefore if you do not want to use Paper UI, a mixed mode configuration approach has to be done.
-To determine the EEP and EnOceanId of the device and announce a SenderId to it, you first have to pair an openHAB thing with the EnOcean device.
-Afterwards you can delete this thing and manage it with its necessary parameters through a configuration file.
-If you change the SenderId of your thing, you have to pair again the thing with your device.
-
-|Thing type | Parameter | Meaning | Possible Values |
-|---------------------------------|-------------------|-----------------------------|---|
-| bridge | path | Path to the EnOcean Gateway | COM3, /dev/ttyAMA0, rfc2217://x.x.x.x:3001 |
-| | nextSenderId | Set SenderId of next created thing. If omitted, the next unused SenderId is taken | 1-127 |
-| pushButton | receivingEEPId | EEP used for receiving msg | F6_01_01 |
-| | enoceanId | EnOceanId of device this thing belongs to | hex value as string |
-| rockerSwitch | receivingEEPId | | F6_02_01, F6_02_02 |
-| | enoceanId | | |
-| mechanicalHandle | receivingEEPId | | F6_10_00, F6_10_01, A5_14_09 |
-| | enoceanId | | |
-| contact | receivingEEPId | | D5_00_01, A5_14_01_ELTAKO |
-| | enoceanId | | |
-| temperatureSensor | receivingEEPId | | A5_02_01-0B, A5_02_10-1B, A5_02_20, A5_02_30 |
-| | enoceanId | | |
-| temperatureHumiditySensor | receivingEEPId | | A5_04_01-03 |
-| | enoceanId | | |
-| occupancySensor | receivingEEPId | | A5_07_01-03 |
-| | enoceanId | | |
-| lightTemperatureOccupancySensor | receivingEEPId | | A5_08_01-03, A5_08_01_FXBH |
-| | enoceanId | | |
-| lightSensor | receivingEEPId | | A5_06_01, A5_06_01_ELTAKO |
-| | enoceanId | | |
-| roomOperatingPanel | receivingEEPId | | A5_10_01-0D, A5_10_10-1F, A5_10_20-23 |
-| | enoceanId | | |
-| automatedMeterSensor | receivingEEPId | | A5_12_00-03 |
-| | enoceanId | | |
-| centralCommand | senderIdOffset | SenderId used for sending msg. If omitted, nextSenderId of bridge is used | 1-127 |
-| | enoceanId | | |
-| | sendingEEPId | EEP used for sending msg | A5_38_08_01, A5_38_08_02 |
-| | broadcastMessages | Send broadcast or addressed msg | true, false |
-| | receivingEEPId | | F6_00_00, A5_38_08_02, A5_11_04 |
-| | suppressRepeating | Suppress repeating of msg | true, false |
-| rollershutter | senderIdOffset | | 1-127 |
-| | enoceanId | | |
-| | sendingEEPId | | A5_3F_7F_EltakoFSB, A5_38_08_07, D2_05_00 |
-| | broadcastMessages | | true, false |
-| | receivingEEPId¹ | | A5_3F_7F_EltakoFSB, A5_11_03, D2_05_00 |
-| | suppressRepeating | | true, false |
-| | pollingInterval | Refresh interval in seconds | Integer |
-| measurementSwitch | senderIdOffset | | 1-127 |
-| | enoceanId | | |
-| | sendingEEPId | | D2_01_00-0F, D2_01_11, D2_01_12, D2_01_09_PERMUNDO, D2_01_0F_NODON, D2_01_12_NODON |
-| | receivingEEPId¹ | | D2_01_00-0F, D2_01_11, D2_01_12, D2_01_09_PERMUNDO, D2_01_0F_NODON, D2_01_12_NODON, A5_12_01 |
-| | broadcastMessages | | true, false |
-| | pollingInterval | | Integer |
-| | suppressRepeating | | true, false |
-| classicDevice | senderIdOffset | | 1-127 |
-| | sendingEEPId | | F6_02_01, F6_02_02 |
-| | broadcastMessages | | true, false |
-| | receivingEEPId | | F6_02_01, F6_02_02 |
-| | suppressRepeating | | true, false |
-
-¹ multiple values possible, EEPs have to be of different EEP families.
-If you want to receive messages of your EnOcean devices you have to set **the enoceanId to the EnOceanId of your device**.
-
-## Channels
-
-The channels of a thing are determined automatically based on the chosen EEP.
-
-|Channel | Item | Description |
-|---------------------|--------------------|---------------------------------|
-| repeaterMode | String | Set repeater level to 1, 2 or disable |
-| setBaseId | String | Changes the BaseId of your gateway. This can only be done 10 times! So use it with care. |
-| pushButton | Trigger | Channel type system:rawbutton, emits PRESSED and RELEASED events |
-| rockerswitchA/B | Trigger | Channel type system:rawrocker, emits DIR1_PRESSED, DIR1_RELEASED, DIR2_PRESSED, DIR2_RELEASED events |
-| windowHandleState | String | Textual representation of handle position (OPEN, CLOSED, TILTED) |
-| contact | Contact | State OPEN/CLOSED (tilted handle => OPEN) |
-| temperature | Number:Temperature | Temperature in degree Celsius |
-| humidity | Number | Relative humidity level in percentages |
-| illumination | Number:Illuminance | Illumination in lux |
-| occupancy | Switch | Occupancy button pressed (ON) or released (OFF) |
-| motionDetection | Switch | On=Motion detected, Off=not |
-| setPoint | Number | linear set point |
-| fanSpeedStage | String | Fan speed: -1 (Auto), 0, 1, 2, 3 |
-| dimmer | Dimmer | Dimmer value in percent |
-| generalSwitch(/A/B) | Switch | Switch something (channel A/B) ON/OFF |
-| rollershutter | Rollershutter | Shut time (shutTime) in seconds can be configured |
-| angle | Number:Angle | The angle for blinds |
-| instantpower | Number:Power | Instant power consumption in Watts |
-| totalusage | Number:Energy | Used energy in Kilowatt hours |
-| teachInCMD | Switch | Sends a teach-in msg, content can configured with parameter teachInMSG |
-| virtualSwitchA | Switch | Used to convert switch item commands into rocker switch messages (channel A used) Time in ms between sending a pressed and release message can be defined with channel parameter duration. The switch mode (rocker switch: use DIR1 and DIR2, toggle: use just one DIR) can be set with channel parameter switchMode (rockerSwitch, toggleButtonDir1, toggleButtonDir2) |
-| virtualRollershutterA | Rollershutter | Used to convert rollershutter item commands into rocker switch messages (channel A used) |
-| rockerswitchListenerSwitch | Switch | Used to convert rocker switch messages into switch item state updates |
-| rockerswitchListenerRollershutter | Rollershutter | Used to convert rocker switch messages into rollershutter item state updates |
-| virtualRockerswitchB | String | Used to send plain rocker switch messages (channel B used) |
-| batteryVoltage | Number:ElectricPotential | Battery voltage for things with battery |
-| energyStorage | Number:ElectricPotential | Energy storage, don't know what this means... |
-| rssi | Number | Received Signal Strength Indication (dBm) of last received message |
-| repeatCount | Number | Number of repeaters involved in the transmission of the telegram |
-| lastReceived | DateTime | Date and time the last telegram was received |
-
-Items linked to bi-directional actuators (actuator sends status messages back) should always disable the `autoupdate`.
-This is especially true for Eltako rollershutter, as their position is calculated out of the current position and the moving time.
-
-## Channel Configuration
-
-Some channels can be configured with parameters.
-
-| Channel type | Parameter | Meaning | Possible values |
-|---------------|----------------|----------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|
-| rollershutter | shutTime | Time (in seconds) to completely close the rollershutter | |
-| dimmer | rampingTime | Duration of dimming | A5-38-08: Ramping Time (in seconds), 0 = default ramping, 1..255 = seconds to 100%; D2-01-01: 0 = switch, 1-3 = timer 1-3, 4 = stop |
-| | eltakoDimmer | Flag for Eltako dimmers, because Eltako does interpret this EEP differently | True for Eltako dimmer, false otherwise. Defaults to true for compatibility purpose. |
-| | storeValue | Store final value. For Eltako devices, block dimming value. | True or false. Defaults to false. |
-| teachInCMD | manufacturerId | Id is used for 4BS teach in with EEP | HEX |
-| | teachInMSG | Use this message if teach in type and/or manufacturer id are unknown | HEX |
-
-Possible declaration in Thing DSL:
-
-```xtend
-Thing centralCommand 11223344 "Light" @ "Living room" [ enoceanId="11223344", senderIdOffset=15, sendingEEPId="A5_38_08_02", receivingEEPId="A5_38_08_02" ] {
- Channels:
- Type teachInCMD : teachInCMD [ teachInMSG="E0400D80" ]
- Type dimmer : dimmer [ rampingTime=0 ]
-}
-```
-
-## Rules and Profiles
-
-The rockerSwitch things use _system:rawrocker_ channel types.
-So they trigger _DIR1[/2]_\__PRESSED_ and DIR1[/2]_\__RELEASED_ events.
-These channels can be directly linked to simple items like Switch, Dimmer or Player with the help of _profiles_.
-If you want to do more advanced stuff, you have to implement rules which react to these events
-
-```xtend
-rule "Advanced rocker rule"
-when
- Channel 'enocean:rockerSwitch:gtwy:AABBCC00:rockerswitchA' triggered DIR1_PRESSED
-then
- // do some advanced stuff
-end
-```
-
-## Example
-
-```xtend
-Bridge enocean:bridge:gtwy "EnOcean Gateway" [ path="/dev/ttyAMA0" ] {
- Thing rockerSwitch rs01 "Rocker" @ "Kitchen" [ enoceanId="aabbcc01", receivingEEPId="F6_02_01" ]
- Thing mechanicalHandle mh01 "Door handle" @ "Living room" [ enoceanId="aabbcc02", receivingEEPId="F6_10_00" ]
- Thing roomOperatingPanel p01 "Panel" @ "Floor" [ enoceanId="aabbcc03", receivingEEPId="A5_10_06" ]
- Thing centralCommand cc01 "Light" @ "Kitchen" [ enoceanId="aabbcc04", senderIdOffset=1, sendingEEPId="A5_38_08_01", receivingEEPId="F6_00_00", broadcastMessages=true, suppressRepeating=false ]
- Thing centralCommand cc02 "Dimmer" @ "Living room" [ enoceanId="aabbcc05", senderIdOffset=2, sendingEEPId="A5_38_08_02", receivingEEPId="A5_38_08_02", broadcastMessages=true, suppressRepeating=false ]
- Thing rollershutter r01 "Rollershutter" @ "Kitchen" [ enoceanId="aabbcc06", senderIdOffset=3, sendingEEPId="A5_3F_7F_EltakoFSB", receivingEEPId="A5_3F_7F_EltakoFSB", broadcastMessages=true, suppressRepeating=false ] {Channels: Type rollershutter:rollershutter [shutTime=25]}
- Thing measurementSwitch ms01 "TV Smart Plug" @ "Living room" [ enoceanId="aabbcc07", senderIdOffset=4, sendingEEPId="D2_01_09", broadcastMessages=false, receivingEEPId="D2_01_09","A5_12_01", suppressRepeating=false, pollingInterval=300]
- Thing classicDevice cd01 "Garage_Light" @ "Garage" [
- senderIdOffset=5,
- sendingEEPId="F6_02_01",
- broadcastMessages=true,
- receivingEEPId="F6_02_01",
- suppressRepeating=false
- ] {
- Type virtualSwitchA : virtualSwitchA [duration=300, switchMode="rockerSwitch"]
- Type rockerswitchListenerSwitch : Listener1 "Schalter links" [enoceanId="aabbcc08", channel="channelA", switchMode="toggleButtonDir1"]
- Type rockerswitchListenerSwitch : Listener2 "Schalter rechts" [enoceanId="aabbcc09", channel="channelB", switchMode="toggleButtonDir2"]
- }
-}
-```
-
-```xtend
-Player Kitchen_Sonos "Sonos" (Kitchen) {channel="sonos:PLAY1:ID:control", channel="enocean:rockerSwitch:gtwy:rs01:rockerswitchA" [profile="system:rawrocker-to-play-pause"]}
-Dimmer Kitchen_Hue "Hue" {channel="enocean:rockerSwitch:gtwy:rs01:rockerswitchB" [profile="system:rawrocker-to-dimmer"], channel="hue:0220:0017884f6626:9:brightness"}
-Rollershutter Kitchen_Rollershutter "Roller shutter" (Kitchen) {channel="enocean:rollershutter:gtwy:r01:rollershutter", autoupdate="false"}
-Switch Garage_Light "Switch" {
- channel="enocean:classicDevice:gtwy:cd01:virtualRockerswitchA",
- channel="enocean:classicDevice:gtwy:cd01:Listener1",
- channel="enocean:classicDevice:gtwy:cd01:Listener2"
-}
-```
-
-## Generic Things
-
-If an EnOcean device uses an unsupported EEP or _A5-3F-7F_, you have to create a `genericThing`.
-Generic things support all channels like switch, number, string etc as generic channels.
-However you have to specify how to convert the EnOcean messages of the device into openHAB state updates and how to convert the openHAB commands into EnOcean messages.
-These conversion functions can be defined with the help of transformation functions like MAP.
-
-|Thing type | Parameter | Meaning | Possible Values |
-|---------------------------------|-------------------|----------------------------|---|
-| genericThing | senderIdOffset | | 1-127 |
-| | enoceanId | EnOceanId of device this thing belongs to | hex value as string |
-| | sendingEEPId | EEP used for sending msg | F6_FF_FF, A5_FF_FF, D2_FF_FF |
-| | receivingEEPId | EEP used for receiving msg | F6_FF_FF, A5_FF_FF, D2_FF_FF |
-| | broadcastMessages | | true, false |
-| | suppressRepeating | | true, false |
-
-Supported channels: genericSwitch, genericRollershutter, genericDimmer, genericNumber, genericString, genericColor, genericTeachInCMD.
-You have to define the transformationType (e.g. MAP) and transformationFunction (e.g. for MAP: file name of mapping file) for each of these channels.
-
-For an inbound transformation (EnOcean message => openHAB state) you receive the channel id and the EnOcean data in hex separated by a pipe.
-Your transformation function has to return the openHAB State type and value separated by a pipe.
-If you want to use a mapping transformation, your mapping file has to look like this for a genericThing using EEP F6_FF_FF:
-
-```
-ChannelId|EnoceanData(Hex)=openHABState|Value
-genericSwitch|70=OnOffType|ON
-genericSwitch|50=OnOffType|OFF
-genericRollershutter|70=PercentType|0
-genericRollershutter|50=PercentType|100
-```
-
-For an outbound transformation (openHAB command => EnOcean message) you receive the channel id and the command separated by a pipe.
-Your transformation function has to return the payload of the EnOcean message.
-You do not have to worry about CRC and header data.
-If you want to use a mapping transformation, your mapping file has to look like this for a genericThing using EEP A5_FF_FF:
-
-```
-ChannelId|openHABCommand=EnoceanData(Hex)
-genericSwitch|ON=01000009
-genericSwitch|OFF=01000008
-```
diff --git a/addons/binding/org.openhab.binding.enocean/build.properties b/addons/binding/org.openhab.binding.enocean/build.properties
deleted file mode 100644
index a6cfff567c9b1..0000000000000
--- a/addons/binding/org.openhab.binding.enocean/build.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-source..=src/main/java/
-output..=target/classes
-bin.includes=META-INF/,\
- .,\
- OSGI-INF/,\
- ESH-INF/,\
- NOTICE
diff --git a/addons/binding/org.openhab.binding.enocean/pom.xml b/addons/binding/org.openhab.binding.enocean/pom.xml
deleted file mode 100644
index f75bb83c66667..0000000000000
--- a/addons/binding/org.openhab.binding.enocean/pom.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
- 4.0.0
-
-
- pom
- org.openhab.binding
- 2.5.0-SNAPSHOT
-
-
- org.openhab.binding.enocean
- eclipse-plugin
-
- EnOcean Binding
-
-
diff --git a/addons/binding/org.openhab.binding.enocean/src/main/java/org/openhab/binding/enocean/internal/handler/EnOceanBaseSensorHandler.java b/addons/binding/org.openhab.binding.enocean/src/main/java/org/openhab/binding/enocean/internal/handler/EnOceanBaseSensorHandler.java
deleted file mode 100644
index 4555d3d57117c..0000000000000
--- a/addons/binding/org.openhab.binding.enocean/src/main/java/org/openhab/binding/enocean/internal/handler/EnOceanBaseSensorHandler.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.enocean.internal.handler;
-
-import static org.openhab.binding.enocean.internal.EnOceanBindingConstants.*;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.Set;
-import java.util.function.Predicate;
-
-import org.eclipse.smarthome.config.core.Configuration;
-import org.eclipse.smarthome.core.thing.Channel;
-import org.eclipse.smarthome.core.thing.ChannelUID;
-import org.eclipse.smarthome.core.thing.Thing;
-import org.eclipse.smarthome.core.thing.ThingTypeUID;
-import org.eclipse.smarthome.core.types.Command;
-import org.eclipse.smarthome.core.types.State;
-import org.eclipse.smarthome.core.types.UnDefType;
-import org.eclipse.smarthome.core.util.HexUtils;
-import org.openhab.binding.enocean.internal.config.EnOceanBaseConfig;
-import org.openhab.binding.enocean.internal.eep.EEP;
-import org.openhab.binding.enocean.internal.eep.EEPFactory;
-import org.openhab.binding.enocean.internal.eep.EEPType;
-import org.openhab.binding.enocean.internal.messages.ERP1Message;
-import org.openhab.binding.enocean.internal.messages.ERP1Message.RORG;
-import org.openhab.binding.enocean.internal.messages.ESP3Packet;
-import org.openhab.binding.enocean.internal.transceiver.ESP3PacketListener;
-
-/**
- *
- * @author Daniel Weber - Initial contribution
- * This class defines base functionality for receiving eep messages.
- */
-public class EnOceanBaseSensorHandler extends EnOceanBaseThingHandler implements ESP3PacketListener {
-
- // List of all thing types which support receiving of eep messages
- public final static Set SUPPORTED_THING_TYPES = new HashSet(
- Arrays.asList(THING_TYPE_ROOMOPERATINGPANEL, THING_TYPE_MECHANICALHANDLE, THING_TYPE_CONTACT,
- THING_TYPE_TEMPERATURESENSOR, THING_TYPE_TEMPERATUREHUMIDITYSENSOR, THING_TYPE_ROCKERSWITCH,
- THING_TYPE_OCCUPANCYSENSOR, THING_TYPE_LIGHTTEMPERATUREOCCUPANCYSENSOR, THING_TYPE_LIGHTSENSOR,
- THING_TYPE_PUSHBUTTON, THING_TYPE_AUTOMATEDMETERSENSOR));
-
- protected Hashtable receivingEEPTypes = null;
-
- public EnOceanBaseSensorHandler(Thing thing) {
- super(thing);
- }
-
- @Override
- void initializeConfig() {
- config = getConfigAs(EnOceanBaseConfig.class);
- }
-
- @Override
- boolean validateConfig() {
- receivingEEPTypes = null;
-
- try {
- if (config.receivingEEPId != null && !config.receivingEEPId.isEmpty()) {
- boolean first = true;
- receivingEEPTypes = new Hashtable<>();
-
- for (String receivingEEP : config.receivingEEPId) {
- if (receivingEEP == null) {
- continue;
- }
-
- EEPType receivingEEPType = EEPType.getType(receivingEEP);
- if (receivingEEPTypes.containsKey(receivingEEPType.getRORG())) {
- configurationErrorDescription = "Receiving more than one EEP of the same RORG is not supported";
- return false;
- }
-
- receivingEEPTypes.put(receivingEEPType.getRORG(), receivingEEPType);
- updateChannels(receivingEEPType, first);
- first = false;
- }
- } else {
- receivingEEPTypes = null;
- }
- } catch (Exception e) {
- configurationErrorDescription = "Receiving EEP is not supported";
- return false;
- }
-
- if (receivingEEPTypes != null) {
- if (!validateEnoceanId(config.enoceanId)) {
- configurationErrorDescription = "EnOceanId is not a valid EnOceanId";
- return false;
- }
-
- if (!config.enoceanId.equals(EMPTYENOCEANID)) {
- getBridgeHandler().addPacketListener(this);
- }
- }
-
- return true;
- }
-
- @Override
- public long getSenderIdToListenTo() {
- return Long.parseLong(config.enoceanId, 16);
- }
-
- @Override
- public void handleRemoval() {
-
- if (getBridgeHandler() != null) {
- getBridgeHandler().removePacketListener(this);
- }
- super.handleRemoval();
- }
-
- @Override
- public void handleCommand(ChannelUID channelUID, Command command) {
- // sensor things cannot send any messages, hence they are not allowed to handle any command
- // The only possible command would be "Refresh"
- }
-
- protected Predicate channelFilter(EEPType eepType, byte[] senderId) {
- return c -> eepType.GetSupportedChannels().containsKey(c.getUID().getId());
- }
-
- @Override
- public void espPacketReceived(ESP3Packet packet) {
-
- if (receivingEEPTypes == null) {
- return;
- }
-
- try {
-
- ERP1Message msg = (ERP1Message) packet;
- EEPType receivingEEPType = receivingEEPTypes.get(msg.getRORG());
- if (receivingEEPType == null) {
- return;
- }
-
- EEP eep = EEPFactory.buildEEP(receivingEEPType, (ERP1Message) packet);
- logger.debug("ESP Packet payload {} for {} received", HexUtils.bytesToHex(packet.getPayload()),
- config.enoceanId);
-
- if (eep.isValid()) {
-
- // try to interpret received message for all linked channels
- getLinkedChannels().stream().filter(channelFilter(receivingEEPType, msg.getSenderId()))
- .forEach(channel -> {
- String channelTypeId = channel.getChannelTypeUID().getId();
- String channelId = channel.getUID().getId();
- Configuration channelConfig = channel.getConfiguration();
- switch (channel.getKind()) {
- case STATE:
- State currentState = getCurrentState(channelId);
- State result = eep.convertToState(channelId, channelTypeId, channelConfig,
- currentState);
-
- // if message can be interpreted (result != UnDefType.UNDEF) => update item state
- if (result != null && result != UnDefType.UNDEF) {
- updateState(channelId, result);
- setCurrentState(channelTypeId, result); // update internal state map
- }
- break;
- case TRIGGER:
- String lastEvent = lastEvents.get(channelId);
- String event = eep.convertToEvent(channelId, channelTypeId, lastEvent,
- channelConfig);
- if (event != null) {
- triggerChannel(channel.getUID(), event);
- lastEvents.put(channelId, event);
- }
- break;
- }
- });
- }
- } catch (Exception e) {
- logger.debug(e.getMessage());
- }
- }
-}
diff --git a/addons/binding/org.openhab.binding.enocean/src/main/java/org/openhab/binding/enocean/internal/handler/EnOceanClassicDeviceHandler.java b/addons/binding/org.openhab.binding.enocean/src/main/java/org/openhab/binding/enocean/internal/handler/EnOceanClassicDeviceHandler.java
deleted file mode 100644
index 70902566e0fdf..0000000000000
--- a/addons/binding/org.openhab.binding.enocean/src/main/java/org/openhab/binding/enocean/internal/handler/EnOceanClassicDeviceHandler.java
+++ /dev/null
@@ -1,273 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.enocean.internal.handler;
-
-import static org.openhab.binding.enocean.internal.EnOceanBindingConstants.*;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.Set;
-import java.util.concurrent.TimeUnit;
-import java.util.function.Predicate;
-
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.smarthome.core.library.types.OnOffType;
-import org.eclipse.smarthome.core.library.types.StopMoveType;
-import org.eclipse.smarthome.core.library.types.StringType;
-import org.eclipse.smarthome.core.library.types.UpDownType;
-import org.eclipse.smarthome.core.thing.Channel;
-import org.eclipse.smarthome.core.thing.ChannelUID;
-import org.eclipse.smarthome.core.thing.CommonTriggerEvents;
-import org.eclipse.smarthome.core.thing.Thing;
-import org.eclipse.smarthome.core.thing.ThingStatus;
-import org.eclipse.smarthome.core.thing.ThingStatusDetail;
-import org.eclipse.smarthome.core.thing.ThingTypeUID;
-import org.eclipse.smarthome.core.types.Command;
-import org.eclipse.smarthome.core.types.RefreshType;
-import org.eclipse.smarthome.core.types.State;
-import org.eclipse.smarthome.core.util.HexUtils;
-import org.openhab.binding.enocean.internal.config.EnOceanActuatorConfig;
-import org.openhab.binding.enocean.internal.config.EnOceanChannelRockerSwitchConfigBase.SwitchMode;
-import org.openhab.binding.enocean.internal.config.EnOceanChannelRockerSwitchListenerConfig;
-import org.openhab.binding.enocean.internal.config.EnOceanChannelVirtualRockerSwitchConfig;
-import org.openhab.binding.enocean.internal.eep.EEP;
-import org.openhab.binding.enocean.internal.eep.EEPFactory;
-import org.openhab.binding.enocean.internal.eep.EEPType;
-import org.openhab.binding.enocean.internal.messages.ESP3Packet;
-
-/**
- *
- * @author Daniel Weber - Initial contribution
- * This class defines base functionality for sending eep messages. This class extends EnOceanBaseSensorHandler
- * class as most actuator things send status or response messages, too.
- */
-public class EnOceanClassicDeviceHandler extends EnOceanBaseActuatorHandler {
-
- // List of thing types which support sending of eep messages
- public final static Set SUPPORTED_THING_TYPES = new HashSet(
- Arrays.asList(THING_TYPE_CLASSICDEVICE));
-
- private Hashtable channelConfigById;
- private String currentEnOceanId;
- private StringType lastTriggerEvent = StringType.valueOf(CommonTriggerEvents.DIR1_PRESSED);
-
- public EnOceanClassicDeviceHandler(Thing thing) {
- super(thing);
-
- channelConfigById = new Hashtable<>();
- }
-
- @Override
- void initializeConfig() {
- super.initializeConfig();
- ((EnOceanActuatorConfig) config).broadcastMessages = true;
- ((EnOceanActuatorConfig) config).enoceanId = EMPTYENOCEANID;
- }
-
- @Override
- public long getSenderIdToListenTo() {
- return Long.parseLong(currentEnOceanId, 16);
- }
-
- @Override
- public void channelLinked(@NonNull ChannelUID channelUID) {
- super.channelLinked(channelUID);
-
- // if linked channel is a listening channel => put listener
- String id = channelUID.getId();
- Channel channel = getThing().getChannel(id);
- addListener(channel);
- }
-
- @Override
- public void thingUpdated(Thing thing) {
- super.thingUpdated(thing);
-
- // it seems that there does not exist a channel update callback
- // => remove all listeners and add them again
- while (!channelConfigById.isEmpty()) {
- removeListener(getThing().getChannel(channelConfigById.keys().nextElement()));
- }
-
- getLinkedChannels().forEach(c -> {
- if (!addListener(c)) {
- updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, "Wrong channel configuration");
- }
- });
- }
-
- @Override
- public void channelUnlinked(@NonNull ChannelUID channelUID) {
- super.channelUnlinked(channelUID);
-
- // if unlinked channel is listening channel => remove listener
- String id = channelUID.getId();
- Channel channel = getThing().getChannel(id);
- removeListener(channel);
- }
-
- protected boolean addListener(Channel channel) {
- if (channel != null && channel.getChannelTypeUID().getId().startsWith("rockerswitchListener")) {
- EnOceanChannelRockerSwitchListenerConfig config = channel.getConfiguration()
- .as(EnOceanChannelRockerSwitchListenerConfig.class);
-
- try {
- Long enoceanId = Long.parseLong(config.enoceanId, 16);
- channelConfigById.put(channel.getUID().getId(), config);
- currentEnOceanId = config.enoceanId;
- getBridgeHandler().addPacketListener(this);
-
- return true;
- } catch (Exception e) {
- }
-
- return false;
- }
- return true;
- }
-
- protected void removeListener(Channel channel) {
- if (channel != null && channel.getChannelTypeUID().getId().startsWith("rockerswitchListener")) {
- String channelId = channel.getUID().getId();
-
- if (channelConfigById.containsKey(channelId)) {
- currentEnOceanId = channelConfigById.get(channelId).enoceanId;
- channelConfigById.remove(channelId);
- getBridgeHandler().removePacketListener(this);
- }
- }
- }
-
- @Override
- protected State getCurrentState(String channelId) {
- // Always use the same channelId of CHANNEL_VIRTUALSWITCHA
- return super.getCurrentState(CHANNEL_VIRTUALSWITCHA);
- }
-
- @Override
- protected void setCurrentState(String channelId, State state) {
- // Always use the same channelId of CHANNEL_VIRTUALSWITCHA
- super.setCurrentState(CHANNEL_VIRTUALSWITCHA, state);
- }
-
- @Override
- protected Predicate channelFilter(EEPType eepType, byte[] senderId) {
- return c -> c.getChannelTypeUID().getId().startsWith("rockerswitchListener")
- && c.getConfiguration().as(EnOceanChannelRockerSwitchListenerConfig.class).enoceanId
- .equalsIgnoreCase(HexUtils.bytesToHex(senderId));
- }
-
- private StringType convertToReleasedCommand(StringType command) {
- return command.equals(CommonTriggerEvents.DIR1_PRESSED) ? StringType.valueOf(CommonTriggerEvents.DIR1_RELEASED)
- : StringType.valueOf(CommonTriggerEvents.DIR2_RELEASED);
- }
-
- private StringType convertToPressedCommand(Command command, SwitchMode switchMode) {
- if (command instanceof StringType) {
- return (StringType) command;
- } else if (command instanceof OnOffType) {
- switch (switchMode) {
- case RockerSwitch:
- return (command == OnOffType.ON) ? StringType.valueOf(CommonTriggerEvents.DIR1_PRESSED)
- : StringType.valueOf(CommonTriggerEvents.DIR2_PRESSED);
- case ToggleDir1:
- return StringType.valueOf(CommonTriggerEvents.DIR1_PRESSED);
- case ToggleDir2:
- return StringType.valueOf(CommonTriggerEvents.DIR2_PRESSED);
- default:
- return null;
- }
- } else if (command instanceof UpDownType) {
- switch (switchMode) {
- case RockerSwitch:
- return (command == UpDownType.UP) ? StringType.valueOf(CommonTriggerEvents.DIR1_PRESSED)
- : StringType.valueOf(CommonTriggerEvents.DIR2_PRESSED);
- case ToggleDir1:
- return StringType.valueOf(CommonTriggerEvents.DIR1_PRESSED);
- case ToggleDir2:
- return StringType.valueOf(CommonTriggerEvents.DIR2_PRESSED);
- default:
- return null;
- }
- } else if (command instanceof StopMoveType) {
- if (command == StopMoveType.STOP) {
- return lastTriggerEvent;
- }
- }
-
- return null;
- }
-
- @Override
- public void handleCommand(@NonNull ChannelUID channelUID, @NonNull Command command) {
-
- // We must have a valid sendingEEPType and sender id to send commands
- if (sendingEEPType == null || senderId == null || command == RefreshType.REFRESH) {
- return;
- }
-
- try {
- String channelId = channelUID.getId();
- Channel channel = getThing().getChannel(channelId);
- // check if the channel is linked otherwise do nothing
- if (!getLinkedChannels().contains(channel)) {
- return;
- }
- if (channel.getChannelTypeUID().getId().contains("Listener")) {
- return;
- }
-
- EnOceanChannelVirtualRockerSwitchConfig channelConfig = channel.getConfiguration()
- .as(EnOceanChannelVirtualRockerSwitchConfig.class);
- State currentState = getCurrentState(channelId);
- StringType result = convertToPressedCommand(command, channelConfig.getSwitchMode());
-
- if (result != null) {
- lastTriggerEvent = result;
-
- EEP eep = EEPFactory.createEEP(sendingEEPType);
- ESP3Packet press = eep.setSenderId(senderId).setDestinationId(destinationId)
- .convertFromCommand(channelId, channel.getChannelTypeUID().getId(), result, currentState,
- channel.getConfiguration())
- .setSuppressRepeating(getConfiguration().suppressRepeating).getERP1Message();
-
- getBridgeHandler().sendMessage(press, null);
-
- if (channelConfig.duration > 0) {
- scheduler.schedule(() -> {
- ESP3Packet release = eep.convertFromCommand(channelId, channel.getChannelTypeUID().getId(),
- convertToReleasedCommand(lastTriggerEvent), currentState, channel.getConfiguration())
- .getERP1Message();
-
- getBridgeHandler().sendMessage(release, null);
-
- }, channelConfig.duration, TimeUnit.MILLISECONDS);
- }
- }
-
- } catch (Exception e) {
- logger.debug(e.getMessage());
- }
-
- }
-
- @Override
- public void handleRemoval() {
- for (Channel channel : getLinkedChannels()) {
- removeListener(channel);
- }
- currentEnOceanId = EMPTYENOCEANID;
- super.handleRemoval();
- }
-}
diff --git a/addons/binding/org.openhab.binding.exec/.classpath b/addons/binding/org.openhab.binding.exec/.classpath
deleted file mode 100644
index 7f457fa4138d1..0000000000000
--- a/addons/binding/org.openhab.binding.exec/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.exec/.project b/addons/binding/org.openhab.binding.exec/.project
deleted file mode 100644
index 19db9d6dc58e7..0000000000000
--- a/addons/binding/org.openhab.binding.exec/.project
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
- org.openhab.binding.exec
-
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- org.eclipse.pde.ManifestBuilder
-
-
-
-
- org.eclipse.pde.SchemaBuilder
-
-
-
-
- org.eclipse.pde.ds.core.builder
-
-
-
-
-
- org.eclipse.pde.PluginNature
- org.eclipse.jdt.core.javanature
-
-
diff --git a/addons/binding/org.openhab.binding.exec/META-INF/MANIFEST.MF b/addons/binding/org.openhab.binding.exec/META-INF/MANIFEST.MF
deleted file mode 100644
index 6c7add5f8ed59..0000000000000
--- a/addons/binding/org.openhab.binding.exec/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,25 +0,0 @@
-Manifest-Version: 1.0
-Automatic-Module-Name: org.openhab.binding.exec
-Bundle-ActivationPolicy: lazy
-Bundle-ClassPath: .
-Bundle-ManifestVersion: 2
-Bundle-Name: Exec Binding
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Bundle-SymbolicName: org.openhab.binding.exec;singleton:=true
-Bundle-Vendor: openHAB
-Bundle-Version: 2.5.0.qualifier
-Import-Package:
- org.apache.commons.exec,
- org.apache.commons.lang,
- org.eclipse.jdt.annotation;resolution:=optional,
- org.eclipse.smarthome.config.core,
- org.eclipse.smarthome.core.library.types,
- org.eclipse.smarthome.core.thing,
- org.eclipse.smarthome.core.thing.binding,
- org.eclipse.smarthome.core.thing.binding.builder,
- org.eclipse.smarthome.core.thing.type,
- org.eclipse.smarthome.core.transform,
- org.eclipse.smarthome.core.types,
- org.osgi.framework,
- org.slf4j
-Service-Component: OSGI-INF/*.xml
diff --git a/addons/binding/org.openhab.binding.exec/OSGI-INF/.gitignore b/addons/binding/org.openhab.binding.exec/OSGI-INF/.gitignore
deleted file mode 100644
index 6722cd96e785a..0000000000000
--- a/addons/binding/org.openhab.binding.exec/OSGI-INF/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-*.xml
diff --git a/addons/binding/org.openhab.binding.exec/build.properties b/addons/binding/org.openhab.binding.exec/build.properties
deleted file mode 100644
index 2802d321c602c..0000000000000
--- a/addons/binding/org.openhab.binding.exec/build.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-source.. = src/main/java/
-output.. = target/classes
-bin.includes = META-INF/,\
- .,\
- OSGI-INF/,\
- ESH-INF/,\
- NOTICE
-
diff --git a/addons/binding/org.openhab.binding.exec/pom.xml b/addons/binding/org.openhab.binding.exec/pom.xml
deleted file mode 100644
index fad51f6e976f2..0000000000000
--- a/addons/binding/org.openhab.binding.exec/pom.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
- 4.0.0
-
-
- org.openhab.binding
- pom
- 2.5.0-SNAPSHOT
-
-
- org.openhab.binding.exec
- eclipse-plugin
-
- Exec Binding
-
-
diff --git a/addons/binding/org.openhab.binding.feed.test/.classpath b/addons/binding/org.openhab.binding.feed.test/.classpath
deleted file mode 100644
index afa41445ca61e..0000000000000
--- a/addons/binding/org.openhab.binding.feed.test/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.feed.test/.project b/addons/binding/org.openhab.binding.feed.test/.project
deleted file mode 100644
index 551d28ffe95b9..0000000000000
--- a/addons/binding/org.openhab.binding.feed.test/.project
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
- org.openhab.binding.feed.test
-
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- org.eclipse.pde.ManifestBuilder
-
-
-
-
- org.eclipse.pde.SchemaBuilder
-
-
-
-
- org.eclipse.pde.ds.core.builder
-
-
-
-
-
- org.eclipse.pde.PluginNature
- org.eclipse.jdt.core.javanature
-
-
diff --git a/addons/binding/org.openhab.binding.feed.test/META-INF/MANIFEST.MF b/addons/binding/org.openhab.binding.feed.test/META-INF/MANIFEST.MF
deleted file mode 100644
index cf719f28246ea..0000000000000
--- a/addons/binding/org.openhab.binding.feed.test/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,32 +0,0 @@
-Manifest-Version: 1.0
-Automatic-Module-Name: org.openhab.binding.feed.test
-Bundle-ManifestVersion: 2
-Bundle-Name: Feed Binding Tests
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Bundle-SymbolicName: org.openhab.binding.feed.test;singleton:=true
-Bundle-Vendor: openHAB
-Bundle-Version: 2.5.0.qualifier
-Fragment-Host: org.openhab.binding.feed
-Import-Package:
- javax.servlet,
- javax.servlet.http,
- org.apache.commons.io,
- org.eclipse.jdt.annotation;resolution:=optional,
- org.eclipse.jetty.http,
- org.eclipse.smarthome.core.common.registry,
- org.eclipse.smarthome.core.events,
- org.eclipse.smarthome.core.items,
- org.eclipse.smarthome.core.library.items,
- org.eclipse.smarthome.core.library.types,
- org.eclipse.smarthome.core.thing.binding.builder,
- org.eclipse.smarthome.core.thing.link,
- org.eclipse.smarthome.test.java,
- org.eclipse.smarthome.test.storage,
- org.hamcrest;core=split,
- org.junit;version="4.0.0",
- org.junit.experimental.categories,
- org.junit.matchers,
- org.junit.runner,
- org.osgi.framework,
- org.osgi.service.event,
- org.osgi.service.http
diff --git a/addons/binding/org.openhab.binding.feed.test/build.properties b/addons/binding/org.openhab.binding.feed.test/build.properties
deleted file mode 100644
index 7c4bbc93109d2..0000000000000
--- a/addons/binding/org.openhab.binding.feed.test/build.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-source.. = src/test/java/,\
- src/test/resources/
-output.. = target/classes
-bin.includes = META-INF/,\
- .,\
- NOTICE
diff --git a/addons/binding/org.openhab.binding.feed.test/org.openhab.binding.feed.test.launch b/addons/binding/org.openhab.binding.feed.test/org.openhab.binding.feed.test.launch
deleted file mode 100644
index 9e81e8ffe9753..0000000000000
--- a/addons/binding/org.openhab.binding.feed.test/org.openhab.binding.feed.test.launch
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.feed.test/pom.xml b/addons/binding/org.openhab.binding.feed.test/pom.xml
deleted file mode 100644
index 75f5927be94c6..0000000000000
--- a/addons/binding/org.openhab.binding.feed.test/pom.xml
+++ /dev/null
@@ -1,146 +0,0 @@
-
-
- 4.0.0
-
-
- org.openhab.binding
- pom
- 2.5.0-SNAPSHOT
-
-
- org.openhab.binding.feed.test
- eclipse-test-plugin
-
- Feed Binding Tests
-
-
-
- org.openhab.io
- org.openhab.io.transport.feed
- ${project.version}
-
-
-
-
-
-
- ${tycho-groupid}
- tycho-surefire-plugin
-
- junit47
-
- org.openhab.binding.feed.test.SlowTests
-
-
- 4
- true
-
-
-
-
- eclipse-plugin
- org.eclipse.equinox.ds
- 0.0.0
-
-
- eclipse-plugin
- org.eclipse.equinox.event
- 0.0.0
-
-
- eclipse-plugin
- org.eclipse.equinox.util
- 0.0.0
-
-
- eclipse-plugin
- org.eclipse.osgi.services
- 0.0.0
-
-
-
- eclipse-plugin
- ch.qos.logback.classic
- 0.0.0
-
-
- eclipse-plugin
- ch.qos.logback.core
- 0.0.0
-
-
- eclipse-plugin
- ch.qos.logback.slf4j
- 0.0.0
-
-
-
- eclipse-plugin
- org.eclipse.equinox.http.jetty
- 0.0.0
-
-
- eclipse-plugin
- org.eclipse.equinox.http.servlet
- 0.0.0
-
-
-
- eclipse-plugin
- org.eclipse.smarthome.config.xml
- 0.0.0
-
-
- eclipse-plugin
- org.eclipse.smarthome.core.thing
- 0.0.0
-
-
- eclipse-plugin
- org.eclipse.smarthome.core.thing.xml
- 0.0.0
-
-
- eclipse-plugin
- org.eclipse.smarthome.core.binding.xml
- 0.0.0
-
-
-
-
- org.eclipse.equinox.ds
- 1
- true
-
-
- org.eclipse.equinox.http.servlet
- 3
- true
-
-
- org.eclipse.equinox.http.jetty
- 3
- true
-
-
- org.eclipse.equinox.event
- 2
- true
-
-
-
-
- -Dorg.osgi.service.http.port=9090 -Dprm.platform.capability.ClientPlatformID=notSimulator
-
- false
-
-
- notSimulator
-
-
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.feed/.classpath b/addons/binding/org.openhab.binding.feed/.classpath
deleted file mode 100644
index 3daf8821910d1..0000000000000
--- a/addons/binding/org.openhab.binding.feed/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.feed/.project b/addons/binding/org.openhab.binding.feed/.project
deleted file mode 100644
index 997a5c60bdd36..0000000000000
--- a/addons/binding/org.openhab.binding.feed/.project
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
- org.openhab.binding.feed
-
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- org.eclipse.pde.ManifestBuilder
-
-
-
-
- org.eclipse.pde.SchemaBuilder
-
-
-
-
- org.eclipse.pde.ds.core.builder
-
-
-
-
-
- org.eclipse.pde.PluginNature
- org.eclipse.jdt.core.javanature
-
-
diff --git a/addons/binding/org.openhab.binding.feed/META-INF/MANIFEST.MF b/addons/binding/org.openhab.binding.feed/META-INF/MANIFEST.MF
deleted file mode 100644
index 108b9fe9b9901..0000000000000
--- a/addons/binding/org.openhab.binding.feed/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,27 +0,0 @@
-Manifest-Version: 1.0
-Automatic-Module-Name: org.openhab.binding.feed
-Bundle-ActivationPolicy: lazy
-Bundle-ClassPath: .
-Bundle-ManifestVersion: 2
-Bundle-Name: Feed Binding
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Bundle-SymbolicName: org.openhab.binding.feed;singleton:=true
-Bundle-Vendor: openHAB
-Bundle-Version: 2.5.0.qualifier
-Import-Package:
- com.rometools.rome.feed,
- com.rometools.rome.feed.atom,
- com.rometools.rome.feed.module,
- com.rometools.rome.feed.rss,
- com.rometools.rome.feed.synd,
- com.rometools.rome.io,
- com.rometools.utils,
- org.eclipse.jdt.annotation;resolution:=optional,
- org.eclipse.smarthome.config.core,
- org.eclipse.smarthome.core.library.types,
- org.eclipse.smarthome.core.thing,
- org.eclipse.smarthome.core.thing.binding,
- org.eclipse.smarthome.core.types,
- org.osgi.framework,
- org.slf4j
-Service-Component: OSGI-INF/*.xml
diff --git a/addons/binding/org.openhab.binding.feed/OSGI-INF/.gitignore b/addons/binding/org.openhab.binding.feed/OSGI-INF/.gitignore
deleted file mode 100644
index b878e882aca37..0000000000000
--- a/addons/binding/org.openhab.binding.feed/OSGI-INF/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/*.xml
diff --git a/addons/binding/org.openhab.binding.feed/build.properties b/addons/binding/org.openhab.binding.feed/build.properties
deleted file mode 100644
index 2802d321c602c..0000000000000
--- a/addons/binding/org.openhab.binding.feed/build.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-source.. = src/main/java/
-output.. = target/classes
-bin.includes = META-INF/,\
- .,\
- OSGI-INF/,\
- ESH-INF/,\
- NOTICE
-
diff --git a/addons/binding/org.openhab.binding.feed/pom.xml b/addons/binding/org.openhab.binding.feed/pom.xml
deleted file mode 100644
index c326f75745545..0000000000000
--- a/addons/binding/org.openhab.binding.feed/pom.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
- 4.0.0
-
-
- org.openhab.binding
- pom
- 2.5.0-SNAPSHOT
-
-
- org.openhab.binding.feed
- eclipse-plugin
-
- Feed Binding
-
-
-
- org.openhab.io
- org.openhab.io.transport.feed
- ${project.version}
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.ftpupload/.classpath b/addons/binding/org.openhab.binding.ftpupload/.classpath
deleted file mode 100644
index c9d8a81b5173f..0000000000000
--- a/addons/binding/org.openhab.binding.ftpupload/.classpath
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.ftpupload/.project b/addons/binding/org.openhab.binding.ftpupload/.project
deleted file mode 100644
index aad3a6997b495..0000000000000
--- a/addons/binding/org.openhab.binding.ftpupload/.project
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
- org.openhab.binding.ftpupload
-
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- org.eclipse.pde.ManifestBuilder
-
-
-
-
- org.eclipse.pde.SchemaBuilder
-
-
-
-
- org.eclipse.pde.ds.core.builder
-
-
-
-
-
- org.eclipse.pde.PluginNature
- org.eclipse.jdt.core.javanature
-
-
diff --git a/addons/binding/org.openhab.binding.ftpupload/META-INF/MANIFEST.MF b/addons/binding/org.openhab.binding.ftpupload/META-INF/MANIFEST.MF
deleted file mode 100644
index 0f183018ba370..0000000000000
--- a/addons/binding/org.openhab.binding.ftpupload/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,28 +0,0 @@
-Manifest-Version: 1.0
-Automatic-Module-Name: org.openhab.binding.ftpupload
-Bundle-ActivationPolicy: lazy
-Bundle-ManifestVersion: 2
-Bundle-Name: FTP Upload Binding
-Bundle-SymbolicName: org.openhab.binding.ftpupload;singleton:=true
-Bundle-Vendor: openHAB
-Bundle-Version: 2.5.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Bundle-ClassPath: .,
- lib/ftplet-api-1.1.0.jar,
- lib/ftpserver-core-1.1.0.jar,
- lib/mina-core-2.0.16.jar
-Import-Package:
- org.apache.commons.lang,
- org.eclipse.jdt.annotation;resolution:=optional,
- org.eclipse.smarthome.config.core,
- org.eclipse.smarthome.core.library.types,
- org.eclipse.smarthome.core.thing,
- org.eclipse.smarthome.core.thing.binding,
- org.eclipse.smarthome.core.thing.binding.builder,
- org.eclipse.smarthome.core.thing.type,
- org.eclipse.smarthome.core.types,
- org.eclipse.smarthome.core.util,
- org.eclipse.smarthome.io.net.http,
- org.osgi.service.component,
- org.slf4j
-Service-Component: OSGI-INF/*.xml
diff --git a/addons/binding/org.openhab.binding.ftpupload/OSGI-INF/.gitignore b/addons/binding/org.openhab.binding.ftpupload/OSGI-INF/.gitignore
deleted file mode 100644
index 6722cd96e785a..0000000000000
--- a/addons/binding/org.openhab.binding.ftpupload/OSGI-INF/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-*.xml
diff --git a/addons/binding/org.openhab.binding.ftpupload/build.properties b/addons/binding/org.openhab.binding.ftpupload/build.properties
deleted file mode 100644
index 23960a396f025..0000000000000
--- a/addons/binding/org.openhab.binding.ftpupload/build.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-source.. = src/main/java/
-output.. = target/classes
-bin.includes = META-INF/,\
- .,\
- OSGI-INF/,\
- ESH-INF/,\
- NOTICE,\
- lib/ftplet-api-1.1.0.jar,\
- lib/ftpserver-core-1.1.0.jar,\
- lib/mina-core-2.0.16.jar
diff --git a/addons/binding/org.openhab.binding.ftpupload/lib/ftplet-api-1.1.0.jar b/addons/binding/org.openhab.binding.ftpupload/lib/ftplet-api-1.1.0.jar
deleted file mode 100644
index 36784e9744c2b..0000000000000
Binary files a/addons/binding/org.openhab.binding.ftpupload/lib/ftplet-api-1.1.0.jar and /dev/null differ
diff --git a/addons/binding/org.openhab.binding.ftpupload/lib/ftpserver-core-1.1.0.jar b/addons/binding/org.openhab.binding.ftpupload/lib/ftpserver-core-1.1.0.jar
deleted file mode 100644
index 00bf2a16d87a6..0000000000000
Binary files a/addons/binding/org.openhab.binding.ftpupload/lib/ftpserver-core-1.1.0.jar and /dev/null differ
diff --git a/addons/binding/org.openhab.binding.ftpupload/lib/mina-core-2.0.16.jar b/addons/binding/org.openhab.binding.ftpupload/lib/mina-core-2.0.16.jar
deleted file mode 100644
index 0e6d9883e6917..0000000000000
Binary files a/addons/binding/org.openhab.binding.ftpupload/lib/mina-core-2.0.16.jar and /dev/null differ
diff --git a/addons/binding/org.openhab.binding.ftpupload/pom.xml b/addons/binding/org.openhab.binding.ftpupload/pom.xml
deleted file mode 100644
index caa2631248db4..0000000000000
--- a/addons/binding/org.openhab.binding.ftpupload/pom.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
- 4.0.0
-
-
- org.openhab.binding
- pom
- 2.5.0-SNAPSHOT
-
-
- org.openhab.binding
- org.openhab.binding.ftpupload
- 2.5.0-SNAPSHOT
- eclipse-plugin
-
- FTP Upload Binding
-
-
diff --git a/addons/binding/org.openhab.binding.ihc.test/.classpath b/addons/binding/org.openhab.binding.ihc.test/.classpath
deleted file mode 100644
index c0a7772eee543..0000000000000
--- a/addons/binding/org.openhab.binding.ihc.test/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.ihc.test/.project b/addons/binding/org.openhab.binding.ihc.test/.project
deleted file mode 100644
index c6393fee6cb40..0000000000000
--- a/addons/binding/org.openhab.binding.ihc.test/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
- org.openhab.binding.ihc.test
-
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- org.eclipse.pde.ManifestBuilder
-
-
-
-
- org.eclipse.pde.SchemaBuilder
-
-
-
-
-
- org.eclipse.pde.PluginNature
- org.eclipse.jdt.core.javanature
-
-
diff --git a/addons/binding/org.openhab.binding.ihc.test/META-INF/MANIFEST.MF b/addons/binding/org.openhab.binding.ihc.test/META-INF/MANIFEST.MF
deleted file mode 100644
index b64dbe0f7ee4b..0000000000000
--- a/addons/binding/org.openhab.binding.ihc.test/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,23 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: openHAB IHC / ELKO Binding Tests
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Bundle-SymbolicName: org.openhab.binding.ihc.test;singleton:=true
-Bundle-Vendor: openHAB
-Bundle-Version: 2.5.0.qualifier
-Fragment-Host: org.openhab.binding.ihc
-Import-Package:
- org.apache.commons.lang.reflect,
- org.eclipse.jdt.annotation;resolution:=optional,
- org.eclipse.smarthome.config.discovery,
- org.eclipse.smarthome.test,
- org.eclipse.smarthome.test.storage,
- org.hamcrest;core=split,
- org.junit,
- org.junit.runner,
- org.junit.runners,
- org.mockito,
- org.mockito.invocation,
- org.mockito.stubbing,
- org.osgi.service.device,
- org.slf4j
diff --git a/addons/binding/org.openhab.binding.ihc.test/build.properties b/addons/binding/org.openhab.binding.ihc.test/build.properties
deleted file mode 100644
index 4d11718bcbfa4..0000000000000
--- a/addons/binding/org.openhab.binding.ihc.test/build.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-source.. = src/test/java/
-output.. = target/classes/
-bin.includes = META-INF/,\
- .,\
- src/,\
- NOTICE
-
diff --git a/addons/binding/org.openhab.binding.ihc.test/org.openhab.binding.ihc.test.launch b/addons/binding/org.openhab.binding.ihc.test/org.openhab.binding.ihc.test.launch
deleted file mode 100644
index 84bca0a176be6..0000000000000
--- a/addons/binding/org.openhab.binding.ihc.test/org.openhab.binding.ihc.test.launch
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.ihc.test/pom.xml b/addons/binding/org.openhab.binding.ihc.test/pom.xml
deleted file mode 100644
index 2d74b1f9547ad..0000000000000
--- a/addons/binding/org.openhab.binding.ihc.test/pom.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-
-
-
- 4.0.0
-
-
- pom
- org.openhab.binding
- 2.5.0-SNAPSHOT
-
-
- org.openhab.binding.ihc.test
- eclipse-test-plugin
-
- IHC / ELKO Binding Tests
-
-
-
-
- org.eclipse.tycho
- tycho-surefire-plugin
- ${tycho-version}
-
-
-
- eclipse-plugin
- org.eclipse.equinox.event
- 0.0.0
-
-
- eclipse-plugin
- org.eclipse.equinox.ds
- 0.0.0
-
-
- eclipse-plugin
- org.eclipse.smarthome.config.xml
- 0.0.0
-
-
- eclipse-plugin
- org.eclipse.smarthome.core.thing.xml
- 0.0.0
-
-
- eclipse-plugin
- org.eclipse.smarthome.core.binding.xml
- 0.0.0
-
-
-
- 4
- true
-
-
-
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.ihc/.classpath b/addons/binding/org.openhab.binding.ihc/.classpath
deleted file mode 100755
index e32acc0cb4fbb..0000000000000
--- a/addons/binding/org.openhab.binding.ihc/.classpath
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.ihc/.project b/addons/binding/org.openhab.binding.ihc/.project
deleted file mode 100755
index a35c80a7964d9..0000000000000
--- a/addons/binding/org.openhab.binding.ihc/.project
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
- org.openhab.binding.ihc
-
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- org.eclipse.pde.ManifestBuilder
-
-
-
-
- org.eclipse.pde.SchemaBuilder
-
-
-
-
- org.eclipse.pde.ds.core.builder
-
-
-
-
-
- org.eclipse.pde.PluginNature
- org.eclipse.jdt.core.javanature
-
-
diff --git a/addons/binding/org.openhab.binding.ihc/META-INF/MANIFEST.MF b/addons/binding/org.openhab.binding.ihc/META-INF/MANIFEST.MF
deleted file mode 100755
index 8b091a8b2bfbb..0000000000000
--- a/addons/binding/org.openhab.binding.ihc/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,26 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: IHC / ELKO Binding
-Bundle-SymbolicName: org.openhab.binding.ihc;singleton:=true
-Bundle-Vendor: openHAB
-Bundle-ClassPath: .,
- lib/httpclient-4.5.6.jar,
- lib/httpcore-4.4.10.jar,
- lib/commons-logging-1.2.jar
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Bundle-Version: 2.5.0.qualifier
-Import-Package: org.apache.commons.io,
- org.apache.commons.lang,
- org.eclipse.jdt.annotation;resolution:=optional,
- org.eclipse.smarthome.config.core,
- org.eclipse.smarthome.core.library,
- org.eclipse.smarthome.core.library.types,
- org.eclipse.smarthome.core.thing,
- org.eclipse.smarthome.core.thing.binding,
- org.eclipse.smarthome.core.thing.binding.builder,
- org.eclipse.smarthome.core.thing.profiles,
- org.eclipse.smarthome.core.thing.type,
- org.eclipse.smarthome.core.types,
- org.slf4j
-Service-Component: OSGI-INF/*.xml
-Bundle-ActivationPolicy: lazy
diff --git a/addons/binding/org.openhab.binding.ihc/OSGI-INF/.gitignore b/addons/binding/org.openhab.binding.ihc/OSGI-INF/.gitignore
deleted file mode 100644
index 6722cd96e785a..0000000000000
--- a/addons/binding/org.openhab.binding.ihc/OSGI-INF/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-*.xml
diff --git a/addons/binding/org.openhab.binding.ihc/build.properties b/addons/binding/org.openhab.binding.ihc/build.properties
deleted file mode 100755
index c97480f987cbb..0000000000000
--- a/addons/binding/org.openhab.binding.ihc/build.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-source..=src/main/java/
-output..=target/classes
-bin.includes = META-INF/,\
- .,\
- OSGI-INF/,\
- ESH-INF/,\
- NOTICE,\
- lib/httpclient-4.5.6.jar,\
- lib/httpcore-4.4.10.jar,\
- lib/commons-logging-1.2.jar
diff --git a/addons/binding/org.openhab.binding.ihc/lib/commons-logging-1.2.jar b/addons/binding/org.openhab.binding.ihc/lib/commons-logging-1.2.jar
deleted file mode 100644
index 93a3b9f6db406..0000000000000
Binary files a/addons/binding/org.openhab.binding.ihc/lib/commons-logging-1.2.jar and /dev/null differ
diff --git a/addons/binding/org.openhab.binding.ihc/lib/httpclient-4.5.6.jar b/addons/binding/org.openhab.binding.ihc/lib/httpclient-4.5.6.jar
deleted file mode 100644
index 56231de0cb6da..0000000000000
Binary files a/addons/binding/org.openhab.binding.ihc/lib/httpclient-4.5.6.jar and /dev/null differ
diff --git a/addons/binding/org.openhab.binding.ihc/lib/httpcore-4.4.10.jar b/addons/binding/org.openhab.binding.ihc/lib/httpcore-4.4.10.jar
deleted file mode 100644
index dc510f81cb7a8..0000000000000
Binary files a/addons/binding/org.openhab.binding.ihc/lib/httpcore-4.4.10.jar and /dev/null differ
diff --git a/addons/binding/org.openhab.binding.ihc/pom.xml b/addons/binding/org.openhab.binding.ihc/pom.xml
deleted file mode 100755
index 8464ed8f89096..0000000000000
--- a/addons/binding/org.openhab.binding.ihc/pom.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
- 4.0.0
-
-
- org.openhab.binding
- pom
- 2.5.0-SNAPSHOT
-
-
- org.openhab.binding.ihc
- eclipse-plugin
-
- IHC / ELKO Binding
-
-
diff --git a/addons/binding/org.openhab.binding.innogysmarthome/.classpath b/addons/binding/org.openhab.binding.innogysmarthome/.classpath
deleted file mode 100644
index 708db9a843de1..0000000000000
--- a/addons/binding/org.openhab.binding.innogysmarthome/.classpath
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.innogysmarthome/.project b/addons/binding/org.openhab.binding.innogysmarthome/.project
deleted file mode 100644
index 9a8c6619e5360..0000000000000
--- a/addons/binding/org.openhab.binding.innogysmarthome/.project
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
- org.openhab.binding.innogysmarthome
-
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- org.eclipse.pde.ManifestBuilder
-
-
-
-
- org.eclipse.pde.SchemaBuilder
-
-
-
-
- org.eclipse.pde.ds.core.builder
-
-
-
-
-
- org.eclipse.pde.PluginNature
- org.eclipse.jdt.core.javanature
-
-
diff --git a/addons/binding/org.openhab.binding.innogysmarthome/META-INF/MANIFEST.MF b/addons/binding/org.openhab.binding.innogysmarthome/META-INF/MANIFEST.MF
deleted file mode 100644
index 874cbc1b316a7..0000000000000
--- a/addons/binding/org.openhab.binding.innogysmarthome/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,46 +0,0 @@
-Manifest-Version: 1.0
-Automatic-Module-Name: org.openhab.binding.innogysmarthome
-Bundle-ActivationPolicy: lazy
-Bundle-ManifestVersion: 2
-Bundle-Name: innogy SmartHome Binding
-Bundle-SymbolicName: org.openhab.binding.innogysmarthome;singleton:=true
-Bundle-Vendor: openHAB
-Bundle-Version: 2.5.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Bundle-ClassPath: .,
- lib/google-http-client-1.22.0.jar,
- lib/google-oauth-client-1.22.0.jar,
- lib/google-http-client-jackson2-1.22.0.jar,
- lib/httpclient-4.0.1.jar,
- lib/httpcore-4.0.1.jar,
- lib/jackson-core-2.1.3.jar
-Import-Package:
- com.google.common.collect,
- com.google.gson,
- com.google.gson.annotations,
- javax.jmdns,
- org.apache.commons.io,
- org.apache.commons.lang,
- org.apache.commons.lang.exception,
- org.eclipse.jdt.annotation;resolution:=optional,
- org.eclipse.jetty.client,
- org.eclipse.jetty.io,
- org.eclipse.jetty.util,
- org.eclipse.jetty.util.component,
- org.eclipse.jetty.util.ssl,
- org.eclipse.jetty.websocket.api,
- org.eclipse.jetty.websocket.api.annotations,
- org.eclipse.jetty.websocket.client,
- org.eclipse.jetty.websocket.common,
- org.eclipse.smarthome.config.core,
- org.eclipse.smarthome.config.discovery,
- org.eclipse.smarthome.config.discovery.mdns,
- org.eclipse.smarthome.core.library.types,
- org.eclipse.smarthome.core.thing,
- org.eclipse.smarthome.core.thing.binding,
- org.eclipse.smarthome.core.thing.binding.builder,
- org.eclipse.smarthome.core.thing.type,
- org.eclipse.smarthome.core.types,
- org.osgi.framework,
- org.slf4j
-Service-Component: OSGI-INF/*.xml
diff --git a/addons/binding/org.openhab.binding.innogysmarthome/OSGI-INF/.gitignore b/addons/binding/org.openhab.binding.innogysmarthome/OSGI-INF/.gitignore
deleted file mode 100644
index 6722cd96e785a..0000000000000
--- a/addons/binding/org.openhab.binding.innogysmarthome/OSGI-INF/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-*.xml
diff --git a/addons/binding/org.openhab.binding.innogysmarthome/build.properties b/addons/binding/org.openhab.binding.innogysmarthome/build.properties
deleted file mode 100644
index 4db0a6767d630..0000000000000
--- a/addons/binding/org.openhab.binding.innogysmarthome/build.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-source.. = src/main/java/
-output.. = target/classes
-bin.includes = META-INF/,\
- .,\
- OSGI-INF/,\
- ESH-INF/,\
- lib/google-http-client-1.22.0.jar,\
- lib/google-http-client-jackson2-1.22.0.jar,\
- lib/google-oauth-client-1.22.0.jar,\
- NOTICE,\
- lib/httpclient-4.0.1.jar,\
- lib/httpcore-4.0.1.jar,\
- lib/jackson-core-2.1.3.jar
-
diff --git a/addons/binding/org.openhab.binding.innogysmarthome/lib/google-http-client-1.22.0.jar b/addons/binding/org.openhab.binding.innogysmarthome/lib/google-http-client-1.22.0.jar
deleted file mode 100644
index a31a9b1e6e388..0000000000000
Binary files a/addons/binding/org.openhab.binding.innogysmarthome/lib/google-http-client-1.22.0.jar and /dev/null differ
diff --git a/addons/binding/org.openhab.binding.innogysmarthome/lib/google-http-client-jackson2-1.22.0.jar b/addons/binding/org.openhab.binding.innogysmarthome/lib/google-http-client-jackson2-1.22.0.jar
deleted file mode 100644
index 64f0c1594ee54..0000000000000
Binary files a/addons/binding/org.openhab.binding.innogysmarthome/lib/google-http-client-jackson2-1.22.0.jar and /dev/null differ
diff --git a/addons/binding/org.openhab.binding.innogysmarthome/lib/google-oauth-client-1.22.0.jar b/addons/binding/org.openhab.binding.innogysmarthome/lib/google-oauth-client-1.22.0.jar
deleted file mode 100644
index 93d284db25381..0000000000000
Binary files a/addons/binding/org.openhab.binding.innogysmarthome/lib/google-oauth-client-1.22.0.jar and /dev/null differ
diff --git a/addons/binding/org.openhab.binding.innogysmarthome/lib/httpclient-4.0.1.jar b/addons/binding/org.openhab.binding.innogysmarthome/lib/httpclient-4.0.1.jar
deleted file mode 100644
index ad32285abc5bb..0000000000000
Binary files a/addons/binding/org.openhab.binding.innogysmarthome/lib/httpclient-4.0.1.jar and /dev/null differ
diff --git a/addons/binding/org.openhab.binding.innogysmarthome/lib/httpcore-4.0.1.jar b/addons/binding/org.openhab.binding.innogysmarthome/lib/httpcore-4.0.1.jar
deleted file mode 100644
index 4aef35e2ffa17..0000000000000
Binary files a/addons/binding/org.openhab.binding.innogysmarthome/lib/httpcore-4.0.1.jar and /dev/null differ
diff --git a/addons/binding/org.openhab.binding.innogysmarthome/lib/jackson-core-2.1.3.jar b/addons/binding/org.openhab.binding.innogysmarthome/lib/jackson-core-2.1.3.jar
deleted file mode 100644
index f47619f41fb07..0000000000000
Binary files a/addons/binding/org.openhab.binding.innogysmarthome/lib/jackson-core-2.1.3.jar and /dev/null differ
diff --git a/addons/binding/org.openhab.binding.innogysmarthome/pom.xml b/addons/binding/org.openhab.binding.innogysmarthome/pom.xml
deleted file mode 100644
index 56c197817baba..0000000000000
--- a/addons/binding/org.openhab.binding.innogysmarthome/pom.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
- 4.0.0
-
-
- org.openhab.binding
- pom
- 2.5.0-SNAPSHOT
-
-
- org.openhab.binding.innogysmarthome
- eclipse-plugin
-
- innogy SmartHome Binding
-
-
diff --git a/addons/binding/org.openhab.binding.lgwebos/.classpath b/addons/binding/org.openhab.binding.lgwebos/.classpath
deleted file mode 100644
index 55216c87f8a9b..0000000000000
--- a/addons/binding/org.openhab.binding.lgwebos/.classpath
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.lgwebos/.project b/addons/binding/org.openhab.binding.lgwebos/.project
deleted file mode 100644
index fbc41a0904b09..0000000000000
--- a/addons/binding/org.openhab.binding.lgwebos/.project
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
- org.openhab.binding.lgwebos
-
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- org.eclipse.pde.ManifestBuilder
-
-
-
-
- org.eclipse.pde.SchemaBuilder
-
-
-
-
- org.eclipse.pde.ds.core.builder
-
-
-
-
-
- org.eclipse.pde.PluginNature
- org.eclipse.jdt.core.javanature
-
-
diff --git a/addons/binding/org.openhab.binding.lgwebos/META-INF/MANIFEST.MF b/addons/binding/org.openhab.binding.lgwebos/META-INF/MANIFEST.MF
deleted file mode 100644
index ff143402c5b12..0000000000000
--- a/addons/binding/org.openhab.binding.lgwebos/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,36 +0,0 @@
-Manifest-Version: 1.0
-Automatic-Module-Name: org.openhab.binding.lgwebos
-Bundle-ClassPath: .,
- lib/java-websocket-1.3.2.jar,
- lib/json-20140107.jar,
- lib/xpp3-1.1.4c.jar,
- lib/Connect-SDK-Java-Core-1.0.jar
-Bundle-ManifestVersion: 2
-Bundle-Name: LG webOS Binding
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Bundle-SymbolicName: org.openhab.binding.lgwebos;singleton:=true
-Bundle-Vendor: openHAB
-Bundle-Version: 2.5.0.qualifier
-Export-Package:
- org.openhab.binding.lgwebos.action
-Import-Package:
- javax.jmdns,
- org.apache.commons.lang,
- org.apache.http.client.methods,
- org.apache.http.conn.util,
- org.apache.http.message,
- org.apache.http.protocol,
- org.eclipse.jdt.annotation;resolution:=optional,
- org.openhab.core.automation.annotation;resolution:=optional,
- org.eclipse.smarthome.config.core,
- org.eclipse.smarthome.config.discovery,
- org.eclipse.smarthome.core.library.types,
- org.eclipse.smarthome.core.net,
- org.eclipse.smarthome.core.thing,
- org.eclipse.smarthome.core.thing.binding,
- org.eclipse.smarthome.core.thing.binding.builder,
- org.eclipse.smarthome.core.thing.type,
- org.eclipse.smarthome.core.types,
- org.openhab.binding.lgwebos.action,
- org.slf4j
-Service-Component: OSGI-INF/*.xml
diff --git a/addons/binding/org.openhab.binding.lgwebos/OSGI-INF/.gitignore b/addons/binding/org.openhab.binding.lgwebos/OSGI-INF/.gitignore
deleted file mode 100644
index b878e882aca37..0000000000000
--- a/addons/binding/org.openhab.binding.lgwebos/OSGI-INF/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/*.xml
diff --git a/addons/binding/org.openhab.binding.lgwebos/build.properties b/addons/binding/org.openhab.binding.lgwebos/build.properties
deleted file mode 100644
index d8903fae3f3e8..0000000000000
--- a/addons/binding/org.openhab.binding.lgwebos/build.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-source.. = src/main/java/,\
- src/main/resources/
-output.. = target/classes
-bin.includes = META-INF/,\
- .,\
- OSGI-INF/,\
- ESH-INF/,\
- lib/json-20140107.jar,\
- lib/xpp3-1.1.4c.jar,\
- lib/java-websocket-1.3.2.jar,\
- lib/Connect-SDK-Java-Core-1.0.jar,\
- NOTICE
diff --git a/addons/binding/org.openhab.binding.lgwebos/lib/java-websocket-1.3.2.jar b/addons/binding/org.openhab.binding.lgwebos/lib/java-websocket-1.3.2.jar
deleted file mode 100644
index dcf5858ac7d1d..0000000000000
Binary files a/addons/binding/org.openhab.binding.lgwebos/lib/java-websocket-1.3.2.jar and /dev/null differ
diff --git a/addons/binding/org.openhab.binding.lgwebos/lib/json-20140107.jar b/addons/binding/org.openhab.binding.lgwebos/lib/json-20140107.jar
deleted file mode 100644
index 40a325dbadf46..0000000000000
Binary files a/addons/binding/org.openhab.binding.lgwebos/lib/json-20140107.jar and /dev/null differ
diff --git a/addons/binding/org.openhab.binding.lgwebos/lib/xpp3-1.1.4c.jar b/addons/binding/org.openhab.binding.lgwebos/lib/xpp3-1.1.4c.jar
deleted file mode 100644
index 451ac82af4a30..0000000000000
Binary files a/addons/binding/org.openhab.binding.lgwebos/lib/xpp3-1.1.4c.jar and /dev/null differ
diff --git a/addons/binding/org.openhab.binding.lgwebos/pom.xml b/addons/binding/org.openhab.binding.lgwebos/pom.xml
deleted file mode 100644
index 699eaf18f1697..0000000000000
--- a/addons/binding/org.openhab.binding.lgwebos/pom.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
- 4.0.0
-
-
- org.openhab.binding
- pom
- 2.5.0-SNAPSHOT
-
-
- org.openhab.binding.lgwebos
- eclipse-plugin
-
- LG webOS Binding
-
-
diff --git a/addons/binding/org.openhab.binding.loxone/.classpath b/addons/binding/org.openhab.binding.loxone/.classpath
deleted file mode 100644
index 04f0184a01454..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.loxone/.project b/addons/binding/org.openhab.binding.loxone/.project
deleted file mode 100644
index ef9dd408f15ab..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/.project
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
- org.openhab.binding.loxone
-
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- org.eclipse.pde.ManifestBuilder
-
-
-
-
- org.eclipse.pde.SchemaBuilder
-
-
-
-
- org.eclipse.pde.ds.core.builder
-
-
-
-
-
- org.eclipse.pde.PluginNature
- org.eclipse.jdt.core.javanature
-
-
diff --git a/addons/binding/org.openhab.binding.loxone/ESH-INF/binding/binding.xml b/addons/binding/org.openhab.binding.loxone/ESH-INF/binding/binding.xml
deleted file mode 100644
index da9176f98cd3f..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/ESH-INF/binding/binding.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
- Loxone Binding
- This is the binding for Loxone Miniserver
- Pawel Pieczul
-
-
diff --git a/addons/binding/org.openhab.binding.loxone/ESH-INF/thing/thing-types.xml b/addons/binding/org.openhab.binding.loxone/ESH-INF/thing/thing-types.xml
deleted file mode 100644
index 1e852f0f6a28a..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/ESH-INF/thing/thing-types.xml
+++ /dev/null
@@ -1,191 +0,0 @@
-
-
-
-
-
-
- IP gateway for Loxone Smarthome system
-
-
-
-
-
- Connection to Miniserver
-
-
-
-
- Authentication and encryption parameters
-
-
-
-
- Various timeout parameters
- true
-
-
-
-
- Various sizing parameters
- true
-
-
-
-
- network-address
- Host address or IP of the Loxone Miniserver
-
-
-
- Web interface port of the Loxone Miniserver
- 80
-
-
-
-
- Method used to authorize user in the Miniserver
- 0
-
-
-
-
-
- true
-
-
-
- User name on the Loxone Miniserver
-
-
-
- password
- User password on the Loxone Miniserver. In token-based authentication this password will be cleared after token is acquired.
-
-
-
- Token acquired by the binding from the Miniserver. Applicable only in token-based authentication mode.
- true
-
-
-
-
- Time between binding initialization and first connection attempt (seconds, 0-120)
- 1
-
-
-
- Time between sending two consecutive keep-alive messages (seconds, 1-600)
- 240
-
-
-
- Time between failed websocket connect attempts (seconds, 0-600)
- 10
-
-
-
- Time to wait for a response from Miniserver to a request sent from the binding (seconds, 0-60)
- 4
-
-
-
- Time in seconds between user login error as a result of wrong name/password or no authority and next connection attempt (seconds, 0-3600)
- 60
-
-
-
- Time between connection close (as a result of some communication error) and next connection attempt (seconds, 0-3600)
- 30
-
-
-
- Websocket client's maximum binary message size in kB
- 3072
-
-
-
- Websocket client's maximum text message size in kB
- 512
-
-
-
-
-
-
- Switch
-
- Loxone's virtual input of switch type and push button controls.
-
-
-
- Switch
-
- Loxone's digital information controls (InfoOnlyDigital, read-only).
-
-
-
-
- Rollershutter
-
- Loxone's Jalousies (rollershutters, blinds).
-
-
-
- String
-
- Loxone's state information controls (TextState, read-only).
-
-
-
-
- Number
-
- Loxone's time counter (TimedSwitch, read-only).
-
-
-
-
- Number
-
- Loxone's state information controls (InfoOnlyAnalog, read-only).
-
-
-
-
- Number
-
- Loxone's light controllers (LightController).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Number
-
- Loxone's radio button controls (Radio).
-
-
-
-
- Dimmer
-
- Loxone's dimmer control
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.loxone/META-INF/MANIFEST.MF b/addons/binding/org.openhab.binding.loxone/META-INF/MANIFEST.MF
deleted file mode 100644
index 3077be81871d6..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,44 +0,0 @@
-Manifest-Version: 1.0
-Automatic-Module-Name: org.openhab.binding.loxone
-Bundle-ActivationPolicy: lazy
-Bundle-ClassPath: .
-Bundle-ManifestVersion: 2
-Bundle-Name: Loxone Binding
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Bundle-SymbolicName: org.openhab.binding.loxone;singleton:=true
-Bundle-Vendor: openHAB
-Bundle-Version: 2.5.0.qualifier
-Import-Package:
- com.google.gson,
- com.google.gson.annotations,
- org.apache.commons.codec,
- org.apache.commons.codec.binary,
- org.eclipse.jdt.annotation;resolution:=optional,
- org.eclipse.jetty.http,
- org.eclipse.jetty.util,
- org.eclipse.jetty.util.component,
- org.eclipse.jetty.websocket.api,
- org.eclipse.jetty.websocket.api.annotations,
- org.eclipse.jetty.websocket.api.extensions,
- org.eclipse.jetty.websocket.client,
- org.eclipse.jetty.websocket.common,
- org.eclipse.jetty.websocket.common.extensions,
- org.eclipse.smarthome.config.core,
- org.eclipse.smarthome.config.discovery,
- org.eclipse.smarthome.config.discovery.upnp,
- org.eclipse.smarthome.core.common,
- org.eclipse.smarthome.core.id,
- org.eclipse.smarthome.core.library.types,
- org.eclipse.smarthome.core.thing,
- org.eclipse.smarthome.core.thing.binding,
- org.eclipse.smarthome.core.thing.binding.builder,
- org.eclipse.smarthome.core.thing.link,
- org.eclipse.smarthome.core.thing.type,
- org.eclipse.smarthome.core.types,
- org.eclipse.smarthome.io.transport.upnp,
- org.jupnp,
- org.jupnp.model.meta,
- org.jupnp.model.types,
- org.osgi.framework,
- org.slf4j
-Service-Component: OSGI-INF/*.xml
diff --git a/addons/binding/org.openhab.binding.loxone/OSGI-INF/.gitignore b/addons/binding/org.openhab.binding.loxone/OSGI-INF/.gitignore
deleted file mode 100644
index b878e882aca37..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/OSGI-INF/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/*.xml
diff --git a/addons/binding/org.openhab.binding.loxone/README.md b/addons/binding/org.openhab.binding.loxone/README.md
deleted file mode 100644
index 166d5dbf6de9c..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/README.md
+++ /dev/null
@@ -1,263 +0,0 @@
-# Loxone Binding
-
-This binding integrates [Loxone Miniserver](https://www.loxone.com/enen/products/miniserver-extensions/) with [openHAB](http://www.openhab.org/).
-Miniserver is represented as a [Thing](https://www.openhab.org/docs/configuration/things.html). Miniserver controls, that are visible in the Loxone [UI](https://www.loxone.com/enen/kb/user-interface-configuration/), are exposed as openHAB channels.
-
-## Features
-
-The following features are currently supported:
-
-* [Discovery](https://en.wikipedia.org/wiki/Simple_Service_Discovery_Protocol) of Miniservers available on the local network
-* Creation of channels for Loxone controls that are exposed in the Loxone [UI](https://www.loxone.com/enen/kb/user-interface-configuration/)
-* Tagging of channels and [items](https://www.openhab.org/docs/configuration/items.html) with tags that can be recognized by [Alexa](https://en.wikipedia.org/wiki/Amazon_Alexa) openHAB [skill](https://www.amazon.com/openHAB-Foundation/dp/B01MTY7Z5L), so voice can be used to command Loxone controls
-* Management of a Websocket connection to the Miniserver and updating Thing status accordingly
-* Updates of openHAB channel's state in runtime according to control's state changes on the Miniserver
-* Passing channel commands to the Miniserver's controls
-* Hash-based and token-based authentication methods
-* Command encryption and response decryption
-
-## Things
-
-This binding supports [Loxone Miniservers](https://www.loxone.com/enen/products/miniserver-extensions/) for accessing controls that are configured in their UI.
-
-The Thing UID of automatically discovered Miniservers is: `loxone:miniserver:`, where `` is a serial number of the Miniserver (effectively this is the MAC address of its network interface).
-
-### Discovery
-
-[Loxone Miniservers](https://www.loxone.com/enen/products/miniserver-extensions/) are automatically discovered by the binding and put in the Inbox. [Discovery](https://en.wikipedia.org/wiki/Simple_Service_Discovery_Protocol) is performed using [UPnP](https://en.wikipedia.org/wiki/Universal_Plug_and_Play) protocol.
-
-Before a Miniserver Thing can go online, it must be configured with a user name and a password of an account available on the Miniserver.
-Please set them manually in Thing configuration after you add a new Miniserver Thing from your Inbox.
-
-### Manual configuration
-
-As an alternative to the automatic discovery process, Miniservers can be configured manually, through an entry in [.things file](https://www.openhab.org/docs/configuration/things.html#defining-things-using-files).
-The entry should have the following syntax:
-
-`loxone:miniserver: [ user="", password="", host="", port=, ... ]`
-
-Where:
-
-* `` is a unique ID for your Miniserver (you can but do not have to use Miniserver's MAC address here)
-* `` and `` are the credentials used to log into the Miniserver
-* `` is a host name or IP of the Miniserver
-* `` is a port of web services on the Miniserver (please notice that port, as a number, is not surrounded by quotation marks, while the other values described above are)
-* `...` are optional advanced parameters - please refer to _Advanced parameters_ section at the end of this instruction for a list of available options
-
-Example 1 - minimal required configuration:
-
- `loxone:miniserver:504F2414780F [ user="kryten", password="jmc2017", host="loxone.local", port=80 ]`
-
-Example 2 - additionally keep alive period is set to 2 minutes and Websocket maximum binary message size to 8MB:
-
- `loxone:miniserver:504F2414780F [ user="kryten", password="jmc2017", host="192.168.0.210", port=80, keepAlivePeriod=120, maxBinMsgSize=8192 ]`
-
-### Thing Offline Reasons
-
-There can be following reasons why Miniserver status is `OFFLINE`:
-
-* __Configuration Error__
- * _Unknown host_
- * Miniserver host/ip address can't be resolved. No connection attempt will be made.
- * _User authentication error_
- * Invalid user name or password or user not authorized to connect to the Miniserver. Binding will make another attempt to connect after some time.
- * _Too many failed login attempts - stopped trying_
- * Miniserver locked out user for too many failed login attempts. In this case binding will stop trying to connect to the Miniserver. A new connection will be attempted only when user corrects user name or password in the configuration parameters.
- * _Enter password to generate a new token_
- * Authentication using stored token failed - either token is wrong or it. A password must be reentered in the binding settings to acquire a new token.
- * _Internal error_
- * Probably a code defect, collect debug data and submit an issue. Binding will try to reconnect, but with unknown chance for success.
- * _Other_
- * An exception occured and its details will be displayed
-* __Communication Error__
- * _Error communicating with Miniserver_
- * I/O error occurred during established communication with the Miniserver, most likely due to network connectivity issues, Miniserver going offline or Loxone Config is uploading a new configuration. A reconnect attempt will be made soon. Please consult detailed message against one of the following:
- * _"Text message size &lsqbXX&rsqb exceeds maximum size &lsqbYY&rsqb"_ - adjust text message size in advanced parameters to be above XX value
- * _"Binary message size &lsqbXX&rsqb exceeds maximum size &lsqbYY&rsqb"_ - adjust binary message size in advanced parameters to be above XX value
- * _User authentication timeout_
- * Authentication procedure took too long time and Miniserver closed connection. It should not occur under normal conditions and may indicate performance issue on binding's OS side.
- * _Timeout due to no activity_
- * Miniserver closed connection because there was no activity from binding. It should not occur under normal conditions, as it is prevented by sending keep-alive messages from the binding to the Miniserver. By default Miniserver's timeout is 5 minutes and period between binding's keep-alive messages is 4 minutes. If you see this error, try changing the keep-alive period in binding's configuration to a smaller value.
- * _Other_
- * An exception occured and its details will be displayed
-
-### Security
-
-The binding supports the following authentication methods, which are selected automatically based on the firmware version. They can be also chosen manually in the advanced settings.
-
-| Method | Miniserver Firmware | Authentication | Encryption | Requirements |
-|-------------|---------------------|--------------------------------------------------------------------------------|------------|-------------------------------------------------------|
-| Hash-based | 8.x | HMAC-SHA1 hash on user and password | None | None |
-| Token-based | 9.x | Token acquired on the first connection and used later instead of the password. | AES-256 | JRE must have unrestricted security policy configured |
-
-For the token-based authentication, the password is required only for the first login and acquiring the token. After the token is acquired, the password is cleared in the binding configuration.
-
-The acquired token will remain active for several weeks following the last succesful authentication with this token. If the connection is not established used during that period and the token expires, a user password has to be re-entered in the binding settings to acquire a new token.
-
-In case a websocket connection to the Miniserver remains active for the whole duration of the token's life span, the binding will refresh the token one day before token expiration, without the need of providing the password.
-
-
-A method to enable unrestricted security policy depends on the JRE version and vendor, some examples can be found [here](https://www.petefreitag.com/item/844.cfm) and [here](https://stackoverflow.com/questions/41580489/how-to-install-unlimited-strength-jurisdiction-policy-files).
-
-## Channels
-
-This binding creates channels for controls that are [used in Loxone's user interface](https://www.loxone.com/enen/kb/user-interface-configuration/).
-Currently supported controls are presented in the table below.
-
-| [Loxone API Control](https://www.loxone.com/enen/kb/api/) | Loxone Block-Functions | [Item Types](https://www.openhab.org/docs/concepts/items.html) | Supported Commands |
-|-----------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------|
-| Dimmer | [Dimmer](https://www.loxone.com/enen/kb/dimmer/) | `Dimmer` | `OnOffType.*` `Percent` |
-| InfoOnlyAnalog | Analog [virtual inputs](https://www.loxone.com/enen/kb/virtual-inputs-outputs/) (virtual state) | `Number` | none (read-only value) |
-| InfoOnlyDigital | Digital [virtual inputs](https://www.loxone.com/enen/kb/virtual-inputs-outputs/) (virtual state) | `String` | none (read-only value) |
-| Jalousie | Blinds, [Automatic Blinds](https://www.loxone.com/enen/kb/automatic-blinds/), Automatic Blinds Integrated | `Rollershutter` | `UpDown.*` `StopMove.*` `Percent` |
-| LightController | [Lighting controller V1 (obsolete)](https://www.loxone.com/enen/kb/lighting-controller/), [Hotel lighting controller](https://www.loxone.com/enen/kb/hotel-lighting-controller/) Additionally, for each configured output of a lighting controller, a new independent control (with own channel/item) will be created. | `Number` | `Decimal` (select lighting scene) `UpDownType.*` (swipe through scenes) `OnOffType.*` (select all off or all on scene) |
-| LightControllerV2 | [Lighting controller](https://www.loxone.com/enen/kb/lighting-controller-v2/) Additionally, for each configured output and for each mood of a lighting controller, a new independent control (with own channel/item) will be created. | `Number` | `Decimal` (select mood) `UpDownType.*` (swipe through moods) |
-| LightControllerV2 Mood | A mood defined for a [Lighting controller](https://www.loxone.com/enen/kb/lighting-controller-v2/). Each mood will have own channel and can be operated independently in order to allow mixing of moods. | `Switch` | `OnOffType.*` (mixes mood in or out of the controller) |
-| Pushbutton | [Virtual inputs](https://www.loxone.com/enen/kb/virtual-inputs-outputs/) of pushbutton type | `Switch` | `OnOffType.ON` (generates Pulse command) |
-| Radio | [Radio button 8x and 16x](https://www.loxone.com/enen/kb/radio-buttons/) | `Number` | `Decimal` (select output number 1-8/16 or 0 for all outputs off) `OnOffType.OFF` (all outputs off) |
-| Switch | [Virtual inputs](https://www.loxone.com/enen/kb/virtual-inputs-outputs/) of switch type [Push-button](https://www.loxone.com/enen/kb/push-button/) | `Switch` | `OnOffType.*` |
-| TextState | [State](https://www.loxone.com/enen/kb/state/) | `String` | none (read-only value) |
-| TimedSwitch | [Stairwell light switch](https://www.loxone.com/enen/kb/stairwell-light-switch/) or [Multifunction switch](https://www.loxone.com/enen/kb/multifunction-switch/) | `Switch`
`Number` | `OnOffType.*` (ON sends pulse to Loxone)
Read-only countdown value to off |
-
-If your control is supported, but binding does not recognize it, please check if it is exposed in Loxone UI using [Loxone Config](https://www.loxone.com/enen/kb-cat/loxone-config/) application.
-
-Channel ID is defined in the following way:
-
-* `loxone:miniserver::`
-
-Channel label is defined in the following way:
-
-* For controls that belong to a room: ` / `
-* For controls without a room: ``
-
-## Advanced Parameters
-
-This section describes the optional advanced parameters that can be configured for a Miniserver. They can be set using UI (e.g. PaperUI) or in a .things file.
-If a parameter is not explicitly defined, binding will use its default value.
-
-To define a parameter value in a .things file, please refer to it by parameter's ID, for example:
-
- keepAlivePeriod=120
-
-### Security
-
-| ID | Name | Values | Default | Description |
-|--------------|-----------------------|-------------------------------------------------|--------------|-------------------------------------------------------|
-| `authMethod` | Authentication method | 0: Automatic 1: Hash-based 2: Token-based | 0: Automatic | A method used to authenticate user in the Miniserver. |
-
-### Timeouts
-
-Timeout values control various parts of Websocket connection management.
-They can be tuned, when abnormal behavior of the binding is observed, which can be attributed to timing.
-
-
-| ID | Name | Range | Default | Description |
-|-------------------|-----------------------------------------------|----------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| `firstConDelay` | First connection delay | 0-120 s | 1 s | Time in seconds between binding initialization with all necessary parameters and first connection attempt. |
-| `keepAlivePeriod` | Period between connection keep-alive messages | 1-600 s | 240 s | Time in seconds between sending two consecutive keep-alive messages, in order to inform Miniserver about active connection and prevent it from disconnecting. Miniserver default connection timeout is 5 minutes, so default is set to 4 minutes. |
-| `connectErrDelay` | Connect error delay | 0-600 s | 10 s | Time in seconds between failed Websocket connect attempt and another attempt to connect. Websocket connection is established before authentication and data transfer. It can usually fail due to unreachable Miniserver. |
-| `responseTimeout` | Response timeout | 0-60 s | 4 s | Time to wait for a response from Miniserver to a request sent from the binding. A request can be any of: websocket connect request, credentials hashing key request, configuration request, enabling of state updates (until initial states are received). If this time passed without the expected reaction from the Miniserver, the connection will be closed. A new connection attempt may be made, depending on the situation. |
-| `userErrorDelay` | Authentication error delay | 0-3600 s | 60 s | Time in seconds between user authentication error and another connection attempt. User authentication error can be a result of a wrong name or password, or no authority granted to the user on the Miniserver. If this time is too short, Miniserver will eventually lock out the user for a longer period of time due to too many failed login attempts. This time should allow the administrator to fix the authentication issue without being locked out. Connection retry is required, because very rarely Miniserver seems to reject correct credentials, which are successful on a subsequent identical attempt. |
-| `comErrorDelay` | Communication error delay | 0-3600 s | 30 s | Time in seconds between an active connection closes, as a result of a communication error, and next connection attempt. This relates to all types of network communication issues, which can occur and cease to exist randomly to the binding. It is desired that the binding monitors the situation and brings things back to online as soon as Miniserver is accessible. |
-
-### Sizes
-
-| ID | Name | Range | Default | Description |
-|------------------|----------------------------------|----------|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| `maxBinMsgSize` | Maximum binary message size (kB) | 0-100 MB | 3072 (3 MB) | For Websocket client, a maximum size of a binary message that can be received from the Miniserver. If you get communication errors with a message indicating there are too long binary messages received, you may need to adjust this parameter. |
-| `maxTextMsgSize` | Maximum text message size (kB) | 0-100 MB | 512 KB | For Websocket client, a maximum size of a text message that can be received from the Miniserver. If you get communication errors with a message indicating there are too long text messages received, you may need to adjust this parameter. |
-
-## Limitations
-
-* As there is no push button item type in openHAB, Loxone's push button is an openHAB's switch, which always generates a short pulse on changing its state to on. If you use simple UI mode and framework generates items for you, switches for push buttons will still be toggle switches. To change it to the push button style, you have to create item manually with `autoupdate=false` parameter. An example of such item definition is given in the _Items_ section above.
-
-## Automatic Configuration Example
-
-The simplest and quickest way of configuring a Loxone Miniserver with openHAB is to use automatic configuration features:
-
-* Make sure your Miniserver is up and running and on the same network segment as openHAB server.
-* Add Loxone binding from the available `Add-ons`.
-* In `Configuration/System` page, set `Item Linking` to `Simple Mode` (don't forget to save your choice).
-* Add your Miniserver Thing from the `Inbox`, after automatic discovery is performed by the framework during binding initialization.
-* Configure your Miniserver by editing Miniserver Thing in `Configuration/Things` page and providing user name and password.
-* Miniserver Thing should go online. Channels and Items will be automatically created and configured.
-* On the `Control` page, you can test Miniserver Items and interact with them.
-* As the user interface, you may use [HABPanel](https://www.openhab.org/docs/configuration/habpanel.html), where all Miniserver's items are ready for picking up, using entirely the graphical user interface.
-
-## Manual Configuration Example
-
-A more advanced setup requires manual creation and editing of openHAB configuration files, according to the instructions provided in [configuration user guide](https://www.openhab.org/docs/configuration/).
-In this example we will manually configure:
-
-* A Miniserver with serial number 504F2414780F, available at IP 192.168.0.220 and with web services port 80
-* A Miniserver's user named "kryten" and password "jmc2017"
-* Items for:
- * Temperature of the Miniserver - a Virtual Analog State functional block
- * State of a garage door - a Virtual Digital State funtional block (ON=door open, OFF=door closed)
- * Kitchen lights switch - a Switch Subcontrol at the AI1 output of a Lighting Controller functional block (with a tag recognizable by Alexa service)
- * Pushbutton to switch all lights off - a Virtual Input of Pushbutton type functional block (pushbutton realized by adding `autoupdate="false"` parameter)
- * Kitchen blinds - a Jalousie functional block
- * Lighting scene - a Lighting Controller functional block
- * Output valve selection for garden watering - 8x Radio Button functional block, where only one valve can be open at a time
- * A text displaying current alarm's state - a State functional block
-
-### things/loxone.things:
-
-```
-loxone:miniserver:504F2414780F [ user="kryten", password="jmc2017", host="192.168.0.220", port=80
-```
-
-### items/loxone.items:
-
-```
-// Type ID Label Icon Tags Settings
-
-Number Miniserver_Temp "Miniserver temperature: [%.1f °C]" {channel="loxone:miniserver:504F2414780F:0F2F2133-017D-3C82-FFFF203EB0C34B9E"}
-Switch Garage_Door "Garage door [MAP(garagedoor.map):%s]" {channel="loxone:miniserver:504F2414780F:0F2F2133-017D-3C82-FFFF203EB0C34B9E"}
-Switch Kitchen_Lights "Kitchen Lights" ["lighting"] {channel="loxone:miniserver:504F2414780F:0EC5E0CF-0255-6ABD-FFFF402FB0C24B9E_AI1"}
-Switch Stair_Lights "Stair Lights" ["lighting"] {channel="loxone:miniserver:504F2414780F:0EC5E0CF-0255-31BD-FFFF402FB0C24B9E"}
-Number Stair_Lights-1 "Stair Lights Deactivation Delay" ["lighting"] {channel="loxone:miniserver:504F2414780F:0EC5E0CF-0255-31BD-FFFF402FB0C24B9E-1"}
-Switch Reset_Lights "Switch all lights off" ["lighting"] {channel="loxone:miniserver:504F2414780F:0F2F2133-01AD-3282-FFFF201EB0C24B9E",autoupdate="false"}
-Rollershutter Kitchen_Blinds "Kitchen blinds" {channel="loxone:miniserver:504F2414780F:0F2E2123-014D-3232-FFEF204EB3C24B9E"}
-Dimmer Kitchen_Dimmer "Kitchen dimmer" ["lighting"] {channel="loxone:miniserver:504F2414780F:0F2E2123-014D-3232-FFEF207EB3C24B9E"}
-Number Light_Scene "Lighting scene" {channel="loxone:miniserver:504F2414780F:0FC4E0DF-0255-6ABD-FFFE403FB0C34B9E"}
-Number Mood_Selector "Lighting mood" {channel="loxone:miniserver:504F2414780F:0FC4E0DF-0255-6ABD-FFFE203EA0C34B9E"}
-Switch Mood_Enter_Home "Entering home" {channel="loxone:miniserver:504F2414780F:0FC4E0DF-0255-6ABD-FFFE203EA0C34B9E-M1"}
-Switch Mood_Read_Book "Reading book" {channel="loxone:miniserver:504F2414780F:0FC4E0DF-0255-6ABD-FFFE203EA0C34B9E-M2"}
-Switch Mood_Evening "Evening setup" {channel="loxone:miniserver:504F2414780F:0FC4E0DF-0255-6ABD-FFFE203EA0C34B9E-M3"}
-Number Garden_Valve "Garden watering section" {channel="loxone:miniserver:504F2414780F:0FC5E0DF-0355-6AAD-FFFE403FB0C34B9E"}
-String Alarm_State "Alarm state [%s]" {channel="loxone:miniserver:504F2414780F:0F2E2134-017D-3E82-FFFF433FB4A34B9E"}
-```
-
-### sitemaps/loxone.sitemap:
-
-```
-sitemap loxone label="Loxone Example Menu"
-{
- Frame label="Demo Controls" {
- Text item=Miniserver_Temp
- Text item=Garage_Door
- Switch item=Kitchen_Lights
- Switch item=Reset_Lights
- Switch item=Kitchen_Blinds
- Slider item=Kitchen_Dimmer switchSupport
- Switch item=Stairs_Light
- Text item=Stairs_Light-1
- Selection item=Light_Scene mappings=[0="All off", 1="My scene 1", 2="My scene 2", 9="All on"]
- Selection item=Mood_Selector
- Switch item=Mood_Enter_Home
- Switch item=Mood_Read_Book
- Switch item=Mood_Evening
- Setpoint item=Garden_Valve minValue=0 maxValue=8 step=1
- Text item=Alarm_State
- }
-}
-```
-
-### transform/garagedoor.map:
-
-```java
-OFF=Closed
-ON=Open
--=Unknown
-```
diff --git a/addons/binding/org.openhab.binding.loxone/build.properties b/addons/binding/org.openhab.binding.loxone/build.properties
deleted file mode 100644
index 2802d321c602c..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/build.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-source.. = src/main/java/
-output.. = target/classes
-bin.includes = META-INF/,\
- .,\
- OSGI-INF/,\
- ESH-INF/,\
- NOTICE
-
diff --git a/addons/binding/org.openhab.binding.loxone/pom.xml b/addons/binding/org.openhab.binding.loxone/pom.xml
deleted file mode 100644
index 3d839836fc098..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/pom.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
- 4.0.0
-
-
- org.openhab.binding
- pom
- 2.5.0-SNAPSHOT
-
-
- org.openhab.binding.loxone
- eclipse-plugin
-
- Loxone Binding
-
-
diff --git a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/LoxoneBindingConstants.java b/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/LoxoneBindingConstants.java
deleted file mode 100644
index a3fbb1cf91dd9..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/LoxoneBindingConstants.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.loxone.internal;
-
-import org.eclipse.jdt.annotation.NonNullByDefault;
-import org.eclipse.smarthome.core.thing.ThingTypeUID;
-
-/**
- * Common constants used across the whole binding.
- *
- * @author Pawel Pieczul - Initial contribution
- */
-@NonNullByDefault
-public class LoxoneBindingConstants {
-
- public static final String BINDING_ID = "loxone";
-
- // List of all Thing Type UIDs
- public static final ThingTypeUID THING_TYPE_MINISERVER = new ThingTypeUID(BINDING_ID, "miniserver");
-
- // Channel Type IDs - read/write
- public static final String MINISERVER_CHANNEL_TYPE_SWITCH = "switchTypeId";
- public static final String MINISERVER_CHANNEL_TYPE_LIGHT_CTRL = "lightCtrlTypeId";
- public static final String MINISERVER_CHANNEL_TYPE_RADIO_BUTTON = "radioButtonTypeId";
- public static final String MINISERVER_CHANNEL_TYPE_ROLLERSHUTTER = "rollerShutterTypeId";
- public static final String MINISERVER_CHANNEL_TYPE_DIMMER = "dimmerTypeId";
-
- // Channel Type IDs - read only
- public static final String MINISERVER_CHANNEL_TYPE_RO_TEXT = "roTextTypeId";
- public static final String MINISERVER_CHANNEL_TYPE_RO_SWITCH = "roSwitchTypeId";
- public static final String MINISERVER_CHANNEL_TYPE_RO_ANALOG = "roAnalogTypeId";
- public static final String MINISERVER_CHANNEL_TYPE_RO_NUMBER = "roNumberTypeId";
-
- // Miniserver properties and parameters
- public static final String MINISERVER_PARAM_HOST = "host";
- public static final String MINISERVER_PARAM_PORT = "port";
- public static final String MINISERVER_PROPERTY_MINISERVER_NAME = "name";
- public static final String MINISERVER_PROPERTY_PROJECT_NAME = "project";
- public static final String MINISERVER_PROPERTY_CLOUD_ADDRESS = "cloudAddress";
-
- // Location as configured on the Miniserver - it may be different to the Thing location property, which is user
- // defined and influences the grouping of items in the UI
- public static final String MINISERVER_PROPERTY_PHYSICAL_LOCATION = "physicalLocation";
-}
diff --git a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/LoxoneDynamicStateDescriptionProvider.java b/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/LoxoneDynamicStateDescriptionProvider.java
deleted file mode 100644
index b2e1387411a04..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/LoxoneDynamicStateDescriptionProvider.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.loxone.internal;
-
-import java.util.Locale;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.eclipse.jdt.annotation.NonNullByDefault;
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.smarthome.core.thing.Channel;
-import org.eclipse.smarthome.core.thing.ChannelUID;
-import org.eclipse.smarthome.core.thing.type.DynamicStateDescriptionProvider;
-import org.eclipse.smarthome.core.types.StateDescription;
-import org.osgi.service.component.annotations.Component;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Dynamic channel state description provider.
- * Overrides the state description for the controls, which receive its configuration in the runtime.
- *
- * @author Pawel Pieczul - Initial contribution
- */
-@Component(service = { DynamicStateDescriptionProvider.class, LoxoneDynamicStateDescriptionProvider.class })
-@NonNullByDefault
-public class LoxoneDynamicStateDescriptionProvider implements DynamicStateDescriptionProvider {
-
- private Map descriptions = new ConcurrentHashMap<>();
- private Logger logger = LoggerFactory.getLogger(LoxoneDynamicStateDescriptionProvider.class);
-
- /**
- * Set a state description for a channel. This description will be used when preparing the channel state by
- * the framework for presentation. A previous description, if existed, will be replaced.
- *
- * @param channelUID
- * channel UID
- * @param description
- * state description for the channel
- */
- public void setDescription(ChannelUID channelUID, StateDescription description) {
- logger.debug("Adding state description for channel {}", channelUID);
- descriptions.put(channelUID, description);
- }
-
- /**
- * Clear all registered state descriptions
- */
- public void removeAllDescriptions() {
- logger.debug("Removing all state descriptions");
- descriptions.clear();
- }
-
- @Override
- public @Nullable StateDescription getStateDescription(Channel channel,
- @Nullable StateDescription originalStateDescription, @Nullable Locale locale) {
- StateDescription description = descriptions.get(channel.getUID());
- logger.trace("Providing state description for channel {}", channel.getUID());
- return description;
- }
-}
diff --git a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/LoxoneHandlerFactory.java b/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/LoxoneHandlerFactory.java
deleted file mode 100644
index e52e34a45aaed..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/LoxoneHandlerFactory.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.loxone.internal;
-
-import java.util.Collections;
-import java.util.Set;
-
-import org.eclipse.smarthome.core.thing.Thing;
-import org.eclipse.smarthome.core.thing.ThingTypeUID;
-import org.eclipse.smarthome.core.thing.binding.BaseThingHandlerFactory;
-import org.eclipse.smarthome.core.thing.binding.ThingHandler;
-import org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory;
-import org.openhab.binding.loxone.internal.handler.LoxoneMiniserverHandler;
-import org.osgi.service.component.annotations.Component;
-import org.osgi.service.component.annotations.Reference;
-
-/**
- * Factory responsible for creating Loxone things (Miniservers) and their handlers ({@link LoxoneMiniserverHandler}
- *
- * @author Pawel Pieczul - Initial contribution
- */
-@Component(service = ThingHandlerFactory.class, configurationPid = "binding.loxone")
-public class LoxoneHandlerFactory extends BaseThingHandlerFactory {
-
- public static final Set SUPPORTED_THING_TYPES_UIDS = Collections
- .singleton(LoxoneBindingConstants.THING_TYPE_MINISERVER);
-
- private LoxoneDynamicStateDescriptionProvider dynamicStateDescriptionProvider;
-
- @Override
- public boolean supportsThingType(ThingTypeUID thingTypeUID) {
- return SUPPORTED_THING_TYPES_UIDS.contains(thingTypeUID);
- }
-
- @Override
- protected ThingHandler createHandler(Thing thing) {
- ThingTypeUID uid = thing.getThingTypeUID();
- if (uid.equals(LoxoneBindingConstants.THING_TYPE_MINISERVER)) {
- LoxoneMiniserverHandler handler = new LoxoneMiniserverHandler(thing, dynamicStateDescriptionProvider);
- return handler;
- }
- return null;
- }
-
- @Reference
- protected void setDynamicStateDescriptionProvider(LoxoneDynamicStateDescriptionProvider provider) {
- this.dynamicStateDescriptionProvider = provider;
- }
-
- protected void unsetDynamicStateDescriptionProvider(LoxoneDynamicStateDescriptionProvider provider) {
- this.dynamicStateDescriptionProvider = null;
- }
-}
diff --git a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/config/LoxoneMiniserverConfig.java b/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/config/LoxoneMiniserverConfig.java
deleted file mode 100644
index 003bebd00c794..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/config/LoxoneMiniserverConfig.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.loxone.internal.config;
-
-import org.openhab.binding.loxone.internal.handler.LoxoneMiniserverHandler;
-
-/**
- * Configuration of a Loxone Miniserver ({@link LoxoneMiniserverHandler})
- *
- * @author Pawel Pieczul - Initial contribution
- *
- */
-public class LoxoneMiniserverConfig {
- /**
- * Host address or IP of the Miniserver
- */
- public String host;
- /**
- * Port of web service of the Miniserver
- */
- public int port;
- /**
- * User name used to log into the Miniserver
- */
- public String user;
- /**
- * Password used to log into the Miniserver
- */
- public String password;
- /**
- * Authentication token acquired from the Miniserver
- */
- public String authToken;
- /**
- * Time in seconds between binding initialization and first connection attempt
- */
- public int firstConDelay;
- /**
- * Time in seconds between sending two consecutive keep-alive messages
- */
- public int keepAlivePeriod;
- /**
- * Time in seconds between failed websocket connect attempts
- */
- public int connectErrDelay;
- /**
- * Time to wait for Miniserver response to a request sent from the binding
- */
- public int responseTimeout;
- /**
- * Time in seconds between user login error as a result of wrong name/password or no authority and next connection
- * attempt
- */
- public int userErrorDelay;
- /**
- * Time in seconds between connection close (as a result of some communication error) and next connection attempt
- */
- public int comErrorDelay;
- /**
- * Websocket client's max binary message size in kB
- */
- public int maxBinMsgSize;
- /**
- * Websocket client's max text message size in kB
- */
- public int maxTextMsgSize;
- public int authMethod;
-}
diff --git a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxCategory.java b/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxCategory.java
deleted file mode 100644
index 89d8bf353d43b..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxCategory.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.loxone.internal.core;
-
-/**
- * Category of Loxone Miniserver's {@link LxControl} object.
- *
- * @author Pawel Pieczul - initial contribution
- *
- */
-public class LxCategory extends LxContainer {
-
- /**
- * Various categories that Loxone Miniserver's control can belong to.
- *
- * @author Pawel Pieczul - initial contribution
- */
- public enum CategoryType {
- /**
- * Category for lights
- */
- LIGHTS,
- /**
- * Category for shading / rollershutter / blinds
- */
- SHADING,
- /**
- * Unknown category
- */
- UNDEFINED
- }
-
- private CategoryType type;
-
- /**
- * Create a {@link LxCategory} object
- *
- * @param uuid
- * UUID of this category object on the Miniserver
- * @param name
- * name of the category
- * @param type
- * type of the category, as retrieved from the Miniserver
- */
- public LxCategory(LxUuid uuid, String name, String type) {
- super(uuid, name);
- setType(type);
- }
-
- /**
- * Obtain the type of this category
- *
- * @return
- * type of category
- */
- public CategoryType getType() {
- return type;
- }
-
- /**
- * Set the type of this category
- *
- * @param type
- * new type to set as received from Miniserver
- */
- void setType(String type) {
- String tl = type.toLowerCase();
- if (tl.equals("lights")) {
- this.type = CategoryType.LIGHTS;
- } else if (tl.equals("shading")) {
- this.type = CategoryType.SHADING;
- } else {
- this.type = CategoryType.UNDEFINED;
- }
- getUuid().setUpdate(true);
- }
-}
diff --git a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxContainer.java b/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxContainer.java
deleted file mode 100644
index 2c6c21636766b..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxContainer.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.loxone.internal.core;
-
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * Container on Loxone Miniserver that groups {@link LxControl} objects.
- *
- * Examples of containers are rooms and categories.
- *
- * @author Pawel Pieczul - initial contribution
- *
- */
-public class LxContainer {
- private LxUuid uuid;
- private String name;
- private Set controls = new HashSet<>();
-
- /**
- * Create a new container with given uuid and name
- *
- * @param uuid
- * UUID of the container as received from the Miniserver
- * @param name
- * name of the container as received from the Miniserver
- */
- LxContainer(LxUuid uuid, String name) {
- this.uuid = uuid;
- this.name = name;
- }
-
- /**
- * Obtain container's current name
- *
- * @return
- * container's current name
- */
- public String getName() {
- return name;
- }
-
- /**
- * Obtain container's UUID (assigned by Loxone Miniserver)
- *
- * @return
- * container's UUID
- */
- public LxUuid getUuid() {
- return uuid;
- }
-
- /**
- * Update container's name
- *
- * @param name
- * a new name of the container
- */
- void setName(String name) {
- this.name = name;
- uuid.setUpdate(true);
- }
-
- /**
- * Add a new control to this container or mark existing control's and container's UUIDs as updated.
- *
- * @param control
- * control to be added or updated
- */
- void addOrUpdateControl(LxControl control) {
- uuid.setUpdate(true);
- for (LxControl c : controls) {
- if (control.equals(c)) {
- c.getUuid().setUpdate(true);
- return;
- }
- }
- controls.add(control);
- control.getUuid().setUpdate(true);
- }
-
- /**
- * Removes a control from the container
- *
- * @param control
- * control object to remove from the container
- * @return
- * true if control object existed in the container and was removed
- */
- boolean removeControl(LxControl control) {
- return controls.remove(control);
- }
-}
diff --git a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControl.java b/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControl.java
deleted file mode 100644
index 8bb1d70da03be..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControl.java
+++ /dev/null
@@ -1,308 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.loxone.internal.core;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Objects;
-
-import org.openhab.binding.loxone.internal.core.LxJsonApp3.LxJsonControl;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.gson.JsonArray;
-import com.google.gson.JsonElement;
-
-/**
- * A control of Loxone Miniserver.
- *
- * It represents a control object on the Miniserver. Controls can represent an input, functional block or an output of
- * the Miniserver, that is marked as visible in the Loxone UI. Controls can belong to a {@link LxContainer} room and a
- * {@link LxCategory} category.
- *
- * @author Pawel Pieczul - initial contribution
- *
- */
-public abstract class LxControl {
-
- /**
- * This class is used to instantiate a particular control object by the {@link LxControlFactory}
- *
- * @author Pawel Pieczul - initial contribution
- *
- */
- abstract static class LxControlInstance {
- /**
- * Creates an instance of a particular control class.
- *
- * @param client
- * websocket client to facilitate communication with Miniserver
- * @param uuid
- * UUID of this control
- * @param json
- * JSON describing the control as received from the Miniserver
- * @param room
- * Room that this control belongs to
- * @param category
- * Category that this control belongs to
- * @return
- * a newly created control object
- */
- abstract LxControl create(LxWsClient client, LxUuid uuid, LxJsonControl json, LxContainer room,
- LxCategory category);
-
- /**
- * Return a type name for this control.
- *
- * @return
- * type name (as used on the Miniserver)
- */
- abstract String getType();
- }
-
- private String name;
- private LxContainer room;
- private LxCategory category;
- private Map states = new HashMap<>();
-
- LxUuid uuid;
- LxWsClient socketClient;
- Logger logger = LoggerFactory.getLogger(LxControl.class);
- Map subControls = new HashMap<>();
-
- /**
- * Create a Miniserver's control object.
- *
- * @param client
- * websocket client to facilitate communication with Miniserver
- * @param uuid
- * UUID of this control
- * @param json
- * JSON describing the control as received from the Miniserver
- * @param room
- * Room that this control belongs to
- * @param category
- * Category that this control belongs to
- */
- LxControl(LxWsClient client, LxUuid uuid, LxJsonControl json, LxContainer room, LxCategory category) {
- logger.trace("Creating new LxControl: {}", json.type);
- socketClient = client;
- this.uuid = uuid;
- update(json, room, category);
- }
-
- /**
- * Gets value of a state object of given name, if exists
- *
- * @param name
- * name of state object
- * @return
- * state object's value
- */
- Double getStateValue(String name) {
- LxControlState state = getState(name);
- if (state != null) {
- return state.getValue();
- }
- return null;
- }
-
- /**
- * Gets text value of a state object of given name, if exists
- *
- * @param name
- * name of state object
- * @return
- * state object's text value
- */
- String getStateTextValue(String name) {
- LxControlState state = getState(name);
- if (state != null) {
- return state.getTextValue();
- }
- return null;
- }
-
- /**
- * Adds a listener for a particular state, if the state exists for the control.
- *
- * @param stateName
- * name of the state to add listener for
- * @param listener
- * listener to listen for state changes
- * @return
- * state that listener was added to or null if no such state
- */
- public LxControlState addStateListener(String stateName, LxControlStateListener listener) {
- LxControlState state = getState(stateName);
- if (state != null) {
- state.addListener(listener);
- } else {
- logger.debug("Attempt to add listener for not existing state {}", stateName);
- }
- return state;
- }
-
- public Map getSubControls() {
- return subControls;
- }
-
- public Map getStates() {
- return states;
- }
-
- /**
- * Call when control is no more needed - unlink it from containers
- */
- public void dispose() {
- if (room != null) {
- room.removeControl(this);
- }
- if (category != null) {
- category.removeControl(this);
- }
- for (LxControl control : subControls.values()) {
- control.dispose();
- }
- }
-
- /**
- * Obtain control's name
- *
- * @return
- * Human readable name of control
- */
- public String getName() {
- return name;
- }
-
- /**
- * Obtain UUID of this control
- *
- * @return
- * UUID
- */
- public LxUuid getUuid() {
- return uuid;
- }
-
- /**
- * Obtain room that this control belongs to
- *
- * @return
- * Control's room or null if no room
- */
- public LxContainer getRoom() {
- return room;
- }
-
- /**
- * Obtain category of this control
- *
- * @return
- * Control's category or null if no category
- */
- public LxCategory getCategory() {
- return category;
- }
-
- /**
- * Compare UUID's of two controls -
- *
- * @param object
- * Object to compare with
- * @return
- * true if UUID of two objects are equal
- */
- @Override
- public boolean equals(Object object) {
- if (this == object) {
- return true;
- }
- if (object == null) {
- return false;
- }
- if (object.getClass() != getClass()) {
- return false;
- }
- LxControl c = (LxControl) object;
- return Objects.equals(c.getUuid(), getUuid());
- }
-
- /**
- * Hash code of the control is equal to its UUID's hash code
- */
- @Override
- public int hashCode() {
- return getUuid().hashCode();
- }
-
- /**
- * Update Miniserver's control in runtime.
- *
- * @param json
- * JSON describing the control as received from the Miniserver
- * @param room
- * New room that this control belongs to
- * @param category
- * New category that this control belongs to
- */
- void update(LxJsonControl json, LxContainer room, LxCategory category) {
- logger.trace("Updating LxControl: {}", json.type);
-
- this.name = json.name;
- this.room = room;
- this.category = category;
- uuid.setUpdate(true);
- if (room != null) {
- room.addOrUpdateControl(this);
- }
- if (category != null) {
- category.addOrUpdateControl(this);
- }
-
- // retrieve all states from the configuration
- if (json.states != null) {
- logger.trace("Reading states for LxControl: {}", json.type);
-
- for (Map.Entry jsonState : json.states.entrySet()) {
- JsonElement element = jsonState.getValue();
- if (element instanceof JsonArray) {
- // temperature state of intelligent home controller object is the only
- // one that has state represented as an array, as this is not implemented
- // yet, we will skip this state
- continue;
- }
- String value = element.getAsString();
- if (value != null) {
- LxUuid id = new LxUuid(value);
- String name = jsonState.getKey().toLowerCase();
- LxControlState state = states.get(name);
- if (state == null) {
- logger.trace("New state for LxControl {}: {}", json.type, name);
- state = new LxControlState(id, name, this);
- } else {
- logger.trace("Existing state for LxControl {}: {}", json.type, name);
- state.getUuid().setUpdate(true);
- state.setName(name);
- }
- states.put(name, state);
- }
- }
- }
- }
-
- private LxControlState getState(String name) {
- return states.get(name);
- }
-}
diff --git a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlAbstractController.java b/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlAbstractController.java
deleted file mode 100644
index b3ab61b5cf2bd..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlAbstractController.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.loxone.internal.core;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.openhab.binding.loxone.internal.core.LxJsonApp3.LxJsonControl;
-
-/**
- * A class that represents controllers, which contain sub-controls, which are also {@link LxControl}
- *
- * @author Pawel Pieczul - initial contribution
- *
- */
-abstract class LxControlAbstractController extends LxControl {
- /**
- * Create controller object.
- *
- * @param client
- * communication client used to send commands to the Miniserver
- * @param uuid
- * controller's UUID
- * @param json
- * JSON describing the control as received from the Miniserver
- * @param room
- * room to which controller belongs
- * @param category
- * category to which controller belongs
- */
- LxControlAbstractController(LxWsClient client, LxUuid uuid, LxJsonControl json, LxContainer room,
- LxCategory category) {
- super(client, uuid, json, room, category);
- }
-
- /**
- * Update Miniserver's controller in runtime.
- *
- * @param json
- * JSON describing the control as received from the Miniserver
- * @param room
- * New room that this control belongs to
- * @param category
- * New category that this control belongs to
- */
- @Override
- void update(LxJsonControl json, LxContainer room, LxCategory category) {
- super.update(json, room, category);
-
- for (LxControl control : subControls.values()) {
- control.uuid.setUpdate(false);
- }
- if (json.subControls != null) {
- for (LxJsonControl subControl : json.subControls.values()) {
- // recursively create a subcontrol as a new control
- subControl.room = json.room;
- subControl.cat = json.cat;
- LxUuid uuid = new LxUuid(subControl.uuidAction);
- if (subControls.containsKey(uuid)) {
- subControls.get(uuid).update(subControl, room, category);
- } else {
- LxControl control = LxControlFactory.createControl(socketClient, uuid, subControl, room, category);
- if (control != null) {
- subControls.put(control.uuid, control);
- }
- }
- }
- }
- List toRemove = new ArrayList<>();
- for (LxControl control : subControls.values()) {
- if (!control.uuid.getUpdate()) {
- toRemove.add(control.uuid);
- }
- }
- for (LxUuid id : toRemove) {
- subControls.remove(id);
- }
- }
-}
diff --git a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlDimmer.java b/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlDimmer.java
deleted file mode 100644
index 233c781e8fd67..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlDimmer.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.loxone.internal.core;
-
-import java.io.IOException;
-
-import org.openhab.binding.loxone.internal.core.LxJsonApp3.LxJsonControl;
-
-/**
- * A dimmer type of control on Loxone Miniserver.
- *
- * According to Loxone API documentation, a dimmer control is:
- *
- *
a virtual input of dimmer type
- *
- *
- * @author Stephan Brunner
- *
- */
-public class LxControlDimmer extends LxControl {
-
- static class Factory extends LxControlInstance {
- @Override
- LxControl create(LxWsClient client, LxUuid uuid, LxJsonControl json, LxContainer room, LxCategory category) {
- return new LxControlDimmer(client, uuid, json, room, category);
- }
-
- @Override
- String getType() {
- return TYPE_NAME;
- }
- }
-
- /**
- * A name by which Miniserver refers to dimmer controls
- */
- private static final String TYPE_NAME = "dimmer";
- /**
- * States
- */
- private static final String STATE_POSITION = "position";
- private static final String STATE_MIN = "min";
- private static final String STATE_MAX = "max";
-
- /**
- * Command string used to set the dimmer ON
- */
- private static final String CMD_ON = "On";
- /**
- * Command string used to set the dimmer to OFF
- */
- private static final String CMD_OFF = "Off";
-
- /**
- * Create dimmer control object.
- *
- * @param client
- * communication client used to send commands to the Miniserver
- * @param uuid
- * dimmer's UUID
- * @param json
- * JSON describing the control as received from the Miniserver
- * @param room
- * room to which dimmer belongs
- * @param category
- * category to which dimmer belongs
- */
- LxControlDimmer(LxWsClient client, LxUuid uuid, LxJsonControl json, LxContainer room, LxCategory category) {
- super(client, uuid, json, room, category);
- }
-
- /**
- * Sets the current position of the dimmer
- *
- * @param position
- * position to move to (0-100, 0 - full off, 100 - full on)
- * @throws IOException
- * error communicating with the Miniserver
- */
- public void setPosition(Double position) throws IOException {
- Double loxonePosition = mapOHToLoxone(position);
- if (loxonePosition != null) {
- socketClient.sendAction(uuid, loxonePosition.toString());
- }
- }
-
- /**
- * Sets the dimmer to on
- *
- * @throws IOException
- * error communicating with the Miniserver
- */
- public void on() throws IOException {
- socketClient.sendAction(uuid, CMD_ON);
- }
-
- /**
- * Sets the dimmer to off
- *
- * @throws IOException
- * error communicating with the Miniserver
- */
- public void off() throws IOException {
- socketClient.sendAction(uuid, CMD_OFF);
- }
-
- /**
- * Get current value of the dimmer state.
- *
- * @return
- * 0 - full off, 100 - full on
- */
- public Double getPosition() {
- return mapLoxoneToOH(getStateValue(STATE_POSITION));
- }
-
- private Double getMax() {
- return getStateValue(STATE_MAX);
- }
-
- private Double getMin() {
- return getStateValue(STATE_MIN);
- }
-
- private Double mapLoxoneToOH(Double loxoneValue) {
- if (loxoneValue != null) {
- // 0 means turn dimmer off, any value above zero should be mapped from min-max range
- if (Double.compare(loxoneValue, 0.0) == 0) {
- return 0.0;
- }
- Double max = getMax();
- Double min = getMin();
- if (max != null && min != null) {
- return (loxoneValue - min) * ((max - min) / 100);
- }
- }
- return null;
- }
-
- private Double mapOHToLoxone(Double ohValue) {
- if (ohValue != null) {
- // 0 means turn dimmer off, any value above zero should be mapped to min-max range
- if (Double.compare(ohValue, 0.0) == 0) {
- return 0.0;
- }
- Double max = getMax();
- Double min = getMin();
- if (max != null && min != null) {
- double value = min + (ohValue / ((max - min) / 100));
- return value; // no rounding to integer value is needed as loxone is accepting floating point values
- }
- }
- return null;
- }
-}
diff --git a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlFactory.java b/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlFactory.java
deleted file mode 100644
index cc43095e93230..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlFactory.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.loxone.internal.core;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.openhab.binding.loxone.internal.core.LxControl.LxControlInstance;
-import org.openhab.binding.loxone.internal.core.LxJsonApp3.LxJsonControl;
-
-/**
- * A factory of controls of Loxone Miniserver.
- * It creates various types of control objects based on control type received from Miniserver.
- *
- * @author Pawel Pieczul
- *
- */
-class LxControlFactory {
- static {
- controls = new HashMap<>();
- add(new LxControlDimmer.Factory());
- add(new LxControlInfoOnlyAnalog.Factory());
- add(new LxControlInfoOnlyDigital.Factory());
- add(new LxControlJalousie.Factory());
- add(new LxControlLightController.Factory());
- add(new LxControlLightControllerV2.Factory());
- add(new LxControlPushbutton.Factory());
- add(new LxControlRadio.Factory());
- add(new LxControlSwitch.Factory());
- add(new LxControlTextState.Factory());
- add(new LxControlTimedSwitch.Factory());
- }
-
- private static Map controls;
-
- /**
- * Create a {@link LxControl} object for a control received from the Miniserver
- *
- * @param client
- * websocket client to facilitate communication with Miniserver
- * @param uuid
- * UUID of the control to be created
- * @param json
- * JSON describing the control as received from the Miniserver
- * @param room
- * Room that this control belongs to
- * @param category
- * Category that this control belongs to
- * @return
- * created control object or null if error
- */
- static LxControl createControl(LxWsClient client, LxUuid uuid, LxJsonControl json, LxContainer room,
- LxCategory category) {
- if (json == null || json.type == null || json.name == null) {
- return null;
- }
- String type = json.type.toLowerCase();
- LxControlInstance control = controls.get(type);
- if (control != null) {
- return control.create(client, uuid, json, room, category);
- }
- return null;
- }
-
- private static void add(LxControlInstance control) {
- controls.put(control.getType(), control);
- }
-}
diff --git a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlInfoOnlyAnalog.java b/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlInfoOnlyAnalog.java
deleted file mode 100644
index 7f1a77810e71b..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlInfoOnlyAnalog.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.loxone.internal.core;
-
-import org.openhab.binding.loxone.internal.core.LxJsonApp3.LxJsonControl;
-
-/**
- * An InfoOnlyAnalog type of control on Loxone Miniserver.
- *
- * According to Loxone API documentation, this control covers analog virtual states only. This control does not send any
- * commands to the Miniserver. It can be used to read a formatted representation of an analog virtual state.
- *
- * @author Pawel Pieczul - initial contribution
- *
- */
-public class LxControlInfoOnlyAnalog extends LxControl {
-
- static class Factory extends LxControlInstance {
- @Override
- LxControl create(LxWsClient client, LxUuid uuid, LxJsonControl json, LxContainer room, LxCategory category) {
- return new LxControlInfoOnlyAnalog(client, uuid, json, room, category);
- }
-
- @Override
- String getType() {
- return TYPE_NAME;
- }
- }
-
- /**
- * A name by which Miniserver refers to analog virtual state controls
- */
- private static final String TYPE_NAME = "infoonlyanalog";
- /**
- * InfoOnlyAnalog state with current value
- */
- private static final String STATE_VALUE = "value";
- /**
- * InfoOnlyAnalog state with error value
- */
- @SuppressWarnings("unused")
- private static final String STATE_ERROR = "error";
-
- private String format;
-
- /**
- * Create InfoOnlyAnalog control object.
- *
- * @param client
- * communication client used to send commands to the Miniserver
- * @param uuid
- * control's UUID
- * @param json
- * JSON describing the control as received from the Miniserver
- * @param room
- * room to which control belongs
- * @param category
- * category to which control belongs
- */
- LxControlInfoOnlyAnalog(LxWsClient client, LxUuid uuid, LxJsonControl json, LxContainer room, LxCategory category) {
- super(client, uuid, json, room, category);
- }
-
- /**
- * Update Miniserver's control in runtime.
- *
- * @param json
- * JSON describing the control as received from the Miniserver
- * @param room
- * New room that this control belongs to
- * @param category
- * New category that this control belongs to
- */
- @Override
- void update(LxJsonControl json, LxContainer room, LxCategory category) {
- super.update(json, room, category);
- if (json.details != null && json.details.format != null) {
- format = json.details.format;
- } else {
- format = "%.1f";
- }
- }
-
- /**
- * Obtain current value of an analog virtual state, expressed in a format configured on the Miniserver
- *
- * @return
- * string for the value of the state or null if current value is not compatible with this control
- */
- public String getFormattedValue() {
- Double value = getStateValue(STATE_VALUE);
- if (value != null) {
- return String.format(format, value);
- }
- return null;
- }
-
- /**
- * Obtain format string used to convert control's value into text
- *
- * @return
- * string with format
- */
- public String getFormatString() {
- return format;
- }
-
- /**
- * Obtain current value of an analog virtual state, expressed as a number
- *
- * @return
- * value of the state or null if current value is not compatible with this control
- */
- public Double getValue() {
- return getStateValue(STATE_VALUE);
- }
-}
diff --git a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlInfoOnlyDigital.java b/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlInfoOnlyDigital.java
deleted file mode 100644
index f63801580d095..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlInfoOnlyDigital.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.loxone.internal.core;
-
-import org.openhab.binding.loxone.internal.core.LxJsonApp3.LxJsonControl;
-
-/**
- * An InfoOnlyDigital type of control on Loxone Miniserver.
- *
- * According to Loxone API documentation, this control covers digital virtual states only. This control does not send
- * any commands to the Miniserver. It can be used to read a formatted representation of a digital virtual state.
- *
- * @author Pawel Pieczul - initial contribution
- *
- */
-public class LxControlInfoOnlyDigital extends LxControl {
-
- static class Factory extends LxControlInstance {
- @Override
- LxControl create(LxWsClient client, LxUuid uuid, LxJsonControl json, LxContainer room, LxCategory category) {
- return new LxControlInfoOnlyDigital(client, uuid, json, room, category);
- }
-
- @Override
- String getType() {
- return TYPE_NAME;
- }
- }
-
- /**
- * A name by which Miniserver refers to digital virtual state controls
- */
- private static final String TYPE_NAME = "infoonlydigital";
- /**
- * InfoOnlyDigital has one state that can be on/off
- */
- private static final String STATE_ACTIVE = "active";
-
- private String textOn;
- private String textOff;
-
- /**
- * Create InfoOnlyDigital control object.
- *
- * @param client
- * communication client used to send commands to the Miniserver
- * @param uuid
- * control's UUID
- * @param json
- * JSON describing the control as received from the Miniserver
- * @param room
- * room to which control belongs
- * @param category
- * category to which control belongs
- */
- LxControlInfoOnlyDigital(LxWsClient client, LxUuid uuid, LxJsonControl json, LxContainer room,
- LxCategory category) {
- super(client, uuid, json, room, category);
- }
-
- /**
- * Update Miniserver's control in runtime.
- *
- * @param json
- * JSON describing the control as received from the Miniserver
- * @param room
- * New room that this control belongs to
- * @param category
- * New category that this control belongs to
- */
- @Override
- void update(LxJsonControl json, LxContainer room, LxCategory category) {
- super.update(json, room, category);
- if (json.details != null && json.details.text != null) {
- textOn = json.details.text.on;
- textOff = json.details.text.off;
- }
- }
-
- /**
- * Obtain current value of the virtual state, expressed in a format configured on the Miniserver
- *
- * @return
- * string for on/off value of the state or null if current value is not available
- */
- public String getFormattedValue() {
- Double value = getStateValue(STATE_ACTIVE);
- if (value != null) {
- if (value == 0) {
- return textOff;
- } else if (value == 1) {
- return textOn;
- }
- }
- return null;
- }
-
- /**
- * Obtain current value of a digital virtual state
- *
- * @return
- * 1 for ON, 0 for OFF and -1 if current value is not available
- */
- public Double getValue() {
- return getStateValue(STATE_ACTIVE);
- }
-}
diff --git a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlJalousie.java b/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlJalousie.java
deleted file mode 100644
index 574205e4253a3..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlJalousie.java
+++ /dev/null
@@ -1,235 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.loxone.internal.core;
-
-import java.io.IOException;
-
-import org.openhab.binding.loxone.internal.core.LxJsonApp3.LxJsonControl;
-
-/**
- * A jalousie type of control on Loxone Miniserver.
- *
- * According to Loxone API documentation, a jalousie control covers:
- *
- *
Blinds
- *
Automatic blinds
- *
Automatic blinds integrated
- *
- *
- * @author Pawel Pieczul - initial contribution
- *
- */
-public class LxControlJalousie extends LxControl implements LxControlStateListener {
-
- static class Factory extends LxControlInstance {
- @Override
- LxControl create(LxWsClient client, LxUuid uuid, LxJsonControl json, LxContainer room, LxCategory category) {
- return new LxControlJalousie(client, uuid, json, room, category);
- }
-
- @Override
- String getType() {
- return TYPE_NAME;
- }
- }
-
- /**
- * A name by which Miniserver refers to jalousie controls
- */
- private static final String TYPE_NAME = "jalousie";
-
- /**
- * Jalousie is moving up
- */
- private static final String STATE_UP = "up";
- /**
- * Jalousie is moving down
- */
- private static final String STATE_DOWN = "down";
- /**
- * The position of the Jalousie, a number from 0 to 1
- * Jalousie upper position = 0
- * Jalousie lower position = 1
- */
- private static final String STATE_POSITION = "position";
- /**
- * The shade position of the Jalousie (blinds), a number from 0 to 1
- * Blinds are not shaded = 0
- * Blinds are shaded = 1
- */
- @SuppressWarnings("unused")
- private static final String STATE_SHADE_POSITION = "shadeposition";
- /**
- * Only used by ones with Autopilot, this represents the safety shutdown
- */
- @SuppressWarnings("unused")
- private static final String STATE_SAFETY_ACTIVE = "safetyactive";
- /**
- * Only used by ones with Autopilot
- */
- @SuppressWarnings("unused")
- private static final String STATE_AUTO_ALLOWED = "autoallowed";
- /**
- * Only used by ones with Autopilot
- */
- @SuppressWarnings("unused")
- private static final String STATE_AUTO_ACTIVE = "autoactive";
- /**
- * Only used by ones with Autopilot, this represents the output QI in Loxone Config
- */
- @SuppressWarnings("unused")
- private static final String STATE_LOCKED = "locked";
-
- /**
- * Command string used to set control's state to Down
- */
- @SuppressWarnings("unused")
- private static final String CMD_DOWN = "Down";
- /**
- * Command string used to set control's state to Up
- */
- @SuppressWarnings("unused")
- private static final String CMD_UP = "Up";
- /**
- * Command string used to set control's state to Full Down
- */
- private static final String CMD_FULL_DOWN = "FullDown";
- /**
- * Command string used to set control's state to Full Up
- */
- private static final String CMD_FULL_UP = "FullUp";
- /**
- * Command string used to stop rollershutter
- */
- private static final String CMD_STOP = "Stop";
-
- private Double targetPosition;
-
- /**
- * Create jalousie control object.
- *
- * @param client
- * communication client used to send commands to the Miniserver
- * @param uuid
- * jalousie's UUID
- * @param json
- * JSON describing the control as received from the Miniserver
- * @param room
- * room to which jalousie belongs
- * @param category
- * category to which jalousie belongs
- */
- LxControlJalousie(LxWsClient client, LxUuid uuid, LxJsonControl json, LxContainer room, LxCategory category) {
- super(client, uuid, json, room, category);
- addStateListener(STATE_POSITION, this);
- }
-
- /**
- * Set rollershutter (jalousie) to full up position.
- *
- * Sends a command to operate the rollershutter.
- *
- * @throws IOException
- * when something went wrong with communication
- */
- public void fullUp() throws IOException {
- socketClient.sendAction(uuid, CMD_FULL_UP);
- }
-
- /**
- * Set rollershutter (jalousie) to full down position.
- *
- * Sends a command to operate the rollershutter.
- *
- * @throws IOException
- * when something went wrong with communication
- */
- public void fullDown() throws IOException {
- socketClient.sendAction(uuid, CMD_FULL_DOWN);
- }
-
- /**
- * Stop movement of the rollershutter (jalousie)
- *
- * Sends a command to operate the rollershutter.
- *
- * @throws IOException
- * when something went wrong with communication
- */
- public void stop() throws IOException {
- socketClient.sendAction(uuid, CMD_STOP);
- }
-
- /**
- * Move the rollershutter (jalousie) to a desired position.
- *
- * The jalousie will start moving in the desired direction based on the current position. It will stop moving once
- * there is a state update event received with value above/below (depending on direction) or equal to the set
- * position.
- *
- * @param position
- * end position to move jalousie to, floating point number from 0..1 (0-fully closed to 1-fully open)
- * @throws IOException
- * when something went wrong with communication
- */
- public void moveToPosition(Double position) throws IOException {
- Double currentPosition = getPosition();
- if (currentPosition != null && currentPosition >= 0 && currentPosition <= 1) {
- if (currentPosition > position) {
- logger.debug("Moving jalousie up from {} to {}", currentPosition, position);
- targetPosition = position;
- fullUp();
- } else if (currentPosition < position) {
- logger.debug("Moving jalousie down from {} to {}", currentPosition, position);
- targetPosition = position;
- fullDown();
- }
- }
- }
-
- /**
- * Get current position of the rollershutter (jalousie)
- *
- * @return
- * a floating point number from range 0-fully closed to 1-fully open or null if position not available
- */
- public Double getPosition() {
- return getStateValue(STATE_POSITION);
- }
-
- /**
- * Monitor jalousie position against desired target position and stop it if target position is reached.
- */
- @Override
- public void onStateChange(LxControlState state) {
- // check position changes
- if (STATE_POSITION.equals(state.getName()) && targetPosition != null && targetPosition > 0
- && targetPosition < 1) {
- // see in which direction jalousie is moving
- Double currentPosition = state.getValue();
- Double upValue = getStateValue(STATE_UP);
- Double downValue = getStateValue(STATE_DOWN);
- if (currentPosition != null && upValue != null && downValue != null) {
- if (((upValue == 1) && (currentPosition <= targetPosition))
- || ((downValue == 1) && (currentPosition >= targetPosition))) {
- targetPosition = null;
- try {
- stop();
- } catch (IOException e) {
- logger.debug("Error stopping jalousie when meeting target position.");
- }
- }
- }
- }
- }
-}
diff --git a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlLightController.java b/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlLightController.java
deleted file mode 100644
index aea49b30c0f5a..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlLightController.java
+++ /dev/null
@@ -1,233 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.loxone.internal.core;
-
-import java.io.IOException;
-import java.util.Map;
-import java.util.TreeMap;
-
-import org.openhab.binding.loxone.internal.core.LxJsonApp3.LxJsonControl;
-
-/**
- * A Light Controller type of control on Loxone Miniserver.
- *
- * According to Loxone API documentation, a light controller is one of following functional blocks:
- *
- *
Lighting Controller
- *
Hotel Lighting Controller
- *
- *
- * @author Pawel Pieczul - initial contribution
- *
- */
-public class LxControlLightController extends LxControlAbstractController implements LxControlStateListener {
-
- static class Factory extends LxControlInstance {
- @Override
- LxControl create(LxWsClient client, LxUuid uuid, LxJsonControl json, LxContainer room, LxCategory category) {
- return new LxControlLightController(client, uuid, json, room, category);
- }
-
- @Override
- String getType() {
- return TYPE_NAME;
- }
- }
-
- /**
- * Number of scenes supported by the Miniserver. Indexing starts with 0 to NUM_OF_SCENES-1.
- */
- public static final int NUM_OF_SCENES = 10;
-
- /**
- * A name by which Miniserver refers to light controller controls
- */
- private static final String TYPE_NAME = "lightcontroller";
-
- /**
- * Current active scene number (0-9)
- */
- private static final String STATE_ACTIVE_SCENE = "activescene";
- /**
- * List of available scenes (public state, so user can monitor scene list updates)
- */
- public static final String STATE_SCENE_LIST = "scenelist";
- /**
- * Command string used to set control's state to ON
- */
- private static final String CMD_ON = "On";
- /**
- * Command string used to set control's state to OFF
- */
- private static final String CMD_OFF = "Off";
- /**
- * Command string used to go to the next scene
- */
- private static final String CMD_NEXT_SCENE = "plus";
- /**
- * Command string used to go to the previous scene
- */
- private static final String CMD_PREVIOUS_SCENE = "minus";
- private static final int SCENE_ALL_ON = 9;
-
- private Map sceneNames = new TreeMap<>();
- private Integer movementScene;
-
- /**
- * Create lighting controller object.
- *
- * @param client
- * communication client used to send commands to the Miniserver
- * @param uuid
- * controller's UUID
- * @param json
- * JSON describing the control as received from the Miniserver
- * @param room
- * room to which controller belongs
- * @param category
- * category to which controller belongs
- */
- LxControlLightController(LxWsClient client, LxUuid uuid, LxJsonControl json, LxContainer room,
- LxCategory category) {
- super(client, uuid, json, room, category);
- // sub-controls of this control have been created when update() method was called by super class constructor
- addStateListener(STATE_SCENE_LIST, this);
- }
-
- /**
- * Update Miniserver's control in runtime.
- *
- * @param json
- * JSON describing the control as received from the Miniserver
- * @param room
- * New room that this control belongs to
- * @param category
- * New category that this control belongs to
- */
- @Override
- void update(LxJsonControl json, LxContainer room, LxCategory category) {
- super.update(json, room, category);
- if (json.details != null) {
- this.movementScene = json.details.movementScene;
- }
- }
-
- /**
- * Set all outputs to ON.
- *
- * @throws IOException
- * when something went wrong with communication
- */
- public void allOn() throws IOException {
- socketClient.sendAction(uuid, CMD_ON);
- }
-
- /**
- * Set all outputs to OFF.
- *
- * @throws IOException
- * when something went wrong with communication
- */
- public void allOff() throws IOException {
- socketClient.sendAction(uuid, CMD_OFF);
- }
-
- /**
- * Select next lighting scene.
- *
- * @throws IOException
- * when something went wrong with communication
- */
- public void nextScene() throws IOException {
- socketClient.sendAction(uuid, CMD_NEXT_SCENE);
- }
-
- /**
- * Select previous lighting scene.
- *
- * @throws IOException
- * when something went wrong with communication
- */
- public void previousScene() throws IOException {
- socketClient.sendAction(uuid, CMD_PREVIOUS_SCENE);
- }
-
- /**
- * Set provided scene.
- *
- * @param scene
- * scene number to set (0-9)
- * @throws IOException
- * when something went wrong with communication
- */
- public void setScene(int scene) throws IOException {
- if (scene == SCENE_ALL_ON) {
- allOn();
- } else if (scene >= 0 && scene < NUM_OF_SCENES) {
- socketClient.sendAction(uuid, Long.toString(scene));
- }
- }
-
- /**
- * Get current active scene
- *
- * @return
- * number of the active scene (0-9, 0-all off, 9-all on) or null if error
- */
- public Integer getCurrentScene() {
- Double value = getStateValue(STATE_ACTIVE_SCENE);
- if (value != null) {
- return value.intValue();
- }
- return null;
- }
-
- /**
- * Get scene designated as 'movement'
- *
- * @return
- * number of the movement scene (0-9, 0-all off, 9-all on) or null if undefined
- */
- public Integer getMovementScene() {
- return movementScene;
- }
-
- /**
- * Return an array with names of all scenes, where index is scene number
- *
- * @return
- * an array with scene names indexed by scene number
- */
- public Map getSceneNames() {
- return sceneNames;
- }
-
- /**
- * Get scene names from new state value received from the Miniserver
- */
- @Override
- public void onStateChange(LxControlState state) {
- String scenesText = state.getTextValue();
- if (scenesText != null) {
- sceneNames.clear();
- String[] scenes = scenesText.split(",");
- for (String line : scenes) {
- line = line.replaceAll("\"", "");
- String[] params = line.split("=");
- if (params.length == 2) {
- sceneNames.put(params[0], params[1]);
- }
- }
- }
- }
-}
diff --git a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlLightControllerV2.java b/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlLightControllerV2.java
deleted file mode 100644
index 29c62c19da8ee..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlLightControllerV2.java
+++ /dev/null
@@ -1,298 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.loxone.internal.core;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.openhab.binding.loxone.internal.core.LxJsonApp3.LxJsonControl;
-
-import com.google.gson.JsonSyntaxException;
-
-/**
- * A Light Controller V2 type of control on Loxone Miniserver.
- *
- * This control has been introduced in Loxone Config 9 in 2017 and it makes the {@link LxControlLightController}
- * obsolete. Both controls will exist for some time together.
- *
- * Light controller V2 can have N outputs named AQ1...AQN that can function as Switch, Dimmer, RGB, Lumitech or Smart
- * Actuator functional blocks. Individual controls will be created for these outputs so they can be operated directly
- * and independently from the controller.
- *
- * Controller can also have M moods configured. Each mood defines own subset of outputs and their settings, which will
- * be engaged when the mood is active. A dedicated switch control object will be created for each mood.
- * This effectively will allow for mixing various moods by individually enabling/disabling them.
- *
- * It seems there is no imposed limitation for the number of outputs and moods.
- *
- * @author Pawel Pieczul - initial contribution
- *
- */
-public class LxControlLightControllerV2 extends LxControlAbstractController implements LxControlStateListener {
-
- static class Factory extends LxControlInstance {
- @Override
- LxControl create(LxWsClient client, LxUuid uuid, LxJsonControl json, LxContainer room, LxCategory category) {
- return new LxControlLightControllerV2(client, uuid, json, room, category);
- }
-
- @Override
- String getType() {
- return TYPE_NAME;
- }
- }
-
- /**
- * A name by which Miniserver refers to light controller v2 controls
- */
- private static final String TYPE_NAME = "lightcontrollerv2";
-
- /**
- * State with list of active moods
- */
- public static final String STATE_ACTIVE_MOODS_LIST = "activemoods";
- /**
- * State with list of available moods
- */
- public static final String STATE_MOODS_LIST = "moodlist";
-
- /**
- * Command string used to set a given mood
- */
- private static final String CMD_CHANGE_TO_MOOD = "changeTo";
- /**
- * Command string used to change to the next mood
- */
- private static final String CMD_NEXT_MOOD = "plus";
- /**
- * Command string used to change to the previous mood
- */
- private static final String CMD_PREVIOUS_MOOD = "minus";
- /**
- * Command string used to add mood to the active moods (mix it in)
- */
- private static final String CMD_ADD_MOOD = "addMood";
- /**
- * Command string used to remove mood from the active moods (mix it out)
- */
- private static final String CMD_REMOVE_MOOD = "removeMood";
-
- // Following commands are not supported:
- // moveFavoriteMood, moveAdditionalMood, moveMood, addToFavoriteMood, removeFromFavoriteMood, learn, delete
-
- private Map moodList = new HashMap<>();
- private List activeMoods = new ArrayList<>();
- private Integer minMoodId;
- private Integer maxMoodId;
-
- /**
- * Create lighting controller v2 object.
- *
- * @param client
- * communication client used to send commands to the Miniserver
- * @param uuid
- * controller's UUID
- * @param json
- * JSON describing the control as received from the Miniserver
- * @param room
- * room to which controller belongs
- * @param category
- * category to which controller belongs
- */
- LxControlLightControllerV2(LxWsClient client, LxUuid uuid, LxJsonControl json, LxContainer room,
- LxCategory category) {
- super(client, uuid, json, room, category);
- // sub-controls of this control have been created when update() method was called by the super class constructor
- addStateListener(STATE_MOODS_LIST, this);
- addStateListener(STATE_ACTIVE_MOODS_LIST, this);
- }
-
- /**
- * Set a mood, deactivate other moods
- *
- * @param moodId
- * ID of the mood to set
- * @throws IOException
- * when something went wrong with communication
- */
- public void setMood(Integer moodId) throws IOException {
- if (isMoodOk(moodId)) {
- socketClient.sendAction(uuid, CMD_CHANGE_TO_MOOD + "/" + moodId);
- }
- }
-
- /**
- * Select next mood.
- *
- * @throws IOException
- * when something went wrong with communication
- */
- public void nextMood() throws IOException {
- socketClient.sendAction(uuid, CMD_NEXT_MOOD);
- }
-
- /**
- * Select previous mood.
- *
- * @throws IOException
- * when something went wrong with communication
- */
- public void previousMood() throws IOException {
- socketClient.sendAction(uuid, CMD_PREVIOUS_MOOD);
- }
-
- /**
- * Mix a mood into currently active moods.
- *
- * @param moodId
- * ID of the mood to add
- * @throws IOException
- * when something went wrong with communication
- */
- public void addMood(Integer moodId) throws IOException {
- if (isMoodOk(moodId)) {
- socketClient.sendAction(uuid, CMD_ADD_MOOD + "/" + moodId);
- }
- }
-
- /**
- * Mix a mood out of currently active moods.
- *
- * @param moodId
- * ID of the mood to remove
- * @throws IOException
- * when something went wrong with communication
- */
- public void removeMood(Integer moodId) throws IOException {
- if (isMoodOk(moodId)) {
- socketClient.sendAction(uuid, CMD_REMOVE_MOOD + "/" + moodId);
- }
- }
-
- /**
- * Get IDs of currently active moods.
- *
- * @return
- * list of IDs of active moods or null if active moods list is not available
- */
- public List getActiveMoods() {
- return activeMoods;
- }
-
- /**
- * Get all configured moods.
- *
- * @return
- * Map with mood ID as key and mood control object as value or null if moods are not configured
- */
- public Map getMoods() {
- return moodList;
- }
-
- /**
- * Get minimum value a mood ID can have for the current list of moods.
- *
- * @return
- * minimum value of a mood ID for the current list of moods or null if not defined
- */
- public Integer getMinMoodId() {
- return minMoodId;
- }
-
- /**
- * Get maximum value a mood ID can have for the current list of moods.
- *
- * @return
- * maximum value of a mood ID for the current list of moods or null if not defined
- */
- public Integer getMaxMoodId() {
- return maxMoodId;
- }
-
- /**
- * Get configured and active moods from a new state value received from the Miniserver
- *
- * @param state
- * state update from the Miniserver
- */
- @Override
- public void onStateChange(LxControlState state) {
- String stateName = state.getName();
- String text = state.getTextValue();
- logger.debug("Received state {} update to {}", stateName, text);
- try {
- if (STATE_MOODS_LIST.equals(stateName)) {
- LxJsonMood[] array = socketClient.getGson().fromJson(text, LxJsonMood[].class);
- moodList.clear();
- minMoodId = null;
- maxMoodId = null;
- LxJsonControl json = new LxJsonApp3().new LxJsonControl();
- for (LxJsonMood mood : array) {
- if (mood.id != null && mood.name != null) {
- logger.debug("Adding mood {} (name={}, isUsed={}, t5={}, static={}", mood.id, mood.name,
- mood.isUsed, mood.isT5Controlled, mood.isStatic);
- json.name = mood.name;
- // mood-UUID = -M
- LxUuid moodUuid = new LxUuid(getUuid().toString() + "-M" + mood.id);
- LxControlMood control = new LxControlMood(socketClient, moodUuid, json, getRoom(),
- getCategory(), mood.id, mood.isStatic, this);
- moodList.put(moodUuid, control);
- if (minMoodId == null || minMoodId > mood.id) {
- minMoodId = mood.id;
- }
- if (maxMoodId == null || maxMoodId < mood.id) {
- maxMoodId = mood.id;
- }
- }
- }
- } else if (STATE_ACTIVE_MOODS_LIST.equals(stateName)) {
- // this state can be received before list of moods, but it contains a valid list of IDs
- Integer[] array = socketClient.getGson().fromJson(text, Integer[].class);
- activeMoods = Arrays.asList(array);
- }
- } catch (JsonSyntaxException e) {
- logger.debug("Error parsing state {}: {}", stateName, e.getMessage());
- }
- }
-
- /**
- * Check if mood ID is within allowed range
- *
- * @param moodId
- * mood ID to check
- * @return
- * true if mood ID is within allowed range or range is not configured
- */
- private boolean isMoodOk(Integer moodId) {
- if ((minMoodId != null && minMoodId > moodId) || (maxMoodId != null && maxMoodId < moodId)) {
- return false;
- }
- return true;
- }
-
- /**
- * Check if mood is currently active.
- *
- * @param moodId
- * mood ID to check
- * @return
- * true if mood is currently active
- */
- boolean isMoodActive(Integer moodId) {
- return activeMoods.contains(moodId);
- }
-}
diff --git a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlMood.java b/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlMood.java
deleted file mode 100644
index 6a5a3be20a168..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlMood.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.loxone.internal.core;
-
-import java.io.IOException;
-
-import org.openhab.binding.loxone.internal.core.LxJsonApp3.LxJsonControl;
-
-/**
- * This class represents a mood belonging to a {@link LxControlMood} object.
- * A mood is effectively a switch. When the switch is set to ON, mood is active and mixed into a set of active
- * moods.
- *
- * @author Pawel Pieczul - initial contribution
- *
- */
-public class LxControlMood extends LxControlSwitch {
- private Integer moodId;
- private Boolean isStatic;
- private LxControlLightControllerV2 controller;
-
- /**
- * Create a control representing a single mood of a light controller V2.
- *
- * @param client
- * communication client used to send commands to the Miniserver
- * @param uuid
- * controller's UUID
- * @param json
- * JSON describing the control as received from the Miniserver
- * @param room
- * room to which mood belongs
- * @param category
- * category to which mood belongs
- * @param moodId
- * mood ID withing the controller (received from the Miniserver)
- * @param isStatic
- * true if this mood is static and can't be deleted or modified in any way
- * @param controller
- * light controller that this mood belongs to
- */
- LxControlMood(LxWsClient client, LxUuid uuid, LxJsonControl json, LxContainer room, LxCategory category,
- Integer moodId, Boolean isStatic, LxControlLightControllerV2 controller) {
- super(client, uuid, json, room, category);
- this.moodId = moodId;
- this.isStatic = isStatic;
- this.controller = controller;
- }
-
- /**
- * Get an ID of this mood. ID indentifies the mood within a light controller.
- * It is equal to the mood ID received from the Miniserver.
- *
- * @return
- * mood ID
- */
- public Integer getId() {
- return moodId;
- }
-
- /**
- * Returns if mood is statically-defined 'all off' mood.
- * Setting 'all off' mood on the Miniserver switches all outputs off, but it can't be mixed with other moods.
- * Attempt to mix it results in no change in the active moods list.
- *
- * @return
- * true if this is static all outputs off mood
- */
- public boolean isAllOffMood() {
- // currently the API does not give a hint how to figure out the 'all off' mood
- // empirically this is the only mood that is not editable by the user and has a static flag set on
- // we will assume that the only static mood is 'all off' mood
- return isStatic == null ? false : isStatic;
- }
-
- /**
- * Get controller's UUID that the mood belongs to.
- *
- * @return UUID of the lighting controller
- */
- public LxUuid getControllerUuid() {
- return LxControlMood.this.getUuid();
- }
-
- /**
- * Mix the mood into active moods.
- *
- * @throws IOException
- * when something went wrong with communication
- */
- @Override
- public void on() throws IOException {
- controller.addMood(moodId);
- }
-
- /**
- * Mix the mood out of active moods.
- *
- * @throws IOException
- * when something went wrong with communication
- */
- @Override
- public void off() throws IOException {
- controller.removeMood(moodId);
- }
-
- /**
- * Return whether the mood is active of not.
- *
- * @return
- * 1 if mood is active and 0 otherwise
- */
- @Override
- public Double getState() {
- if (controller.isMoodActive(moodId)) {
- return 1.0;
- }
- return 0.0;
- }
-}
diff --git a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlPushbutton.java b/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlPushbutton.java
deleted file mode 100644
index 1316f58fbd8a0..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlPushbutton.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.loxone.internal.core;
-
-import java.io.IOException;
-
-import org.openhab.binding.loxone.internal.core.LxJsonApp3.LxJsonControl;
-
-/**
- * A pushbutton type of control on Loxone Miniserver.
- *
- * According to Loxone API documentation, a pushbutton control covers virtual input of type pushbutton
- *
- * @author Pawel Pieczul - initial contribution
- *
- */
-public class LxControlPushbutton extends LxControlSwitch {
-
- static class Factory extends LxControlInstance {
- @Override
- LxControl create(LxWsClient client, LxUuid uuid, LxJsonControl json, LxContainer room, LxCategory category) {
- return new LxControlPushbutton(client, uuid, json, room, category);
- }
-
- @Override
- String getType() {
- return TYPE_NAME;
- }
- }
-
- /**
- * A name by which Miniserver refers to pushbutton controls
- */
- private static final String TYPE_NAME = "pushbutton";
- /**
- * Command string used to set control's state to ON and OFF (tap)
- */
- private static final String CMD_PULSE = "Pulse";
-
- /**
- * Create pushbutton control object.
- *
- * @param client
- * communication client used to send commands to the Miniserver
- * @param uuid
- * switch's UUID
- * @param json
- * JSON describing the control as received from the Miniserver
- * @param room
- * room to which switch belongs
- * @param category
- * category to which switch belongs
- */
- LxControlPushbutton(LxWsClient client, LxUuid uuid, LxJsonControl json, LxContainer room, LxCategory category) {
- super(client, uuid, json, room, category);
- }
-
- /**
- * Set pushbutton to ON and to OFF (tap it).
- *
- * Sends a command to operate the pushbutton.
- *
- * @throws IOException
- * when something went wrong with communication
- */
- public void pulse() throws IOException {
- socketClient.sendAction(uuid, CMD_PULSE);
- }
-}
diff --git a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlRadio.java b/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlRadio.java
deleted file mode 100644
index 49e7a6d17dbfc..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlRadio.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.loxone.internal.core;
-
-import java.io.IOException;
-import java.util.Map;
-import java.util.TreeMap;
-
-import org.openhab.binding.loxone.internal.core.LxJsonApp3.LxJsonControl;
-
-/**
- * A radio-button type of control on Loxone Miniserver.
- *
- * @author Pawel Pieczul - initial contribution
- *
- */
-public class LxControlRadio extends LxControl {
-
- static class Factory extends LxControlInstance {
- @Override
- LxControl create(LxWsClient client, LxUuid uuid, LxJsonControl json, LxContainer room, LxCategory category) {
- return new LxControlRadio(client, uuid, json, room, category);
- }
-
- @Override
- String getType() {
- return TYPE_NAME;
- }
- }
-
- /**
- * Number of outputs a radio controller may have
- */
- public static final int MAX_RADIO_OUTPUTS = 16;
-
- /**
- * A name by which Miniserver refers to radio-button controls
- */
- private static final String TYPE_NAME = "radio";
-
- /**
- * Radio-button has one state that is a number representing current active output
- */
- private static final String STATE_ACTIVE_OUTPUT = "activeoutput";
-
- /**
- * Command string used to set radio button to all outputs off
- */
- private static final String CMD_RESET = "reset";
- private Map outputs;
-
- /**
- * Create radio-button control object.
- *
- * @param client
- * communication client used to send commands to the Miniserver
- * @param uuid
- * radio-button's UUID
- * @param json
- * JSON describing the control as received from the Miniserver
- * @param room
- * room to which radio-button belongs
- * @param category
- * category to which control belongs
- */
- LxControlRadio(LxWsClient client, LxUuid uuid, LxJsonControl json, LxContainer room, LxCategory category) {
- super(client, uuid, json, room, category);
- }
-
- /**
- * Update Miniserver's control in runtime.
- *
- * @param json
- * JSON describing the control as received from the Miniserver
- * @param room
- * New room that this control belongs to
- * @param category
- * New category that this control belongs to
- */
- @Override
- void update(LxJsonControl json, LxContainer room, LxCategory category) {
- super.update(json, room, category);
- if (json.details.outputs != null) {
- outputs = new TreeMap<>(json.details.outputs);
- } else {
- outputs = new TreeMap<>();
- }
- if (json.details != null && json.details.allOff != null) {
- outputs.put("0", json.details.allOff);
- }
- }
-
- /**
- * Set radio-button control's active output
- *
- * Sends a command to operate the radio-button control.
- *
- * @param output
- * output number to activate
- * @throws IOException
- * when something went wrong with communication
- */
- public void setOutput(int output) throws IOException {
- if (output == 0) {
- socketClient.sendAction(uuid, CMD_RESET);
- } else if (output >= 1 && output <= MAX_RADIO_OUTPUTS) {
- socketClient.sendAction(uuid, Long.toString(output));
- }
- }
-
- /**
- * Get current active output of a radio-button control
- *
- * @return
- * active output number 1-8 (or 1-16), or 0 if all outputs are off, or null if error occured
- */
- public Integer getActiveOutput() {
- Double value = getStateValue(STATE_ACTIVE_OUTPUT);
- if (value != null) {
- return value.intValue();
- }
- return null;
- }
-
- /**
- * Get mapping between output numbers and output names
- *
- * @return
- * map where key is output number 1-8 (or 1-16) or 0 for no active outputs and value is corresponding name
- * (never returns null)
- */
- public Map getOutputs() {
- return outputs;
- }
-}
diff --git a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlState.java b/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlState.java
deleted file mode 100644
index 842ffe938c300..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlState.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.loxone.internal.core;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * A state of a Loxone control ({@link LxControl})
- *
- * Each control object may have a number of states defined, that describe the overall condition of the control.
- * List of states is read from LoxApp3.json configuration file.
- *
- * Each state is identified by its own UUID and a name of the state. Names are proprietary to a particular type of the
- * control and as such are defined in {@link LxControl} child classes implementation (e.g. {@link LxControlSwitch}
- * Objects of this class are used to bind state updates received from the Miniserver to a control object.
- *
- * @author Pawel Pieczul - initial contribution
- *
- */
-class LxControlState {
- private LxUuid uuid;
- private String name;
- private Double value;
- private String textValue;
- private LxControl control;
- private List listeners = new ArrayList<>();
-
- /**
- * Create a control state object.
- *
- * @param uuid
- * UUID of the state
- * @param name
- * name of the state
- * @param control
- * control to which this state belongs
- */
- LxControlState(LxUuid uuid, String name, LxControl control) {
- this.uuid = uuid;
- this.name = name;
- this.control = control;
- uuid.setUpdate(true);
- }
-
- /**
- * Sets current value of the control's state
- *
- * @param value
- * current state's value to set
- * @param textValue
- * current state's text value to set
- */
- void setValue(Double value, String textValue) {
- boolean changed = false;
-
- uuid.setUpdate(true);
-
- if (value != null && !value.equals(this.value)) {
- this.value = value;
- changed = true;
- }
-
- if (textValue != null && !textValue.equals(this.textValue)) {
- this.textValue = textValue;
- changed = true;
- }
-
- if (changed) {
- for (LxControlStateListener listener : listeners) {
- listener.onStateChange(this);
- }
- }
- }
-
- /**
- * Sets current text value of the control's state
- *
- * @param value
- * new text message value
- */
- void setValue(String value) {
- uuid.setUpdate(true);
- }
-
- /**
- * Gets current value of the control's state
- *
- * @return
- * current state's value
- */
- Double getValue() {
- return value;
- }
-
- /**
- * Gets current value of the control's state
- *
- * @return
- * current state's value
- */
- String getTextValue() {
- return textValue;
- }
-
- /**
- * Gets control to which state belongs
- *
- * @return
- * state's control object
- */
- LxControl getControl() {
- return control;
- }
-
- /**
- * Gets state's name.
- *
- * State's name is proprietary per control type.
- *
- * @return
- * state's name
- */
- String getName() {
- return name;
- }
-
- /**
- * Sets state's name
- *
- * @param name
- * state's name
- */
- void setName(String name) {
- this.name = name;
- uuid.setUpdate(true);
- }
-
- /**
- * Gets UUID of the state
- *
- * @return
- * state's UUID
- */
- LxUuid getUuid() {
- return uuid;
- }
-
- /**
- * Adds a listener to state changes
- *
- * @param listener
- * an object implementing state change listener interface
- */
- void addListener(LxControlStateListener listener) {
- listeners.add(listener);
- }
-
- /**
- * Removes a listener of state changes
- *
- * @param listener
- * listener object to remove
- */
- void removeListener(LxControlStateListener listener) {
- listeners.remove(listener);
- }
-
-}
diff --git a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlStateListener.java b/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlStateListener.java
deleted file mode 100644
index 76286846fa00d..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlStateListener.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.loxone.internal.core;
-
-/**
- * This is an interface to listen to control's state changes
- *
- * @author Pawel Pieczul - initial contribution
- *
- */
-interface LxControlStateListener {
- /**
- * This method will be called by registered listener, when control's state is changed
- *
- * @param state
- * changed state
- */
- void onStateChange(LxControlState state);
-}
diff --git a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlSwitch.java b/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlSwitch.java
deleted file mode 100644
index f1994cc30b13e..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlSwitch.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.loxone.internal.core;
-
-import java.io.IOException;
-
-import org.openhab.binding.loxone.internal.core.LxJsonApp3.LxJsonControl;
-
-/**
- * A switch type of control on Loxone Miniserver.
- *
- * According to Loxone API documentation, a switch control is:
- *
- *
a virtual input of switch type
- *
a push button function block
- *
- *
- * @author Pawel Pieczul - initial contribution
- *
- */
-public class LxControlSwitch extends LxControl {
-
- static class Factory extends LxControlInstance {
- @Override
- LxControl create(LxWsClient client, LxUuid uuid, LxJsonControl json, LxContainer room, LxCategory category) {
- return new LxControlSwitch(client, uuid, json, room, category);
- }
-
- @Override
- String getType() {
- return TYPE_NAME;
- }
- }
-
- /**
- * A name by which Miniserver refers to switch controls
- */
- static final String TYPE_NAME = "switch";
-
- /**
- * Switch has one state that can be on/off
- */
- private static final String STATE_ACTIVE = "active";
-
- /**
- * Command string used to set control's state to ON
- */
- private static final String CMD_ON = "On";
- /**
- * Command string used to set control's state to OFF
- */
- private static final String CMD_OFF = "Off";
-
- /**
- * Create switch control object.
- *
- * @param client
- * communication client used to send commands to the Miniserver
- * @param uuid
- * switch's UUID
- * @param json
- * JSON describing the control as received from the Miniserver
- * @param room
- * room to which switch belongs
- * @param category
- * category to which switch belongs
- */
- LxControlSwitch(LxWsClient client, LxUuid uuid, LxJsonControl json, LxContainer room, LxCategory category) {
- super(client, uuid, json, room, category);
- }
-
- /**
- * Set switch to ON.
- *
- * Sends a command to operate the switch.
- *
- * @throws IOException
- * when something went wrong with communication
- */
- public void on() throws IOException {
- socketClient.sendAction(uuid, CMD_ON);
- }
-
- /**
- * Set switch to OFF.
- *
- * Sends a command to operate the switch.
- *
- * @throws IOException
- * when something went wrong with communication
- */
- public void off() throws IOException {
- socketClient.sendAction(uuid, CMD_OFF);
- }
-
- /**
- * Get current value of the switch'es state.
- *
- * @return
- * 0 - switch off, 1 - switch on
- */
- public Double getState() {
- return getStateValue(STATE_ACTIVE);
- }
-}
diff --git a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlTextState.java b/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlTextState.java
deleted file mode 100644
index d833aa6af790f..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlTextState.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.loxone.internal.core;
-
-import org.openhab.binding.loxone.internal.core.LxJsonApp3.LxJsonControl;
-
-/**
- * A Text State type of control on Loxone Miniserver.
- *
- * According to Loxone API documentation, a text state represents a State functional block on the Miniserver
- *
- * @author Pawel Pieczul - initial contribution
- *
- */
-public class LxControlTextState extends LxControl {
-
- static class Factory extends LxControlInstance {
- @Override
- LxControl create(LxWsClient client, LxUuid uuid, LxJsonControl json, LxContainer room, LxCategory category) {
- return new LxControlTextState(client, uuid, json, room, category);
- }
-
- @Override
- String getType() {
- return TYPE_NAME;
- }
- }
-
- /**
- * A name by which Miniserver refers to text state controls
- */
- private static final String TYPE_NAME = "textstate";
-
- /**
- * A state which will receive an update of possible Text State values)
- */
- private static final String STATE_TEXT_AND_ICON = "textandicon";
-
- /**
- * Create text state object.
- *
- * @param client
- * communication client used to send commands to the Miniserver
- * @param uuid
- * controller's UUID
- * @param json
- * JSON describing the control as received from the Miniserver
- * @param room
- * room to which controller belongs
- * @param category
- * category to which controller belongs
- */
- LxControlTextState(LxWsClient client, LxUuid uuid, LxJsonControl json, LxContainer room, LxCategory category) {
- super(client, uuid, json, room, category);
- }
-
- /**
- * Return current text value of the state
- *
- * @return
- * string with current value
- */
- public String getText() {
- return getStateTextValue(STATE_TEXT_AND_ICON);
- }
-}
diff --git a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlTimedSwitch.java b/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlTimedSwitch.java
deleted file mode 100644
index 569a5e28f2e4c..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxControlTimedSwitch.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.loxone.internal.core;
-
-import org.openhab.binding.loxone.internal.core.LxJsonApp3.LxJsonControl;
-
-/**
- * A timed switch type of control on Loxone Miniserver.
- *
- * According to Loxone API documentation, a switch control is:
- *
- *
a virtual input of switch type
- *
a push button function block
- *
- *
- * @author Stephan Brunner
- *
- */
-public class LxControlTimedSwitch extends LxControlPushbutton {
-
- static class Factory extends LxControlInstance {
- @Override
- LxControl create(LxWsClient client, LxUuid uuid, LxJsonControl json, LxContainer room, LxCategory category) {
- return new LxControlTimedSwitch(client, uuid, json, room, category);
- }
-
- @Override
- String getType() {
- return TYPE_NAME;
- }
- }
-
- /**
- * A name by which Miniserver refers to timed switch controls
- */
- private static final String TYPE_NAME = "timedswitch";
-
- /**
- * deactivationDelay - countdown until the output is deactivated.
- * 0 = the output is turned off
- * -1 = the output is permanently on
- * otherwise it will count down from deactivationDelayTotal
- */
- private static final String STATE_DEACTIVATION_DELAY = "deactivationdelay";
-
- /**
- * Create timed switch control object.
- *
- * @param client
- * communication client used to send commands to the Miniserver
- * @param uuid
- * switch's UUID
- * @param json
- * JSON describing the control as received from the Miniserver
- * @param room
- * room to which switch belongs
- * @param category
- * category to which switch belongs
- */
- LxControlTimedSwitch(LxWsClient client, LxUuid uuid, LxJsonControl json, LxContainer room, LxCategory category) {
- super(client, uuid, json, room, category);
- }
-
- /**
- * Get current value of the timed switch'es state.
- *
- * @return
- * 0 - switch off, 1 - switch on
- */
- @Override
- public Double getState() {
- /**
- * 0 = the output is turned off
- * -1 = the output is permanently on
- * otherwise it will count down from deactivationDelayTotal
- **/
- Double value = getStateValue(STATE_DEACTIVATION_DELAY);
- if (value != null) {
- if (value == -1 || value > 0) { // mapping
- return 1d;
- } else if (value == 0) {
- return 0d;
- }
- }
- return null;
- }
-
- /**
- * Get the time remaining to the switch off, in seconds
- *
- * @return deactivation delay in seconds
- * Loxone also returns floating point values for the delay e.g. 9.99 seconds
- */
- public Double getDeactivationDelay() {
- return getStateValue(STATE_DEACTIVATION_DELAY);
- }
-}
diff --git a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxJsonApp3.java b/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxJsonApp3.java
deleted file mode 100644
index 8beb376d08c8e..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxJsonApp3.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.loxone.internal.core;
-
-import java.util.Map;
-
-import com.google.gson.JsonElement;
-
-/**
- * A structure of JSON file http://miniserver/data/LoxAPP3.json used for parsing it with Gson library.
- *
- * @author Pawel Pieczul - initial contribution
- *
- */
-class LxJsonApp3 {
-
- LxJsonInfo msInfo;
- Map controls;
- Map rooms;
- Map cats;
-
- class LxJsonInfo {
- String serialNr;
- String location;
- String roomTitle;
- String catTitle;
- String msName;
- String projectName;
- String remoteUrl;
- String swVersion;
- String macAddress;
- }
-
- class LxJsonRoom {
- String uuid;
- String name;
- }
-
- class LxJsonCat {
- String uuid;
- String name;
- String type;
- }
-
- class LxJsonControl {
-
- class LxJsonDetails {
- class LxJsonText {
- String off;
- String on;
- }
-
- LxJsonText text;
- String format;
- int movementScene;
- String allOff;
- Map outputs;
- }
-
- String uuidAction;
- String name;
- String type;
- String room;
- String cat;
- LxJsonDetails details;
- Map states;
- Map subControls;
- }
-}
diff --git a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxJsonMood.java b/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxJsonMood.java
deleted file mode 100644
index b4df57234e417..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxJsonMood.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.loxone.internal.core;
-
-import com.google.gson.annotations.SerializedName;
-
-/**
- * A JSON structure of a mood of {@link LxControlLightControllerV2}. This structure is an item of a JSON array received
- * in moodList state update of this controller in the runtime.
- *
- * This structure is used for parsing with Gson library.
- *
- * @author Pawel Pieczul - initial contribution
- *
- */
-class LxJsonMood {
- /**
- * The userfriendly name for this mood
- */
- String name;
-
- /**
- * An ID that uniquely identifies this mood (e.g. inside activeMoods)
- */
- Integer id;
-
- /**
- * Bitmask that tells if the mood is used for a specific purpose in the logic.
- * If it’s not used, it can be removed without affecting the logic on the Miniserver.
- * 0: not used
- * 1: this mood is activated by a movement event
- * 2: a T5 or other inputs activate/deactivate this mood
- */
- @SerializedName("used")
- Integer isUsed;
-
- /**
- * Whether or not this mood can be controlled with a t5 input
- */
- @SerializedName("t5")
- Boolean isT5Controlled;
-
- /**
- * If a mood is marked as static it cannot be deleted or modified in any way.
- * But it can be moved within and between favorite and additional lists.
- */
- @SerializedName("static")
- Boolean isStatic;
-}
diff --git a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxJsonResponse.java b/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxJsonResponse.java
deleted file mode 100644
index 96c4c8b08770a..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxJsonResponse.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.loxone.internal.core;
-
-import com.google.gson.JsonElement;
-import com.google.gson.annotations.SerializedName;
-
-/**
- * A JSON response to a call to send a command to Miniserver's control at
- * http://miniserver/jdev/sps/io/{uuid}/{command}.
- *
- * This structure is used for parsing with Gson library.
- *
- * @author Pawel Pieczul - initial contribution
- *
- */
-class LxJsonResponse {
-
- class LxJsonKeySalt {
- String key;
- String salt;
- }
-
- class LxJsonCfgApi {
- String snr;
- String version;
- }
-
- class LxJsonToken {
- String token;
- String key;
- Integer validUntil;
- Integer tokenRights;
- Boolean unsecurePass;
- }
-
- static class LxJsonSubResponse {
- String control;
- JsonElement value;
- @SerializedName(value = "Code", alternate = { "code" })
- int code;
- }
-
- @SerializedName("LL")
- LxJsonSubResponse subResponse;
-}
diff --git a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxOfflineReason.java b/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxOfflineReason.java
deleted file mode 100644
index f89032cb46280..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxOfflineReason.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.loxone.internal.core;
-
-/**
- * Reasons why Miniserver may be not reachable
- *
- * @author Pawel Pieczul - initial contribution
- *
- */
-public enum LxOfflineReason {
- /**
- * No reason at all - should be reachable
- */
- NONE,
- /**
- * User name or password incorrect or user not authorized
- */
- UNAUTHORIZED,
- /**
- * Too many failed login attempts and server's temporary ban of the user
- */
- TOO_MANY_FAILED_LOGIN_ATTEMPTS,
- /**
- * Communication error with the Miniserv
- */
- COMMUNICATION_ERROR,
- /**
- * Timeout of user authentication procedure
- */
- AUTHENTICATION_TIMEOUT,
- /**
- * No activity from Miniserver's client
- */
- IDLE_TIMEOUT,
- /**
- * Internal error, sign of something wrong with the program
- */
- INTERNAL_ERROR,
- /**
- * Connection attempt failed (before authentication)
- */
- CONNECT_FAILED,
- /**
- * Repeat connection immediately (for example to retry with different authorization scheme)
- */
- REPEAT_CONNECTION;
-
- /**
- * Converts Miniserver status code to offline reason
- *
- * @param code
- * status code received in message response from the Miniserver
- * @return
- * converted offline reason
- */
- static LxOfflineReason getReason(int code) {
- switch (code) {
- case 420:
- return LxOfflineReason.AUTHENTICATION_TIMEOUT;
- case 401:
- return LxOfflineReason.UNAUTHORIZED;
- case 4003:
- return LxOfflineReason.TOO_MANY_FAILED_LOGIN_ATTEMPTS;
- case 1001:
- return LxOfflineReason.IDLE_TIMEOUT;
- case 200:
- return LxOfflineReason.NONE;
- default:
- return COMMUNICATION_ERROR;
- }
- }
-}
diff --git a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxServer.java b/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxServer.java
deleted file mode 100644
index 89fa680ddafa1..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxServer.java
+++ /dev/null
@@ -1,783 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.loxone.internal.core;
-
-import java.net.InetAddress;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReentrantLock;
-
-import org.openhab.binding.loxone.internal.core.LxServerEvent.EventType;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Loxone Miniserver representaton.
- *
- * A Miniserver is identified by host address, user name and password used for logging into it.
- * They are provided to the constructor of this class. Upon creation of the object, you need to call
- * {@link #start()} method to initiate communication with the Miniserver, obtain its runtime configuration and
- * process live updates of controls' state changes.
- *
- * Runtime configuration consists of following items:
- *
- *
server parameters: serial number, location, project name, server name
- *
'room' and 'category' proprietary display names
- *
a list of rooms
- *
a list of control categories
- *
a list of controls, each may be assigned to a room and a category
- *
a list of states for each of the controls
- *
- *
- * Once server is populated with runtime configuration, its controls may be used to perform operations.
- *
- * If server is not needed anymore, a {@link #stop()} method should be called to close open connections and stop
- * processing thread.
- *
- * @author Pawel Pieczul - initial contribution
- *
- */
-public class LxServer {
-
- class Configuration {
- Object get(String name) {
- // this interface is going to be refactored, there can never be more than one listener
- for (LxServerListener listener : listeners) {
- return listener.getSetting(name);
- }
- return null;
- }
-
- void setSettings(Map properties) {
- listeners.forEach(listener -> listener.setSettings(properties));
- }
- }
-
- // Configuration
- private final InetAddress host;
- private final int port;
- private final String user;
- private final String password;
- private final Configuration configuration = new Configuration();
-
- private String miniserverName = "";
- private String projectName = "";
- private String location = "";
- private String serial = "";
- private String cloudAddress = "";
- private String swVersion = "";
- private String macAddress = "";
-
- private int firstConDelay = 1;
- private int connectErrDelay = 10;
- private int userErrorDelay = 60;
- private int comErrorDelay = 30;
-
- // Data structures
- private final Map controls = new HashMap<>();
- private final Map rooms = new HashMap<>();
- private final Map categories = new HashMap<>();
- // Map of state UUID to a map of control UUID and state objects
- // State with a unique UUID can be configured in many controls and each control can even have a different name of
- // the state. It must be ensured that updates received for this state UUID are passed to all controls that have this
- // state UUID configured.
- private final Map> states = new HashMap<>();
- private final List listeners = new ArrayList<>();
-
- // Services
- private LxWsClient socketClient;
- private Thread monitorThread;
- private final Lock threadLock = new ReentrantLock();
- private final BlockingQueue queue = new LinkedBlockingQueue<>();
- private final Logger logger = LoggerFactory.getLogger(LxServer.class);
- private final int debugId;
- private static final AtomicInteger STATIC_DEBUG_ID = new AtomicInteger(1);
-
- /**
- * Creates a new instance of Loxone Miniserver with provided host address and credentials.
- *
- * @param securityType
- * type of authentication/encryption method to use
- *
- * @param host
- * host address of the Miniserver
- * @param port
- * web service port of the Miniserver
- * @param user
- * user name used for logging in
- * @param password
- * password used for logging in
- */
- public LxServer(LxWsSecurityType securityType, InetAddress host, int port, String user, String password) {
- this.host = host;
- this.port = port;
- this.user = user;
- this.password = password;
-
- debugId = STATIC_DEBUG_ID.getAndIncrement();
- socketClient = new LxWsClient(debugId, queue, configuration, securityType, host, port, user, password);
- }
-
- /**
- * Initiate communication with the Miniserver.
- * Starts thread that handles communication.
- */
- public void start() {
- logger.debug("[{}] Server start", debugId);
- threadLock.lock();
- try {
- if (monitorThread == null) {
- monitorThread = new LxServerThread(this);
- monitorThread.start();
- }
- } finally {
- threadLock.unlock();
- }
- }
-
- /**
- * Stop server thread, close communication with Miniserver.
- */
- public void stop() {
- threadLock.lock();
- try {
- if (monitorThread != null) {
- logger.debug("[{}] Server stop", debugId);
- LxServerEvent event = new LxServerEvent(EventType.CLIENT_CLOSING, LxOfflineReason.NONE, null);
- try {
- queue.put(event);
- } catch (InterruptedException e) {
- monitorThread.interrupt();
- }
- } else {
- logger.debug("[{}] Server stop - no thread", debugId);
- }
- } finally {
- threadLock.unlock();
- }
- }
-
- /**
- * Update server's configuration.
- *
- * Only timeout parameters can be updated in runtime without breaking connection to the Miniserver.
- * If other parameters must be changed, server should be stopped and a new instance created.
- *
- * @param firstConDelay
- * Time in seconds between binding initialization and first connection attempt
- * @param keepAlivePeriod
- * Time in seconds between sending two consecutive keep-alive messages
- * @param connectErrDelay
- * Time in seconds between failed websocket connect attempts
- * @param connectTimeout
- * Time to wait for websocket connect response from the Miniserver
- * @param userErrorDelay
- * Time in seconds between user login error as a result of wrong name/password or no authority and next
- * connection attempt
- * @param comErrorDelay
- * Time in seconds between connection close (as a result of some communication error) and next connection
- * attempt
- * @param maxBinMsgSize
- * maximum binary message size of websocket client (in kB)
- * @param maxTextMsgSize
- * maximum text message size of websocket client (in kB)
- */
- public void update(int firstConDelay, int keepAlivePeriod, int connectErrDelay, int connectTimeout,
- int userErrorDelay, int comErrorDelay, int maxBinMsgSize, int maxTextMsgSize) {
- logger.debug("[{}] Server update configuration", debugId);
-
- if (firstConDelay >= 0 && this.firstConDelay != firstConDelay) {
- logger.debug("[{}] Changing firstConDelay to {}", debugId, firstConDelay);
- this.firstConDelay = firstConDelay;
- }
- if (connectErrDelay >= 0 && this.connectErrDelay != connectErrDelay) {
- logger.debug("[{}] Changing connectErrDelay to {}", debugId, connectErrDelay);
- this.connectErrDelay = connectErrDelay;
- }
- if (userErrorDelay >= 0 && this.userErrorDelay != userErrorDelay) {
- logger.debug("[{}] Changing userErrorDelay to {}", debugId, userErrorDelay);
- this.userErrorDelay = userErrorDelay;
- }
- if (comErrorDelay >= 0 && this.comErrorDelay != comErrorDelay) {
- logger.debug("[{}] Changing comErrorDelay to {}", debugId, comErrorDelay);
- this.comErrorDelay = comErrorDelay;
- }
- if (socketClient != null) {
- socketClient.update(keepAlivePeriod, connectTimeout, maxBinMsgSize, maxTextMsgSize);
- }
- }
-
- /**
- * Adds a listener to server's events
- *
- * @param listener
- * an object implementing server's listener interface
- */
- public void addListener(LxServerListener listener) {
- listeners.add(listener);
- }
-
- /**
- * Removes a listener of server's events
- *
- * @param listener
- * listener object to remove
- */
- public void removeListener(LxServerListener listener) {
- listeners.remove(listener);
- }
-
- /**
- * Checks if current Miniserver configuration differs from provided parameters.
- *
- * @param host
- * A new host address to check against
- * @param user
- * A new user name to check against
- * @param port
- * A new web service port to check against
- * @param password
- * A new password to check against
- * @return
- * true if current Miniserver configuration is different
- */
- public boolean isChanged(InetAddress host, int port, String user, String password) {
- return (!(this.port == port && this.host.toString().equals(host.toString()) && this.user.equals(user)
- && this.password.equals(password)));
- }
-
- /**
- * Searches for a control with given UUID
- *
- * @param id
- * UUID of the control to locate
- * @return
- * Found control or null if not found
- */
- public LxControl findControl(LxUuid id) {
- if (controls == null || id == null) {
- return null;
- }
- if (controls.containsKey(id)) {
- return controls.get(id);
- }
- return null;
- }
-
- /**
- * Searches for a control with given name (descriptive)
- *
- * @param name
- * A name of the control to locate
- * @return
- * Found control or null if not found
- */
- public LxControl findControl(String name) {
- for (LxControl l : controls.values()) {
- if (l.getName().equals(name)) {
- return l;
- }
- }
- return null;
- }
-
- /**
- * Gets a set of all controls for this Miniserver
- *
- * @return Map of controls with UUID as a key
- */
- public Map getControls() {
- return controls;
- }
-
- /**
- * Gets Miniserver name
- *
- * @return Miniserver name
- */
- public String getMiniserverName() {
- return miniserverName;
- }
-
- /**
- * Gets project name as configured on the Miniserver
- *
- * @return project name
- */
- public String getProjectName() {
- return projectName;
- }
-
- /**
- * Gets Miniserver cloud address
- *
- * @return cloud URL
- */
- public String getCloudAddress() {
- return cloudAddress;
- }
-
- /**
- * Gets device location as configured on the Miniserver
- *
- * @return Description of the device location
- */
- public String getLocation() {
- return location;
- }
-
- /**
- * Gets device serial number as configured on the Miniserver
- *
- * @return Device serial number
- */
- public String getSerial() {
- return serial;
- }
-
- /**
- * Gets device software version
- *
- * @return
- * software version (e.g. '9.1.0.3')
- */
- public String getSwVersion() {
- return swVersion;
- }
-
- /**
- * Gets device MAC address
- *
- * @return
- * MAC address
- */
- public String getMacAddress() {
- return macAddress;
- }
-
- /**
- * Thread that performs and supervises communication with the Miniserver.
- *
- * It will try to maintain the connection as long as possible, handling errors and interruptions. There are two
- * reasons when this thread will terminate and stop connecting to the Miniserver:
- * when it receives close command from supervisor ({@link LxServer} or when Miniserver locks out user due to too
- * many unsuccessful login attempts.
- *
- * @author Pawel Pieczul - initial contribution
- *
- */
- private class LxServerThread extends Thread {
- private final LxServer server;
- private boolean running = true;
- private int waitTime = firstConDelay;
-
- LxServerThread(LxServer server) {
- this.server = server;
- }
-
- @Override
- public void run() {
- logger.debug("[{}] Thread starting", debugId);
- try {
- boolean connected = false;
- while (running) {
- while (!connected) {
- LxServerEvent wsMsg;
- do {
- wsMsg = queue.poll(waitTime, TimeUnit.SECONDS);
- if (wsMsg != null) {
- processMessage(wsMsg);
- }
- } while (wsMsg != null);
- logger.debug("[{}] Server connecting to websocket", debugId);
- connected = socketClient.connect();
- if (!connected) {
- waitTime = connectErrDelay;
- }
- }
- while (connected) {
- LxServerEvent wsMsg = queue.take();
- connected = processMessage(wsMsg);
- }
- }
- } catch (InterruptedException e) {
- logger.debug("[{}] Server thread interrupted, terminating", debugId);
- }
- logger.debug("[{}] Thread ending", debugId);
- threadLock.lock();
- try {
- socketClient.disconnect();
- monitorThread = null;
- queue.clear();
- } finally {
- threadLock.unlock();
- }
- }
-
- private boolean processMessage(LxServerEvent wsMsg) {
- EventType event = wsMsg.getEvent();
- logger.trace("[{}] Server received event: {}", debugId, event);
- switch (event) {
- case RECEIVED_CONFIG:
- LxJsonApp3 config = (LxJsonApp3) wsMsg.getObject();
- if (config != null) {
- updateConfig(config);
- for (LxServerListener listener : listeners) {
- listener.onNewConfig(server);
- }
- } else {
- logger.debug("[{}] Server failed processing received configuration", debugId);
- }
- break;
- case STATE_UPDATE:
- LxWsStateUpdateEvent update = (LxWsStateUpdateEvent) wsMsg.getObject();
- Map perStateUuid = findState(update.getUuid());
- if (perStateUuid != null) {
- perStateUuid.forEach((controlUuid, state) -> {
- state.setValue(update.getValue(), update.getText());
- LxControl control = state.getControl();
- if (control != null) {
- logger.debug("[{}] State update {} ({}:{}) to value {}, text '{}'", debugId,
- update.getUuid(), control.getName(), state.getName(), update.getValue(),
- update.getText());
- for (LxServerListener listener : listeners) {
- listener.onControlStateUpdate(control, state.getName().toLowerCase());
- }
- } else {
- logger.debug("[{}] State update {} ({}) of unknown control", debugId, update.getUuid(),
- state.getName());
- }
- });
- }
- break;
- case SERVER_ONLINE:
- for (LxServerListener listener : listeners) {
- listener.onServerGoesOnline();
- }
- break;
- case SERVER_OFFLINE:
- LxOfflineReason reason = wsMsg.getOfflineReason();
- String details = null;
- if (wsMsg.getObject() instanceof String) {
- details = (String) wsMsg.getObject();
- }
- logger.debug("[{}] Websocket goes OFFLINE, reason {} : {}.", debugId, reason, details);
-
- if (reason == LxOfflineReason.TOO_MANY_FAILED_LOGIN_ATTEMPTS) {
- // assume credentials are wrong, do not re-attempt connections
- // close thread and expect a new LxServer object will have to be re-created
- // with corrected configuration
- running = false;
- } else {
- if (reason == LxOfflineReason.UNAUTHORIZED) {
- waitTime = userErrorDelay;
- } else if (reason == LxOfflineReason.REPEAT_CONNECTION) {
- waitTime = 1;
- } else {
- waitTime = comErrorDelay;
- }
- socketClient.disconnect();
- }
- for (LxServerListener listener : listeners) {
- listener.onServerGoesOffline(reason, details);
- }
- return false;
- case CLIENT_CLOSING:
- running = false;
- return false;
- default:
- logger.debug("[{}] Received unknown request {}", debugId, wsMsg.getEvent().name());
- break;
- }
- return true;
- }
-
- }
-
- /**
- * Updates runtime configuration from parsed JSON configuration file of Loxone Miniserver (LoxApp3.json)
- *
- * @param config
- * parsed JSON LoxApp3.json file
- */
- private void updateConfig(LxJsonApp3 config) {
- logger.trace("[{}] Updating configuration from Miniserver", debugId);
-
- invalidateMap(rooms);
- invalidateMap(categories);
- invalidateMap(controls);
- invalidateMap(states);
-
- if (config.msInfo != null) {
- logger.trace("[{}] updating global config", debugId);
- miniserverName = buildName(config.msInfo.msName);
- projectName = buildName(config.msInfo.projectName);
- location = buildName(config.msInfo.location);
- serial = buildName(config.msInfo.serialNr);
- cloudAddress = buildName(config.msInfo.remoteUrl);
- swVersion = buildName(config.msInfo.swVersion);
- macAddress = buildName(config.msInfo.macAddress);
- } else {
- logger.warn("[{}] missing global configuration msInfo on Loxone", debugId);
- }
-
- // create internal structures based on configuration file
- if (config.rooms != null) {
- logger.trace("[{}] creating rooms", debugId);
- for (LxJsonApp3.LxJsonRoom room : config.rooms.values()) {
- addOrUpdateRoom(new LxUuid(room.uuid), room.name);
- }
- }
- if (config.cats != null) {
- logger.trace("[{}] creating categories", debugId);
- for (LxJsonApp3.LxJsonCat cat : config.cats.values()) {
- addOrUpdateCategory(new LxUuid(cat.uuid), cat.name, cat.type);
- }
- }
- if (config.controls != null) {
- logger.trace("[{}] creating controls", debugId);
- for (LxJsonApp3.LxJsonControl ctrl : config.controls.values()) {
- // create a new control or update existing one
- try {
- addOrUpdateControl(ctrl);
- } catch (Exception e) {
- logger.error("[{}] exception creating control {}: ", debugId, ctrl.name, e);
- }
- }
- }
- // remove items that do not exist anymore in Miniserver
- logger.trace("[{}] removing unused objects", debugId);
- removeUnusedFromMap(rooms);
- removeUnusedFromMap(categories);
- removeUnusedFromMap(controls);
- removeUnusedFromMap(states);
- }
-
- /**
- * Removes all entries from a map, that do not have the 'updated' flag set on UUID key
- *
- * @param
- * any type of container used in the map
- * @param map
- * map to remove entries from
- */
-
- private void removeUnusedFromMap(Map map) {
- for (Iterator> it = map.entrySet().iterator(); it.hasNext();) {
- Map.Entry entry = it.next();
- if (!entry.getKey().getUpdate()) {
- it.remove();
- if (entry.getValue() instanceof LxControl) {
- ((LxControl) entry.getValue()).dispose();
- }
- }
- }
- }
-
- /**
- * Sets all entries in a map to not updated
- *
- * @param map
- * map to invalidate entries in
- */
- private void invalidateMap(Map map) {
- map.keySet().forEach(k -> {
- k.setUpdate(false);
- });
- }
-
- /**
- * Search for a room with given UUID
- *
- * @param id
- * UUID of a room to search for
- * @return
- * found room on null if not found
- */
- private LxContainer findRoom(LxUuid id) {
- if (rooms == null || id == null) {
- return null;
- }
- if (rooms.containsKey(id)) {
- return rooms.get(id);
- }
- return null;
- }
-
- /**
- * Add a room to the server, if a room with same UUID already does not exist, otherwise update it with new name.
- *
- * @param id
- * UUID of the room to add
- * @param name
- * name of the room to add
- * @return
- * room object (either newly created or already existing) or null if wrong parameters
- */
- private LxContainer addOrUpdateRoom(LxUuid id, String name) {
- if (rooms == null) {
- return null;
- }
- LxContainer r = findRoom(id);
- if (r != null) {
- r.setName(name);
- return r;
- }
- LxContainer nr = new LxContainer(id, name);
- rooms.put(id, nr);
- return nr;
- }
-
- /**
- * Search for a state with given UUID
- *
- * @param id
- * UUID of state to locate
- * @return
- * map of all state objects with control UUID as key
- */
- private Map findState(LxUuid id) {
- if (states == null || id == null) {
- return null;
- }
- if (states.containsKey(id)) {
- return states.get(id);
- }
- return null;
- }
-
- /**
- * Search for a category on the server
- *
- * @param id
- * UUID of the category to find
- * @return
- * category object found or null if not found
- */
- private LxCategory findCategory(LxUuid id) {
- if (categories == null || id == null) {
- return null;
- }
- if (categories.containsKey(id)) {
- return categories.get(id);
- }
- return null;
- }
-
- /**
- * Add a new category or update and return existing one with same UUID
- *
- * @param id
- * UUID of the category to add or update
- * @param name
- * name of the category
- * @param type
- * type of the category
- * @return
- * newly added category or already existing and updated, null if wrong parameters/configuration
- */
- private LxCategory addOrUpdateCategory(LxUuid id, String name, String type) {
- if (categories == null) {
- return null;
- }
- LxCategory c = findCategory(id);
- if (c != null) {
- c.setName(name);
- c.setType(type);
- return c;
- }
- LxCategory nc = new LxCategory(id, name, type);
- categories.put(id, nc);
- return nc;
- }
-
- /**
- * Add a new control and its states or update and return existing one with same UUID
- *
- * @param json
- * JSON original object of this control to get extra parameters
- */
- private void addOrUpdateControl(LxJsonApp3.LxJsonControl json) {
- if (json == null || json.uuidAction == null || json.name == null || json.type == null) {
- return;
- }
-
- LxUuid categoryId = null;
- if (json.cat != null) {
- categoryId = new LxUuid(json.cat);
- }
- LxUuid roomId = null;
- if (json.room != null) {
- roomId = new LxUuid(json.room);
- }
- LxContainer room = findRoom(roomId);
- LxCategory category = findCategory(categoryId);
-
- LxUuid id = new LxUuid(json.uuidAction);
- LxControl control = findControl(id);
- if (control != null) {
- control.update(json, room, category);
- } else {
- control = LxControlFactory.createControl(socketClient, id, json, room, category);
- }
- if (control != null) {
- updateControls(control);
- }
- }
-
- /**
- * Updates server structures with a new or updated control and its states and subcontrols
- *
- * @param control
- * control to update in server structures
- */
- private void updateControls(LxControl control) {
- for (LxControlState state : control.getStates().values()) {
- state.getUuid().setUpdate(true);
- Map perUuid = states.get(state.getUuid());
- if (perUuid == null) {
- perUuid = new HashMap<>();
- states.put(state.getUuid(), perUuid);
- }
- perUuid.put(control.uuid, state);
- }
- controls.put(control.uuid, control);
- control.uuid.setUpdate(true);
- for (LxControl subControl : control.getSubControls().values()) {
- updateControls(subControl);
- }
- }
-
- /**
- * Check and convert null string to empty string.
- *
- * @param name
- * string to check
- * @return
- * string guaranteed to be not null
- */
- private String buildName(String name) {
- if (name == null) {
- return "";
- }
- return name;
- }
-}
diff --git a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxServerEvent.java b/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxServerEvent.java
deleted file mode 100644
index 79ac589024de2..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxServerEvent.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.loxone.internal.core;
-
-import org.openhab.binding.loxone.internal.core.LxWsClient.LxWebSocket;
-
-/**
- * Event used to communicate between websocket client ({@link LxWebSocket}) and object representing a Miniserver
- * ({@link LxServer})
- *
- * @author Pawel Pieczul - initial contribution
- *
- */
-class LxServerEvent {
- /**
- * Type of {@link LxServerEvent} event
- *
- * @author Pawel Pieczul - initial contribution
- *
- */
- public enum EventType {
- /**
- * Unspecified event
- */
- NONE,
- /**
- * Miniserver is online - websocket connection ready to pass commands and receive controls state updates
- */
- SERVER_ONLINE,
- /**
- * Miniserver is offline - websocket connection is closed. There is a reason parameter associated.
- */
- SERVER_OFFLINE,
- /**
- * Received configuration of Miniserver. There is a {@link LxJsonApp3} object associated.
- */
- RECEIVED_CONFIG,
- /**
- * Received control's state value or text update from Miniserver. There is a {@link LxWsStateUpdateEvent} object
- * associated.
- */
- STATE_UPDATE,
- /**
- * Received request to shutdown thread from {@link LxServer} object.
- */
- CLIENT_CLOSING
- }
-
- private EventType event;
- private LxOfflineReason reason;
- private Object object;
-
- LxServerEvent(EventType event, LxOfflineReason reason, Object object) {
- this.event = event;
- this.reason = reason;
- this.object = object;
- }
-
- /**
- * Get type of event
- *
- * @return
- * type of event
- */
- EventType getEvent() {
- return event;
- }
-
- /**
- * Get reason for server going offline
- *
- * @return
- * reason for going offline
- */
- LxOfflineReason getOfflineReason() {
- return reason;
- }
-
- /**
- * Get object associated with the event
- *
- * @return
- * object associated with event
- */
- Object getObject() {
- return object;
- }
-}
diff --git a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxServerListener.java b/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxServerListener.java
deleted file mode 100644
index b0ae5889c2148..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxServerListener.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.loxone.internal.core;
-
-import java.util.Map;
-
-/**
- * Interface to get notifications about {@link LxServer} asynchronous events.
- * These events are triggered by messages received from Miniserver over websocket connection or the state of the
- * connection to the Miniserver.
- *
- * @author Pawel Pieczul - initial contribution
- *
- */
-public interface LxServerListener {
- /**
- * Called by {@link LxServer} thread when new configuration is received from Loxone Miniserver and stored in
- * {@link LxServer} object.
- *
- * @param server
- * server object that can be queried for new configuration of the Miniserver
- *
- */
- void onNewConfig(LxServer server);
-
- /**
- * Called by {@link LxServer} thread when Loxone Miniserver goes online and communication channel is established and
- * ready
- * to send commands and
- * receive state updates.
- */
- void onServerGoesOnline();
-
- /**
- * Called by {@link LxServer} thread when Loxone Miniserver goes offline and communication channel is broken.
- *
- * @param reason
- * reason for going offline
- * @param details
- * details describing the disconnection reason
- */
- void onServerGoesOffline(LxOfflineReason reason, String details);
-
- /**
- * Called by {@link LxServer} thread when a state of a control is updated on the Loxone Miniserver
- *
- * @param control
- * control object, which state changed
- * @param stateName
- * name of the state that was updated
- */
- void onControlStateUpdate(LxControl control, String stateName);
-
- Object getSetting(String name);
-
- void setSettings(Map properties);
-
-}
diff --git a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxUuid.java b/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxUuid.java
deleted file mode 100644
index 781668541f1c4..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxUuid.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.loxone.internal.core;
-
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-
-/**
- * Unique identifier of an object on Loxone Miniserver.
- *
- * It is defined by the Miniserver. UUID can represent a control, room, category, etc. and provides a unique ID space
- * across all objects residing on the Miniserver.
- *
- * @author Pawel Pieczul - initial contribution
- *
- */
-public class LxUuid {
- private String uuid;
- private String uuidOriginal;
- private boolean updated;
-
- /**
- * Create a new {@link LxUuid} object from an UUID on a Miniserver.
- *
- * @param uuid
- * identifier retrieved from Loxone Miniserver
- */
- public LxUuid(String uuid) {
- init(uuid);
- }
-
- public LxUuid(byte data[], int offset) {
- String id = String.format("%08x-%04x-%04x-%02x%02x%02x%02x%02x%02x%02x%02x",
- ByteBuffer.wrap(data, offset, 4).order(ByteOrder.LITTLE_ENDIAN).getInt(),
- ByteBuffer.wrap(data, offset + 4, 2).order(ByteOrder.LITTLE_ENDIAN).getShort(),
- ByteBuffer.wrap(data, offset + 6, 2).order(ByteOrder.LITTLE_ENDIAN).getShort(), data[offset + 8],
- data[offset + 9], data[offset + 10], data[offset + 11], data[offset + 12], data[offset + 13],
- data[offset + 14], data[offset + 15]);
- init(id);
- }
-
- private void init(String uuid) {
- uuidOriginal = uuid;
- this.uuid = uuidOriginal.replaceAll("[^a-zA-Z0-9-]", "-").toUpperCase();
- updated = true;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null) {
- return false;
- }
- if (o.getClass() != getClass()) {
- return false;
- }
- LxUuid id = (LxUuid) o;
- return uuid.equals(id.uuid);
- }
-
- @Override
- public int hashCode() {
- return uuid.hashCode();
- }
-
- @Override
- public String toString() {
- return uuid;
- }
-
- /**
- * Returns an original string that was used to create UUID.
- *
- * @return
- * original string for the UUID
- */
-
- public String getOriginalString() {
- return uuidOriginal;
- }
-
- /**
- * Indicate the object corresponding to UUID has recently been updated.
- *
- * @param updated
- * true if object has been updated
- */
- void setUpdate(boolean updated) {
- this.updated = updated;
- }
-
- /**
- * See if the object corresponding to UUID has been recently updated.
- *
- * @return
- * true if object was updated
- */
- boolean getUpdate() {
- return updated;
- }
-}
diff --git a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxWsClient.java b/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxWsClient.java
deleted file mode 100644
index 7f0df2d22cf9a..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxWsClient.java
+++ /dev/null
@@ -1,1006 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.loxone.internal.core;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.net.HttpURLConnection;
-import java.net.InetAddress;
-import java.net.URI;
-import java.net.URL;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.ScheduledFuture;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.locks.Condition;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReentrantLock;
-
-import org.apache.commons.codec.binary.Hex;
-import org.eclipse.jetty.websocket.api.Session;
-import org.eclipse.jetty.websocket.api.StatusCode;
-import org.eclipse.jetty.websocket.api.WebSocketPolicy;
-import org.eclipse.jetty.websocket.api.annotations.OnWebSocketClose;
-import org.eclipse.jetty.websocket.api.annotations.OnWebSocketConnect;
-import org.eclipse.jetty.websocket.api.annotations.OnWebSocketError;
-import org.eclipse.jetty.websocket.api.annotations.OnWebSocketMessage;
-import org.eclipse.jetty.websocket.api.annotations.WebSocket;
-import org.eclipse.jetty.websocket.client.ClientUpgradeRequest;
-import org.eclipse.jetty.websocket.client.WebSocketClient;
-import org.eclipse.smarthome.core.common.ThreadPoolManager;
-import org.openhab.binding.loxone.internal.core.LxJsonResponse.LxJsonCfgApi;
-import org.openhab.binding.loxone.internal.core.LxJsonResponse.LxJsonSubResponse;
-import org.openhab.binding.loxone.internal.core.LxServer.Configuration;
-import org.openhab.binding.loxone.internal.core.LxServerEvent.EventType;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.gson.Gson;
-import com.google.gson.JsonParseException;
-import com.google.gson.JsonSyntaxException;
-
-/**
- * Websocket client facilitating communication with Loxone Miniserver.
- * This client is implemented as a state machine, according to guidelines in Loxone API documentation.
- * It uses jetty websocket client and creates one own thread to send keep-alive messages to the Miniserver.
- *
- * @author Pawel Pieczul - initial contribution
- *
- */
-class LxWsClient {
- private final Configuration configuration;
- private final InetAddress host;
- private final int port;
- private final String user;
- private final String password;
- private final int debugId;
- private long keepAlivePeriod = 240; // 4 minutes, server timeout is 5 minutes
- private long connectTimeout = 4; // 4 seconds to wait for connection response
- private int maxBinMsgSize = 3 * 1024; // 3 MB
- private int maxTextMsgSize = 512; // 512 KB
-
- private String swVersion;
- private String macAddress;
- private LxWsSecurityType securityType;
- private final Gson gson = new Gson();
- private ScheduledFuture> timeout;
- private LxWebSocket socket;
- private WebSocketClient wsClient;
- private BlockingQueue queue;
- private ClientState state = ClientState.IDLE;
- private final Lock stateMachineLock = new ReentrantLock();
- private final Logger logger = LoggerFactory.getLogger(LxWsClient.class);
-
- private static final ScheduledExecutorService SCHEDULER = ThreadPoolManager
- .getScheduledPool(LxWsClient.class.getName());
-
- private static final String SOCKET_URL = "/ws/rfc6455";
- private static final String CMD_ACTION = "jdev/sps/io/";
- private static final String CMD_KEEPALIVE = "keepalive";
- private static final String CMD_ENABLE_UPDATES = "jdev/sps/enablebinstatusupdate";
- private static final String CMD_GET_APP_CONFIG = "data/LoxAPP3.json";
- private static final String CMD_CFG_API = "jdev/cfg/api";
-
- /**
- * Internal state of the websocket client.
- *
- * @author Pawel Pieczul - initial contribution
- *
- */
- private enum ClientState {
- /**
- * Waiting for connection request
- */
- IDLE,
- /**
- * Connection requested, waiting for confirmation
- */
- CONNECTING,
- /**
- * Connection confirmed and established
- */
- CONNECTED,
- /**
- * Waiting for Miniserver's configuration
- */
- UPDATING_CONFIGURATION,
- /**
- * Ready to send commands and receive state updates
- */
- RUNNING,
- /**
- * Received internal request to shutdown
- */
- CLOSING
- }
-
- /**
- * Type of a binary message received from the Miniserver
- *
- * @author Pawel Pieczul
- *
- */
- enum MessageType {
- /**
- * Text message - jetty websocket client will pass it on automatically to a callback
- */
- TEXT_MESSAGE,
- /**
- * Binary file
- */
- BINARY_FILE,
- /**
- * A set of value states for controls that changed their state
- */
- EVENT_TABLE_OF_VALUE_STATES,
- /**
- * A set of text states for controls that changed their state
- */
- EVENT_TABLE_OF_TEXT_STATES,
- EVENT_TABLE_OF_DAYTIMER_STATES,
- OUT_OF_SERVICE_INDICATOR,
- /**
- * Response to keepalive request message
- */
- KEEPALIVE_RESPONSE,
- EVENT_TABLE_OF_WEATHER_STATES,
- /**
- * Unknown header
- */
- UNKNOWN
- }
-
- /**
- * A header of a binary message received from Loxone Miniserver on a websocket connection.
- *
- * @author Pawel Pieczul - initial contribution
- *
- */
- private class LxWsBinaryHeader {
- MessageType type = MessageType.UNKNOWN;
-
- /**
- * Create header from binary buffer at a given offset
- *
- * @param buffer
- * buffer with received message
- * @param offset
- * offset in bytes at which header is expected
- */
- LxWsBinaryHeader(byte[] buffer, int offset) throws IndexOutOfBoundsException {
- if (buffer[offset] != 0x03) {
- return;
- }
- switch (buffer[offset + 1]) {
- case 0:
- type = MessageType.TEXT_MESSAGE;
- break;
- case 1:
- type = MessageType.BINARY_FILE;
- break;
- case 2:
- type = MessageType.EVENT_TABLE_OF_VALUE_STATES;
- break;
- case 3:
- type = MessageType.EVENT_TABLE_OF_TEXT_STATES;
- break;
- case 4:
- type = MessageType.EVENT_TABLE_OF_DAYTIMER_STATES;
- break;
- case 5:
- type = MessageType.OUT_OF_SERVICE_INDICATOR;
- break;
- case 6:
- type = MessageType.KEEPALIVE_RESPONSE;
- break;
- case 7:
- type = MessageType.EVENT_TABLE_OF_WEATHER_STATES;
- break;
- default:
- type = MessageType.UNKNOWN;
- break;
- }
- // These fields are not used today , but left it for future reference
- // estimated = ((buffer[offset + 2] & 0x01) != 0);
- // length = ByteBuffer.wrap(buffer, offset + 3, 4).getInt();
- }
- }
-
- /**
- * Create websocket client object
- *
- * @param debugId
- * instance of the client used for debugging purposes only
- * @param queue
- * message queue to communicate with its master {@link LxServer}, must be already initialized
- * @param configuration
- * configuration object for getting and setting custom properties
- * @param securityType
- * type of authentication/encryption method to use
- * @param host
- * Miniserver's host address
- * @param port
- * Miniserver's web services port
- * @param user
- * user to authenticate
- * @param password
- * password to authenticate
- */
- LxWsClient(int debugId, BlockingQueue queue, Configuration configuration,
- LxWsSecurityType securityType, InetAddress host, int port, String user, String password) {
- this.debugId = debugId;
- this.queue = queue;
- this.configuration = configuration;
- this.securityType = securityType;
- this.host = host;
- this.port = port;
- this.user = user;
- this.password = password;
- }
-
- /**
- * Connect the websocket.
- * Attempts to connect to the websocket on a remote Miniserver.
- *
- * @return
- * true if connection request initiated correctly, false if not
- */
- boolean connect() {
- logger.trace("[{}] connect() websocket", debugId);
- stateMachineLock.lock();
- try {
- if (state != ClientState.IDLE) {
- close("Attempt to connect a websocket in non-idle state: " + state);
- return false;
- }
-
- socket = new LxWebSocket();
- wsClient = new WebSocketClient();
-
- String message = socket.httpGet(CMD_CFG_API);
- if (message != null) {
- LxJsonSubResponse response = socket.getSubResponse(message);
- if (response != null && response.code == 200 && response.value != null) {
- try {
- LxJsonCfgApi cfgApi = gson.fromJson(response.value.getAsString(), LxJsonCfgApi.class);
- swVersion = cfgApi.version;
- macAddress = cfgApi.snr;
- } catch (JsonSyntaxException | NumberFormatException e) {
- logger.debug("[{}] Error parsing API config response: {}, {}", debugId, response,
- e.getMessage());
- }
- } else {
- logger.debug("[{}] Http get null or error in reponse for API config request.", debugId);
- }
- } else {
- logger.debug("[{}] Http get failed for API config request.", debugId);
- }
-
- try {
- wsClient.start();
-
- URI target = new URI("ws://" + host.getHostAddress() + ":" + port + SOCKET_URL);
- ClientUpgradeRequest request = new ClientUpgradeRequest();
- request.setSubProtocols("remotecontrol");
-
- startResponseTimeout();
- wsClient.connect(socket, target, request);
- setClientState(ClientState.CONNECTING);
-
- logger.debug("[{}] Connecting to server : {} ", debugId, target);
- return true;
- } catch (Exception e) {
- setClientState(ClientState.IDLE);
- close("Connection to websocket failed : " + e.getMessage());
- return false;
- }
- } finally {
- stateMachineLock.unlock();
- }
- }
-
- /**
- * Disconnect from the websocket with provided reason. This method is called from {@link LxServer} level and also
- * from unsuccessful connect attempt.
- * After calling this method, client is ready to perform a new connection request with {@link #connect()}.
- *
- * @param reason
- * text describing reason for disconnection
- */
- private void disconnect(String reason) {
- logger.trace("[{}] disconnect() websocket : {}", debugId, reason);
- stateMachineLock.lock();
- try {
- if (wsClient != null) {
- try {
- close(reason);
- wsClient.stop();
- wsClient = null;
- } catch (Exception e) {
- logger.debug("[{}] Failed to stop websocket client, message = {}", debugId, e.getMessage());
- }
- } else {
- logger.debug("[{}] Attempt to disconnect websocket client, but wsClient == null", debugId);
- }
- } finally {
- stateMachineLock.unlock();
- }
- }
-
- /**
- * Disconnect from the websocket.
- * After calling this method, client is ready to perform a new connection request with {@link #connect()}.
- */
- void disconnect() {
- disconnect("Disconnecting websocket client");
- }
-
- /**
- * Close websocket session from within {@link LxWsClient}, without stopping the client.
- * To close session from {@link LxServer} level, use {@link #disconnect()}
- *
- * @param reason
- * reason for closing the websocket
- */
- private void close(String reason) {
- logger.trace("[{}] close() websocket", debugId);
- stateMachineLock.lock();
- try {
- stopResponseTimeout();
- if (socket != null) {
- if (socket.session != null) {
- if (state != ClientState.IDLE) {
- logger.debug("[{}] Closing websocket session, reason : {}", debugId, reason);
- setClientState(ClientState.CLOSING);
- } else {
- logger.debug("[{}] Closing websocket, state already IDLE.", debugId);
- }
- socket.session.close(StatusCode.NORMAL, reason);
- } else {
- logger.debug("[{}] Closing websocket, but no session, reason : {}", debugId, reason);
- setClientState(ClientState.IDLE);
- }
- } else {
- logger.debug("[{}] Closing websocket, but socket = null", debugId);
- }
- } finally {
- stateMachineLock.unlock();
- }
- }
-
- /**
- * Notify {@link LxServer} about server going offline and close websocket session from within
- * {@link LxWsClient},
- * without stopping the client.
- * To close session from {@link LxServer} level, use {@link #disconnect()}
- *
- * @param reasonCode
- * reason code for server going offline
- * @param reasonText
- * reason text (description) for server going offline
- */
- private void notifyAndClose(LxOfflineReason reasonCode, String reasonText) {
- notifyMaster(EventType.SERVER_OFFLINE, reasonCode, reasonText);
- close(reasonText);
- }
-
- /**
- * Update configuration parameter(s) in runtime.
- * Calling this method will not interrupt existing services, changes will take effect when new values are used next
- * time.
- *
- * @param keepAlivePeriod
- * new period between keep alive messages, in seconds
- * @param connectTimeout
- * Time to wait for websocket connect response from the Miniserver
- * @param maxBinMsgSize
- * maximum binary message size of websocket client (in kB)
- * @param maxTextMsgSize
- * maximum text message size of websocket client (in kB)
- */
- void update(int keepAlivePeriod, int connectTimeout, int maxBinMsgSize, int maxTextMsgSize) {
- if (keepAlivePeriod > 0 && this.keepAlivePeriod != keepAlivePeriod) {
- logger.debug("[{}] Changing keepAlivePeriod to {}", debugId, keepAlivePeriod);
- this.keepAlivePeriod = keepAlivePeriod;
- }
- if (connectTimeout > 0 && this.connectTimeout != connectTimeout) {
- logger.debug("[{}] Changing connectTimeout to {}", debugId, connectTimeout);
- this.connectTimeout = connectTimeout;
- }
- if (maxBinMsgSize > 0 && this.maxBinMsgSize != maxBinMsgSize) {
- logger.debug("[{}] Changing maxBinMsgSize to {}", debugId, maxBinMsgSize);
- this.maxBinMsgSize = maxBinMsgSize;
- }
- if (maxTextMsgSize > 0 && this.maxTextMsgSize != maxTextMsgSize) {
- logger.debug("[{}] Changing maxTextMsgSize to {}", debugId, maxTextMsgSize);
- this.maxTextMsgSize = maxTextMsgSize;
- }
- }
-
- /**
- * Sends an action to a Loxone Miniserver's control.
- *
- * @param id
- * identifier of the control
- * @param operation
- * identifier of the operation
- * @return
- * true if action was executed by the Miniserver
- */
- boolean sendAction(LxUuid id, String operation) {
- String command = CMD_ACTION + id.getOriginalString() + "/" + operation;
- logger.debug("[{}] Sending command {}", debugId, command);
- LxJsonSubResponse response = socket.sendCmdWithResp(command, true, true);
- if (response == null) {
- logger.debug("[{}] Error sending command {}", debugId, command);
- return false;
- }
- if (response.code != 200) {
- logger.debug("[{}] Received error response {} to command {}", debugId, response.code, command);
- return false;
- }
- return true;
- }
-
- /**
- * Returns {@link Gson} object so it can be reused without creating a new instance.
- *
- * @return
- * Gson object for reuse
- */
- Gson getGson() {
- return gson;
- }
-
- /**
- * Sets a new websocket client state.
- * The caller must take care of thread synchronization.
- *
- * @param state
- * new state to set
- */
- private void setClientState(LxWsClient.ClientState state) {
- logger.debug("[{}] changing client state to: {}", debugId, state);
- this.state = state;
- }
-
- /**
- * Start a timer to wait for a Miniserver response to an action sent from the binding.
- * When timer expires, connection is removed and server error is reported. Further connection attempt can be made
- * later by the upper layer.
- * If a previous timer is running, it will be stopped before a new timer is started.
- * The caller must take care of thread synchronization.
- */
- private void startResponseTimeout() {
- stopResponseTimeout();
- timeout = SCHEDULER.schedule(this::responseTimeout, connectTimeout, TimeUnit.SECONDS);
- }
-
- /**
- * Called when response timeout occurred.
- */
- private void responseTimeout() {
- stateMachineLock.lock();
- try {
- logger.debug("[{}] Miniserver response timeout", debugId);
- notifyMaster(EventType.SERVER_OFFLINE, LxOfflineReason.COMMUNICATION_ERROR,
- "Miniserver response timeout occured");
- disconnect();
- } finally {
- stateMachineLock.unlock();
- }
- }
-
- /**
- * Stops scheduled timeout waiting for a Miniserver response
- * The caller must take care of thread synchronization.
- */
- private void stopResponseTimeout() {
- logger.trace("[{}] stopping response timeout in state {}", debugId, state);
- if (timeout != null) {
- timeout.cancel(true);
- timeout = null;
- }
- }
-
- /**
- * Sends an event to {@link LxServer} object
- *
- * @param event
- * event that happened
- * @param reason
- * reason for the event (applicable to server OFFLINE event}
- * @param object
- * additional data for the event (text message for OFFLINE event, data for state changes)
- */
- private void notifyMaster(EventType event, LxOfflineReason reason, Object object) {
- LxOfflineReason localReason;
- if (reason == null) {
- localReason = LxOfflineReason.NONE;
- } else {
- localReason = reason;
- }
- LxServerEvent sync = new LxServerEvent(event, localReason, object);
- try {
- queue.put(sync);
- } catch (InterruptedException e) {
- logger.debug("[{}] Interrupted queue operation", debugId);
- }
- }
-
- /**
- * Implementation of jetty websocket client
- *
- * @author Pawel Pieczul - initial contribution
- *
- */
- @WebSocket
- public class LxWebSocket {
- Session session;
- private ScheduledFuture> keepAlive;
- private LxWsBinaryHeader header;
- private LxWsSecurity security;
- private boolean syncRequest;
- private LxJsonSubResponse commandResponse;
- private final Lock responseLock = new ReentrantLock();
- private final Condition responseAvailable = responseLock.newCondition();
-
- @OnWebSocketConnect
- public void onConnect(Session session) {
- stateMachineLock.lock();
- try {
- if (state != ClientState.CONNECTING) {
- logger.debug("[{}] Unexpected connect received on websocket in state {}", debugId, state);
- return;
- }
-
- WebSocketPolicy policy = session.getPolicy();
- policy.setMaxBinaryMessageSize(maxBinMsgSize * 1024);
- policy.setMaxTextMessageSize(maxTextMsgSize * 1024);
-
- logger.debug("[{}] Websocket connected (maxBinMsgSize={}, maxTextMsgSize={})", debugId,
- policy.getMaxBinaryMessageSize(), policy.getMaxTextMessageSize());
- this.session = session;
- setClientState(ClientState.CONNECTED);
-
- security = LxWsSecurity.create(securityType, swVersion, debugId, configuration, socket, user, password);
- security.authenticate((result, details) -> {
- if (result == LxOfflineReason.NONE) {
- authenticated();
- } else {
- notifyAndClose(result, details);
- }
- });
- } finally {
- stateMachineLock.unlock();
- }
- }
-
- @OnWebSocketClose
- public void onClose(int statusCode, String reason) {
- stateMachineLock.lock();
- try {
- logger.debug("[{}] Websocket connection in state {} closed with code {} reason : {}", debugId, state,
- statusCode, reason);
- if (security != null) {
- security.cancel();
- }
- stopKeepAlive();
- if (state == ClientState.CLOSING) {
- session = null;
- } else if (state != ClientState.IDLE) {
- responseLock.lock();
- try {
- commandResponse = null;
- responseAvailable.signalAll();
- } finally {
- responseLock.unlock();
- }
- notifyMaster(EventType.SERVER_OFFLINE, LxOfflineReason.getReason(statusCode), reason);
- }
- setClientState(ClientState.IDLE);
- } finally {
- stateMachineLock.unlock();
- }
- }
-
- @OnWebSocketError
- public void onError(Throwable error) {
- logger.debug("[{}] Websocket error : {}", debugId, error.getMessage());
- }
-
- @OnWebSocketMessage
- public void onBinaryMessage(byte data[], int msgOffset, int msgLength) {
- int offset = msgOffset;
- int length = msgLength;
- if (logger.isTraceEnabled()) {
- String s = Hex.encodeHexString(data);
- logger.trace("[{}] Binary message: length {}: {}", debugId, length, s);
- }
- stateMachineLock.lock();
- try {
- if (state != ClientState.RUNNING) {
- return;
- }
- // websocket will receive header and data in turns as two separate binary messages
- if (header == null) {
- // header expected now
- header = new LxWsBinaryHeader(data, offset);
- switch (header.type) {
- // following header types precede data in next message
- case BINARY_FILE:
- case EVENT_TABLE_OF_VALUE_STATES:
- case EVENT_TABLE_OF_TEXT_STATES:
- case EVENT_TABLE_OF_DAYTIMER_STATES:
- case EVENT_TABLE_OF_WEATHER_STATES:
- break;
- // other header types have no data and next message will be header again
- default:
- header = null;
- break;
- }
- } else {
- // data expected now
- switch (header.type) {
- case EVENT_TABLE_OF_VALUE_STATES:
- stopResponseTimeout();
- while (length > 0) {
- LxWsStateUpdateEvent event = new LxWsStateUpdateEvent(true, data, offset);
- offset += event.getSize();
- length -= event.getSize();
- notifyMaster(EventType.STATE_UPDATE, null, event);
- }
- break;
- case EVENT_TABLE_OF_TEXT_STATES:
- while (length > 0) {
- LxWsStateUpdateEvent event = new LxWsStateUpdateEvent(false, data, offset);
- offset += event.getSize();
- length -= event.getSize();
- notifyMaster(EventType.STATE_UPDATE, null, event);
- }
- break;
- case KEEPALIVE_RESPONSE:
- case TEXT_MESSAGE:
- default:
- break;
- }
- // header will be next
- header = null;
- }
- } catch (IndexOutOfBoundsException e) {
- logger.debug("[{}] malformed binary message received, discarded", debugId);
- } finally {
- stateMachineLock.unlock();
- }
- }
-
- @OnWebSocketMessage
- public void onMessage(String msg) {
- stateMachineLock.lock();
- try {
- if (logger.isTraceEnabled()) {
- String trace = msg;
- if (trace.length() > 100) {
- trace = msg.substring(0, 100);
- }
- logger.trace("[{}] received message in state {}: {}", debugId, state, trace);
- }
- switch (state) {
- case IDLE:
- case CONNECTING:
- logger.debug("[{}] Unexpected message received by websocket in state {}", debugId, state);
- break;
- case CONNECTED:
- case RUNNING:
- processResponse(msg);
- break;
- case UPDATING_CONFIGURATION:
- try {
- stopResponseTimeout();
- LxJsonApp3 config = gson.fromJson(msg, LxJsonApp3.class);
- if (config.msInfo != null) {
- config.msInfo.swVersion = swVersion;
- config.msInfo.macAddress = macAddress;
- }
- logger.debug("[{}] Received configuration from server", debugId);
- notifyMaster(EventType.RECEIVED_CONFIG, null, config);
- setClientState(ClientState.RUNNING);
- notifyMaster(EventType.SERVER_ONLINE, null, null);
- if (sendCmdWithResp(CMD_ENABLE_UPDATES, false, false) == null) {
- notifyAndClose(LxOfflineReason.COMMUNICATION_ERROR, "Failed to enable state updates.");
- }
- } catch (JsonParseException e) {
- notifyAndClose(LxOfflineReason.INTERNAL_ERROR, "Error processing received configuration");
- }
- break;
- case CLOSING:
- default:
- break;
- }
- } finally {
- stateMachineLock.unlock();
- }
- }
-
- LxJsonSubResponse getSubResponse(String msg) {
- try {
- LxJsonSubResponse subResp = gson.fromJson(msg, LxJsonResponse.class).subResponse;
- if (subResp == null) {
- logger.debug("[{}] Miniserver response subresponse is null: {}", debugId, msg);
- return null;
- }
- if (subResp.control == null) {
- logger.debug("[{}] Miniserver response control is null: {}", debugId, msg);
- return null;
- }
- return subResp;
- } catch (JsonSyntaxException e) {
- logger.debug("[{}] Miniserver response JSON parsing error: {}, {}", debugId, msg, e.getMessage());
- return null;
- }
- }
-
- /**
- * Returns {@link Gson} object so it can be reused without creating a new instance.
- *
- * @return
- * Gson object for reuse
- */
- Gson getGson() {
- return LxWsClient.this.getGson();
- }
-
- /**
- * Send a HTTP GET request and return server's response.
- *
- * @param request
- * request content
- * @return
- * response received
- */
- String httpGet(String request) {
- HttpURLConnection con = null;
- try {
- URL url = new URL("http", host.getHostAddress(), port,
- request.startsWith("/") ? request : "/" + request);
- con = (HttpURLConnection) url.openConnection();
- con.setRequestMethod("GET");
- StringBuilder result = new StringBuilder();
- try (BufferedReader reader = new BufferedReader(new InputStreamReader(con.getInputStream()))) {
- String l;
- while ((l = reader.readLine()) != null) {
- result.append(l);
- }
- return result.toString();
- }
- } catch (IOException e) {
- return null;
- } finally {
- if (con != null) {
- con.disconnect();
- }
- }
- }
-
- /**
- * Sends a command to the Miniserver and encrypts it if command can be encrypted and encryption is available.
- * Request can be synchronous or asynchronous. There is always a response expected to the command, that is a
- * standard command response as defined in {@link LxJsonSubResponse}. Such commands are the majority of commands
- * used for performing actions on the controls and for executing authentication procedure.
- * A synchronous command must not be sent from the websocket thread or it will cause a deadlock.
- * An asynchronous command request returns immediately, but the returned value will not contain valid data until
- * the response if received. Asynchronous request can be sent from the websocket thread.
- * There can be only one command sent which awaits response, whether this is synchronous or asynchronous
- * command. For synchronous commands this is ensured naturally, for asynchronous the caller must manage it.
- * If this method is called before a response to the previous command is received, it will return error and not
- * send the command.
- *
- * @param command
- * command to send to the Miniserver
- * @param sync
- * true is synchronous request, false if ansynchronous
- * @param encrypt
- * true if command can be encrypted
- * @return
- * response received (for sync command) or to be received (for async), null if error occurred
- */
- LxJsonSubResponse sendCmdWithResp(String command, boolean sync, boolean encrypt) {
- responseLock.lock();
- try {
- if (commandResponse != null) {
- logger.warn("[{}] Command not sent, previous command not finished: {}", debugId, command);
- return null;
- }
- if (!sendCmdNoResp(command, encrypt)) {
- return null;
- }
- commandResponse = new LxJsonSubResponse();
- commandResponse.control = command;
- LxJsonSubResponse response = commandResponse;
- syncRequest = sync;
- if (sync) {
- if (!responseAvailable.await(connectTimeout, TimeUnit.SECONDS)) {
- commandResponse = null;
- responseTimeout();
- return null;
- }
- commandResponse = null;
- }
- return response;
- } catch (InterruptedException e) {
- logger.debug("[{}] Interrupted waiting for response: {}", debugId, command);
- commandResponse = null;
- return null;
- } finally {
- responseLock.unlock();
- }
- }
-
- /**
- * Sends a command to the Miniserver and encrypts it if command can be encrypted and encryption is available.
- * The request is asynchronous and no response is expected. It can be used to send commands from the websocket
- * thread or commands for which the responses are not following the standard format defined in
- * {@link LxJsonSubResponse}.
- * If the caller expects the non-standard response it should manage its reception and the response timeout.
- *
- * @param command
- * command to send to the Miniserver
- * @param encrypt
- * true if command can be encrypted
- * @return
- * true if command was sent (no information if it was received)
- */
- private boolean sendCmdNoResp(String command, boolean encrypt) {
- stateMachineLock.lock();
- try {
- if (session != null && state != ClientState.IDLE && state != ClientState.CONNECTING
- && state != ClientState.CLOSING) {
- String encrypted = encrypt ? security.encrypt(command) : command;
- if (logger.isDebugEnabled()) {
- // security.encrypt() may return the original string if it did not encrypt
- if (encrypted.equals(command)) {
- logger.debug("[{}] Sending string: {}", debugId, command);
- } else {
- logger.debug("[{}] Sending encrypted string: {}", debugId, command);
- logger.debug("[{}] Encrypted: {}", debugId, encrypted);
- }
- }
- try {
- session.getRemote().sendString(encrypted);
- return true;
- } catch (IOException e) {
- logger.debug("[{}] Error sending command: {}, {}", debugId, command, e.getMessage());
- return false;
- }
- } else {
- logger.debug("[{}] NOT sending command, state {}: {}", debugId, state, command);
- return false;
- }
- } finally {
- stateMachineLock.unlock();
- }
- }
-
- /**
- * Process a Miniserver's response to a command. The response is in plain text format as received from the
- * websocket, but is expected to follow the standard format defined in {@link LxJsonSubResponse}.
- * If there is a thread waiting for the response (on a synchronous command request), the thread will be
- * released.
- * Only one requester is expected to wait for the response at a time - commands must be sent sequentially - a
- * command can be sent only after a response to the previous command was received, whether it was sent
- * synchronously or asynchronously.
- * If the received message is encrypted, it will be decrypted before processing.
- *
- * @param message
- * websocket message with the response
- */
- private void processResponse(String message) {
- LxJsonSubResponse subResp = getSubResponse(message);
- if (subResp == null) {
- return;
- }
- logger.debug("[{}] Response: {}", debugId, message.trim());
- String control = subResp.control.trim();
- control = security.decryptControl(subResp.control);
- // for some reason the responses to some commands starting with jdev begin with dev, not jdev
- // this seems to be a bug in the Miniserver
- if (control.startsWith("dev/")) {
- control = "j" + control;
- }
- responseLock.lock();
- try {
- if (commandResponse == null) {
- logger.warn("[{}] Received response, but awaiting none.", debugId);
- return;
- }
- String awaitedControl = commandResponse.control;
- if (awaitedControl == null) {
- logger.warn("[{}] Malformed awaiting response structure - no control.", debugId);
- commandResponse = null;
- return;
- }
- if (!awaitedControl.equals(control)) {
- logger.warn("[{}] Waiting for another response: {}", debugId, awaitedControl);
- }
- commandResponse.code = subResp.code;
- commandResponse.value = subResp.value;
- if (syncRequest) {
- logger.debug("[{}] Releasing command sender with response: {}, {}, {}", debugId, control,
- subResp.code, subResp.value);
- responseAvailable.signal();
- } else {
- logger.debug("[{}] Reponse to asynchronous request: {}, {}, {}", debugId, control, subResp.code,
- subResp.value);
- commandResponse = null;
- }
- } finally {
- responseLock.unlock();
- }
- }
-
- /**
- * Perform actions after user authentication is successfully completed.
- * This method sends a request to receive Miniserver configuration.
- */
- private void authenticated() {
- logger.debug("[{}] Websocket authentication successfull.", debugId);
- stateMachineLock.lock();
- try {
- setClientState(ClientState.UPDATING_CONFIGURATION);
- if (sendCmdNoResp(CMD_GET_APP_CONFIG, false)) {
- startResponseTimeout();
- startKeepAlive();
- } else {
- notifyAndClose(LxOfflineReason.INTERNAL_ERROR, "Error sending get config command.");
- }
- } finally {
- stateMachineLock.unlock();
- }
- }
-
- /**
- * Start keep alive thread. The thread will periodically send keep alive messages until {@link #stopKeepAlive()}
- * is called or a connection terminates.
- */
- private void startKeepAlive() {
- keepAlive = SCHEDULER.scheduleWithFixedDelay(() -> {
- stateMachineLock.lock();
- try {
- if (state == ClientState.CLOSING || state == ClientState.IDLE || state == ClientState.CONNECTING) {
- stopKeepAlive();
- } else {
- logger.debug("[{}] sending keepalive message", debugId);
- if (!sendCmdNoResp(CMD_KEEPALIVE, false)) {
- logger.debug("[{}] error sending keepalive message", debugId);
- }
- }
- } finally {
- stateMachineLock.unlock();
- }
- }, keepAlivePeriod, keepAlivePeriod, TimeUnit.SECONDS);
- }
-
- /**
- * Stops keep alive thread and ceases sending keep alive messages to the Miniserver
- * The caller must take care of thread synchronization.
- */
- private void stopKeepAlive() {
- logger.trace("[{}] stopping keepalives in state {}", debugId, state);
- if (keepAlive != null) {
- keepAlive.cancel(true);
- keepAlive = null;
- }
- }
- }
-}
diff --git a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxWsSecurity.java b/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxWsSecurity.java
deleted file mode 100644
index b35a226b16b3e..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxWsSecurity.java
+++ /dev/null
@@ -1,241 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.loxone.internal.core;
-
-import java.security.InvalidKeyException;
-import java.security.NoSuchAlgorithmException;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReentrantLock;
-import java.util.function.BiConsumer;
-
-import javax.crypto.Mac;
-import javax.crypto.spec.SecretKeySpec;
-
-import org.apache.commons.codec.DecoderException;
-import org.apache.commons.codec.binary.Hex;
-import org.openhab.binding.loxone.internal.core.LxJsonResponse.LxJsonSubResponse;
-import org.openhab.binding.loxone.internal.core.LxServer.Configuration;
-import org.openhab.binding.loxone.internal.core.LxWsClient.LxWebSocket;
-
-/**
- * Security abstract class providing authentication and encryption services.
- * Used by the {@link LxWsClient} during connection establishment to authenticate user and during message exchange for
- * encryption and decryption or the messages.
- *
- * @author Pawel Pieczul - initial contribution
- *
- */
-abstract class LxWsSecurity {
- final int debugId;
- final String user;
- final String password;
- final LxWebSocket socket;
- final Configuration configuration;
-
- LxOfflineReason reason;
- String details;
- boolean cancel = false;
-
- private final Lock authenticationLock = new ReentrantLock();
-
- /**
- * Create an authentication instance.
- *
- * @param debugId
- * instance of the client used for debugging purposes only
- * @param configuration
- * configuration object for getting and setting custom properties (e.g. token)
- * @param socket
- * websocket to perform communication with Miniserver
- * @param user
- * user to authenticate
- * @param password
- * password to authenticate
- */
- LxWsSecurity(int debugId, Configuration configuration, LxWebSocket socket, String user, String password) {
- this.debugId = debugId;
- this.configuration = configuration;
- this.socket = socket;
- this.user = user;
- this.password = password;
- }
-
- /**
- * Initiate user authentication. This method will return immediately and authentication will be done in a separate
- * thread asynchronously. On successful or unsuccessful completion, a provided callback will be called with
- * information about failed reason and details of failure. In case of success, the reason value will be
- * {@link LxOfflineReason#NONE}
- * Only one authentication can run in parallel and must be performed sequentially (create no more threads).
- *
- * @param doneCallback
- * callback to execute when authentication is finished or failed
- */
- void authenticate(BiConsumer doneCallback) {
- Runnable init = () -> {
- authenticationLock.lock();
- try {
- execute();
- doneCallback.accept(reason, details);
- } finally {
- authenticationLock.unlock();
- }
- };
- new Thread(init).start();
- }
-
- /**
- * Perform user authentication using a specific authentication algorithm.
- * This method will be executed in a dedicated thread to allow sending synchronous messages to the Miniserver.
- *
- * @return
- * true when authentication granted
- */
- abstract boolean execute();
-
- /**
- * Cancel authentication procedure and any pending activities.
- * It is supposed to be overridden by implementing classes.
- */
- void cancel() {
- cancel = true;
- }
-
- /**
- * Check a response received from the Miniserver for errors, interpret it and store the results in class fields.
- *
- * @param response
- * response received from the Miniserver
- * @return
- * {@link LxOfflineReason#NONE} when response is correct or a specific {@link LxOfflineReason}
- */
- boolean checkResponse(LxJsonSubResponse response) {
- if (response == null || cancel) {
- reason = LxOfflineReason.COMMUNICATION_ERROR;
- return false;
- }
- reason = LxOfflineReason.getReason(response.code);
- return (reason == LxOfflineReason.NONE);
- }
-
- /**
- * Hash string (e.g. containing user name and password or token) according to the algorithm required by the
- * Miniserver.
- *
- * @param string
- * string to be hashed
- * @param hashKeyHex
- * hash key received from the Miniserver in hex format
- * @return
- * hashed string or null if failed
- */
- String hashString(String string, String hashKeyHex) {
- try {
- byte[] hashKeyBytes = Hex.decodeHex(hashKeyHex.toCharArray());
- SecretKeySpec signKey = new SecretKeySpec(hashKeyBytes, "HmacSHA1");
- Mac mac = Mac.getInstance("HmacSHA1");
- mac.init(signKey);
- byte[] rawData = mac.doFinal(string.getBytes());
- return Hex.encodeHexString(rawData);
- } catch (DecoderException | NoSuchAlgorithmException | InvalidKeyException e) {
- return null;
- }
- }
-
- /**
- * Encrypt string using current encryption algorithm.
- *
- * @param string
- * input string to encrypt
- * @return
- * encrypted string
- */
- String encrypt(String string) {
- // by default no encryption
- return string;
- }
-
- /**
- * Check if control is encrypted and decrypt it using current decryption algorithm.
- * If control is not encrypted or decryption is not available or not ready, the control should be returned in its
- * original form.
- *
- * @param control
- * control to be decrypted
- * @return
- * decrypted control or original control in case decryption is unavailable, control is not encrypted or
- * other issue occurred
- */
- String decryptControl(String control) {
- // by default no decryption
- return control;
- }
-
- /**
- * Set error code and return false. It is used to report detailed error information from inside the algorithms.
- *
- * @param reason
- * reason for failure
- * @param details
- * details of the failure
- * @return
- * always false
- */
- boolean setError(LxOfflineReason reason, String details) {
- if (reason != null) {
- this.reason = reason;
- }
- if (details != null) {
- this.details = details;
- }
- return false;
- }
-
- /**
- * Create an authentication instance.
- *
- * @param type
- * type of security algorithm
- * @param swVersion
- * Miniserver's software version or null if unknown
- * @param debugId
- * instance of the client used for debugging purposes only
- * @param configuration
- * configuration object for getting and setting custom properties (e.g. token)
- * @param socket
- * websocket to perform communication with Miniserver
- * @param user
- * user to authenticate
- * @param password
- * password to authenticate
- * @return
- * created security object
- */
- static LxWsSecurity create(LxWsSecurityType type, String swVersion, int debugId, Configuration configuration,
- LxWebSocket socket, String user, String password) {
- LxWsSecurityType securityType = type;
- if (securityType == LxWsSecurityType.AUTO && swVersion != null) {
- String[] versions = swVersion.split("[.]");
- if (versions != null && versions.length > 0 && Integer.parseInt(versions[0]) <= 8) {
- securityType = LxWsSecurityType.HASH;
- } else {
- securityType = LxWsSecurityType.TOKEN;
- }
- }
- if (securityType == LxWsSecurityType.HASH) {
- return new LxWsSecurityHash(debugId, configuration, socket, user, password);
- } else {
- return new LxWsSecurityToken(debugId, configuration, socket, user, password);
- }
- }
-
-}
diff --git a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxWsSecurityHash.java b/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxWsSecurityHash.java
deleted file mode 100644
index 76735d531d073..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxWsSecurityHash.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.loxone.internal.core;
-
-import org.openhab.binding.loxone.internal.core.LxJsonResponse.LxJsonSubResponse;
-import org.openhab.binding.loxone.internal.core.LxServer.Configuration;
-import org.openhab.binding.loxone.internal.core.LxWsClient.LxWebSocket;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A hash-based authentication algorithm. No encryption and decryption supported.
- * The algorithm computes a HMAC-SHA1 hash from the user name and password, using a key received from the Miniserver.
- * This hash is sent to the Miniserver to authorize the user.
- *
- * @author Pawel Pieczul - initial contribution
- *
- */
-class LxWsSecurityHash extends LxWsSecurity {
-
- private static final String CMD_GET_KEY = "jdev/sys/getkey";
- private static final String CMD_AUTHENTICATE = "authenticate/";
-
- private Logger logger = LoggerFactory.getLogger(LxWsSecurityHash.class);
-
- /**
- * Create a hash-based authentication instance.
- *
- * @param debugId
- * instance of the client used for debugging purposes only
- * @param configuration
- * configuration object for getting and setting custom properties (e.g. token)
- * @param socket
- * websocket to perform communication with Miniserver
- * @param user
- * user to authenticate
- * @param password
- * password to authenticate
- */
- LxWsSecurityHash(int debugId, Configuration configuration, LxWebSocket socket, String user, String password) {
- super(debugId, configuration, socket, user, password);
- }
-
- @Override
- boolean execute() {
- logger.debug("[{}] Starting hash-based authentication.", debugId);
- if (password == null || password.isEmpty()) {
- return setError(LxOfflineReason.UNAUTHORIZED, "Enter password for hash-based authentication.");
- }
- LxJsonSubResponse resp = socket.sendCmdWithResp(CMD_GET_KEY, true, false);
- if (!checkResponse(resp)) {
- return false;
- }
- String hash = hashString(user + ":" + password, resp.value.getAsString());
- if (hash == null) {
- return setError(LxOfflineReason.INTERNAL_ERROR, "Error hashing credentials.");
- }
- String cmd = CMD_AUTHENTICATE + hash;
- if (!checkResponse(socket.sendCmdWithResp(cmd, true, false))) {
- return false;
- }
- logger.debug("[{}] Authenticated - hash based authentication.", debugId);
- return true;
- }
-}
diff --git a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxWsStateUpdateEvent.java b/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxWsStateUpdateEvent.java
deleted file mode 100644
index 66e2eaa2762f9..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/core/LxWsStateUpdateEvent.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.loxone.internal.core;
-
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-
-/**
- * An event received from Loxone Miniserver with control's state update
- *
- * @author Pawel Pieczul - initial contribution
- *
- */
-class LxWsStateUpdateEvent {
- private LxUuid uuid;
- @SuppressWarnings("unused")
- private LxUuid iconUuid;
- private Double value;
- private String text;
- private int size = 0;
-
- /**
- * Create new state update event from binary message
- *
- * @param isValueEvent
- * true if this event updates double value, false if it updates text message
- * @param data
- * buffer with binary message received from Miniserver
- * @param offsetParam
- * offset in buffer where event is expected
- */
- LxWsStateUpdateEvent(boolean isValueEvent, byte data[], int offsetParam) throws IndexOutOfBoundsException {
- int offset = offsetParam;
- uuid = new LxUuid(data, offset);
- offset += 16;
-
- if (isValueEvent) {
- value = ByteBuffer.wrap(data, offset, 8).order(ByteOrder.LITTLE_ENDIAN).getDouble();
- size = 24;
- return;
- }
-
- iconUuid = new LxUuid(data, offset);
- offset += 16;
-
- int textLen = ByteBuffer.wrap(data, offset, 4).order(ByteOrder.LITTLE_ENDIAN).getInt();
- offset += 4;
-
- text = new String(data, offset, textLen);
- size = 36 + (textLen % 4 > 0 ? textLen + 4 - (textLen % 4) : textLen);
- }
-
- /**
- * Get UUID of this state
- *
- * @return
- * UUID of this state
- */
- LxUuid getUuid() {
- return uuid;
- }
-
- /**
- * Get current value of this state
- *
- * @return
- * current value of the state or null if state has no value
- */
- Double getValue() {
- return value;
- }
-
- /**
- * Get current text value of this state
- *
- * @return
- * current text value of this state
- */
- String getText() {
- return text;
- }
-
- /**
- * Get size of binary representation of state update event in bytes, as received from Loxone Miniserver
- * Used to traverse a binary buffer with more than one state update events
- *
- * @return
- * size of event in binary buffer, in bytes
- */
- int getSize() {
- return size;
- }
-}
diff --git a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/discovery/LoxoneMiniserverDiscoveryParticipant.java b/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/discovery/LoxoneMiniserverDiscoveryParticipant.java
deleted file mode 100644
index 51e6933e72dc7..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/discovery/LoxoneMiniserverDiscoveryParticipant.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.loxone.internal.discovery;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.smarthome.config.discovery.DiscoveryResult;
-import org.eclipse.smarthome.config.discovery.DiscoveryResultBuilder;
-import org.eclipse.smarthome.config.discovery.upnp.UpnpDiscoveryParticipant;
-import org.eclipse.smarthome.core.thing.Thing;
-import org.eclipse.smarthome.core.thing.ThingTypeUID;
-import org.eclipse.smarthome.core.thing.ThingUID;
-import org.jupnp.model.meta.DeviceDetails;
-import org.jupnp.model.meta.RemoteDevice;
-import org.openhab.binding.loxone.internal.LoxoneBindingConstants;
-import org.openhab.binding.loxone.internal.handler.LoxoneMiniserverHandler;
-import org.osgi.service.component.annotations.Component;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * The {@link LoxoneMiniserverDiscoveryParticipant} class creates Miniserver things.
- * It analyzes UPNP devices discovered by the framework and if Loxone Miniserver is found,
- * a new thing discovery is reported, which in turn will result in creating a {@link Thing}
- * and subsequently a new {@link LoxoneMiniserverHandler} object.
- *
- * @author Pawel Pieczul - Initial contribution
- *
- */
-@Component(immediate = true)
-public class LoxoneMiniserverDiscoveryParticipant implements UpnpDiscoveryParticipant {
-
- private Logger logger = LoggerFactory.getLogger(LoxoneMiniserverDiscoveryParticipant.class);
-
- @Override
- public Set getSupportedThingTypeUIDs() {
- return LoxoneMiniserverHandler.SUPPORTED_THING_TYPES_UIDS;
- }
-
- @Override
- public DiscoveryResult createResult(RemoteDevice device) {
- ThingUID uid = getThingUID(device);
- if (uid != null) {
- Map properties = new HashMap<>(2);
-
- // After correct Thing UID is created, we have confidence that all following parameters exist and we don't
- // need to check for null objects here in the device details
- DeviceDetails details = device.getDetails();
- String serial = details.getSerialNumber();
- String host = details.getPresentationURI().getHost();
- String label = details.getFriendlyName() + " @ " + host;
- int port = details.getPresentationURI().getPort();
- String vendor = details.getManufacturerDetails().getManufacturer();
- String model = details.getModelDetails().getModelName();
-
- logger.debug("Creating discovery result for serial {} label {} port {}", serial, label, port);
- properties.put(LoxoneBindingConstants.MINISERVER_PARAM_HOST, host);
- properties.put(LoxoneBindingConstants.MINISERVER_PARAM_PORT, port);
- properties.put(Thing.PROPERTY_VENDOR, vendor);
- properties.put(Thing.PROPERTY_MODEL_ID, model);
- properties.put(Thing.PROPERTY_SERIAL_NUMBER, serial);
-
- return DiscoveryResultBuilder.create(uid).withProperties(properties).withLabel(label)
- .withRepresentationProperty(serial).build();
- }
- return null;
- }
-
- @Override
- public ThingUID getThingUID(RemoteDevice device) {
- String manufacturer = device.getDetails().getManufacturerDetails().getManufacturer();
- if (manufacturer != null && manufacturer.toLowerCase().contains("loxone")) {
- String model = device.getDetails().getModelDetails().getModelName();
- if (model != null && model.toLowerCase().contentEquals("loxone miniserver")) {
- String serial = device.getDetails().getSerialNumber();
- if (serial == null) {
- serial = device.getIdentity().getUdn().getIdentifierString();
- }
- if (serial != null) {
- return new ThingUID(LoxoneBindingConstants.THING_TYPE_MINISERVER, serial);
- }
- }
- }
- return null;
- }
-}
diff --git a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/handler/LoxoneMiniserverHandler.java b/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/handler/LoxoneMiniserverHandler.java
deleted file mode 100644
index 07cc9c820f90e..0000000000000
--- a/addons/binding/org.openhab.binding.loxone/src/main/java/org/openhab/binding/loxone/internal/handler/LoxoneMiniserverHandler.java
+++ /dev/null
@@ -1,753 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.loxone.internal.handler;
-
-import static org.openhab.binding.loxone.internal.LoxoneBindingConstants.*;
-
-import java.io.IOException;
-import java.math.BigDecimal;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.nio.channels.Channels;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.stream.Collectors;
-
-import org.eclipse.smarthome.config.core.Configuration;
-import org.eclipse.smarthome.core.library.types.DecimalType;
-import org.eclipse.smarthome.core.library.types.OnOffType;
-import org.eclipse.smarthome.core.library.types.PercentType;
-import org.eclipse.smarthome.core.library.types.StopMoveType;
-import org.eclipse.smarthome.core.library.types.StringType;
-import org.eclipse.smarthome.core.library.types.UpDownType;
-import org.eclipse.smarthome.core.thing.Channel;
-import org.eclipse.smarthome.core.thing.ChannelUID;
-import org.eclipse.smarthome.core.thing.Thing;
-import org.eclipse.smarthome.core.thing.ThingStatus;
-import org.eclipse.smarthome.core.thing.ThingStatusDetail;
-import org.eclipse.smarthome.core.thing.ThingTypeUID;
-import org.eclipse.smarthome.core.thing.binding.BaseThingHandler;
-import org.eclipse.smarthome.core.thing.binding.builder.ChannelBuilder;
-import org.eclipse.smarthome.core.thing.binding.builder.ThingBuilder;
-import org.eclipse.smarthome.core.thing.type.ChannelTypeUID;
-import org.eclipse.smarthome.core.types.Command;
-import org.eclipse.smarthome.core.types.RefreshType;
-import org.eclipse.smarthome.core.types.StateDescription;
-import org.eclipse.smarthome.core.types.StateOption;
-import org.eclipse.smarthome.core.types.UnDefType;
-import org.openhab.binding.loxone.internal.LoxoneDynamicStateDescriptionProvider;
-import org.openhab.binding.loxone.internal.config.LoxoneMiniserverConfig;
-import org.openhab.binding.loxone.internal.core.LxCategory;
-import org.openhab.binding.loxone.internal.core.LxContainer;
-import org.openhab.binding.loxone.internal.core.LxControl;
-import org.openhab.binding.loxone.internal.core.LxControlDimmer;
-import org.openhab.binding.loxone.internal.core.LxControlInfoOnlyAnalog;
-import org.openhab.binding.loxone.internal.core.LxControlInfoOnlyDigital;
-import org.openhab.binding.loxone.internal.core.LxControlJalousie;
-import org.openhab.binding.loxone.internal.core.LxControlLightController;
-import org.openhab.binding.loxone.internal.core.LxControlLightControllerV2;
-import org.openhab.binding.loxone.internal.core.LxControlMood;
-import org.openhab.binding.loxone.internal.core.LxControlPushbutton;
-import org.openhab.binding.loxone.internal.core.LxControlRadio;
-import org.openhab.binding.loxone.internal.core.LxControlSwitch;
-import org.openhab.binding.loxone.internal.core.LxControlTextState;
-import org.openhab.binding.loxone.internal.core.LxControlTimedSwitch;
-import org.openhab.binding.loxone.internal.core.LxOfflineReason;
-import org.openhab.binding.loxone.internal.core.LxServer;
-import org.openhab.binding.loxone.internal.core.LxServerListener;
-import org.openhab.binding.loxone.internal.core.LxUuid;
-import org.openhab.binding.loxone.internal.core.LxWsSecurityType;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Representation of a Loxone Miniserver. It is an openHAB {@link Thing}, which is used to communicate with
- * objects (controls) configured in the Miniserver over {@link Channels}.
- *
- * @author Pawel Pieczul - Initial contribution
- */
-public class LoxoneMiniserverHandler extends BaseThingHandler implements LxServerListener {
-
- public static final Set SUPPORTED_THING_TYPES_UIDS = Collections.singleton(THING_TYPE_MINISERVER);
-
- private LxServer server;
-
- private ChannelTypeUID switchTypeId = new ChannelTypeUID(BINDING_ID, MINISERVER_CHANNEL_TYPE_SWITCH);
- private ChannelTypeUID lightCtrlTypeId = new ChannelTypeUID(BINDING_ID, MINISERVER_CHANNEL_TYPE_LIGHT_CTRL);
- private ChannelTypeUID radioButtonTypeId = new ChannelTypeUID(BINDING_ID, MINISERVER_CHANNEL_TYPE_RADIO_BUTTON);
- private ChannelTypeUID rollershutterTypeId = new ChannelTypeUID(BINDING_ID, MINISERVER_CHANNEL_TYPE_ROLLERSHUTTER);
- private ChannelTypeUID dimmerTypeId = new ChannelTypeUID(BINDING_ID, MINISERVER_CHANNEL_TYPE_DIMMER);
- private ChannelTypeUID roTextTypeId = new ChannelTypeUID(BINDING_ID, MINISERVER_CHANNEL_TYPE_RO_TEXT);
- private ChannelTypeUID roSwitchTypeId = new ChannelTypeUID(BINDING_ID, MINISERVER_CHANNEL_TYPE_RO_SWITCH);
- private ChannelTypeUID roAnalogTypeId = new ChannelTypeUID(BINDING_ID, MINISERVER_CHANNEL_TYPE_RO_ANALOG);
- private ChannelTypeUID roTimedSwitchDeactivationDelayTypeId = new ChannelTypeUID(BINDING_ID,
- MINISERVER_CHANNEL_TYPE_RO_NUMBER);
-
- private Logger logger = LoggerFactory.getLogger(LoxoneMiniserverHandler.class);
- private Map controls = new HashMap<>();
-
- private LoxoneDynamicStateDescriptionProvider dynamicStateDescriptionProvider;
-
- /**
- * Create {@link LoxoneMiniserverHandler} object
- *
- * @param thing
- * Thing object that creates the handler
- * @param provider
- * state description provider service
- */
- public LoxoneMiniserverHandler(Thing thing, LoxoneDynamicStateDescriptionProvider provider) {
- super(thing);
- if (provider != null) {
- dynamicStateDescriptionProvider = provider;
- } else {
- logger.warn("Dynamic state description provider is null");
- }
- }
-
- @Override
- public void handleCommand(ChannelUID channelUID, Command command) {
- if (server == null) {
- updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR,
- "No server attached to this thing");
- return;
- }
-
- LxControl control = getControlFromChannelUID(channelUID);
- if (control == null) {
- // This situation should not happen under normal circumstances, it indicates binding somehow lost its
- // controls
- logger.error("Received command {} for unknown control.", command);
- return;
- }
-
- logger.debug("Control '{}' received command: {}", control.getName(), command);
-
- try {
- if (command instanceof RefreshType) {
- updateChannelStates(channelUID, control);
- return;
- }
-
- if (control instanceof LxControlSwitch) {
- if (command instanceof OnOffType) {
- if ((OnOffType) command == OnOffType.ON) {
- if (control instanceof LxControlPushbutton) {
- ((LxControlPushbutton) control).pulse();
- } else {
- ((LxControlSwitch) control).on();
- }
- } else {
- ((LxControlSwitch) control).off();
- }
- }
- return;
- }
-
- if (control instanceof LxControlTimedSwitch) {
- if (command instanceof OnOffType) {
- if (command == OnOffType.ON) {
- ((LxControlTimedSwitch) control).pulse();
- } else {
- ((LxControlTimedSwitch) control).off();
- }
- }
- return;
- }
-
- if (control instanceof LxControlDimmer) {
- LxControlDimmer dimmer = (LxControlDimmer) control;
- if (command instanceof OnOffType) {
- if (command == OnOffType.ON) {
- dimmer.on();
- } else {
- dimmer.off();
- }
- } else if (command instanceof PercentType) {
- PercentType percentCmd = (PercentType) command;
- dimmer.setPosition(percentCmd.doubleValue());
- }
- return;
- }
-
- if (control instanceof LxControlJalousie) {
- LxControlJalousie jalousie = (LxControlJalousie) control;
- if (command instanceof PercentType) {
- jalousie.moveToPosition(((PercentType) command).doubleValue() / 100);
- } else if (command instanceof UpDownType) {
- if ((UpDownType) command == UpDownType.UP) {
- jalousie.fullUp();
- } else {
- jalousie.fullDown();
- }
- } else if (command instanceof StopMoveType) {
- if ((StopMoveType) command == StopMoveType.STOP) {
- jalousie.stop();
- }
- }
- return;
- }
-
- if (control instanceof LxControlLightController) {
- LxControlLightController controller = (LxControlLightController) control;
- if (command instanceof OnOffType) {
- if ((OnOffType) command == OnOffType.ON) {
- controller.allOn();
- } else {
- controller.allOff();
- }
- } else if (command instanceof UpDownType) {
- if ((UpDownType) command == UpDownType.UP) {
- controller.nextScene();
- } else {
- controller.previousScene();
- }
- } else if (command instanceof DecimalType) {
- controller.setScene(((DecimalType) command).intValue());
- }
- return;
- }
-
- if (control instanceof LxControlLightControllerV2) {
- LxControlLightControllerV2 controller = (LxControlLightControllerV2) control;
- if (command instanceof UpDownType) {
- if ((UpDownType) command == UpDownType.UP) {
- controller.nextMood();
- } else {
- controller.previousMood();
- }
- } else if (command instanceof DecimalType) {
- controller.setMood(((DecimalType) command).intValue());
- }
- return;
- }
-
- if (control instanceof LxControlRadio) {
- LxControlRadio radio = (LxControlRadio) control;
- if (command instanceof OnOffType) {
- if ((OnOffType) command == OnOffType.OFF) {
- radio.setOutput(0);
- }
- } else if (command instanceof DecimalType) {
- radio.setOutput(((DecimalType) command).intValue());
- }
- return;
- }
- logger.debug("Incompatible operation on control {}", control.getUuid());
- } catch (IOException e) {
- updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, e.getMessage());
- }
- }
-
- @Override
- public void channelLinked(ChannelUID channelUID) {
- logger.debug("Channel linked: {}", channelUID.getAsString());
- LxControl control = getControlFromChannelUID(channelUID);
- if (control != null) {
- updateChannelStates(channelUID, control);
- }
- }
-
- @Override
- public void initialize() {
- logger.trace("Initializing thing");
- LoxoneMiniserverConfig cfg = getConfig().as(LoxoneMiniserverConfig.class);
- try {
- InetAddress ip = InetAddress.getByName(cfg.host);
- server = new LxServer(LxWsSecurityType.getType(cfg.authMethod), ip, cfg.port, cfg.user, cfg.password);
- server.addListener(this);
- server.update(cfg.firstConDelay, cfg.keepAlivePeriod, cfg.connectErrDelay, cfg.responseTimeout,
- cfg.userErrorDelay, cfg.comErrorDelay, cfg.maxBinMsgSize, cfg.maxTextMsgSize);
- server.start();
- } catch (UnknownHostException e) {
- updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, "Unknown host");
- }
- }
-
- @Override
- public void onNewConfig(LxServer server) {
- logger.trace("Processing new configuration");
- Thing thing = getThing();
- thing.setProperty(MINISERVER_PROPERTY_MINISERVER_NAME, server.getMiniserverName());
- thing.setProperty(MINISERVER_PROPERTY_PROJECT_NAME, server.getProjectName());
- thing.setProperty(MINISERVER_PROPERTY_CLOUD_ADDRESS, server.getCloudAddress());
- thing.setProperty(MINISERVER_PROPERTY_PHYSICAL_LOCATION, server.getLocation());
- thing.setProperty(Thing.PROPERTY_FIRMWARE_VERSION, server.getSwVersion());
- thing.setProperty(Thing.PROPERTY_SERIAL_NUMBER, server.getSerial());
- thing.setProperty(Thing.PROPERTY_MAC_ADDRESS, server.getMacAddress());
-
- ArrayList channels = new ArrayList<>();
- ThingBuilder builder = editThing();
- controls.clear();
- dynamicStateDescriptionProvider.removeAllDescriptions();
-
- logger.trace("Building new channels ({} controls)", server.getControls().size());
- for (LxControl control : server.getControls().values()) {
- List newChannels = createChannelsForControl(control);
- if (newChannels != null) {
- channels.addAll(newChannels);
- for (Channel channel : newChannels) {
- ChannelUID id = channel.getUID();
- controls.put(id, control);
- }
- }
- }
-
- logger.trace("Sorting channels");
- channels.sort(new Comparator() {
- @Override
- public int compare(Channel c1, Channel c2) {
- String label = c1.getLabel();
- if (label == null) {
- return 1;
- }
- return label.compareTo(c2.getLabel());
- }
- });
-
- logger.trace("Updating thing");
- builder.withChannels(channels);
- updateThing(builder.build());
- }
-
- @Override
- public void onControlStateUpdate(LxControl control, String stateName) {
- ChannelUID channelId = getChannelIdForControl(control, 0);
-
- if (control instanceof LxControlLightController
- && LxControlLightController.STATE_SCENE_LIST.equals(stateName)) {
- LxControlLightController controller = (LxControlLightController) control;
- setStateDescription(channelId, null, false, controller.getSceneNames(), BigDecimal.ZERO,
- new BigDecimal((LxControlLightController.NUM_OF_SCENES - 1)));
- return;
- } else if (control instanceof LxControlLightControllerV2) {
- LxControlLightControllerV2 controller = (LxControlLightControllerV2) control;
-
- if (LxControlLightControllerV2.STATE_MOODS_LIST.equals(stateName)) {
- // A new list of moods arrived as state update - we update dynamic state description for the channel
- // that represents single mood selection and we create new channels per mood and remove any obsolete
- // mood channels for this controller
- Map moods = controller.getMoods();
- if (moods == null) {
- logger.debug("Moods list state was received, but mood list is null.");
- return;
- }
-
- // convert all moods to options list for state description
- List optionsList = moods.values().stream()
- .map(mood -> new StateOption(mood.getId().toString(), mood.getName()))
- .collect(Collectors.toList());
-
- // for all moods but 'all off' mood create and store channels
- Map newChannels = new HashMap<>();
- moods.values().stream().filter(mood -> !mood.isAllOffMood()).forEach(
- mood -> createChannelsForControl(mood).forEach(channel -> newChannels.put(channel, mood)));
-
- dynamicStateDescriptionProvider.setDescription(channelId,
- new StateDescription(new BigDecimal(controller.getMinMoodId()),
- new BigDecimal(controller.getMaxMoodId()), BigDecimal.ONE, null, false, optionsList));
-
- // collect all moods that currently belong to this controller
- List toRemove = new ArrayList<>();
- controls.forEach((k, v) -> {
- if (v instanceof LxControlMood
- && controller.getUuid().equals(((LxControlMood) v).getControllerUuid())
- && !newChannels.containsKey(k)) {
- toRemove.add(k);
- }
- });
-
- // remove the collected mood channels from the thing and controls
- ThingBuilder builder = editThing();
- toRemove.forEach(k -> {
- builder.withoutChannel(k);
- controls.remove(k);
- });
-
- // add channels for the new moods
- newChannels.forEach((k, v) -> {
- builder.withChannel(k);
- controls.put(k.getUID(), v);
- });
-
- updateThing(builder.build());
- return;
- }
- }
- // for all state updates not handled above just update the channel state the regular way
- updateChannelStates(channelId, control);
- }
-
- @Override
- public void onServerGoesOnline() {
- logger.debug("Server goes online.");
- updateStatus(ThingStatus.ONLINE);
- }
-
- @Override
- public void onServerGoesOffline(LxOfflineReason reason, String details) {
- logger.debug("Server goes offline: {}, {}", reason, details);
-
- switch (reason) {
- case AUTHENTICATION_TIMEOUT:
- updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, "User authentication timeout");
- break;
- case COMMUNICATION_ERROR:
- String text = "Error communicating with Miniserver";
- if (details != null) {
- text += " (" + details + ")";
- }
- updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, text);
- break;
- case INTERNAL_ERROR:
- updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR,
- details != null ? "Internal error (" + details + ")" : "Internal error");
- break;
- case TOO_MANY_FAILED_LOGIN_ATTEMPTS:
- updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR,
- "Too many failed login attempts - stopped trying");
- break;
- case UNAUTHORIZED:
- updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR,
- details != null ? details : "User authentication error (invalid user name or password)");
- break;
- case IDLE_TIMEOUT:
- logger.warn("Idle timeout from Loxone Miniserver - adjust keepalive settings");
- updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, "Timeout due to no activity");
- break;
- default:
- updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, "Unknown reason");
- break;
- }
- }
-
- @Override
- public void dispose() {
- logger.debug("Disposing of server");
- dynamicStateDescriptionProvider.removeAllDescriptions();
- if (server != null) {
- server.stop();
- server = null;
- }
- }
-
- @Override
- public Object getSetting(String name) {
- return getConfig().get(name);
- }
-
- @Override
- public void setSettings(Map properties) {
- Configuration config = getConfig();
- properties.forEach((name, value) -> config.put(name, value));
- updateConfiguration(config);
- }
-
- /**
- * Create and add a new channel to the channels list.
- *
- * @param channels
- * list of channels to add the channel to
- * @param itemType
- * item type for the channel
- * @param typeId
- * channel type ID for the channel
- * @param channelId
- * channel ID
- * @param channelLabel
- * channel label
- * @param channelDescription
- * channel description
- * @param tags
- * tags for the channel or null if no tags needed
- * @return
- * true if channel was created and added to the list
- */
- private boolean addChannel(List channels, String itemType, ChannelTypeUID typeId, ChannelUID channelId,
- String channelLabel, String channelDescription, Set tags) {
- if (channels != null && channelId != null && itemType != null && typeId != null && channelDescription != null) {
- ChannelBuilder builder = ChannelBuilder.create(channelId, itemType).withType(typeId).withLabel(channelLabel)
- .withDescription(channelDescription + " : " + channelLabel);
- if (tags != null) {
- builder.withDefaultTags(tags);
- }
- Channel newChannel = builder.build();
- channels.add(newChannel);
- return true;
- }
- return false;
- }
-
- /**
- * Creates a new list of {@link Channel} for a single Loxone control object. Registers channel type within the
- * factory, which is the channel type provider, or uses one of pre-registered type.
- * Most of controls create only one channel, but some of them will create more channels to facilitate different
- * types of states they support.
- *
- * @param control
- * control object to create a channel for
- * @return
- * created list of {@link Channel} object
- */
- private List createChannelsForControl(LxControl control) {
- logger.trace("Creating channels for control: {}, {}", control.getClass().getSimpleName(), control.getUuid());
-
- String label;
- ChannelUID id = getChannelIdForControl(control, 0);
-
- List channels = new ArrayList<>();
-
- LxContainer room = control.getRoom();
- String roomName = room != null ? room.getName() : null;
-
- String controlName = control.getName();
- if (controlName == null) {
- // Each control on a Miniserver must have a name defined, but in case this is a subject
- // of some malicious data attack, we'll prevent null pointer exception
- controlName = "Undefined name";
- }
-
- if (control instanceof LxControlMood) {
- controlName = "Mood / " + controlName;
- }
- if (roomName != null) {
- label = roomName + " / " + controlName;
- } else {
- label = controlName;
- }
-
- Set tags = new HashSet<>();
- addChannelTags(tags, control);
-
- // LxControlSwitch covers LxControlPushbutton, LxControlMood and LxControlTimedSwitch as child classes
- if (control instanceof LxControlSwitch) {
- String description;
- if (control instanceof LxControlTimedSwitch) {
- description = "Timed switch";
- // adding a deactivation delay channel for timed switch, don't tag it
- ChannelUID deactivationDelayChannelId = getChannelIdForControl(control, 1);
- addChannel(channels, "Number", roTimedSwitchDeactivationDelayTypeId, deactivationDelayChannelId,
- label + " / Deactivation Delay", "Deactivation Delay", null);
- } else if (control instanceof LxControlPushbutton) {
- // this must be compared after LxControlTimedSwitch (pusbutton is parent class)
- description = "Pushbutton";
- } else if (control instanceof LxControlMood) {
- description = "Mood mixer";
- } else {
- description = "Switch";
- }
- addChannel(channels, "Switch", switchTypeId, id, label, description, tags);
- } else if (control instanceof LxControlJalousie) {
- addChannel(channels, "Rollershutter", rollershutterTypeId, id, label, "Rollershutter", tags);
- } else if (control instanceof LxControlInfoOnlyDigital) {
- addChannel(channels, "Switch", roSwitchTypeId, id, label, "Digital virtual state", tags);
- } else if (control instanceof LxControlInfoOnlyAnalog) {
- // add both channel and state description (all needed configuration is available)
- if (addChannel(channels, "Number", roAnalogTypeId, id, label, "Analog virtual state", tags)) {
- setStateDescription(id, ((LxControlInfoOnlyAnalog) control).getFormatString(), true, null, null, null);
- }
- } else if (control instanceof LxControlLightController) {
- // add only channel, state description will be added later when a control state update message is received
- addChannel(channels, "Number", lightCtrlTypeId, id, label, "Light controller", tags);
- } else if (control instanceof LxControlLightControllerV2) {
- // add only channel, state description will be added later when a control state update message is received
- addChannel(channels, "Number", lightCtrlTypeId, id, label, "Light controller V2", tags);
- } else if (control instanceof LxControlRadio) {
- // add both channel and state description (all needed configuration is available)
- if (addChannel(channels, "Number", radioButtonTypeId, id, label, "Radio button", tags)) {
- setStateDescription(id, null, false, ((LxControlRadio) control).getOutputs(), BigDecimal.ZERO,
- new BigDecimal(LxControlRadio.MAX_RADIO_OUTPUTS));
- }
- } else if (control instanceof LxControlTextState) {
- addChannel(channels, "String", roTextTypeId, id, label, "Text state", tags);
- } else if (control instanceof LxControlDimmer) {
- addChannel(channels, "Dimmer", dimmerTypeId, id, label, "Dimmer", tags);
- }
- return channels;
- }
-
- /**
- * Add tags that can be used by homekit transport and Alexa openHAB skill
- *
- * @param tags
- * collection to add tags to
- * @param control
- * control object for which the tags are to be identified
- */
- private void addChannelTags(Set tags, LxControl control) {
- if (control instanceof LxControlSwitch) {
- // All switches that belong to the lights category can be turned on or off by voice
- LxCategory category = control.getCategory();
- if (category != null && category.getType() == LxCategory.CategoryType.LIGHTS) {
- tags.add("Lighting");
- }
- }
- }
-
- /**
- * Update thing's states for all channels associated with the control
- *
- * @param channelId
- * first channel for the control
- * @param control
- * control to update states for
- */
- private void updateChannelStates(ChannelUID channelId, LxControl control) {
- if (control instanceof LxControlSwitch) {
- Double value = ((LxControlSwitch) control).getState();
- if (value != null) {
- if (value == 1.0) {
- updateState(channelId, OnOffType.ON);
- } else if (value == 0) {
- updateState(channelId, OnOffType.OFF);
- }
- }
- // timed switch is a child class of a switch
- if (control instanceof LxControlTimedSwitch) {
- // getting second channel for this control and update the state
- LxControlTimedSwitch timedSwitch = (LxControlTimedSwitch) control;
- Double deactivationValue = timedSwitch.getDeactivationDelay();
- if (deactivationValue != null) {
- updateState(getChannelIdForControl(timedSwitch, 1), new DecimalType(deactivationValue));
- }
- }
- } else if (control instanceof LxControlJalousie) {
- Double value = ((LxControlJalousie) control).getPosition();
- if (value != null && value >= 0 && value <= 1) {
- // state UP or DOWN from Loxone indicates blinds are moving up or down
- // state UP in openHAB means blinds are fully up (0%) and DOWN means fully down (100%)
- // so we will update only position and not up or down states
- updateState(channelId, new PercentType((int) (value * 100)));
- }
- } else if (control instanceof LxControlDimmer) {
- Double value = ((LxControlDimmer) control).getPosition();
- if (value != null && value >= 0 && value <= 100) {
- updateState(channelId, new PercentType(value.intValue()));
- }
- } else if (control instanceof LxControlInfoOnlyDigital) {
- Double value = ((LxControlInfoOnlyDigital) control).getValue();
- if (value != null) {
- if (value == 0) {
- updateState(channelId, OnOffType.OFF);
- } else if (value == 1.0) {
- updateState(channelId, OnOffType.ON);
- }
- }
- } else if (control instanceof LxControlInfoOnlyAnalog) {
- Double value = ((LxControlInfoOnlyAnalog) control).getValue();
- if (value != null) {
- updateState(channelId, new DecimalType(value));
- }
- } else if (control instanceof LxControlLightController) {
- LxControlLightController controller = (LxControlLightController) control;
- Integer value = controller.getCurrentScene();
- if (value != null && value >= 0 && value < LxControlLightController.NUM_OF_SCENES) {
- updateState(channelId, new DecimalType(value));
- }
- } else if (control instanceof LxControlLightControllerV2) {
- LxControlLightControllerV2 controller = (LxControlLightControllerV2) control;
- List activeMoods = controller.getActiveMoods();
- // update the single mood channel state
- if (activeMoods.size() == 1) {
- updateState(channelId, new DecimalType(activeMoods.get(0)));
- } else {
- updateState(channelId, UnDefType.UNDEF);
- }
- // update the individual mood mixing channels
- Map allMoods = controller.getMoods();
- allMoods.values().forEach(v -> {
- // we update moods like all other switches with no special dedicated code
- updateChannelStates(getChannelIdForControl(v, 0), v);
- });
- } else if (control instanceof LxControlRadio) {
- LxControlRadio radio = (LxControlRadio) control;
- Integer output = radio.getActiveOutput();
- if (output != null && output >= 0 && output <= LxControlRadio.MAX_RADIO_OUTPUTS) {
- updateState(channelId, new DecimalType(output));
- }
- } else if (control instanceof LxControlTextState) {
- LxControlTextState state = (LxControlTextState) control;
- String value = state.getText();
- if (value != null) {
- updateState(channelId, new StringType(value));
- }
- }
- }
-
- /**
- * Sets a new {@link StateDescription} for a channel that has multiple options to select from or a custom format
- * string. A previous description, if existed, will be replaced.
- *
- * @param channelUID
- * channel UID
- * @param format
- * format string to present the value
- * @param readOnly
- * true if this control does not accept commands
- * @param options
- * collection of options, where key is option ID (number in reality) and value is option name
- * @param minimum
- * minimum value an option ID can have
- * @param maximum
- * maximum value an option ID can have
- */
- private void setStateDescription(ChannelUID channelUID, String format, boolean readOnly,
- Map options, BigDecimal minimum, BigDecimal maximum) {
- if (channelUID != null) {
- List optionsList = null;
- if (options != null) {
- optionsList = options.entrySet().stream().map(e -> new StateOption(e.getKey(), e.getValue()))
- .collect(Collectors.toList());
- }
- dynamicStateDescriptionProvider.setDescription(channelUID,
- new StateDescription(minimum, maximum, BigDecimal.ONE, format, readOnly, optionsList));
- }
- }
-
- /**
- * Based on channel ID, return corresponding {@link LxControl} object
- *
- * @param channelUID
- * channel ID of the control to find
- * @return
- * control corresponding to the channel ID or null if not found
- */
- private LxControl getControlFromChannelUID(ChannelUID channelUID) {
- return controls.get(channelUID);
- }
-
- /**
- * Build channel ID for a control, based on control's UUID, thing's UUID and index of the channel for the control
- *
- * @param control
- * control to build the channel ID for
- * @param index
- * index of a channel within control (0 for primary channel)
- * all indexes greater than 0 will have -index added to the channel ID
- * @return
- * channel ID for the control and index
- */
- private ChannelUID getChannelIdForControl(LxControl control, int index) {
- String controlId = control.getUuid().toString();
- if (index > 0) {
- controlId += "-" + index;
- }
- return new ChannelUID(getThing().getUID(), controlId);
- }
-}
diff --git a/addons/binding/org.openhab.binding.modbus.test/.classpath b/addons/binding/org.openhab.binding.modbus.test/.classpath
deleted file mode 100644
index ee295c1a0e79b..0000000000000
--- a/addons/binding/org.openhab.binding.modbus.test/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.modbus.test/.project b/addons/binding/org.openhab.binding.modbus.test/.project
deleted file mode 100644
index 9f690616bfa60..0000000000000
--- a/addons/binding/org.openhab.binding.modbus.test/.project
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
- org.openhab.binding.modbus.test
-
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- org.eclipse.pde.ManifestBuilder
-
-
-
-
- org.eclipse.pde.SchemaBuilder
-
-
-
-
- org.eclipse.pde.ds.core.builder
-
-
-
-
-
- org.eclipse.pde.PluginNature
- org.eclipse.jdt.core.javanature
-
-
diff --git a/addons/binding/org.openhab.binding.modbus.test/META-INF/MANIFEST.MF b/addons/binding/org.openhab.binding.modbus.test/META-INF/MANIFEST.MF
deleted file mode 100644
index 48e0ebbce50b1..0000000000000
--- a/addons/binding/org.openhab.binding.modbus.test/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,40 +0,0 @@
-Manifest-Version: 1.0
-Automatic-Module-Name: org.openhab.binding.modbus.test
-Bundle-ManifestVersion: 2
-Bundle-Name: Modbus Binding Tests
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Bundle-SymbolicName: org.openhab.binding.modbus.test;singleton:=true
-Bundle-Vendor: openHAB
-Bundle-Version: 2.5.0.qualifier
-Fragment-Host: org.openhab.binding.modbus
-Require-Bundle: org.hamcrest
-Import-Package:
- net.bytebuddy.dynamic.loading,
- org.eclipse.jdt.annotation;resolution:=optional,
- org.eclipse.smarthome.config.core,
- org.eclipse.smarthome.core.common.registry,
- org.eclipse.smarthome.core.events,
- org.eclipse.smarthome.core.items,
- org.eclipse.smarthome.core.library.items,
- org.eclipse.smarthome.core.storage,
- org.eclipse.smarthome.core.thing,
- org.eclipse.smarthome.core.thing.binding,
- org.eclipse.smarthome.core.thing.binding.builder,
- org.eclipse.smarthome.core.thing.link,
- org.eclipse.smarthome.core.thing.util,
- org.eclipse.smarthome.test.java,
- org.eclipse.smarthome.test.storage,
- org.hamcrest;core=split,
- org.junit;version="4.0.0",
- org.junit.runner;version="4.0.0",
- org.mockito,
- org.mockito.hamcrest,
- org.mockito.invocation,
- org.mockito.junit,
- org.mockito.stubbing,
- org.objenesis,
- org.openhab.io.transport.modbus,
- org.osgi.framework,
- org.osgi.service.component,
- org.osgi.service.device,
- org.slf4j
diff --git a/addons/binding/org.openhab.binding.modbus.test/build.properties b/addons/binding/org.openhab.binding.modbus.test/build.properties
deleted file mode 100644
index 64491e243ba70..0000000000000
--- a/addons/binding/org.openhab.binding.modbus.test/build.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-source.. = src/test/java/
-output.. = target/test-classes
-bin.includes = META-INF/,\
- .,\
- NOTICE
diff --git a/addons/binding/org.openhab.binding.modbus.test/org.openhab.binding.modbus.test.launch b/addons/binding/org.openhab.binding.modbus.test/org.openhab.binding.modbus.test.launch
deleted file mode 100644
index a3e7ddff88129..0000000000000
--- a/addons/binding/org.openhab.binding.modbus.test/org.openhab.binding.modbus.test.launch
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.modbus.test/pom.xml b/addons/binding/org.openhab.binding.modbus.test/pom.xml
deleted file mode 100644
index 853b9e7b4c37c..0000000000000
--- a/addons/binding/org.openhab.binding.modbus.test/pom.xml
+++ /dev/null
@@ -1,129 +0,0 @@
-
-
- 4.0.0
-
-
- pom
- org.openhab.binding
- 2.5.0-SNAPSHOT
-
-
- org.openhab.binding.modbus.test
- eclipse-test-plugin
-
- Modbus Binding Tests
-
-
-
- org.openhab.io
- org.openhab.io.transport.modbus
- ${project.version}
-
-
-
-
-
-
- ${tycho-groupid}
- target-platform-configuration
-
-
-
-
- eclipse-plugin
- org.eclipse.equinox.event
- 0.0.0
-
-
- eclipse-plugin
- org.eclipse.equinox.ds
- 0.0.0
-
-
- eclipse-plugin
- org.eclipse.smarthome.config.xml
- 0.0.0
-
-
- eclipse-plugin
- org.eclipse.smarthome.core.thing.xml
- 0.0.0
-
-
- eclipse-plugin
- org.eclipse.smarthome.core.binding.xml
- 0.0.0
-
-
-
-
-
-
- ${tycho-groupid}
- tycho-surefire-plugin
-
-
-
- eclipse-plugin
- org.eclipse.equinox.ds
- 0.0.0
-
-
- eclipse-plugin
- ch.qos.logback.classic
- 0.0.0
-
-
- eclipse-plugin
- ch.qos.logback.core
- 0.0.0
-
-
- eclipse-plugin
- ch.qos.logback.slf4j
- 0.0.0
-
-
-
-
- org.eclipse.equinox.ds
- 1
- true
-
-
- org.eclipse.equinox.event
- 2
- true
-
-
- org.eclipse.smarthome.core
- 4
- true
-
-
- org.eclipse.smarthome.core.thing
- 4
- true
-
-
- org.eclipse.smarthome.config.xml
- 4
- true
-
-
- org.eclipse.smarthome.core.thing.xml
- 4
- true
-
-
- org.eclipse.smarthome.core.binding.xml
- 4
- true
-
-
-
-
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.modbus/.classpath b/addons/binding/org.openhab.binding.modbus/.classpath
deleted file mode 100644
index 04f0184a01454..0000000000000
--- a/addons/binding/org.openhab.binding.modbus/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.modbus/.project b/addons/binding/org.openhab.binding.modbus/.project
deleted file mode 100644
index b3562dba628bc..0000000000000
--- a/addons/binding/org.openhab.binding.modbus/.project
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
- org.openhab.binding.modbus
-
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- org.eclipse.pde.ManifestBuilder
-
-
-
-
- org.eclipse.pde.SchemaBuilder
-
-
-
-
- org.eclipse.pde.ds.core.builder
-
-
-
-
-
- org.eclipse.pde.PluginNature
- org.eclipse.jdt.core.javanature
-
-
diff --git a/addons/binding/org.openhab.binding.modbus/META-INF/MANIFEST.MF b/addons/binding/org.openhab.binding.modbus/META-INF/MANIFEST.MF
deleted file mode 100644
index fbb7dc32a5686..0000000000000
--- a/addons/binding/org.openhab.binding.modbus/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,34 +0,0 @@
-Manifest-Version: 1.0
-Automatic-Module-Name: org.openhab.binding.modbus
-Bundle-ManifestVersion: 2
-Bundle-Name: Modbus Binding
-Bundle-SymbolicName: org.openhab.binding.modbus;singleton:=true
-Bundle-Vendor: openHAB
-Bundle-Version: 2.5.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Bundle-ClassPath: .
-Import-Package: org.apache.commons.lang,
- org.apache.commons.lang.builder,
- org.eclipse.jdt.annotation;resolution:=optional,
- org.eclipse.smarthome.config.core,
- org.eclipse.smarthome.config.discovery,
- org.eclipse.smarthome.core.common.registry,
- org.eclipse.smarthome.core.library.items,
- org.eclipse.smarthome.core.library.types,
- org.eclipse.smarthome.core.thing,
- org.eclipse.smarthome.core.thing.binding,
- org.eclipse.smarthome.core.transform,
- org.eclipse.smarthome.core.types,
- org.openhab.binding.modbus,
- org.openhab.binding.modbus.handler,
- org.openhab.binding.modbus.discovery,
- org.openhab.io.transport.modbus,
- org.openhab.io.transport.modbus.endpoint,
- org.openhab.io.transport.modbus.json,
- org.osgi.framework,
- org.slf4j
-Service-Component: OSGI-INF/*.xml
-Export-Package: org.openhab.binding.modbus,
- org.openhab.binding.modbus.handler,
- org.openhab.binding.modbus.discovery
-Bundle-ActivationPolicy: lazy
diff --git a/addons/binding/org.openhab.binding.modbus/OSGI-INF/.gitignore b/addons/binding/org.openhab.binding.modbus/OSGI-INF/.gitignore
deleted file mode 100644
index b878e882aca37..0000000000000
--- a/addons/binding/org.openhab.binding.modbus/OSGI-INF/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/*.xml
diff --git a/addons/binding/org.openhab.binding.modbus/build.properties b/addons/binding/org.openhab.binding.modbus/build.properties
deleted file mode 100644
index 0f6636e9de4f6..0000000000000
--- a/addons/binding/org.openhab.binding.modbus/build.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-source.. = src/main/java/
-output.. = target/classes
-bin.includes = META-INF/,\
- .,\
- OSGI-INF/,\
- ESH-INF/,\
- NOTICE
diff --git a/addons/binding/org.openhab.binding.modbus/pom.xml b/addons/binding/org.openhab.binding.modbus/pom.xml
deleted file mode 100644
index 30dd89a08d324..0000000000000
--- a/addons/binding/org.openhab.binding.modbus/pom.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
- 4.0.0
-
-
- org.openhab.binding
- pom
- 2.5.0-SNAPSHOT
-
-
- org.openhab.binding.modbus
-
- Modbus Binding
- eclipse-plugin
-
-
-
- org.openhab.io
- org.openhab.io.transport.modbus
- ${project.version}
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.nikohomecontrol/.classpath b/addons/binding/org.openhab.binding.nikohomecontrol/.classpath
deleted file mode 100644
index 7f457fa4138d1..0000000000000
--- a/addons/binding/org.openhab.binding.nikohomecontrol/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/addons/binding/org.openhab.binding.nikohomecontrol/.project b/addons/binding/org.openhab.binding.nikohomecontrol/.project
deleted file mode 100644
index acbd84740ae80..0000000000000
--- a/addons/binding/org.openhab.binding.nikohomecontrol/.project
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
- org.openhab.binding.nikohomecontrol
-
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- org.eclipse.pde.ManifestBuilder
-
-
-
-
- org.eclipse.pde.SchemaBuilder
-
-
-
-
- org.eclipse.pde.ds.core.builder
-
-
-
-
-
- org.eclipse.pde.PluginNature
- org.eclipse.jdt.core.javanature
-
-
diff --git a/addons/binding/org.openhab.binding.nikohomecontrol/ESH-INF/binding/binding.xml b/addons/binding/org.openhab.binding.nikohomecontrol/ESH-INF/binding/binding.xml
deleted file mode 100644
index a38ac98abe57f..0000000000000
--- a/addons/binding/org.openhab.binding.nikohomecontrol/ESH-INF/binding/binding.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
- Niko Home Control Binding
- This is the binding for the Niko Home Control system
- Mark Herwege
-
-
diff --git a/addons/binding/org.openhab.binding.nikohomecontrol/ESH-INF/thing/thing-types.xml b/addons/binding/org.openhab.binding.nikohomecontrol/ESH-INF/thing/thing-types.xml
deleted file mode 100644
index 2e645e8b84f9b..0000000000000
--- a/addons/binding/org.openhab.binding.nikohomecontrol/ESH-INF/thing/thing-types.xml
+++ /dev/null
@@ -1,196 +0,0 @@
-
-
-
-
-
- This bridge represents a Niko Home Control IP-interface
-
-
-
-
-
-
-
- IP Address of Niko Home Control IP-interface
- false
- network-address
-
-
-
- Port to communicate with Niko Home Control IP-interface, default 8000
- 8000
- true
-
-
-
- Refresh interval for connection with Niko Home Control IP-interface (min), default 300. If set to 0 or left empty, no refresh will be scheduled
- 300
- true
-
-
-
-
-
-
-
-
-
- On/Off type action in Niko Home Control
-
-
-
-
-
-
- Niko Home Control IP Interface Action Object ID
- false
-
-
-
-
-
-
-
-
- Dimmer type actions in Niko Home Control
-
-
-
-
-
-
- Niko Home Control IP Interface Action Object ID
- false
-
-
-
- Step value used for increase/decrease of dimmer brightness, default 10%
- 10
- true
-
-
-
-
-
-
-
-
- Rollershutter type actions in Niko Home Control
-
-
-
-
-
-
- Niko Home Control IP Interface Action Object ID
- false
-
-
-
-
-
-
-
-
- Thermostat in the Niko Home Control system
-
-
-
-
-
-
-
-
-
- Niko Home Control IP Interface Thermostat Object ID
- false
-
-
-
- Default overrule duration in minutes when an overrule temperature is set without providing overrule time, 60 minutes by default
- 60
- true
-
-
-
-
-
- Switch
-
- Switch control for action in Niko Home Control
- Switch
-
-
- Dimmer
-
- Brightness control for dimmer action in Niko Home Control
- DimmableLight
-
-
- Rollershutter
-
- Rollershutter control for rollershutter action in Niko Home Control
- Blinds
-
-
-
- Number:Temperature
-
- Temperature measured by thermostat
- Temperature
-
- CurrentTemperature
-
-
-
-
- Number:Temperature
-
- Setpoint temperature of thermostat
- Temperature
-
- TargetTemperature
-
-
-
-
- Number
-
- Time duration for overruling thermostat target temperature in min.
- Number
-
-
-
- Number
-
- Thermostat mode
- Number
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- trigger
-
- Alarm from Niko Home Control
-
-
- trigger
-
- Notice from Niko Home Control
-
-
-
diff --git a/addons/binding/org.openhab.binding.nikohomecontrol/META-INF/MANIFEST.MF b/addons/binding/org.openhab.binding.nikohomecontrol/META-INF/MANIFEST.MF
deleted file mode 100644
index a47d3aaa156f5..0000000000000
--- a/addons/binding/org.openhab.binding.nikohomecontrol/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,26 +0,0 @@
-Manifest-Version: 1.0
-Automatic-Module-Name: org.openhab.binding.nikohomecontrol
-Bundle-ActivationPolicy: lazy
-Bundle-ClassPath: .
-Bundle-ManifestVersion: 2
-Bundle-Name: Niko Home Control Binding
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Bundle-SymbolicName: org.openhab.binding.nikohomecontrol;singleton:=true
-Bundle-Vendor: openHAB
-Bundle-Version: 2.5.0.qualifier
-Import-Package:
- com.google.gson,
- com.google.gson.stream,
- javax.measure.quantity,
- org.eclipse.jdt.annotation;resolution:=optional,
- org.eclipse.smarthome.config.core,
- org.eclipse.smarthome.config.discovery,
- org.eclipse.smarthome.core.library.types,
- org.eclipse.smarthome.core.library.unit,
- org.eclipse.smarthome.core.net,
- org.eclipse.smarthome.core.thing,
- org.eclipse.smarthome.core.thing.binding,
- org.eclipse.smarthome.core.types,
- org.osgi.framework,
- org.slf4j
-Service-Component: OSGI-INF/*.xml
diff --git a/addons/binding/org.openhab.binding.nikohomecontrol/OSGI-INF/.gitignore b/addons/binding/org.openhab.binding.nikohomecontrol/OSGI-INF/.gitignore
deleted file mode 100644
index b878e882aca37..0000000000000
--- a/addons/binding/org.openhab.binding.nikohomecontrol/OSGI-INF/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/*.xml
diff --git a/addons/binding/org.openhab.binding.nikohomecontrol/README.md b/addons/binding/org.openhab.binding.nikohomecontrol/README.md
deleted file mode 100644
index 19dbda4e1f830..0000000000000
--- a/addons/binding/org.openhab.binding.nikohomecontrol/README.md
+++ /dev/null
@@ -1,217 +0,0 @@
-# Niko Home Control Binding
-
-The Niko Home Control binding integrates with a [Niko Home Control](http://www.nikohomecontrol.be/) system through a Niko Home Control IP-interface.
-
-The binding has been tested with a Niko Home Control IP-interface (550-00508). This IP-interface provides access on the LAN.
-The binding does not require a Niko Home Control Gateway (550-00580), but does work with it in the LAN. It will not make a remote connection.
-It has also been confirmed to work with the Niko Home Control Connected Controller (550-00003).
-The binding does not work for Niko Home Control II.
-
-The binding exposes all actions from the Niko Home Control System that can be triggered from the smartphone/tablet interface, as defined in the Niko Home Control programming software.
-
-Supported action types are switches, dimmers and rollershutters or blinds.
-Niko Home Control alarm and notice messages are retrieved and made available in the binding.
-
-## Supported Things
-
-The Niko Home Control Controller is represented as a bridge in the binding.
-Connected to a bridge, the Niko Home Control Binding supports on/off actions (e.g. for lights or groups of lights), dimmers, rollershutters or blinds and thermostats.
-
-## Binding Configuration
-
-The bridge representing the Niko Home Control IP-interface needs to be added first in the things file or through Paper UI.
-A bridge can be auto-discovered or created manually.
-No bridge configuration is required when using auto-discovery. An auto-discovered bridge will have an IP-address parameter automatically filled with the current IP-address of the IP-interface. This IP-address for the discovered bridge will automatically update when the IP-address of the IP-interface changes.
-
-The IP-address and port can be set when manually creating the bridge.
-
-If the IP-address is set on a manually created bridge, no attempt will be made to discover the correct IP-address. You are responsible to force a fixed IP address on the Niko Home Control IP-interface through settings in your DHCP server.
-
-The port is set to 8000 by default and should match the port used by the Niko Home Control IP-interface.
-
-An optional refresh interval will be used to restart the bridge at regular intervals (every 300 minutes by default).
-Restarting the bridge at regular times improves the connection stability and avoids loss of connection. It can be turned off completely.
-
-## Discovery
-
-A discovery scan will first discover the Niko Home Control IP-interface in the network as a bridge.
-Default parameters will be used.
-Note that this may fail to find the correct Niko Home Control IP-interface when there are multiple IP-interfaces in the network, or when traffic to port 10000 on the openHAB server is blocked.
-
-When the Niko Home Control bridge is added as a thing, from the discovery inbox or manually, system information will be read from the Niko Home Control Controller and will be put in the bridge properties, visible through Paper UI.
-
-Subsequently, all defined actions that can be triggered from a smartphone/tablet in the Niko Home Control system will be discovered and put in the inbox.
-It is possible to trigger a manual scan for things on the Niko Home Control bridge.
-
-If the Niko Home Control system has locations configured, these will be copied to thing locations and grouped as such in PaperUI.
-Locations can subsequently be changed through the thing location parameter in PaperUI.
-
-## Thing Configuration
-
-Besides using PaperUI to manually configure things or adding automatically discovered things through PaperUI, you can add thing definitions in the things file.
-
-The Thing configuration for the **bridge** uses the following syntax:
-
-```
-Bridge nikohomecontrol:bridge: [ addr="", port=,
- refresh= ]
-```
-
-`bridgeId` can have any value.
-
-`addr` is the fixed Niko Home Control IP-interface address and is required.
-`port` will be the port used to connect and is 8000 by default.
-`refresh` is the interval to restart the communication in minutes (300 by default), if 0 or omitted the connection will not restart at regular intervals.
-
-The Thing configuration for **Niko Home Control actions** has the following syntax:
-
-```
-Thing nikohomecontrol::: "Label" @ "Location"
- [ actionId=,
- step= ]
-```
-
-or nested in the bridge configuration:
-
-```
- "Label" @ "Location" [ actionId=,
- step= ]
-```
-
-The following action thing types are valid for the configuration:
-
-```
-onOff, dimmer, blind
-```
-
-`thingId` can have any value, but will be set to the same value as the actionId parameter if discovery is used.
-
-`"Label"` is an optional label for the thing.
-
-`@ "Location"` is optional, and represents the location of the Thing. Auto-discovery would have assigned a value automatically.
-
-The `actionId` parameter is the unique ip Interface Object ID (`ipInterfaceObjectId`) as automatically assigned in the Niko Home Control Controller when programming the Niko Home Control system using the Niko Home Control programming software.
-It is not directly visible in the Niko Home Control programming or user software, but will be detected and automatically set by openHAB discovery.
-For textual configuration, you can manually retrieve it from the content of the .nhcp configuration file created by the programming software.
-Open the file with an unzip tool to read it's content.
-
-The `step` parameter is only available for dimmers.
-It sets a step value for dimmer increase/decrease actions. The parameter is optional and set to 10 by default.
-
-The Thing configuration for **Niko Home Control thermostats** has the following syntax:
-
-```
-Thing nikohomecontrol:thermostat:: "Label" @ "Location"
- [ thermostatId= ]
-```
-
-or nested in the bridge configuration:
-
-```
-thermostat "Label" @ "Location" [ thermostatId= ]
-```
-
-`thingId` can have any value, but will be set to the same value as the thermostatId parameter if discovery is used.
-
-`"Label"` is an optional label for the Thing.
-
-`@ "Location"` is optional, and represents the location of the thing. Auto-discovery would have assigned a value automatically.
-
-The `thermostatId` parameter is the unique ip Interface Object ID as automatically assigned in the Niko Home Control Controller when programming the Niko Home Control system using the Niko Home Control programming software.
-It is not directly visible in the Niko Home Control programming or user software, but will be detected and automatically set by openHAB discovery.
-For textual configuration, it can be retrieved from the .nhcp configuration file.
-
-The `overruleTime` parameter is used to set the standard overrule duration when you set a new setpoint without providing an overrule duration. The default value is 60 minutes.
-
-## Channels
-
-For thing type `onOff` the supported channel is `switch`.
-OnOff command types are supported.
-
-For thing type `dimmer` the supported channel is `brightness`.
-OnOff, IncreaseDecrease and Percent command types are supported.
-Note that sending an ON command will switch the dimmer to the value stored when last turning the dimmer off, or 100% depending on the configuration in the Niko Home Control Controller.
-This can be changed with the Niko Home Control programming software.
-
-For thing type `blind` the supported channel is `rollershutter`. UpDown, StopMove and Percent command types are supported.
-
-For thing type `thermostat` the supported channels are `measured`, `mode`, `setpoint` and `overruletime`.
-`measured` gives the current temperature in QuantityType, allowing for different temperature units. This channel is read only.
-`mode` can be set and shows the current thermostat mode. Allowed values are 0 (day), 1 (night), 2 (eco), 3 (off), 4 (coll), 5 (prog 1), 6 (prog 2), 7 (prog 3). If mode is set, the `setpoint` temperature will return to its standard value from the mode.
-`setpoint` can be set and shows the current thermostat setpoint value in QuantityType. When updating `setpoint`, it will overrule the temperature setpoint defined by the thermostat mode for `overruletime` duration.
-`overruletime` is used to set the total duration to apply the setpoint temperature set in the setpoint channel before the thermostat returns to the setting in its mode.
-
-The bridge has two trigger channels `alarm` and `notice`.
-It can be used as a trigger to rules. The event message is the alarm or notice text coming from Niko Home Control.
-
-## Limitations
-
-The binding has been tested with a Niko Home Control IP-interface (550-00508) and the Niko Home Control Connected Controller (550-00003).
-
-The binding has been developed for and tested with Niko Home Control I. It does not work with Niko Home Control II, or with Niko Home Control I installations upgraded to Niko Home Control II.
-
-The action events implemented are limited to onOff, dimmer and rollershutter or blinds.
-Other actions have not been implemented.
-It is not possible to tilt the slats of venetian blinds.
-
-Beyond action and thermostat events, the Niko Home Control communication also supports electricity usage data.
-This has not been implemented.
-
-## Example
-
-.things:
-
-```
-Bridge nikohomecontrol:bridge:nhc1 [ addr="192.168.0.70", port=8000, refresh=300 ] {
- onOff 1 "LivingRoom" @ "Downstairs" [ actionId=1 ]
- dimmer 2 "TVRoom" [ actionId=2, step=5 ]
- blind 3 [ actionId=3 ]
- thermostat 4 [ thermostatId=0 ]
-}
-
-Bridge nikohomecontrol:bridge:nhc2 [ addr="192.168.0.110" ] {
- onOff 11 @ "Upstairs"[ actionId=11 ]
- dimmer 12 [ actionId=12, step=5 ]
- blind 13 [ actionId=13 ]
- thermostat 14 [ thermostatId=10 ]
-}
-```
-
-.items:
-
-```
-Switch LivingRoom {channel="nikohomecontrol:onOff:nhc1:1:switch"} # Switch for onOff type action
-Dimmer TVRoom {channel="nikohomecontrol:dimmer:nhc1:2:brightness"} # Changing brightness dimmer type action
-Rollershutter Kitchen {channel="nikohomecontrol:blind:nhc1:3:rollershutter"} # Controlling rollershutter or blind type action
-Number:Temperature CurTemperature "[%.1f °F]" {channel="nikohomecontrol:thermostat:nhc1:4:measured"} # Getting measured temperature from thermostat in °F, read only
-Number ThermostatMode {channel="nikohomecontrol:thermostat:nhc1:4:mode"} # Get and set thermostat mode
-Number:Temperature SetTemperature "[%.1f °C]" {channel="nikohomecontrol:thermostat:nhc1:4:setpoint"} # Get and set target temperature in °C
-Number OverruleDuration {channel="nikohomecontrol:thermostat:nhc1:4:overruletime} # Get and set the overrule time
-```
-
-.sitemap:
-
-```
-Switch item=LivingRoom
-Slider item=TVRoom
-Switch item=TVRoom # allows switching dimmer item off or on (with controller defined behavior)
-Rollershutter item=Kitchen
-Text item=CurTemperature
-Selection item=ThermostatMode mappings="[0="day", 1="night", 2="eco", 3="off", 4="cool", 5="prog 1", 6="prog 2", 7="prog 3"]
-Setpoint item=SetTemperature minValue=0 maxValue=30
-Slider item=OverruleDuration minValue=0 maxValue=120
-```
-
-Example trigger rule:
-
-```
-rule "example trigger rule"
-when
- Channel 'nikohomecontrol:bridge:nhc1:alarm' triggered or
- Channel 'nikohomecontrol:bridge:nhc1:notice' triggered
-then
- var message = receivedEvent.getEvent()
- logInfo("nhcTriggerExample", "Message: {}", message)
- ...
-end
-```
diff --git a/addons/binding/org.openhab.binding.nikohomecontrol/build.properties b/addons/binding/org.openhab.binding.nikohomecontrol/build.properties
deleted file mode 100644
index 0f6636e9de4f6..0000000000000
--- a/addons/binding/org.openhab.binding.nikohomecontrol/build.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-source.. = src/main/java/
-output.. = target/classes
-bin.includes = META-INF/,\
- .,\
- OSGI-INF/,\
- ESH-INF/,\
- NOTICE
diff --git a/addons/binding/org.openhab.binding.nikohomecontrol/pom.xml b/addons/binding/org.openhab.binding.nikohomecontrol/pom.xml
deleted file mode 100644
index 41e0c53cf5dc9..0000000000000
--- a/addons/binding/org.openhab.binding.nikohomecontrol/pom.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
- 4.0.0
-
-
- org.openhab.binding
- pom
- 2.5.0-SNAPSHOT
-
-
- org.openhab.binding.nikohomecontrol
- eclipse-plugin
-
- Niko Home Control Binding
-
-
diff --git a/addons/binding/org.openhab.binding.nikohomecontrol/src/main/java/org/openhab/binding/nikohomecontrol/internal/NikoHomeControlBindingConstants.java b/addons/binding/org.openhab.binding.nikohomecontrol/src/main/java/org/openhab/binding/nikohomecontrol/internal/NikoHomeControlBindingConstants.java
deleted file mode 100644
index 08597f8d33398..0000000000000
--- a/addons/binding/org.openhab.binding.nikohomecontrol/src/main/java/org/openhab/binding/nikohomecontrol/internal/NikoHomeControlBindingConstants.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.nikohomecontrol.internal;
-
-import java.util.Collections;
-import java.util.Set;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
-
-import org.eclipse.jdt.annotation.NonNullByDefault;
-import org.eclipse.smarthome.core.thing.ThingTypeUID;
-
-/**
- * The {@link NikoHomeControlBindingConstants} class defines common constants, which are
- * used across the whole binding.
- *
- * @author Mark Herwege - Initial Contribution
- */
-@NonNullByDefault
-public class NikoHomeControlBindingConstants {
-
- public static final String BINDING_ID = "nikohomecontrol";
-
- // List of all Thing Type UIDs
-
- // bridge
- public static final ThingTypeUID BRIDGE_THING_TYPE = new ThingTypeUID(BINDING_ID, "bridge");
-
- // generic thing types
- public static final ThingTypeUID THING_TYPE_ON_OFF_LIGHT = new ThingTypeUID(BINDING_ID, "onOff");
- public static final ThingTypeUID THING_TYPE_DIMMABLE_LIGHT = new ThingTypeUID(BINDING_ID, "dimmer");
- public static final ThingTypeUID THING_TYPE_BLIND = new ThingTypeUID(BINDING_ID, "blind");
- public static final ThingTypeUID THING_TYPE_THERMOSTAT = new ThingTypeUID(BINDING_ID, "thermostat");
-
- // thing type sets
- public static final Set BRIDGE_THING_TYPES_UIDS = Collections.singleton(BRIDGE_THING_TYPE);
- public static final Set ACTION_THING_TYPES_UIDS = Collections.unmodifiableSet(Stream
- .of(THING_TYPE_ON_OFF_LIGHT, THING_TYPE_DIMMABLE_LIGHT, THING_TYPE_BLIND).collect(Collectors.toSet()));
- public static final Set SUPPORTED_THING_TYPES_UIDS = Collections.unmodifiableSet(
- Stream.of(THING_TYPE_ON_OFF_LIGHT, THING_TYPE_DIMMABLE_LIGHT, THING_TYPE_BLIND, THING_TYPE_THERMOSTAT)
- .collect(Collectors.toSet()));
-
- // List of all Channel ids
- public static final String CHANNEL_SWITCH = "switch";
- public static final String CHANNEL_BRIGHTNESS = "brightness";
- public static final String CHANNEL_ROLLERSHUTTER = "rollershutter";
-
- public static final String CHANNEL_MEASURED = "measured";
- public static final String CHANNEL_SETPOINT = "setpoint";
- public static final String CHANNEL_OVERRULETIME = "overruletime";
- public static final String CHANNEL_MODE = "mode";
-
- public static final String CHANNEL_ALARM = "alarm";
- public static final String CHANNEL_NOTICE = "notice";
-
- // Bridge config properties
- public static final String CONFIG_HOST_NAME = "addr";
- public static final String CONFIG_PORT = "port";
- public static final String CONFIG_REFRESH = "refresh";
-
- // Thing config properties
- public static final String CONFIG_ACTION_ID = "actionId";
- public static final String CONFIG_STEP_VALUE = "step";
-
- public static final String CONFIG_THERMOSTAT_ID = "thermostatId";
- public static final String CONFIG_OVERRULETIME = "overruleTime";
-}
diff --git a/addons/binding/org.openhab.binding.nikohomecontrol/src/main/java/org/openhab/binding/nikohomecontrol/internal/NikoHomeControlHandlerFactory.java b/addons/binding/org.openhab.binding.nikohomecontrol/src/main/java/org/openhab/binding/nikohomecontrol/internal/NikoHomeControlHandlerFactory.java
deleted file mode 100644
index 16aba76952bbc..0000000000000
--- a/addons/binding/org.openhab.binding.nikohomecontrol/src/main/java/org/openhab/binding/nikohomecontrol/internal/NikoHomeControlHandlerFactory.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.nikohomecontrol.internal;
-
-import static org.openhab.binding.nikohomecontrol.internal.NikoHomeControlBindingConstants.*;
-
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.Map;
-
-import org.eclipse.smarthome.config.discovery.DiscoveryService;
-import org.eclipse.smarthome.core.thing.Bridge;
-import org.eclipse.smarthome.core.thing.Thing;
-import org.eclipse.smarthome.core.thing.ThingTypeUID;
-import org.eclipse.smarthome.core.thing.ThingUID;
-import org.eclipse.smarthome.core.thing.binding.BaseThingHandlerFactory;
-import org.eclipse.smarthome.core.thing.binding.ThingHandler;
-import org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory;
-import org.openhab.binding.nikohomecontrol.internal.discovery.NikoHomeControlDiscoveryService;
-import org.openhab.binding.nikohomecontrol.internal.handler.NikoHomeControlActionHandler;
-import org.openhab.binding.nikohomecontrol.internal.handler.NikoHomeControlBridgeHandler;
-import org.openhab.binding.nikohomecontrol.internal.handler.NikoHomeControlThermostatHandler;
-import org.osgi.framework.ServiceRegistration;
-import org.osgi.service.component.annotations.Component;
-
-/**
- * The {@link NikoHomeControlHandlerFactory} is responsible for creating things and thing
- * handlers.
- *
- * @author Mark Herwege - Initial Contribution
- */
-
-@Component(service = ThingHandlerFactory.class, configurationPid = "binding.nikohomecontrol")
-public class NikoHomeControlHandlerFactory extends BaseThingHandlerFactory {
-
- private Map> discoveryServiceRegs = new HashMap<>();
-
- @Override
- public boolean supportsThingType(ThingTypeUID thingTypeUID) {
- return SUPPORTED_THING_TYPES_UIDS.contains(thingTypeUID) || BRIDGE_THING_TYPES_UIDS.contains(thingTypeUID);
- }
-
- @Override
- protected ThingHandler createHandler(Thing thing) {
- if (BRIDGE_THING_TYPES_UIDS.contains(thing.getThingTypeUID())) {
- NikoHomeControlBridgeHandler handler = new NikoHomeControlBridgeHandler((Bridge) thing);
- registerNikoHomeControlDiscoveryService(handler);
- return handler;
- } else if (THING_TYPE_THERMOSTAT.equals(thing.getThingTypeUID())) {
- return new NikoHomeControlThermostatHandler(thing);
- } else if (ACTION_THING_TYPES_UIDS.contains(thing.getThingTypeUID())) {
- return new NikoHomeControlActionHandler(thing);
- }
-
- return null;
- }
-
- private synchronized void registerNikoHomeControlDiscoveryService(NikoHomeControlBridgeHandler bridgeHandler) {
- NikoHomeControlDiscoveryService nhcDiscoveryService = new NikoHomeControlDiscoveryService(bridgeHandler);
- this.discoveryServiceRegs.put(bridgeHandler.getThing().getUID(), bundleContext.registerService(
- DiscoveryService.class.getName(), nhcDiscoveryService, new Hashtable()));
- nhcDiscoveryService.activate();
- }
-
- @Override
- protected synchronized void removeHandler(ThingHandler thingHandler) {
- if (thingHandler instanceof NikoHomeControlBridgeHandler) {
- ServiceRegistration> serviceReg = this.discoveryServiceRegs.remove(thingHandler.getThing().getUID());
- if (serviceReg != null) {
- // remove discovery service, if bridge handler is removed
- NikoHomeControlDiscoveryService service = (NikoHomeControlDiscoveryService) bundleContext
- .getService(serviceReg.getReference());
- serviceReg.unregister();
- if (service != null) {
- service.deactivate();
- }
- }
- }
- }
-}
diff --git a/addons/binding/org.openhab.binding.nikohomecontrol/src/main/java/org/openhab/binding/nikohomecontrol/internal/discovery/NikoHomeControlDiscoveryService.java b/addons/binding/org.openhab.binding.nikohomecontrol/src/main/java/org/openhab/binding/nikohomecontrol/internal/discovery/NikoHomeControlDiscoveryService.java
deleted file mode 100644
index a9fb2588e8d58..0000000000000
--- a/addons/binding/org.openhab.binding.nikohomecontrol/src/main/java/org/openhab/binding/nikohomecontrol/internal/discovery/NikoHomeControlDiscoveryService.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.nikohomecontrol.internal.discovery;
-
-import static org.openhab.binding.nikohomecontrol.internal.NikoHomeControlBindingConstants.*;
-
-import java.util.Date;
-import java.util.Map;
-
-import org.eclipse.smarthome.config.discovery.AbstractDiscoveryService;
-import org.eclipse.smarthome.config.discovery.DiscoveryResult;
-import org.eclipse.smarthome.config.discovery.DiscoveryResultBuilder;
-import org.eclipse.smarthome.core.thing.ThingUID;
-import org.openhab.binding.nikohomecontrol.internal.NikoHomeControlBindingConstants;
-import org.openhab.binding.nikohomecontrol.internal.handler.NikoHomeControlBridgeHandler;
-import org.openhab.binding.nikohomecontrol.internal.protocol.NhcAction;
-import org.openhab.binding.nikohomecontrol.internal.protocol.NhcThermostat;
-import org.openhab.binding.nikohomecontrol.internal.protocol.NikoHomeControlCommunication;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * If a Niko Home Control bridge is added or if the user scans manually for things this
- * {@link NikoHomeControlDiscoveryService}
- * is used to return Niko Home Control Actions as things to the framework.
- *
- * @author Mark Herwege - Initial Contribution
- */
-public class NikoHomeControlDiscoveryService extends AbstractDiscoveryService {
-
- private final Logger logger = LoggerFactory.getLogger(NikoHomeControlDiscoveryService.class);
-
- private static final int TIMEOUT = 5;
-
- private ThingUID bridgeUID;
- private NikoHomeControlBridgeHandler handler;
-
- public NikoHomeControlDiscoveryService(NikoHomeControlBridgeHandler handler) {
- super(NikoHomeControlBindingConstants.SUPPORTED_THING_TYPES_UIDS, TIMEOUT, false);
- logger.debug("Niko Home Control: discovery service {}", handler);
- this.bridgeUID = handler.getThing().getUID();
- this.handler = handler;
- }
-
- public void activate() {
- this.handler.setNhcDiscovery(this);
- }
-
- @Override
- public void deactivate() {
- removeOlderResults(new Date().getTime());
- this.handler.setNhcDiscovery(null);
- this.handler = null;
- }
-
- /**
- * Discovers devices connected to a Niko Home Control controller
- */
- public void discoverDevices() {
- NikoHomeControlCommunication nhcComm = this.handler.getCommunication();
-
- if ((nhcComm == null) || !nhcComm.communicationActive()) {
- logger.warn("Niko Home Control: not connected.");
- return;
- }
- logger.debug("Niko Home Control: getting devices on {}", this.handler.getThing().getUID().getId());
-
- Map actions = nhcComm.getActions();
-
- for (Map.Entry action : actions.entrySet()) {
-
- int actionId = action.getKey();
- NhcAction nhcAction = action.getValue();
- String thingName = nhcAction.getName();
- String thingLocation = nhcAction.getLocation();
-
- switch (nhcAction.getType()) {
- case 0: // handles all-off
- case 1: // switch
- addActionDevice(new ThingUID(THING_TYPE_ON_OFF_LIGHT, this.handler.getThing().getUID(),
- Integer.toString(actionId)), actionId, thingName, thingLocation);
-
- break;
- case 2: // dimmer
- addActionDevice(new ThingUID(THING_TYPE_DIMMABLE_LIGHT, this.handler.getThing().getUID(),
- Integer.toString(actionId)), actionId, thingName, thingLocation);
- break;
- case 4: // rollershutter
- case 5:
- addActionDevice(new ThingUID(THING_TYPE_BLIND, this.handler.getThing().getUID(),
- Integer.toString(actionId)), actionId, thingName, thingLocation);
- break;
- default:
- logger.debug("Niko Home Control: unrecognized action type {} for {} {}", nhcAction.getType(),
- actionId, thingName);
- }
- }
-
- Map thermostats = nhcComm.getThermostats();
-
- for (Map.Entry thermostatEntry : thermostats.entrySet()) {
-
- int thermostatId = thermostatEntry.getKey();
- NhcThermostat nhcThermostat = thermostatEntry.getValue();
- String thingName = nhcThermostat.getName();
- String thingLocation = nhcThermostat.getLocation();
- addThermostatDevice(new ThingUID(THING_TYPE_THERMOSTAT, this.handler.getThing().getUID(),
- Integer.toString(thermostatId)), thermostatId, thingName, thingLocation);
- }
- }
-
- private void addActionDevice(ThingUID uid, int actionId, String thingName, String thingLocation) {
- DiscoveryResult discoveryResult = DiscoveryResultBuilder.create(uid).withBridge(bridgeUID).withLabel(thingName)
- .withProperty("Location", thingLocation).withProperty(CONFIG_ACTION_ID, actionId).build();
- thingDiscovered(discoveryResult);
- }
-
- private void addThermostatDevice(ThingUID uid, int thermostatId, String thingName, String thingLocation) {
- DiscoveryResult discoveryResult = DiscoveryResultBuilder.create(uid).withBridge(bridgeUID).withLabel(thingName)
- .withProperty("Location", thingLocation).withProperty(CONFIG_THERMOSTAT_ID, thermostatId).build();
- thingDiscovered(discoveryResult);
- }
-
- @Override
- protected void startScan() {
- discoverDevices();
- }
-
- @Override
- protected synchronized void stopScan() {
- super.stopScan();
- removeOlderResults(getTimestampOfLastScan());
- }
-}
diff --git a/addons/binding/org.openhab.binding.nikohomecontrol/src/main/java/org/openhab/binding/nikohomecontrol/internal/handler/NikoHomeControlActionHandler.java b/addons/binding/org.openhab.binding.nikohomecontrol/src/main/java/org/openhab/binding/nikohomecontrol/internal/handler/NikoHomeControlActionHandler.java
deleted file mode 100644
index 11682feff9c84..0000000000000
--- a/addons/binding/org.openhab.binding.nikohomecontrol/src/main/java/org/openhab/binding/nikohomecontrol/internal/handler/NikoHomeControlActionHandler.java
+++ /dev/null
@@ -1,514 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.nikohomecontrol.internal.handler;
-
-import static org.eclipse.smarthome.core.types.RefreshType.REFRESH;
-import static org.openhab.binding.nikohomecontrol.internal.NikoHomeControlBindingConstants.*;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.ScheduledFuture;
-import java.util.concurrent.TimeUnit;
-
-import org.eclipse.jdt.annotation.NonNullByDefault;
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.smarthome.config.core.Configuration;
-import org.eclipse.smarthome.core.library.types.IncreaseDecreaseType;
-import org.eclipse.smarthome.core.library.types.OnOffType;
-import org.eclipse.smarthome.core.library.types.PercentType;
-import org.eclipse.smarthome.core.library.types.StopMoveType;
-import org.eclipse.smarthome.core.library.types.UpDownType;
-import org.eclipse.smarthome.core.thing.Bridge;
-import org.eclipse.smarthome.core.thing.ChannelUID;
-import org.eclipse.smarthome.core.thing.Thing;
-import org.eclipse.smarthome.core.thing.ThingStatus;
-import org.eclipse.smarthome.core.thing.ThingStatusDetail;
-import org.eclipse.smarthome.core.thing.binding.BaseThingHandler;
-import org.eclipse.smarthome.core.types.Command;
-import org.openhab.binding.nikohomecontrol.internal.protocol.NhcAction;
-import org.openhab.binding.nikohomecontrol.internal.protocol.NikoHomeControlCommunication;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * The {@link NikoHomeControlActionHandler} is responsible for handling commands, which are
- * sent to one of the channels.
- *
- * @author Mark Herwege - Initial Contribution
- */
-@NonNullByDefault
-public class NikoHomeControlActionHandler extends BaseThingHandler {
-
- private final Logger logger = LoggerFactory.getLogger(NikoHomeControlActionHandler.class);
-
- // dimmer constants
- static final int NHCON = 254;
- static final int NHCOFF = 255;
-
- // rollershutter constants
- static final int NHCDOWN = 254;
- static final int NHCUP = 255;
- static final int NHCSTOP = 253;
-
- @FunctionalInterface
- private interface Action {
- void execute();
- }
-
- @Nullable
- private volatile Action rollershutterTask;
- @Nullable
- private volatile ScheduledFuture> rollershutterStopTask;
- @Nullable
- private volatile ScheduledFuture> rollershutterMovingFlagTask;
-
- private volatile boolean filterEvent; // flag to filter first event from rollershutter on percent move to
- // avoid wrong position update
- private volatile boolean rollershutterMoving; // flag to indicate if rollershutter is currently moving
- private volatile boolean waitForEvent; // flag to wait for position update rollershutter before doing next
- // move
-
- private volatile int prevActionState;
-
- public NikoHomeControlActionHandler(Thing thing) {
- super(thing);
- }
-
- @Override
- public void handleCommand(ChannelUID channelUID, Command command) {
- Integer actionId = ((Number) this.getConfig().get(CONFIG_ACTION_ID)).intValue();
-
- Bridge nhcBridge = getBridge();
- if (nhcBridge == null) {
- updateStatus(ThingStatus.UNINITIALIZED, ThingStatusDetail.BRIDGE_UNINITIALIZED,
- "Niko Home Control: no bridge initialized when trying to execute action " + actionId);
- return;
- }
- NikoHomeControlBridgeHandler nhcBridgeHandler = (NikoHomeControlBridgeHandler) nhcBridge.getHandler();
- if (nhcBridgeHandler == null) {
- updateStatus(ThingStatus.UNINITIALIZED, ThingStatusDetail.BRIDGE_UNINITIALIZED,
- "Niko Home Control: no bridge initialized when trying to execute action " + actionId);
- return;
- }
- NikoHomeControlCommunication nhcComm = nhcBridgeHandler.getCommunication();
-
- if (nhcComm == null) {
- updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.OFFLINE.CONFIGURATION_ERROR,
- "Niko Home Control: bridge communication not initialized when trying to execute action "
- + actionId);
- return;
- }
-
- NhcAction nhcAction = nhcComm.getActions().get(actionId);
- if (nhcAction == null) {
- updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.OFFLINE.CONFIGURATION_ERROR,
- "Niko Home Control: actionId " + actionId + " does not match an action in the controller");
- return;
- }
-
- if (nhcComm.communicationActive()) {
- handleCommandSelection(nhcAction, channelUID, command);
- } else {
- // We lost connection but the connection object is there, so was correctly started.
- // Try to restart communication.
- // This can be expensive, therefore do it in a job.
- scheduler.submit(() -> {
- nhcComm.restartCommunication();
- // If still not active, take thing offline and return.
- if (!nhcComm.communicationActive()) {
- updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR,
- "Niko Home Control: communication socket error");
- return;
- }
- // Also put the bridge back online
- nhcBridgeHandler.bridgeOnline();
-
- // And finally handle the command
- handleCommandSelection(nhcAction, channelUID, command);
- });
- }
- }
-
- private void handleCommandSelection(NhcAction nhcAction, ChannelUID channelUID, Command command) {
- logger.debug("Niko Home Control: handle command {} for {}", command, channelUID);
-
- if (command == REFRESH) {
- handleStateUpdate(nhcAction);
- return;
- }
-
- switch (channelUID.getId()) {
- case CHANNEL_SWITCH:
- handleSwitchCommand(nhcAction, command);
- updateStatus(ThingStatus.ONLINE);
- break;
-
- case CHANNEL_BRIGHTNESS:
- handleBrightnessCommand(nhcAction, command);
- updateStatus(ThingStatus.ONLINE);
- break;
-
- case CHANNEL_ROLLERSHUTTER:
- handleRollershutterCommand(nhcAction, command);
- updateStatus(ThingStatus.ONLINE);
- break;
-
- default:
- updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR,
- "Niko Home Control: channel unknown " + channelUID.getId());
- }
- }
-
- private void handleSwitchCommand(NhcAction nhcAction, Command command) {
- if (command instanceof OnOffType) {
- OnOffType s = (OnOffType) command;
- if (s == OnOffType.OFF) {
- nhcAction.execute(0);
- } else {
- nhcAction.execute(100);
- }
- }
- }
-
- private void handleBrightnessCommand(NhcAction nhcAction, Command command) {
- if (command instanceof OnOffType) {
- OnOffType s = (OnOffType) command;
- if (s == OnOffType.OFF) {
- nhcAction.execute(NHCOFF);
- } else {
- nhcAction.execute(NHCON);
- }
- } else if (command instanceof IncreaseDecreaseType) {
- IncreaseDecreaseType s = (IncreaseDecreaseType) command;
- int stepValue = ((Number) this.getConfig().get(CONFIG_STEP_VALUE)).intValue();
- int currentValue = nhcAction.getState();
- int newValue;
- if (s == IncreaseDecreaseType.INCREASE) {
- newValue = currentValue + stepValue;
- // round down to step multiple
- newValue = newValue - newValue % stepValue;
- nhcAction.execute(newValue > 100 ? 100 : newValue);
- } else {
- newValue = currentValue - stepValue;
- // round up to step multiple
- newValue = newValue + newValue % stepValue;
- nhcAction.execute(newValue < 0 ? 0 : newValue);
- }
- } else if (command instanceof PercentType) {
- PercentType p = (PercentType) command;
- if (p == PercentType.ZERO) {
- nhcAction.execute(NHCOFF);
- } else {
- nhcAction.execute(p.intValue());
- }
- }
- }
-
- private void handleRollershutterCommand(NhcAction nhcAction, Command command) {
- Configuration config = this.getConfig();
- if (logger.isTraceEnabled()) {
- String actionId = (String) config.get(CONFIG_ACTION_ID);
- logger.trace("handleRollerShutterCommand: rollershutter {} command {}", actionId, command);
- logger.trace("handleRollerShutterCommand: rollershutter {}, current position {}", actionId,
- nhcAction.getState());
- }
-
- // first stop all current movement of rollershutter and wait until exact position is known
- if (this.rollershutterMoving) {
- if (logger.isTraceEnabled()) {
- logger.trace("handleRollerShutterCommand: rollershutter {} moving, therefore stop",
- config.get(CONFIG_ACTION_ID));
- }
- rollershutterPositionStop(nhcAction);
- }
-
- // task to be executed once exact position received from Niko Home Control
- this.rollershutterTask = () -> {
- if (logger.isTraceEnabled()) {
- logger.trace("handleRollerShutterCommand: rollershutter {} task running",
- this.getConfig().get(CONFIG_ACTION_ID));
- }
-
- int currentValue = nhcAction.getState();
-
- if (command instanceof UpDownType) {
- UpDownType s = (UpDownType) command;
- if (s == UpDownType.UP) {
- nhcAction.execute(NHCUP);
- } else {
- nhcAction.execute(NHCDOWN);
- }
- } else if (command instanceof StopMoveType) {
- nhcAction.execute(NHCSTOP);
- } else if (command instanceof PercentType) {
- int newValue = 100 - ((PercentType) command).intValue();
- if (logger.isTraceEnabled()) {
- logger.trace("handleRollerShutterCommand: rollershutter {} percent command, current {}, new {}",
- config.get(CONFIG_ACTION_ID), currentValue, newValue);
- }
- if (currentValue == newValue) {
- return;
- }
- if ((newValue > 0) && (newValue < 100)) {
- scheduleRollershutterStop(nhcAction, currentValue, newValue);
- }
- if (newValue < currentValue) {
- nhcAction.execute(NHCDOWN);
- } else if (newValue > currentValue) {
- nhcAction.execute(NHCUP);
- }
- }
- };
-
- // execute immediately if not waiting for exact position
- if (!this.waitForEvent) {
- if (logger.isTraceEnabled()) {
- logger.trace("handleRollerShutterCommand: rollershutter {} task executing immediately",
- this.getConfig().get(CONFIG_ACTION_ID));
- }
- executeRollershutterTask();
- }
- }
-
- /**
- * Method used to stop rollershutter when moving. This will then result in an exact position to be received, so next
- * percentage movements could be done accurately.
- *
- * @param nhcAction Niko Home Control action
- *
- */
- private void rollershutterPositionStop(NhcAction nhcAction) {
- if (logger.isTraceEnabled()) {
- logger.trace("rollershutterPositionStop: rollershutter {} executing",
- this.getConfig().get(CONFIG_ACTION_ID));
- }
- cancelRollershutterStop();
- this.rollershutterTask = null;
- this.filterEvent = false;
- this.waitForEvent = true;
- nhcAction.execute(NHCSTOP);
- }
-
- private void executeRollershutterTask() {
- if (logger.isTraceEnabled()) {
- logger.trace("executeRollershutterTask: rollershutter {} task triggered",
- this.getConfig().get(CONFIG_ACTION_ID));
- }
- this.waitForEvent = false;
-
- Action action = this.rollershutterTask;
- if (action != null) {
- action.execute();
- this.rollershutterTask = null;
- }
- }
-
- /**
- * Method used to schedule a rollershutter stop when moving. This allows stopping the rollershutter at a percent
- * position.
- *
- * @param nhcAction Niko Home Control action
- * @param currentValue current percent position
- * @param newValue new percent position
- *
- */
- private void scheduleRollershutterStop(NhcAction nhcAction, int currentValue, int newValue) {
- // filter first event for a rollershutter coming from Niko Home Control if moving to an intermediate
- // position to avoid updating state to full open or full close
- this.filterEvent = true;
-
- long duration = rollershutterMoveTime(nhcAction, currentValue, newValue);
- setRollershutterMovingTrue(nhcAction, duration);
-
- if (logger.isTraceEnabled()) {
- logger.trace("scheduleRollershutterStop: schedule rollershutter {} stop in {}ms",
- this.getConfig().get(CONFIG_ACTION_ID), duration);
- }
- this.rollershutterStopTask = scheduler.schedule(() -> {
- logger.trace("scheduleRollershutterStop: run rollershutter {} stop",
- this.getConfig().get(CONFIG_ACTION_ID));
- nhcAction.execute(NHCSTOP);
- }, duration, TimeUnit.MILLISECONDS);
- }
-
- private void cancelRollershutterStop() {
- ScheduledFuture> stopTask = this.rollershutterStopTask;
- if (stopTask != null) {
- if (logger.isTraceEnabled()) {
- logger.trace("cancelRollershutterStop: cancel rollershutter {} stop",
- this.getConfig().get(CONFIG_ACTION_ID));
- }
- stopTask.cancel(true);
- }
- this.rollershutterStopTask = null;
-
- this.filterEvent = false;
- }
-
- private void setRollershutterMovingTrue(NhcAction nhcAction, long duration) {
- if (logger.isTraceEnabled()) {
- logger.trace("setRollershutterMovingTrue: rollershutter {} moving", this.getConfig().get(CONFIG_ACTION_ID));
- }
- this.rollershutterMoving = true;
- this.rollershutterMovingFlagTask = scheduler.schedule(() -> {
- if (logger.isTraceEnabled()) {
- logger.trace("setRollershutterMovingTrue: rollershutter {} stopped moving",
- this.getConfig().get(CONFIG_ACTION_ID));
- }
- this.rollershutterMoving = false;
- }, duration, TimeUnit.MILLISECONDS);
- }
-
- private void setRollershutterMovingFalse() {
- if (logger.isTraceEnabled()) {
- logger.trace("setRollershutterMovingFalse: rollershutter {} not moving",
- this.getConfig().get(CONFIG_ACTION_ID));
- }
- this.rollershutterMoving = false;
- ScheduledFuture> future = this.rollershutterMovingFlagTask;
- if (future != null) {
- future.cancel(true);
- this.rollershutterMovingFlagTask = null;
- }
- }
-
- private long rollershutterMoveTime(NhcAction nhcAction, int currentValue, int newValue) {
- int totalTime = (newValue > currentValue) ? nhcAction.getCloseTime() : nhcAction.getOpenTime();
- long duration = Math.abs(newValue - currentValue) * totalTime * 10;
- if (logger.isTraceEnabled()) {
- logger.trace("rollershutterMoveTime: rollershutter {} move time {}", this.getConfig().get(CONFIG_ACTION_ID),
- duration);
- }
- return duration;
- }
-
- @Override
- public void initialize() {
- Configuration config = this.getConfig();
-
- Integer actionId = ((Number) config.get(CONFIG_ACTION_ID)).intValue();
-
- Bridge nhcBridge = getBridge();
- if (nhcBridge == null) {
- updateStatus(ThingStatus.UNINITIALIZED, ThingStatusDetail.BRIDGE_UNINITIALIZED,
- "Niko Home Control: no bridge initialized for action " + actionId);
- return;
- }
- NikoHomeControlBridgeHandler nhcBridgeHandler = (NikoHomeControlBridgeHandler) nhcBridge.getHandler();
- if (nhcBridgeHandler == null) {
- updateStatus(ThingStatus.UNINITIALIZED, ThingStatusDetail.BRIDGE_UNINITIALIZED,
- "Niko Home Control: no bridge initialized for action " + actionId);
- return;
- }
- NikoHomeControlCommunication nhcComm = nhcBridgeHandler.getCommunication();
- if (nhcComm == null || !nhcComm.communicationActive()) {
- updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR,
- "Niko Home Control: no connection with Niko Home Control, could not initialize action " + actionId);
- return;
- }
-
- NhcAction nhcAction = nhcComm.getActions().get(actionId);
- if (nhcAction == null) {
- updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.OFFLINE.CONFIGURATION_ERROR,
- "Niko Home Control: actionId does not match an action in the controller " + actionId);
- return;
- }
-
- int actionState = nhcAction.getState();
- int actionType = nhcAction.getType();
- String actionLocation = nhcAction.getLocation();
-
- this.prevActionState = actionState;
- nhcAction.setThingHandler(this);
-
- Map properties = new HashMap<>();
- properties.put("type", String.valueOf(actionType));
- if (this.getThing().getThingTypeUID() == THING_TYPE_BLIND) {
- cancelRollershutterStop();
- this.waitForEvent = false;
- setRollershutterMovingFalse();
-
- properties.put("timeToOpen", String.valueOf(nhcAction.getOpenTime()));
- properties.put("timeToClose", String.valueOf(nhcAction.getCloseTime()));
- }
- thing.setProperties(properties);
-
- if (thing.getLocation() == null) {
- thing.setLocation(actionLocation);
- }
-
- handleStateUpdate(nhcAction);
-
- logger.debug("Niko Home Control: action intialized {}", actionId);
- }
-
- /**
- * Method to update state of channel, called from Niko Home Control action.
- *
- * @param nhcAction Niko Home Control action
- *
- */
- public void handleStateUpdate(NhcAction nhcAction) {
- Configuration config = this.getConfig();
- Integer actionId = ((Number) config.get(CONFIG_ACTION_ID)).intValue();
-
- int actionType = nhcAction.getType();
- int actionState = nhcAction.getState();
-
- if (this.filterEvent) {
- this.filterEvent = false;
- logger.debug("Niko Home Control: filtered event {} for {}", actionState, actionId);
- updateStatus(ThingStatus.ONLINE);
- return;
- }
-
- switch (actionType) {
- case 0:
- case 1:
- updateState(CHANNEL_SWITCH, (actionState == 0) ? OnOffType.OFF : OnOffType.ON);
- updateStatus(ThingStatus.ONLINE);
- break;
- case 2:
- updateState(CHANNEL_BRIGHTNESS, new PercentType(actionState));
- updateStatus(ThingStatus.ONLINE);
- break;
- case 4:
- case 5:
- cancelRollershutterStop();
-
- int state = 100 - actionState;
- int prevState = 100 - this.prevActionState;
- if (((state == 0) || (state == 100)) && (state != prevState)) {
- long duration = rollershutterMoveTime(nhcAction, prevState, state);
- setRollershutterMovingTrue(nhcAction, duration);
- } else {
- setRollershutterMovingFalse();
- }
-
- if (this.waitForEvent) {
- logger.debug("Niko Home Control: received requested rollershutter {} position event {}", actionId,
- actionState);
- executeRollershutterTask();
- } else {
- updateState(CHANNEL_ROLLERSHUTTER, new PercentType(state));
- updateStatus(ThingStatus.ONLINE);
- }
- break;
- default:
- updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR,
- "Niko Home Control: unknown action type " + actionType);
- }
-
- this.prevActionState = actionState;
- }
-}
diff --git a/addons/binding/org.openhab.binding.nikohomecontrol/src/main/java/org/openhab/binding/nikohomecontrol/internal/handler/NikoHomeControlBridgeHandler.java b/addons/binding/org.openhab.binding.nikohomecontrol/src/main/java/org/openhab/binding/nikohomecontrol/internal/handler/NikoHomeControlBridgeHandler.java
deleted file mode 100644
index 3fee11905fd02..0000000000000
--- a/addons/binding/org.openhab.binding.nikohomecontrol/src/main/java/org/openhab/binding/nikohomecontrol/internal/handler/NikoHomeControlBridgeHandler.java
+++ /dev/null
@@ -1,293 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.nikohomecontrol.internal.handler;
-
-import static org.openhab.binding.nikohomecontrol.internal.NikoHomeControlBindingConstants.*;
-
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.concurrent.ScheduledFuture;
-import java.util.concurrent.TimeUnit;
-
-import org.eclipse.smarthome.config.core.Configuration;
-import org.eclipse.smarthome.core.thing.Bridge;
-import org.eclipse.smarthome.core.thing.ChannelUID;
-import org.eclipse.smarthome.core.thing.ThingStatus;
-import org.eclipse.smarthome.core.thing.ThingStatusDetail;
-import org.eclipse.smarthome.core.thing.binding.BaseBridgeHandler;
-import org.eclipse.smarthome.core.types.Command;
-import org.openhab.binding.nikohomecontrol.internal.discovery.NikoHomeControlDiscoveryService;
-import org.openhab.binding.nikohomecontrol.internal.protocol.NikoHomeControlCommunication;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * {@link NikoHomeControlBridgeHandler} is the handler for a Niko Home Control IP-interface and connects it to
- * the framework.
- *
- * @author Mark Herwege - Initial Contribution
- */
-public class NikoHomeControlBridgeHandler extends BaseBridgeHandler {
-
- private final Logger logger = LoggerFactory.getLogger(NikoHomeControlBridgeHandler.class);
-
- private NikoHomeControlCommunication nhcComm;
-
- private ScheduledFuture> refreshTimer;
-
- private NikoHomeControlDiscoveryService nhcDiscovery;
-
- public NikoHomeControlBridgeHandler(Bridge nikoHomeControlBridge) {
- super(nikoHomeControlBridge);
- }
-
- @Override
- public void handleCommand(ChannelUID channelUID, Command command) {
- // There is nothing to handle in the bridge handler
- }
-
- @Override
- public void initialize() {
- logger.debug("Niko Home Control: initializing bridge handler");
-
- Configuration config = this.getConfig();
- InetAddress addr = getAddr();
- int port = getPort();
-
- logger.debug("Niko Home Control: bridge handler host {}, port {}", addr, port);
-
- if (addr != null) {
- createCommunicationObject(addr, port);
- } else {
- updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.OFFLINE.COMMUNICATION_ERROR,
- "Niko Home Control: cannot resolve bridge IP with hostname " + config.get(CONFIG_HOST_NAME));
- }
- }
-
- /**
- * Create communication object to Niko Home Control IP-interface and start communication.
- * Trigger discovery when communication setup is successful.
- *
- * @param addr IP address of Niko Home Control IP-interface
- * @param port
- */
- private void createCommunicationObject(InetAddress addr, int port) {
- Configuration config = this.getConfig();
-
- scheduler.submit(() -> {
- nhcComm = new NikoHomeControlCommunication();
-
- // Set callback from NikoHomeControlCommunication object to this bridge to be able to take bridge
- // offline when non-resolvable communication error occurs.
- setBridgeCallBack();
-
- nhcComm.startCommunication();
- if (!nhcComm.communicationActive()) {
- nhcComm = null;
- bridgeOffline();
- return;
- }
-
- updateProperties();
-
- updateStatus(ThingStatus.ONLINE);
-
- Integer refreshInterval = ((Number) config.get(CONFIG_REFRESH)).intValue();
- setupRefreshTimer(refreshInterval);
-
- if (nhcDiscovery != null) {
- nhcDiscovery.discoverDevices();
- } else {
- logger.debug("Niko Home Control: cannot discover devices, discovery service not started");
- }
- });
- }
-
- private void setBridgeCallBack() {
- this.nhcComm.setBridgeCallBack(this);
- }
-
- /**
- * Schedule future communication refresh.
- *
- * @param interval_config Time before refresh in minutes.
- */
- private void setupRefreshTimer(Integer refreshInterval) {
- if (this.refreshTimer != null) {
- this.refreshTimer.cancel(true);
- this.refreshTimer = null;
- }
-
- if ((refreshInterval == null) || (refreshInterval == 0)) {
- return;
- }
-
- // This timer will restart the bridge connection periodically
- logger.debug("Niko Home Control: restart bridge connection every {} min", refreshInterval);
- this.refreshTimer = scheduler.scheduleWithFixedDelay(() -> {
- logger.debug("Niko Home Control: restart communication at scheduled time");
-
- nhcComm.restartCommunication();
- if (!nhcComm.communicationActive()) {
- logger.debug("Niko Home Control: communication socket error");
- bridgeOffline();
- return;
- }
-
- updateProperties();
-
- updateStatus(ThingStatus.ONLINE);
- }, refreshInterval, refreshInterval, TimeUnit.MINUTES);
- }
-
- /**
- * Take bridge offline when error in communication with Niko Home Control IP-interface. This method can also be
- * called directly from {@link NikoHomeControlCommunication} object.
- */
- public void bridgeOffline() {
- updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.OFFLINE.COMMUNICATION_ERROR,
- "Niko Home Control: error starting bridge connection");
- }
-
- /**
- * Put bridge online when error in communication resolved.
- */
- public void bridgeOnline() {
- updateProperties();
- updateStatus(ThingStatus.ONLINE);
- }
-
- /**
- * Update bridge properties with properties returned from Niko Home Control Controller, so they can be made visible
- * in PaperUI.
- */
- private void updateProperties() {
- Map properties = new HashMap<>();
-
- properties.put("softwareVersion", this.nhcComm.getSystemInfo().getSwVersion());
- properties.put("apiVersion", this.nhcComm.getSystemInfo().getApi());
- properties.put("language", this.nhcComm.getSystemInfo().getLanguage());
- properties.put("currency", this.nhcComm.getSystemInfo().getCurrency());
- properties.put("units", this.nhcComm.getSystemInfo().getUnits());
- properties.put("tzOffset", this.nhcComm.getSystemInfo().getTz());
- properties.put("dstOffset", this.nhcComm.getSystemInfo().getDst());
- properties.put("configDate", this.nhcComm.getSystemInfo().getLastConfig());
- properties.put("energyEraseDate", this.nhcComm.getSystemInfo().getLastEnergyErase());
- properties.put("connectionStartDate", this.nhcComm.getSystemInfo().getTime());
-
- thing.setProperties(properties);
- }
-
- @Override
- public void dispose() {
- if (this.refreshTimer != null) {
- this.refreshTimer.cancel(true);
- }
- this.refreshTimer = null;
- if (this.nhcComm != null) {
- nhcComm.stopCommunication();
- }
- this.nhcComm = null;
- }
-
- @Override
- public void handleConfigurationUpdate(Map configurationParameters) {
- Configuration configuration = editConfiguration();
- for (Entry configurationParmeter : configurationParameters.entrySet()) {
- configuration.put(configurationParmeter.getKey(), configurationParmeter.getValue());
- }
- updateConfiguration(configuration);
-
- scheduler.submit(() -> {
- nhcComm.restartCommunication();
- if (!nhcComm.communicationActive()) {
- bridgeOffline();
- return;
- }
-
- updateProperties();
-
- updateStatus(ThingStatus.ONLINE);
-
- Integer refreshInterval = ((Number) configuration.get(CONFIG_REFRESH)).intValue();
- setupRefreshTimer(refreshInterval);
- });
- }
-
- /**
- * Set discovery service handler to be able to start discovery after bridge initialization.
- *
- * @param nhcDiscovery
- */
- public void setNhcDiscovery(NikoHomeControlDiscoveryService nhcDiscovery) {
- this.nhcDiscovery = nhcDiscovery;
- }
-
- /**
- * Send a trigger from an alarm received from Niko Home Control.
- *
- * @param Niko Home Control alarm message
- */
- public void triggerAlarm(String alarmText) {
- triggerChannel(CHANNEL_ALARM, alarmText);
- updateStatus(ThingStatus.ONLINE);
- }
-
- /**
- * Send a trigger from a notice received from Niko Home Control.
- *
- * @param Niko Home Control alarm message
- */
- public void triggerNotice(String alarmText) {
- triggerChannel(CHANNEL_NOTICE, alarmText);
- updateStatus(ThingStatus.ONLINE);
- }
-
- /**
- * Get the Niko Home Control communication object.
- *
- * @return Niko Home Control communication object
- */
- public NikoHomeControlCommunication getCommunication() {
- return this.nhcComm;
- }
-
- /**
- * Get the IP-address of the Niko Home Control IP-interface.
- *
- * @return the addr
- */
- public InetAddress getAddr() {
- Configuration config = this.getConfig();
- InetAddress addr = null;
- try {
- addr = InetAddress.getByName((String) config.get(CONFIG_HOST_NAME));
- } catch (UnknownHostException e) {
- logger.debug("Niko Home Control: Cannot resolve hostname {} to IP adress", config.get(CONFIG_HOST_NAME));
- }
- return addr;
- }
-
- /**
- * Get the listening port of the Niko Home Control IP-interface.
- *
- * @return the port
- */
- public int getPort() {
- Configuration config = this.getConfig();
- return ((Number) config.get(CONFIG_PORT)).intValue();
- }
-}
diff --git a/addons/binding/org.openhab.binding.nikohomecontrol/src/main/java/org/openhab/binding/nikohomecontrol/internal/protocol/NhcAction.java b/addons/binding/org.openhab.binding.nikohomecontrol/src/main/java/org/openhab/binding/nikohomecontrol/internal/protocol/NhcAction.java
deleted file mode 100644
index f5c9b7182ecf9..0000000000000
--- a/addons/binding/org.openhab.binding.nikohomecontrol/src/main/java/org/openhab/binding/nikohomecontrol/internal/protocol/NhcAction.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.nikohomecontrol.internal.protocol;
-
-import org.eclipse.jdt.annotation.NonNullByDefault;
-import org.eclipse.jdt.annotation.Nullable;
-import org.openhab.binding.nikohomecontrol.internal.handler.NikoHomeControlActionHandler;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * The {@link NhcAction} class represents the action Niko Home Control communication object. It contains all fields
- * representing a Niko Home Control action and has methods to trigger the action in Niko Home Control and receive action
- * updates.
- *
- * @author Mark Herwege - Initial Contribution
- */
-@NonNullByDefault
-public final class NhcAction {
-
- private final Logger logger = LoggerFactory.getLogger(NhcAction.class);
-
- @Nullable
- private NikoHomeControlCommunication nhcComm;
-
- private int id;
- private String name;
- private Integer type;
- private String location;
- private Integer state = 0;
- @Nullable
- private Integer closeTime;
- @Nullable
- private Integer openTime;
-
- @Nullable
- private NikoHomeControlActionHandler thingHandler;
-
- NhcAction(int id, String name, Integer type, String location, @Nullable Integer closeTime,
- @Nullable Integer openTime) {
- this.id = id;
- this.name = name;
- this.type = type;
- this.location = location;
- this.closeTime = closeTime;
- this.openTime = openTime;
- }
-
- /**
- * This method should be called if the ThingHandler for the thing corresponding to this action is initialized.
- * It keeps a record of the thing handler in this object so the thing can be updated when
- * the action receives an update from the Niko Home Control IP-interface.
- *
- * @param handler
- */
- public void setThingHandler(NikoHomeControlActionHandler handler) {
- this.thingHandler = handler;
- }
-
- /**
- * This method sets a pointer to the nhcComm object of class {@link NikoHomeControlCommuncation}.
- * This is then used to be able to call back the sendCommand method in this class to send a command to the
- * Niko Home Control IP-interface when..
- *
- * @param nhcComm
- */
- public void setNhcComm(NikoHomeControlCommunication nhcComm) {
- this.nhcComm = nhcComm;
- }
-
- /**
- * Get name of action.
- *
- * @return action name
- */
- public String getName() {
- return this.name;
- }
-
- /**
- * Get type of action identified.
- *
- * Action type is 0 or 1 for a switch, 2 for a dimmer, 3 or 4 for a rollershutter.
- *
- * @return action type
- */
- public Integer getType() {
- return this.type;
- }
-
- /**
- * Get location name of action.
- *
- * @return location name
- */
- public String getLocation() {
- return this.location;
- }
-
- /**
- * Get state of action.
- *
- * State is a value between 0 and 100 for a dimmer or rollershutter.
- * Rollershutter state is 0 for fully closed and 100 for fully open.
- * State is 0 or 100 for a switch.
- *
- * @return action state
- */
- public Integer getState() {
- return this.state;
- }
-
- /**
- * Get openTime of action.
- *
- * openTime is the time in seconds to fully open a rollershutter.
- *
- * @return action openTime
- */
- public @Nullable Integer getOpenTime() {
- return this.openTime;
- }
-
- /**
- * Get closeTime of action.
- *
- * closeTime is the time in seconds to fully close a rollershutter.
- *
- * @return action closeTime
- */
- public @Nullable Integer getCloseTime() {
- return this.closeTime;
- }
-
- /**
- * Sets state of action.
- *
- * State is a value between 0 and 100 for a dimmer or rollershutter.
- * Rollershutter state is 0 for fully closed and 100 for fully open.
- * State is 0 or 100 for a switch.
- * If a thing handler is registered for the action, send a state update through the handler.
- * This method should only be called from inside this package.
- *
- * @param state
- */
- void setState(int state) {
- this.state = state;
- NikoHomeControlActionHandler handler = thingHandler;
- if (handler != null) {
- logger.debug("Niko Home Control: update channel state for {} with {}", id, state);
- handler.handleStateUpdate(this);
- }
- }
-
- /**
- * Sends action to Niko Home Control.
- *
- * @param percent - The allowed values depend on the action type.
- * switch action: 0 or 100
- * dimmer action: between 0 and 100, 254 for on, 255 for off
- * rollershutter action: 254 to close, 255 to open, 253 to stop
- */
- public void execute(int percent) {
- logger.debug("Niko Home Control: execute action {} of type {} for {}", percent, this.type, this.id);
-
- NhcMessageCmd nhcCmd = new NhcMessageCmd("executeactions", this.id, percent);
-
- NikoHomeControlCommunication comm = nhcComm;
- if (comm != null) {
- comm.sendMessage(nhcCmd);
- }
- }
-}
diff --git a/addons/binding/org.openhab.binding.nikohomecontrol/src/main/java/org/openhab/binding/nikohomecontrol/internal/protocol/NhcLocation.java b/addons/binding/org.openhab.binding.nikohomecontrol/src/main/java/org/openhab/binding/nikohomecontrol/internal/protocol/NhcLocation.java
deleted file mode 100644
index c7259aba386c9..0000000000000
--- a/addons/binding/org.openhab.binding.nikohomecontrol/src/main/java/org/openhab/binding/nikohomecontrol/internal/protocol/NhcLocation.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.nikohomecontrol.internal.protocol;
-
-/**
- * The {@link NhcLocation} class represents the location Niko Home Control communication object. It contains all fields
- * representing a Niko Home Control location.
- *
- * @author Mark Herwege - Initial Contribution
- */
-final class NhcLocation {
-
- private String name;
-
- NhcLocation(String name) {
- this.name = name;
- }
-
- String getName() {
- return this.name;
- }
-}
diff --git a/addons/binding/org.openhab.binding.nikohomecontrol/src/main/java/org/openhab/binding/nikohomecontrol/internal/protocol/NhcMessageBase.java b/addons/binding/org.openhab.binding.nikohomecontrol/src/main/java/org/openhab/binding/nikohomecontrol/internal/protocol/NhcMessageBase.java
deleted file mode 100644
index a99997c5216c0..0000000000000
--- a/addons/binding/org.openhab.binding.nikohomecontrol/src/main/java/org/openhab/binding/nikohomecontrol/internal/protocol/NhcMessageBase.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.nikohomecontrol.internal.protocol;
-
-/**
- * Class {@link NhcMessageBase} used as base class for output from gson for cmd or event feedback from Niko Home
- * Control. This class only contains the common base fields required for the deserializer
- * {@link NikoHomeControlMessageDeserializer} to select the specific formats implemented in {@link NhcMessageMap},
- * {@link NhcMessageListMap}, {@link NhcMessageCmd}.
- *
- *
- * @author Mark Herwege - Initial Contribution
- */
-abstract class NhcMessageBase {
-
- private String cmd;
- private String event;
-
- String getCmd() {
- return this.cmd;
- }
-
- void setCmd(String cmd) {
- this.cmd = cmd;
- }
-
- String getEvent() {
- return this.event;
- }
-
- void setEvent(String event) {
- this.event = event;
- }
-}
diff --git a/addons/binding/org.openhab.binding.nikohomecontrol/src/main/java/org/openhab/binding/nikohomecontrol/internal/protocol/NhcMessageCmd.java b/addons/binding/org.openhab.binding.nikohomecontrol/src/main/java/org/openhab/binding/nikohomecontrol/internal/protocol/NhcMessageCmd.java
deleted file mode 100644
index b37a909506b37..0000000000000
--- a/addons/binding/org.openhab.binding.nikohomecontrol/src/main/java/org/openhab/binding/nikohomecontrol/internal/protocol/NhcMessageCmd.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.nikohomecontrol.internal.protocol;
-
-/**
- * Class {@link NhcMessageCmd} used as input to gson to send commands to Niko Home Control. Extends
- * {@link NhcMessageBase}.
- *
- * Example: {"cmd":"executeactions","id":1,"value1":0}
- *
- * @author Mark Herwege - Initial Contribution
- */
-@SuppressWarnings("unused")
-class NhcMessageCmd extends NhcMessageBase {
-
- private Integer id;
- private Integer value1;
- private Integer value2;
- private Integer value3;
- private Integer mode;
- private Integer overrule;
- private String overruletime;
-
- NhcMessageCmd(String cmd) {
- super.setCmd(cmd);
- }
-
- NhcMessageCmd(String cmd, Integer id) {
- this(cmd);
- this.id = id;
- }
-
- NhcMessageCmd(String cmd, Integer id, Integer value1) {
- this(cmd, id);
- this.value1 = value1;
- }
-
- NhcMessageCmd(String cmd, Integer id, Integer value1, Integer value2, Integer value3) {
- this(cmd, id, value1);
- this.value2 = value2;
- this.value3 = value3;
- }
-
- NhcMessageCmd withMode(Integer mode) {
- this.mode = mode;
- return this;
- }
-
- NhcMessageCmd withOverrule(Integer overrule) {
- this.overrule = overrule;
- return this;
- }
-
- NhcMessageCmd withOverruletime(String overruletime) {
- this.overruletime = overruletime;
- return this;
- }
-}
diff --git a/addons/binding/org.openhab.binding.nikohomecontrol/src/main/java/org/openhab/binding/nikohomecontrol/internal/protocol/NhcMessageListMap.java b/addons/binding/org.openhab.binding.nikohomecontrol/src/main/java/org/openhab/binding/nikohomecontrol/internal/protocol/NhcMessageListMap.java
deleted file mode 100644
index f6b1279ca2956..0000000000000
--- a/addons/binding/org.openhab.binding.nikohomecontrol/src/main/java/org/openhab/binding/nikohomecontrol/internal/protocol/NhcMessageListMap.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Copyright (c) 2010-2019 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.nikohomecontrol.internal.protocol;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Class {@link NhcMessageListMap} used as output from gson for cmd or event feedback from Niko Home Control where the
- * data part is enclosed by [] and contains a list of json strings. Extends {@link NhcMessageBase}.
- *