* Rework Servlets to use Http Whiteboard annotations in favor of proprietary `org.openhab.core.io.http.servlet` classes
* Resolve itest runbundles
* Fix dependency issues
* Catch proper exception when starting hueemulation UpnpServer
Also-by: Jan N. Klug <github@klug.nrw>
Signed-off-by: Wouter Born <github@maindrain.net>
* [jsscriptingnashorn] JavaScript Scripting Nashorn Automation
This add-on allows you to use your older JavaScript (ECMAScript 5.1) rules on newer Java versions until they are migrated to JavaScript (ECMAScript 2021+).
The add-on uses a standalone [Nashorn Engine](https://github.com/openjdk/nashorn) which was part of Java until it was removed in Java 15.
* Update parent to 3.4.0-SNAPSHOT and nashorn-core to 15.4
For the Nashorn changelog, see:
https://github.com/openjdk/nashorn/blob/main/CHANGELOG.md
* Update parent to 4.0.0-SNAPSHOT
* Remove removeUnsupportedNashornArgs
* Update scriptTypes
* Add CODEOWNERS entry
* Recycle ScriptScopeOSGiTest.java
It got removed in openhab/openhab-core#2994
* Remove redundant new line from pom.xml
Signed-off-by: Wouter Born <github@maindrain.net>
* State descriptions cleanup
* Converted channels to QuantityType, adjusted default translations
* Channel definitions and percent to QuanityType
* Changed default state descriptions from MB to MiB
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
* Changed discovery to MDNS; added HTTPS handling; refactor HTTPClient to use jetty shared client
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
* Update Shelly and Tradfri bindings for upgrade to Californium 2.7.3
* Fixes deprecated API usages
* Resolves itest runbundles
Signed-off-by: Wouter Born <github@maindrain.net>
* Add CPU load channel, update dependencies
* use PercentType, correct process CPU load
* Add and fix test
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
* Syncs the karaf.version so the new Maven plugin is used
* Resolves itest runbundles for the new runtime dependencies
Signed-off-by: Wouter Born <github@maindrain.net>
This fixes all the compilation/dependency issues in the MQTT itests so they can be reenabled again.
The tests now create and use their own Moquette instance instead of the removed embedded MQTT broker.
The moquette-broker JAR is also included in the test bundles as workaround for its missing OSGi bundle manifest headers.
Signed-off-by: Wouter Born <github@maindrain.net>
This fixes the issue of the integration tests sometimes failing because channels have not yet been linked causing item state to remain null.
Signed-off-by: Wouter Born <github@maindrain.net>
* Introduce algorithm for preventing excessive currentPower updates
* Increase calculation accuracy
* Rename currentPowerAccurate to currentPowerRaw
* Remove duplicated line
* Use interface when declaring double ended queue
* Reformat README to one sentence per line
* Rename constants for consistency and readability
Fixes#12460
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Fix status transitions
Fixes#12415
* Fix integration tests
* Fix missing status update for some devices after HTTP call
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
This workaround fixes the modbus itests.
It seems that the methods that were added to the `BaseThingHandler` in openhab/openhab-core#2773 have caused some class loading issues when creating mocks of ThingHandlers in the modbus itests:
```
java.lang.NoClassDefFoundError: org/openhab/core/thing/type/ChannelTypeUID
at org.mockito.codegen.ModbusPollerThingHandler$MockitoMock$1698831298.<clinit>(Unknown Source)
at jdk.internal.reflect.GeneratedSerializationConstructorAccessor6.newInstance(Unknown Source)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at org.objenesis.instantiator.sun.SunReflectionFactoryInstantiator.newInstance(SunReflectionFactoryInstantiator.java:48)
at org.objenesis.ObjenesisBase.newInstance(ObjenesisBase.java:73)
at org.mockito.internal.creation.instance.ObjenesisInstantiator.newInstance(ObjenesisInstantiator.java:22)
at org.mockito.internal.creation.bytebuddy.SubclassByteBuddyMockMaker.createMock(SubclassByteBuddyMockMaker.java:48)
at org.mockito.internal.creation.bytebuddy.ByteBuddyMockMaker.createMock(ByteBuddyMockMaker.java:42)
at org.mockito.internal.util.MockUtil.createMock(MockUtil.java:53)
at org.mockito.internal.MockitoCore.mock(MockitoCore.java:96)
at org.mockito.Mockito.mock(Mockito.java:1954)
at org.mockito.Mockito.mock(Mockito.java:1869)
at org.openhab.binding.modbus.tests.ModbusDataHandlerTest.createPollerMock(ModbusDataHandlerTest.java:199)
at org.openhab.binding.modbus.tests.ModbusDataHandlerTest.testInitGeneric(ModbusDataHandlerTest.java:1039)
at org.openhab.binding.modbus.tests.ModbusDataHandlerTest.testInitGeneric(ModbusDataHandlerTest.java:1007)
at org.openhab.binding.modbus.tests.ModbusDataHandlerTest.testWriteOnlyData(ModbusDataHandlerTest.java:1101)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:725)
at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84)
at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:214)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:210)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:135)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:66)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
at aQute.tester.bundle.engine.BundleDescriptor.executeChild(BundleDescriptor.java:49)
at aQute.tester.bundle.engine.BundleEngine.lambda$executeBundle$7(BundleEngine.java:120)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
at aQute.tester.bundle.engine.BundleEngine.executeBundle(BundleEngine.java:120)
at aQute.tester.bundle.engine.BundleEngine.lambda$executeBundle$8(BundleEngine.java:133)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
at aQute.tester.bundle.engine.BundleEngine.executeBundle(BundleEngine.java:133)
at aQute.tester.bundle.engine.BundleEngine.lambda$execute$5(BundleEngine.java:100)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
at aQute.tester.bundle.engine.BundleEngine.execute(BundleEngine.java:100)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53)
at aQute.tester.junit.platform.Activator.test(Activator.java:439)
at aQute.tester.junit.platform.Activator.automatic(Activator.java:344)
at aQute.tester.junit.platform.Activator.run(Activator.java:216)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at aQute.launcher.Launcher.launch(Launcher.java:450)
at aQute.launcher.Launcher.run(Launcher.java:184)
at aQute.launcher.Launcher.main(Launcher.java:160)
at aQute.launcher.pre.EmbeddedLauncher.executeWithRunPath(EmbeddedLauncher.java:170)
at aQute.launcher.pre.EmbeddedLauncher.findAndExecute(EmbeddedLauncher.java:135)
at aQute.launcher.pre.EmbeddedLauncher.main(EmbeddedLauncher.java:52)
Caused by: java.lang.ClassNotFoundException: org.openhab.core.thing.type.ChannelTypeUID
at net.bytebuddy.dynamic.loading.ByteArrayClassLoader.findClass(ByteArrayClassLoader.java:397)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 128 more
```
Signed-off-by: Wouter Born <github@maindrain.net>
* Adds --add-opens to the surefire-maven-plugin config required for deserialization using Gson/XStream
* Upgrades plugin dependencies to JDK 17 compatible versions
* Replaces some reflection that no longer works on JDK 17
* Fixes issues when mocking Random
* Run Nashorn dependant tests only on JDK < 15
Signed-off-by: Wouter Born <github@maindrain.net>
* Consolidate service subscriptions in base class.
* Remove unsynchronized and unneeded cache of subscriptions.
* Do not unregister participant when removing subscription.
* Fix status wrongly set to ONLINE when exception is thrown.
* Refactor error handling for WemoHttpCall.
* Adjust log level for communication errors.
* Add automatic subscription renewal.
* Fix more ONLINE/OFFLINE status transition issues.
* Adjust log level when getWemoURL fails because device is offline.
* Remove redundant logging.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Syncs the karaf.version so the new Maven plugin is used
* Resolves itest runbundles for the new runtime dependencies
Signed-off-by: Wouter Born <github@maindrain.net>
* Move bridge and thing setup into individual integration tests
* Ensure that mocks used by ThingHandlers are fully initialized prior to
creating the thing handlers
* Ensure that bridge and thing are linked together after thing creation in
integration tests
Signed-off-by: Björn Lange <bjoern.lange@tu-dortmund.de>
* Syncs the karaf.version so the new Maven plugin is used
* Resolves itest runbundles for the new runtime dependencies
Signed-off-by: Wouter Born <github@maindrain.net>
It is probably always a good idea to run the OSGi HTTP service on a random available port in itests.
So when this is always done it prevents future issues and removes a bit of duplication.
Signed-off-by: Wouter Born <github@maindrain.net>
* Added support for DECT500 and HAN-FUN bulbs
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
* Incorporated comment from review
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
* Syncs the karaf.version so the new Maven plugin is used
* Resolves itest runbundles for the new runtime dependencies
Signed-off-by: Wouter Born <github@maindrain.net>
* [nest] Add support for Smart Device Management (SDM) API
* Reworks WWN implementation so that the thing types have a wwn_ prefix and the classes have a WWN prefix and reside in a 'wwn' package
* Adds an SDM implementation which is also based on: https://github.com/bhigg-code/openhab-addons/tree/2.5.x/bundles/org.openhab.binding.nestdeviceaccess
* Adds unit tests for (de)serialization of the SDM and Pub/Sub API requests and responses
* Updates the binding documentation for the changes and additions
Fixes#8664
Also-by: Brian Higginbotham <brianhigginbothamtx@gmail.com>
Signed-off-by: Wouter Born <github@maindrain.net>
* Fix and improve documentation
Signed-off-by: Wouter Born <github@maindrain.net>
* Always use UTF8 when decoding SDM events
Signed-off-by: Wouter Born <github@maindrain.net>
Also-by: Bert Plonus <bert.plonus@miele.com>
Also-by: Martin Lepsy <martin.lepsy@miele.com>
Also-by: Benjamin Bolte <benjamin.bolte@itemis.de>
Signed-off-by: Björn Lange <bjoern.lange@itemis.de>
* Syncs the karaf.version so the new Maven plugin is used
* Resolves itest runbundles for the new runtime dependencies
Signed-off-by: Wouter Born <github@maindrain.net>
* [modbus] gainOffset and bitMask profiles for working with modbus data
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] README trailing whitespaces
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] README and some final renaming
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] log error with incompatible units
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] gainOffset profile: test for incompatible unit
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] example renamed
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] Remove unused fields
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] gainOffset profile: make configuration parameters optional
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] xml indentantion fix
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] static code analysis fixes
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] Minor fixes for null checking
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] remove comment
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] bit profile README disclaimer with many commands
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] Grammar fixes in README
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] Fix bit profile UI configuration
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] Bit profile: Added possibility to invert value on read/write
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] fix typo with explanation of inverted
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] bit profile: unit tests for inverted parameter
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] spotless:apply
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] static checker fixes
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] write bit feature in data thing
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* wip
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] resolve itest
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] fixes
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] Remove bit profile
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] Fix data thing readStart validation
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] readme fix
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] Remove bit profile test
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] Invalidate REFRESH data cache with cacheful writes
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] cleanup
- abort if command is not convertible to 0/1 (previously wrote the
cached data)
- fail fast conditionals instead of deep if's
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] README Fix typo in example
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] fix data thing write when child of endpoint
Also added regression test
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* Update bundles/org.openhab.binding.modbus/src/main/resources/OH-INF/config/gainOffset.xml
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
* [modbus] performance-optimized logging
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] README: Removing xtend syntax hint, not needed anymore
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] generics typing added
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] dead code
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] avoid supressing generic type warnings
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] unnecessary generics
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] rename type parameter name
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] QU (short for quantity output) generic type instead of Q2
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] Remove unused localization
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] profile constant visibility harmonized
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] spotless:apply
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
* Upgrades Karaf to 4.3.1
* Uses Pax Logging as runtime dependency instead of Felix Log
To change the log level in itests, change the value of org.ops4j.pax.logging.DefaultServiceLog.level in itest-include.bndrun
* Adds --add-opens and nashorn.args in itest-include.bndrun to prevent some warnings being logged in itests
Related to openhab/openhab-distro#1167
Signed-off-by: Wouter Born <github@maindrain.net>
* Resolve itest runbundles for Gson and Commons Lang upgrades
* Fix JsonParser deprecations too
* Fix feature verification
Signed-off-by: Wouter Born <github@maindrain.net>
* Reworks many commons-lang usages to use standard Java
* Updates all remaining commons.lang imports to commons.lang3
Related to openhab/openhab-addons#7722
Signed-off-by: Wouter Born <github@maindrain.net>
* [modbus] More strict nullness. Remove apache.commons.lang from itests
* [modbus] Defaults for tcp and serial things according to docs
* [modbus] further explicit defaults
* [modbus] document default encoding for serial.
RTU is pretty much the only one used in the field.
Previous default was ascii implicitly.
* [modbus] verify defaults are used for undefined configuration parameters
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] Cascaded transforms with ∩
* [modbus] README to mention cascaded transformations
* [modbus] Take cascaded transformation into use
* [modbus] README to show preference towards new syntax
* [modbus] examples to use new syntax
* [modbus] fix test
* [modbus] remove apache commons lang dependency
- see also PR #10002
- I removed equals and hashCode implementation all-together, I could not see they played any role in practice.
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* [modbus] add support for rtu encoded over tcp
* [modbus] move classes to openhab/jamod
* [modbus] spotless
* [modbus] revert EndpointPoolConfiguration
* [modbus] remove virtual serial
* [modbus] resolve dependencies
* [modbus.studer] add support for RTU over TCP bridge
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* Added Channel for link to latest feed; update rome deoendency to version 1.15
* Removed unsed interface
* Run spotless
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
* Refactored discovery service to ThingHandlerService
* Fixed discovery for Geofence Sensor
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
* Configures XStream security to prevent "Security framework of XStream not initialized, XStream is probably vulnerable" warnings.
* Resolves the itest bundles for the upgrade to XStream 1.4.13
Related to openhab/openhab-core#1688
Signed-off-by: Wouter Born <github@maindrain.net>
Upgrades the compiler and its dependencies so the compiler results of Maven builds are more similar to those generated in recent Eclipse versions.
To fix compilation issues in Eclipse for add-ons using classes from javax.xml.stream several dependencies were upgraded/excluded.
Signed-off-by: Wouter Born <github@maindrain.net>
The ThingStatus is updated asynchronously so the test is unstable when the status is not updated immediately.
Signed-off-by: Wouter Born <github@maindrain.net>
* Improve exception handling of the embedded MQTT broker so the port can be reconfigured when it is already bound and it properly unlocks files
* Rework MQTT integration tests so they each run the embedded broker on their own reserved port
Signed-off-by: Wouter Born <github@maindrain.net>
With these changes and working channelLink events (openhab/openhab-core#1634) the ntp itest works again.
Signed-off-by: Wouter Born <github@maindrain.net>
With these changes and working channelLink events (openhab/openhab-core#1634) the feed itest works again.
Signed-off-by: Wouter Born <github@maindrain.net>