mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-25 14:55:55 +01:00
[souliss] fix discovery issue (#11438)
* Initial Contribution Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> Co-Authored-By: Tonino Fazio <fazioa@gmail.com> Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update pom.xml spotless-apply Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> Co-Authored-By: Tonino Fazio <fazioa@gmail.com> Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Renamed healty in healthy (simple word error) Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update thing-types.xml onOff to CamelCase Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * camelCase fixed on some types Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update bundles/org.openhab.binding.souliss/README.md Co-authored-by: Matthew Skinner <matt@pcmus.com> Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update bundles/org.openhab.binding.souliss/README.md Co-authored-by: Matthew Skinner <matt@pcmus.com> Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update README.md Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update README.md Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update README.md Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update README.md Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * fixed camelCase on thhings parameters Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update thing-types.xml fixed label cases Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update thing-types.xml Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Revert "Update thing-types.xml" This reverts commit 5c19fbc69dee53f41d56a847bc82660192e0158c. Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Initial Contribution Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> Co-Authored-By: Tonino Fazio <fazioa@gmail.com> Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Fix some errors (Nullable issues) and pom.xml format Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update pom.xml spotless-apply Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> Co-Authored-By: Tonino Fazio <fazioa@gmail.com> Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update SoulissT11Handler.java Default case on switch (handlecommand ) Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * added secoresend to t31 skeleton and variable smessage fix declaration Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Initial Contribution Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> Co-Authored-By: Tonino Fazio <fazioa@gmail.com> Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update pom.xml spotless-apply Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> Co-Authored-By: Tonino Fazio <fazioa@gmail.com> Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update SoulissGatewayHandler.java Cutted comments and uneccessary log on gw status Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Renamed healty in healthy (simple word error) Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * fixed camelCase on thhings parameters Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update thing-types.xml Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * cleanup and quality code fixes Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update SoulissBindingUDPDecoder.java fixed some npe Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * npe check fix Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update SoulissCommonCommands.java Remove comments unused code Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update SoulissCommonCommands.java commented out code unused Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update SoulissCommonCommands.java remove unused code commented out Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update SoulissBindingUDPServerJob.java remove unused code comments Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update SoulissBindingSendDispatcherJob.java fixed logger trace and remove unused code comments Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update bundles/org.openhab.binding.souliss/README.md Co-authored-by: Matthew Skinner <matt@pcmus.com> Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * removed completely unnecessary comments Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * fixed some thing types cases Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update SoulissGatewayHandler.java removed unnecessary log line Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update SoulissGatewayHandler.java removed unnecessary comment Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * loggers as final ! Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update SoulissGatewayJobHealthy.java removed unnecessary logs Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update SoulissGatewayJobPing.java removed unnecessary logs Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * fixed redundancy on types checks Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update README.md fixed examples parms Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update SoulissGatewayHandler.java changed parm var name bridge Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update bundles/org.openhab.binding.souliss/src/main/java/org/openhab/binding/souliss/handler/SoulissT11Handler.java remove comments Co-authored-by: Matthew Skinner <matt@pcmus.com> Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update bundles/org.openhab.binding.souliss/src/main/java/org/openhab/binding/souliss/handler/SoulissT12Handler.java comments removed Co-authored-by: Matthew Skinner <matt@pcmus.com> Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update bundles/org.openhab.binding.souliss/src/main/java/org/openhab/binding/souliss/handler/SoulissT13Handler.java comments removed Co-authored-by: Matthew Skinner <matt@pcmus.com> Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * fixed thing type on README and some case on xml thing types Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update README.md cutted part about manually thing config specs on README . Who use oh already knows it . Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Code cleanup and optimizations based on @Skinah tips Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * fixes from @Skinah suggestions Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> Fixed typeid's on costants files Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * various optimizations follow @Skinah tips (thanks!) Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * spotless:apply fix Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * fixes constants and channel id types of t31 Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Fix various NPE warnings Fixes many ... Some added suppresswarnings. Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update SoulissGenericActionMessage.java Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Refactor handlers into souliss.internal.handler Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * spoless:apply fix Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * spotless:apply Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * fix t19 (securesend parm ,labels and setvalue) Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update thing-types.xml spotless:apply fix Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update bundles/org.openhab.binding.souliss/README.md Co-authored-by: Fabian Wolter <github@fabian-wolter.de> Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update bundles/org.openhab.binding.souliss/README.md Co-authored-by: Fabian Wolter <github@fabian-wolter.de> Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update bundles/org.openhab.binding.souliss/README.md Co-authored-by: Fabian Wolter <github@fabian-wolter.de> Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update bundles/org.openhab.binding.souliss/README.md Co-authored-by: Fabian Wolter <github@fabian-wolter.de> Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update bundles/org.openhab.binding.souliss/README.md Co-authored-by: Fabian Wolter <github@fabian-wolter.de> Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * spotless:apply fix Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Null checks Warnings removed (mitigated with local copy of field) - removed comments Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * syntax sugar fixed of consts and section removed from README Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * moved files to internal package Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update SoulissHandlerFactory.java check types on object and not on strings Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * various fixes based on @fwolter Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Gateway ip address regex on config param Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * changed description of gateway ip on param Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * formatted tables in README.md Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * removed comments Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * wip for npe checks - breaking functionality :-( Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * spotless fix Author: Luca Calcaterra <calcaterra.luca@gmail.com> Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * fix contrib header in some files Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * reworked udp - only one bridge allowed and UDP listen only to bridge port 230 ...passing datagramsocket with soulissnetworkparameter class Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * quite ok. Where to close socket in case of thread interruption ? Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * wip Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * wip2 Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * wip3 udp receive but not on vpn Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Classes names Refactor Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * wip Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * wip Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * replaced datagramsocket with nio socket- seems to be ok Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update UDPListenDiscoverRunnable.java Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Fixed some null checks removed securesend option (only t11 end similar) Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * dummy initial value of raw values - removed thread on decoder line Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * fix t19 ex catch and broadcast function Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Reworked Config of Gateway as Class (todo check nulls...) Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Added representation property on gw - some cleanups Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update SoulissGatewayHandler.java cleanup unused vars Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * refactor methods of gw parameters Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * WIP to remove NetworkParameter class Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * wip refactor DiscoverResult Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * wip remove networkparameters Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * WIP remove NetworkParameter Class. Things online only on a health message Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * WIP Fix Topics Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * WIP2 Fix topics Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update pom.xml upgrade binding version to 3.2 snapshot Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * topics bound to bridge - seems to be ok. Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * remove NetworkParameters class - topics ok but need parse rework Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * code cleanup and bugs check fix Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Add node and slot to property - other fixes Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * change default interval subscription -cleanup constants Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * WIP WAN Address gw Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * WAN option external network. Fixed Putin on commands - to test well Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * cleanup - safesend check WIP Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * fixed secursend for t11-18 Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * WIP Fix null checks Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update SoulissGenericHandler.java fixed wrong assignment of prop Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * null checks fixes for code quality Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * fixed listen port according to gw parm (default 23000) Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * nuances Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update thing-types.xml changed default values Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * CommonCommands to static - other fixes . seems quite ok, remain T31 to fix (securesend) Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update UDPListenDiscoverRunnable.java Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update SoulissGatewayHandler.java changed executor imp for udp Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * restored commoncommands non static Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update SendDispatcherRunnable.java safesendcheck fix (not really) Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * various nuances (sonarlint) Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update README.md Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update bundles/org.openhab.binding.souliss/README.md Co-authored-by: Fabian Wolter <github@fabian-wolter.de> Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update bundles/org.openhab.binding.souliss/README.md Co-authored-by: Fabian Wolter <github@fabian-wolter.de> Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update README.md removed explain how oh works on example Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update bundles/org.openhab.binding.souliss/README.md Co-authored-by: Fabian Wolter <github@fabian-wolter.de> Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update bundles/org.openhab.binding.souliss/src/main/feature/feature.xml Co-authored-by: Fabian Wolter <github@fabian-wolter.de> Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * @fwolter various fixes Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update SoulissT11Handler.java wrong header Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update SoulissT11Handler.java Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * fix headers descriptions before authors on all classes Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * all var on begin of classes and @nullable sugar syntax Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * removed @nullable on local vars Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * wip comments translations and cleanup Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * cleanup comments and translated them (if italian occourred) Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * @fwolter suggestions for approval...various fixes Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * various fixes based on @fwolter suggestions. Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * various fixes based on @fwolter suggestions. Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update SoulissGatewayHandler.java Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update thing-types.xml Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update UDPListenDiscoverRunnable.java hexutils usage Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update SoulissT22Handler.java removed unused method Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update SoulissT22Handler.java fix previous commit Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update SoulissT11Handler.java @Nullable on configuration Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * method to put bridge offline (network exception on listener) Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update thing-types.xml changed some channels to trigger type Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * WIP broken Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update thing-types.xml spotless:apply Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * various changes call super on initialize() of all handlers. Changed to QuantityType where appliable Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update SoulissGatewayDiscovery.java added uniqueId (ip of gateway+node+slot) as representationProperty Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * wip for load discovery component Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * big fixes and code quality improvments Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * fixes Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update SoulissGenericHandler.java Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update README.md wrong format .. Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * fix null soulissGwHandler and code analysis Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update SoulissGatewayDiscovery.java Comment removed Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update SoulissGatewayDiscovery.java cleanup ... Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update SoulissGatewayDiscovery.java reintroduced local var for avoid SAT warning Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> * Update SoulissGatewayDiscovery.java fix error ...nuances Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com> Co-authored-by: Tonino Fazio <fazioa@gmail.com> Co-authored-by: Matthew Skinner <matt@pcmus.com> Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
This commit is contained in:
parent
d2f39be77a
commit
a1b3f27964
@ -300,6 +300,7 @@ Text label="Termostato soggiorno" icon="temperature" {
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Community
|
||||
|
||||
Souliss is a small community and doesn't have sufficient human resources to be more active on openHAB official community.
|
||||
|
@ -46,8 +46,7 @@ public class SoulissGatewayDiscovery extends AbstractDiscoveryService
|
||||
private @Nullable ScheduledFuture<?> discoveryJob = null;
|
||||
private final Logger logger = LoggerFactory.getLogger(SoulissGatewayDiscovery.class);
|
||||
|
||||
private @Nullable SoulissDiscoverJob soulissDiscoverRunnableClass = null;
|
||||
|
||||
private @Nullable SoulissDiscoverJob soulissDiscoverRunnableClass;
|
||||
private @Nullable SoulissGatewayHandler soulissGwHandler;
|
||||
|
||||
public SoulissGatewayDiscovery() {
|
||||
@ -135,112 +134,113 @@ public class SoulissGatewayDiscovery extends AbstractDiscoveryService
|
||||
String sNodeId = node + SoulissBindingConstants.UUID_NODE_SLOT_SEPARATOR + slot;
|
||||
|
||||
ThingUID gatewayUID = gwHandler.getThing().getUID();
|
||||
var nodeLabel = "node";
|
||||
var slotLabel = "slot";
|
||||
|
||||
switch (typical) {
|
||||
case SoulissProtocolConstants.SOULISS_T11:
|
||||
thingUID = new ThingUID(SoulissBindingConstants.T11_THING_TYPE, gatewayUID, sNodeId);
|
||||
label = "T11: node " + node + slotLabel + slot;
|
||||
label = "T11: " + nodeLabel + " " + node + " " + slotLabel + " " + slot;
|
||||
break;
|
||||
case SoulissProtocolConstants.SOULISS_T12:
|
||||
thingUID = new ThingUID(SoulissBindingConstants.T12_THING_TYPE, gatewayUID, sNodeId);
|
||||
label = "T12: node " + node + slotLabel + slot;
|
||||
label = "T12: " + nodeLabel + " " + " " + node + " " + " " + slotLabel + " " + slot;
|
||||
break;
|
||||
case SoulissProtocolConstants.SOULISS_T13:
|
||||
thingUID = new ThingUID(SoulissBindingConstants.T13_THING_TYPE, gatewayUID, sNodeId);
|
||||
label = "T13: node " + node + slotLabel + slot;
|
||||
label = "T13: " + nodeLabel + " " + node + " " + slotLabel + " " + slot;
|
||||
break;
|
||||
case SoulissProtocolConstants.SOULISS_T14:
|
||||
thingUID = new ThingUID(SoulissBindingConstants.T14_THING_TYPE, gatewayUID, sNodeId);
|
||||
label = "T14: node " + node + slotLabel + slot;
|
||||
label = "T14: " + nodeLabel + " " + node + " " + slotLabel + " " + slot;
|
||||
break;
|
||||
case SoulissProtocolConstants.SOULISS_T16:
|
||||
thingUID = new ThingUID(SoulissBindingConstants.T16_THING_TYPE, gatewayUID, sNodeId);
|
||||
label = "T16: node " + node + slotLabel + slot;
|
||||
label = "T16: " + nodeLabel + " " + node + " " + slotLabel + " " + slot;
|
||||
break;
|
||||
case SoulissProtocolConstants.SOULISS_T18:
|
||||
thingUID = new ThingUID(SoulissBindingConstants.T18_THING_TYPE, gatewayUID, sNodeId);
|
||||
label = "T18: node " + node + slotLabel + slot;
|
||||
label = "T18: " + nodeLabel + " " + node + " " + slotLabel + " " + slot;
|
||||
break;
|
||||
case SoulissProtocolConstants.SOULISS_T19:
|
||||
thingUID = new ThingUID(SoulissBindingConstants.T19_THING_TYPE, gatewayUID, sNodeId);
|
||||
label = "T19: node " + node + slotLabel + slot;
|
||||
label = "T19: " + nodeLabel + " " + node + " " + slotLabel + " " + slot;
|
||||
break;
|
||||
case SoulissProtocolConstants.SOULISS_T1A:
|
||||
thingUID = new ThingUID(SoulissBindingConstants.T1A_THING_TYPE, gatewayUID, sNodeId);
|
||||
label = "T1A: node " + node + slotLabel + slot;
|
||||
label = "T1A: " + nodeLabel + " " + node + " " + slotLabel + " " + slot;
|
||||
break;
|
||||
case SoulissProtocolConstants.SOULISS_T21:
|
||||
thingUID = new ThingUID(SoulissBindingConstants.T21_THING_TYPE, gatewayUID, sNodeId);
|
||||
label = "T21: node " + node + slotLabel + slot;
|
||||
label = "T21: " + nodeLabel + " " + node + " " + slotLabel + " " + slot;
|
||||
break;
|
||||
case SoulissProtocolConstants.SOULISS_T22:
|
||||
thingUID = new ThingUID(SoulissBindingConstants.T22_THING_TYPE, gatewayUID, sNodeId);
|
||||
label = "T22: node " + node + slotLabel + slot;
|
||||
label = "T22: " + nodeLabel + " " + node + " " + slotLabel + " " + slot;
|
||||
break;
|
||||
case SoulissProtocolConstants.SOULISS_T41_ANTITHEFT_MAIN:
|
||||
thingUID = new ThingUID(SoulissBindingConstants.T41_THING_TYPE, gatewayUID, sNodeId);
|
||||
label = "T41: node " + node + slotLabel + slot;
|
||||
label = "T41: " + nodeLabel + " " + node + " " + slotLabel + " " + slot;
|
||||
break;
|
||||
case SoulissProtocolConstants.SOULISS_T42_ANTITHEFT_PEER:
|
||||
thingUID = new ThingUID(SoulissBindingConstants.T42_THING_TYPE, gatewayUID, sNodeId);
|
||||
label = "T42: node " + node + slotLabel + slot;
|
||||
label = "T42: " + nodeLabel + " " + node + " " + slotLabel + " " + slot;
|
||||
break;
|
||||
case SoulissProtocolConstants.SOULISS_T31:
|
||||
thingUID = new ThingUID(SoulissBindingConstants.T31_THING_TYPE, gatewayUID, sNodeId);
|
||||
label = "T31: node " + node + slotLabel + slot;
|
||||
label = "T31: " + nodeLabel + " " + node + " " + slotLabel + " " + slot;
|
||||
break;
|
||||
case SoulissProtocolConstants.SOULISS_T52_TEMPERATURE_SENSOR:
|
||||
thingUID = new ThingUID(SoulissBindingConstants.T52_THING_TYPE, gatewayUID, sNodeId);
|
||||
label = "T52: node " + node + slotLabel + slot;
|
||||
label = "T52: " + nodeLabel + " " + node + " " + slotLabel + " " + slot;
|
||||
break;
|
||||
case SoulissProtocolConstants.SOULISS_T53_HUMIDITY_SENSOR:
|
||||
thingUID = new ThingUID(SoulissBindingConstants.T53_THING_TYPE, gatewayUID, sNodeId);
|
||||
label = "T53: node " + node + slotLabel + slot;
|
||||
label = "T53: " + nodeLabel + " " + node + " " + slotLabel + " " + slot;
|
||||
break;
|
||||
case SoulissProtocolConstants.SOULISS_T54_LUX_SENSOR:
|
||||
thingUID = new ThingUID(SoulissBindingConstants.T54_THING_TYPE, gatewayUID, sNodeId);
|
||||
label = "T54: node " + node + slotLabel + slot;
|
||||
label = "T54: " + nodeLabel + " " + node + " " + slotLabel + " " + slot;
|
||||
break;
|
||||
case SoulissProtocolConstants.SOULISS_T55_VOLTAGE_SENSOR:
|
||||
thingUID = new ThingUID(SoulissBindingConstants.T55_THING_TYPE, gatewayUID, sNodeId);
|
||||
label = "T55: node " + node + slotLabel + slot;
|
||||
label = "T55: " + nodeLabel + " " + node + " " + slotLabel + " " + slot;
|
||||
break;
|
||||
case SoulissProtocolConstants.SOULISS_T56_CURRENT_SENSOR:
|
||||
thingUID = new ThingUID(SoulissBindingConstants.T56_THING_TYPE, gatewayUID, sNodeId);
|
||||
label = "T56: node " + node + slotLabel + slot;
|
||||
label = "T56: " + nodeLabel + " " + node + " " + slotLabel + " " + slot;
|
||||
break;
|
||||
case SoulissProtocolConstants.SOULISS_T57_POWER_SENSOR:
|
||||
thingUID = new ThingUID(SoulissBindingConstants.T57_THING_TYPE, gatewayUID, sNodeId);
|
||||
label = "T57: node " + node + slotLabel + slot;
|
||||
label = "T57: " + nodeLabel + " " + node + " " + slotLabel + " " + slot;
|
||||
break;
|
||||
case SoulissProtocolConstants.SOULISS_T61:
|
||||
thingUID = new ThingUID(SoulissBindingConstants.T61_THING_TYPE, gatewayUID, sNodeId);
|
||||
label = "T61: node " + node + slotLabel + slot;
|
||||
label = "T61: " + nodeLabel + " " + node + " " + slotLabel + " " + slot;
|
||||
break;
|
||||
case SoulissProtocolConstants.SOULISS_T62_TEMPERATURE_SENSOR:
|
||||
thingUID = new ThingUID(SoulissBindingConstants.T62_THING_TYPE, gatewayUID, sNodeId);
|
||||
label = "T62: node " + node + slotLabel + slot;
|
||||
label = "T62: " + nodeLabel + " " + node + " " + slotLabel + " " + slot;
|
||||
break;
|
||||
case SoulissProtocolConstants.SOULISS_T63_HUMIDITY_SENSOR:
|
||||
thingUID = new ThingUID(SoulissBindingConstants.T63_THING_TYPE, gatewayUID, sNodeId);
|
||||
label = "T63: node " + node + slotLabel + slot;
|
||||
label = "T63: " + nodeLabel + " " + node + " " + slotLabel + " " + slot;
|
||||
break;
|
||||
case SoulissProtocolConstants.SOULISS_T64_LUX_SENSOR:
|
||||
thingUID = new ThingUID(SoulissBindingConstants.T64_THING_TYPE, gatewayUID, sNodeId);
|
||||
label = "T64: node " + node + slotLabel + slot;
|
||||
label = "T64: " + nodeLabel + " " + node + " " + slotLabel + " " + slot;
|
||||
break;
|
||||
case SoulissProtocolConstants.SOULISS_T65_VOLTAGE_SENSOR:
|
||||
thingUID = new ThingUID(SoulissBindingConstants.T65_THING_TYPE, gatewayUID, sNodeId);
|
||||
label = "T65: node " + node + slotLabel + slot;
|
||||
label = "T65: " + nodeLabel + " " + node + " " + slotLabel + " " + slot;
|
||||
break;
|
||||
case SoulissProtocolConstants.SOULISS_T66_CURRENT_SENSOR:
|
||||
thingUID = new ThingUID(SoulissBindingConstants.T66_THING_TYPE, gatewayUID, sNodeId);
|
||||
label = "T66: node " + node + slotLabel + slot;
|
||||
label = "T66: " + nodeLabel + " " + node + " " + slotLabel + " " + slot;
|
||||
break;
|
||||
case SoulissProtocolConstants.SOULISS_T67_POWER_SENSOR:
|
||||
thingUID = new ThingUID(SoulissBindingConstants.T67_THING_TYPE, gatewayUID, sNodeId);
|
||||
label = "T67: node " + node + slotLabel + slot;
|
||||
label = "T67: " + nodeLabel + " " + node + " " + slotLabel + " " + slot;
|
||||
break;
|
||||
default: {
|
||||
logger.debug("no supported things found ...");
|
||||
@ -264,8 +264,8 @@ public class SoulissGatewayDiscovery extends AbstractDiscoveryService
|
||||
@Override
|
||||
public void setThingHandler(ThingHandler handler) {
|
||||
if (handler instanceof SoulissGatewayHandler) {
|
||||
var localGwHandler = this.soulissGwHandler;
|
||||
localGwHandler = (SoulissGatewayHandler) handler;
|
||||
SoulissGatewayHandler localGwHandler = (SoulissGatewayHandler) handler;
|
||||
this.soulissGwHandler = localGwHandler;
|
||||
localGwHandler.discoverResult = this;
|
||||
}
|
||||
}
|
||||
|
@ -29,8 +29,6 @@ import org.openhab.core.thing.Thing;
|
||||
import org.openhab.core.thing.ThingStatus;
|
||||
import org.openhab.core.thing.ThingStatusDetail;
|
||||
import org.openhab.core.thing.binding.BaseThingHandler;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* This class implements the base Souliss Typical All other Typicals derive from
|
||||
@ -52,7 +50,6 @@ public abstract class SoulissGenericHandler extends BaseThingHandler implements
|
||||
|
||||
private int iSlot;
|
||||
private int iNode;
|
||||
private final Logger logger = LoggerFactory.getLogger(SoulissGenericHandler.class);
|
||||
|
||||
private final CommonCommands commonCommands = new CommonCommands();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user