From d4228e03309f09aca340bdecc8187fffeef7be85 Mon Sep 17 00:00:00 2001 From: Andrew Fiddian-Green Date: Thu, 5 Dec 2024 19:37:15 +0000 Subject: [PATCH] Add UoM support for RSSI channels (#17845) * Enhance received signal strength indications Signed-off-by: Andrew Fiddian-Green Signed-off-by: Ciprian Pascu --- .../org.openhab.binding.airgradient/README.md | 2 +- .../resources/OH-INF/thing/thing-types.xml | 4 +- .../main/resources/OH-INF/update/update.xml | 22 +++++ .../org.openhab.binding.bluetooth/README.md | 8 +- .../main/resources/OH-INF/thing/channels.xml | 4 +- .../resources/OH-INF/thing/thing-types.xml | 4 + .../main/resources/OH-INF/update/update.xml | 14 +++ .../README.md | 8 +- .../resources/OH-INF/thing/thing-types.xml | 16 +++- .../main/resources/OH-INF/update/update.xml | 38 ++++++++ .../README.md | 2 +- .../resources/OH-INF/thing/thing-types.xml | 8 +- .../main/resources/OH-INF/update/update.xml | 14 +++ .../org.openhab.binding.surepetcare/README.md | 88 +++++++++---------- .../handler/SurePetcareDeviceHandler.java | 7 +- .../main/resources/OH-INF/thing/things.xml | 10 ++- .../main/resources/OH-INF/update/update.xml | 28 ++++++ .../mqtt/ruuvigateway/RuuviGatewayTest.java | 7 ++ 18 files changed, 217 insertions(+), 67 deletions(-) create mode 100644 bundles/org.openhab.binding.airgradient/src/main/resources/OH-INF/update/update.xml create mode 100644 bundles/org.openhab.binding.bluetooth/src/main/resources/OH-INF/update/update.xml create mode 100644 bundles/org.openhab.binding.draytonwiser/src/main/resources/OH-INF/update/update.xml create mode 100644 bundles/org.openhab.binding.mqtt.ruuvigateway/src/main/resources/OH-INF/update/update.xml create mode 100644 bundles/org.openhab.binding.surepetcare/src/main/resources/OH-INF/update/update.xml diff --git a/bundles/org.openhab.binding.airgradient/README.md b/bundles/org.openhab.binding.airgradient/README.md index 30f27be5e5d..d85f7780665 100644 --- a/bundles/org.openhab.binding.airgradient/README.md +++ b/bundles/org.openhab.binding.airgradient/README.md @@ -77,7 +77,7 @@ For more information about the data in the channels, please refer to the models | tvoc | Number:Density | Read | Total Volatile Organic Compounds | | atmp | Number:Temperature | Read | Ambient Temperature | | rhum | Number:Dimensionless | Read | Relative Humidity Percentage | -| wifi | Number | Read | Received signal strength indicator | +| wifi | Number:Power | Read | Received signal strength indicator | | uploads-since-boot | Number:Dimensionless | Read | Number of measure uploads since last reboot (boot) | | leds | String | Read/Write | Sets the leds mode (off/co2/pm) | | calibration | String | Write | Triggers co2 calibration on the device | diff --git a/bundles/org.openhab.binding.airgradient/src/main/resources/OH-INF/thing/thing-types.xml b/bundles/org.openhab.binding.airgradient/src/main/resources/OH-INF/thing/thing-types.xml index b1fd1adaa14..45c554e34d7 100644 --- a/bundles/org.openhab.binding.airgradient/src/main/resources/OH-INF/thing/thing-types.xml +++ b/bundles/org.openhab.binding.airgradient/src/main/resources/OH-INF/thing/thing-types.xml @@ -72,6 +72,7 @@ + 1 serialNumber @@ -121,6 +122,7 @@ + 1 location @@ -161,7 +163,7 @@ - Number + Number:Power Received signal strength indicator QualityOfService diff --git a/bundles/org.openhab.binding.airgradient/src/main/resources/OH-INF/update/update.xml b/bundles/org.openhab.binding.airgradient/src/main/resources/OH-INF/update/update.xml new file mode 100644 index 00000000000..b4712ae87ba --- /dev/null +++ b/bundles/org.openhab.binding.airgradient/src/main/resources/OH-INF/update/update.xml @@ -0,0 +1,22 @@ + + + + + + + airgradient:wifi + + + + + + + + airgradient:wifi + + + + + diff --git a/bundles/org.openhab.binding.bluetooth/README.md b/bundles/org.openhab.binding.bluetooth/README.md index daf6019fce8..840c98b6301 100644 --- a/bundles/org.openhab.binding.bluetooth/README.md +++ b/bundles/org.openhab.binding.bluetooth/README.md @@ -39,9 +39,9 @@ Other configuration parameters may be required depending on the bluetooth thing Every Bluetooth thing has the following channel: -| Channel ID | Item Type | Description | -|------------|-----------|-----------------------------------------------------------------------------------------------------| -| rssi | Number | The "Received Signal Strength Indicator", the [RSSI](https://blog.bluetooth.com/proximity-and-rssi) | +| Channel ID | Item Type | Description | +|------------|--------------|-----------------------------------------------------------------------------------------------------| +| rssi | Number:Power | The "Received Signal Strength Indicator", the [RSSI](https://blog.bluetooth.com/proximity-and-rssi) | ## Full Example @@ -54,7 +54,7 @@ bluetooth:beacon:hci0:b1 "BLE Beacon" (bluetooth:bluez:hci0) [ address="68:64:4 demo.items: ```java -Number Beacon_RSSI "My Beacon [%.0f]" { channel="bluetooth:beacon:hci0:b1:rssi" } +Number:Power Beacon_RSSI "My Beacon [%.0f %unit%]" { unit="dBm", channel="bluetooth:beacon:hci0:b1:rssi" } ``` demo.sitemap: diff --git a/bundles/org.openhab.binding.bluetooth/src/main/resources/OH-INF/thing/channels.xml b/bundles/org.openhab.binding.bluetooth/src/main/resources/OH-INF/thing/channels.xml index b840e0328de..822a1cee70a 100644 --- a/bundles/org.openhab.binding.bluetooth/src/main/resources/OH-INF/thing/channels.xml +++ b/bundles/org.openhab.binding.bluetooth/src/main/resources/OH-INF/thing/channels.xml @@ -5,11 +5,11 @@ xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0 https://openhab.org/schemas/thing-description-1.0.0.xsd"> - Number + Number:Power Received signal strength indicator QualityOfService - + diff --git a/bundles/org.openhab.binding.bluetooth/src/main/resources/OH-INF/thing/thing-types.xml b/bundles/org.openhab.binding.bluetooth/src/main/resources/OH-INF/thing/thing-types.xml index ba279f4eef3..e6288497608 100644 --- a/bundles/org.openhab.binding.bluetooth/src/main/resources/OH-INF/thing/thing-types.xml +++ b/bundles/org.openhab.binding.bluetooth/src/main/resources/OH-INF/thing/thing-types.xml @@ -17,6 +17,10 @@ + + 1 + + diff --git a/bundles/org.openhab.binding.bluetooth/src/main/resources/OH-INF/update/update.xml b/bundles/org.openhab.binding.bluetooth/src/main/resources/OH-INF/update/update.xml new file mode 100644 index 00000000000..91449818f00 --- /dev/null +++ b/bundles/org.openhab.binding.bluetooth/src/main/resources/OH-INF/update/update.xml @@ -0,0 +1,14 @@ + + + + + + + bluetooth:rssi + + + + + diff --git a/bundles/org.openhab.binding.draytonwiser/README.md b/bundles/org.openhab.binding.draytonwiser/README.md index c97d01dfd51..e42686e3330 100644 --- a/bundles/org.openhab.binding.draytonwiser/README.md +++ b/bundles/org.openhab.binding.draytonwiser/README.md @@ -52,7 +52,7 @@ The `awaySetPoint` defines the temperature in degrees Celsius that will be sent | `heatChannel1DemandState` | Switch | Is channel 1 calling the boiler for heat | | `heatChannel2Demand` | Number:Dimensionless | Current demand level of heating channel 2 | | `heatChannel2DemandState` | Switch | Is channel 2 calling the boiler for heat | -| `currentSignalRSSI` | Number | Relative Signal Strength Indicator | +| `currentSignalRSSI` | Number:Power | Relative Signal Strength Indicator | | `currentWiserSignalStrength` | String | Human readable signal strength | | `currentSignalStrength` | Number | Signal strength value that maps to qualityofservice icon | @@ -87,7 +87,7 @@ The `awaySetPoint` defines the temperature in degrees Celsius that will be sent | `currentBatteryVoltage` | Number:ElectricPotential | Currently reported battery voltage | | `currentWiserBatteryLevel` | String | Human readable battery level | | `currentBatteryLevel` | Number | Battery level in percent | -| `currentSignalRSSI` | Number | Relative Signal Strength Indicator | +| `currentSignalRSSI` | Number:Power | Relative Signal Strength Indicator | | `currentSignalLQI` | Number | Link Quality Indicator | | `currentWiserSignalStrength` | String | Human readable signal strength | | `currentSignalStrength` | Number | Signal strength value that maps to qualityofservice icon | @@ -103,7 +103,7 @@ The `awaySetPoint` defines the temperature in degrees Celsius that will be sent | `currentBatteryVoltage` | Number:ElectricPotential | Currently reported battery voltage | | `currentWiserBatteryLevel` | String | Human readable battery level | | `currentBatteryLevel` | Number | Battery level in percent | -| `currentSignalRSSI` | Number | Relative Signal Strength Indicator | +| `currentSignalRSSI` | Number:Power | Relative Signal Strength Indicator | | `currentSignalLQI` | Number | Link Quality Indicator | | `currentWiserSignalStrength` | String | Human readable signal strength | | `currentSignalStrength` | Number | Signal strength value that maps to qualityofservice icon | @@ -113,7 +113,7 @@ The `awaySetPoint` defines the temperature in degrees Celsius that will be sent | Channel | Item Type | Description | |--------------------------|---------------|--------------------------------------------| -| `currentSignalRSSI` | Number | Relative Signal Strength Indicator | +| `currentSignalRSSI` | Number:Power | Relative Signal Strength Indicator | | `currentSignalLQI` | Number | Link Quality Indicator | | `zigbeeConnected` | Switch | Is the TRV joined to network | | `plugInstantaneousPower` | Number:Power | Current Power being drawn through the plug | diff --git a/bundles/org.openhab.binding.draytonwiser/src/main/resources/OH-INF/thing/thing-types.xml b/bundles/org.openhab.binding.draytonwiser/src/main/resources/OH-INF/thing/thing-types.xml index 6fafad1aaee..2ca034e7220 100644 --- a/bundles/org.openhab.binding.draytonwiser/src/main/resources/OH-INF/thing/thing-types.xml +++ b/bundles/org.openhab.binding.draytonwiser/src/main/resources/OH-INF/thing/thing-types.xml @@ -65,6 +65,9 @@ + + 1 + id @@ -158,6 +161,9 @@ + + 1 + serialNumber @@ -192,6 +198,9 @@ + + 1 + serialNumber @@ -223,6 +232,9 @@ + + 1 + serialNumber @@ -294,10 +306,10 @@ - Number + Number:Power The reported network signal RSSI - + diff --git a/bundles/org.openhab.binding.draytonwiser/src/main/resources/OH-INF/update/update.xml b/bundles/org.openhab.binding.draytonwiser/src/main/resources/OH-INF/update/update.xml new file mode 100644 index 00000000000..7e9b122120a --- /dev/null +++ b/bundles/org.openhab.binding.draytonwiser/src/main/resources/OH-INF/update/update.xml @@ -0,0 +1,38 @@ + + + + + + + draytonwiser:signalRSSI-channel + + + + + + + + draytonwiser:signalRSSI-channel + + + + + + + + draytonwiser:signalRSSI-channel + + + + + + + + draytonwiser:signalRSSI-channel + + + + + diff --git a/bundles/org.openhab.binding.mqtt.ruuvigateway/README.md b/bundles/org.openhab.binding.mqtt.ruuvigateway/README.md index f688c42d798..c1fa59d3f9a 100644 --- a/bundles/org.openhab.binding.mqtt.ruuvigateway/README.md +++ b/bundles/org.openhab.binding.mqtt.ruuvigateway/README.md @@ -48,7 +48,7 @@ For users that prefer manual configuration, we list here the configurable parame | dataFormat | Number | Data format version | | measurementSequenceNumber | Number:Dimensionless | Measurement sequence number | | movementCounter | Number:Dimensionless | Movement counter | -| rssi | Number | Received signal (between the Gateway and the sensor) strength indicator | +| rssi | Number:Power | Received signal (between the Gateway and the sensor) strength indicator | | ts | DateTime | Timestamp when the message from Bluetooth-sensor was received by Gateway | | gwts | DateTime | Timestamp when the message from Bluetooth-sensor was relayed by Gateway | | gwmac | String | MAC-address of Ruuvi Gateway | diff --git a/bundles/org.openhab.binding.mqtt.ruuvigateway/src/main/resources/OH-INF/thing/thing-types.xml b/bundles/org.openhab.binding.mqtt.ruuvigateway/src/main/resources/OH-INF/thing/thing-types.xml index 0bd2bb9c3a9..d9b615ddb37 100644 --- a/bundles/org.openhab.binding.mqtt.ruuvigateway/src/main/resources/OH-INF/thing/thing-types.xml +++ b/bundles/org.openhab.binding.mqtt.ruuvigateway/src/main/resources/OH-INF/thing/thing-types.xml @@ -30,6 +30,10 @@ + + 1 + + @@ -40,11 +44,11 @@ - Number + Number:Power Received signal strength indicator QualityOfService - + DateTime diff --git a/bundles/org.openhab.binding.mqtt.ruuvigateway/src/main/resources/OH-INF/update/update.xml b/bundles/org.openhab.binding.mqtt.ruuvigateway/src/main/resources/OH-INF/update/update.xml new file mode 100644 index 00000000000..ef5acb1800f --- /dev/null +++ b/bundles/org.openhab.binding.mqtt.ruuvigateway/src/main/resources/OH-INF/update/update.xml @@ -0,0 +1,14 @@ + + + + + + + mqtt:ruuvitag_rssi + + + + + diff --git a/bundles/org.openhab.binding.surepetcare/README.md b/bundles/org.openhab.binding.surepetcare/README.md index 2619eccdf9b..4ac46ebad6f 100644 --- a/bundles/org.openhab.binding.surepetcare/README.md +++ b/bundles/org.openhab.binding.surepetcare/README.md @@ -75,53 +75,53 @@ Channel names in **bold** are read/write, everything else is read-only ### Flap Device Thing (Cat or Pet Flap) -| Channel | Type | Description | -|-----------------------|----------|-----------------------------------------------------------------------| -| id | Number | A unique id assigned by the Sure Petcare API | -| name | Text | The name of the flap | -| product | Text | The type of product (3=pet flap, 6=cat flap) | -| curfewEnabled1 | Switch | Indicator if curfew #1 configuration is enabled | -| curfewLockTime1 | Text | The curfew #1 locking time (HH:MM) | -| curfewUnlockTime1 | Text | The curfew #1 unlocking time (HH:MM) | -| curfewEnabled2 | Switch | Indicator if curfew #2 configuration is enabled | -| curfewLockTime2 | Text | The curfew #2 locking time (HH:MM) | -| curfewUnlockTime2 | Text | The curfew #2 unlocking time (HH:MM) | -| curfewEnabled3 | Switch | Indicator if curfew #3 configuration is enabled | -| curfewLockTime3 | Text | The curfew #3 locking time (HH:MM) | -| curfewUnlockTime3 | Text | The curfew #3 unlocking time (HH:MM) | -| curfewEnabled4 | Switch | Indicator if curfew #4 configuration is enabled | -| curfewLockTime4 | Text | The curfew #4 locking time (HH:MM) | -| curfewUnlockTime4 | Text | The curfew #4 unlocking time (HH:MM) | -| lockingMode | Text | The locking mode (e.g. in/out, in-only, out-only etc.) | -| online | Switch | Indicator if the flap is connected to the hub | -| lowBattery | Switch | Indicator if the battery voltage is low | -| batteryLevel | Number | The battery voltage percentage | -| batteryVoltage | Number | The absolute battery voltage measurement | -| deviceRSSI | Number | The received device signal strength in dB | -| hubRSSI | Number | The received hub signal strength in dB | +| Channel | Type | Description | +|--------------------|--------------|------------------------------------------------------------| +| id | Number | A unique id assigned by the Sure Petcare API | +| name | Text | The name of the flap | +| product | Text | The type of product (3=pet flap, 6=cat flap) | +| curfewEnabled1 | Switch | Indicator if curfew #1 configuration is enabled | +| curfewLockTime1 | Text | The curfew #1 locking time (HH:MM) | +| curfewUnlockTime1 | Text | The curfew #1 unlocking time (HH:MM) | +| curfewEnabled2 | Switch | Indicator if curfew #2 configuration is enabled | +| curfewLockTime2 | Text | The curfew #2 locking time (HH:MM) | +| curfewUnlockTime2 | Text | The curfew #2 unlocking time (HH:MM) | +| curfewEnabled3 | Switch | Indicator if curfew #3 configuration is enabled | +| curfewLockTime3 | Text | The curfew #3 locking time (HH:MM) | +| curfewUnlockTime3 | Text | The curfew #3 unlocking time (HH:MM) | +| curfewEnabled4 | Switch | Indicator if curfew #4 configuration is enabled | +| curfewLockTime4 | Text | The curfew #4 locking time (HH:MM) | +| curfewUnlockTime4 | Text | The curfew #4 unlocking time (HH:MM) | +| lockingMode | Text | The locking mode (e.g. in/out, in-only, out-only etc.) | +| online | Switch | Indicator if the flap is connected to the hub | +| lowBattery | Switch | Indicator if the battery voltage is low | +| batteryLevel | Number | The battery voltage percentage | +| batteryVoltage | Number | The absolute battery voltage measurement | +| deviceRSSI | Number:Power | The received device signal strength in dB | +| hubRSSI | Number:Power | The received hub signal strength in dB | ### Feeder Device Thing -| Channel | Type | Description | -|-------------------|-------------|-------------------------------------------------------------------------------------------------| -| id | Number | A unique id assigned by the Sure Petcare API | -| name | Text | The name of the feeder | -| product | Text | The type of product | -| online | Switch | Indicator if the feeder is connected to the hub | -| lowBattery | Switch | Indicator if the battery voltage is low | -| batteryLevel | Number | The battery voltage percentage | -| batteryVoltage | Number | The absolute battery voltage measurement | -| deviceRSSI | Number | The received device signal strength in dB | -| hubRSSI | Number | The received hub signal strength in dB | -| bowls | Text | The feeder bowls type (1 big bowl or 2 half bowls) | -| bowlsFood | Text | The feeder big bowl food type (wet food, dry food or both) | -| bowlsTarget | Number:Mass | The feeder big bowl target weight in gram (even if user setting is oz, API stores this in gram) | -| bowlsFoodLeft | Text | The feeder left half bowl food type (wet food, dry food or both) | -| bowlsTargetLeft | Number:Mass | The feeder left half bowl target weight | -| bowlsFoodRight | Text | The feeder right half bowl food type (wet food, dry food or both) | -| bowlsTargetRight | Number:Mass | The feeder right half bowl target weight | -| bowlsCloseDelay | Text | The feeder lid close delay (fast, normal, slow) | -| bowlsTrainingMode | Text | The feeder training mode (off, full open, almost full open, half closed, almost closed) | +| Channel | Type | Description | +|-------------------|--------------|-------------------------------------------------------------------------------------------------| +| id | Number | A unique id assigned by the Sure Petcare API | +| name | Text | The name of the feeder | +| product | Text | The type of product | +| online | Switch | Indicator if the feeder is connected to the hub | +| lowBattery | Switch | Indicator if the battery voltage is low | +| batteryLevel | Number | The battery voltage percentage | +| batteryVoltage | Number | The absolute battery voltage measurement | +| deviceRSSI | Number:Power | The received device signal strength in dB | +| hubRSSI | Number:Power | The received hub signal strength in dB | +| bowls | Text | The feeder bowls type (1 big bowl or 2 half bowls) | +| bowlsFood | Text | The feeder big bowl food type (wet food, dry food or both) | +| bowlsTarget | Number:Mass | The feeder big bowl target weight in gram (even if user setting is oz, API stores this in gram) | +| bowlsFoodLeft | Text | The feeder left half bowl food type (wet food, dry food or both) | +| bowlsTargetLeft | Number:Mass | The feeder left half bowl target weight | +| bowlsFoodRight | Text | The feeder right half bowl food type (wet food, dry food or both) | +| bowlsTargetRight | Number:Mass | The feeder right half bowl target weight | +| bowlsCloseDelay | Text | The feeder lid close delay (fast, normal, slow) | +| bowlsTrainingMode | Text | The feeder training mode (off, full open, almost full open, half closed, almost closed) | ### Pet Thing diff --git a/bundles/org.openhab.binding.surepetcare/src/main/java/org/openhab/binding/surepetcare/internal/handler/SurePetcareDeviceHandler.java b/bundles/org.openhab.binding.surepetcare/src/main/java/org/openhab/binding/surepetcare/internal/handler/SurePetcareDeviceHandler.java index 6d3ca78f16a..140ba4c4d38 100644 --- a/bundles/org.openhab.binding.surepetcare/src/main/java/org/openhab/binding/surepetcare/internal/handler/SurePetcareDeviceHandler.java +++ b/bundles/org.openhab.binding.surepetcare/src/main/java/org/openhab/binding/surepetcare/internal/handler/SurePetcareDeviceHandler.java @@ -31,6 +31,7 @@ import org.openhab.core.library.types.OnOffType; import org.openhab.core.library.types.QuantityType; import org.openhab.core.library.types.StringType; import org.openhab.core.library.unit.SIUnits; +import org.openhab.core.library.unit.Units; import org.openhab.core.thing.ChannelUID; import org.openhab.core.thing.Thing; import org.openhab.core.types.Command; @@ -138,8 +139,10 @@ public class SurePetcareDeviceHandler extends SurePetcareBaseObjectHandler { (batVol - BATTERY_EMPTY_VOLTAGE) / (BATTERY_FULL_VOLTAGE - BATTERY_EMPTY_VOLTAGE) * 100.0f, 100.0f))); updateState(DEVICE_CHANNEL_LOW_BATTERY, OnOffType.from(batVol < LOW_BATTERY_THRESHOLD)); - updateState(DEVICE_CHANNEL_DEVICE_RSSI, new DecimalType(device.status.signal.deviceRssi)); - updateState(DEVICE_CHANNEL_HUB_RSSI, new DecimalType(device.status.signal.hubRssi)); + updateState(DEVICE_CHANNEL_DEVICE_RSSI, + QuantityType.valueOf(device.status.signal.deviceRssi, Units.DECIBEL_MILLIWATTS)); + updateState(DEVICE_CHANNEL_HUB_RSSI, + QuantityType.valueOf(device.status.signal.hubRssi, Units.DECIBEL_MILLIWATTS)); if (thing.getThingTypeUID().equals(THING_TYPE_FLAP_DEVICE)) { updateThingCurfews(device); diff --git a/bundles/org.openhab.binding.surepetcare/src/main/resources/OH-INF/thing/things.xml b/bundles/org.openhab.binding.surepetcare/src/main/resources/OH-INF/thing/things.xml index cf7e723b7d2..1cd2ae840f7 100644 --- a/bundles/org.openhab.binding.surepetcare/src/main/resources/OH-INF/thing/things.xml +++ b/bundles/org.openhab.binding.surepetcare/src/main/resources/OH-INF/thing/things.xml @@ -144,6 +144,7 @@ + 1 id @@ -186,6 +187,7 @@ + 1 id @@ -548,17 +550,17 @@ - Number + Number:Power The received device signal strength (RSSI). - + - Number + Number:Power The received hub signal strength (RSSI). - + diff --git a/bundles/org.openhab.binding.surepetcare/src/main/resources/OH-INF/update/update.xml b/bundles/org.openhab.binding.surepetcare/src/main/resources/OH-INF/update/update.xml new file mode 100644 index 00000000000..40ededf7cd2 --- /dev/null +++ b/bundles/org.openhab.binding.surepetcare/src/main/resources/OH-INF/update/update.xml @@ -0,0 +1,28 @@ + + + + + + + surepetcare:rssiDeviceType + + + surepetcare:rssiHubType + + + + + + + + surepetcare:rssiDeviceType + + + surepetcare:rssiHubType + + + + + diff --git a/itests/org.openhab.binding.mqtt.ruuvigateway.tests/src/main/java/org/openhab/binding/mqtt/ruuvigateway/RuuviGatewayTest.java b/itests/org.openhab.binding.mqtt.ruuvigateway.tests/src/main/java/org/openhab/binding/mqtt/ruuvigateway/RuuviGatewayTest.java index ab2fad13c5a..dc81e45efaa 100644 --- a/itests/org.openhab.binding.mqtt.ruuvigateway.tests/src/main/java/org/openhab/binding/mqtt/ruuvigateway/RuuviGatewayTest.java +++ b/itests/org.openhab.binding.mqtt.ruuvigateway.tests/src/main/java/org/openhab/binding/mqtt/ruuvigateway/RuuviGatewayTest.java @@ -193,6 +193,13 @@ public class RuuviGatewayTest extends MqttOSGiTest { thingBuilder.withChannel(ChannelBuilder.create(new ChannelUID(thingUID, channelId)).build()); }); + /* + * Since we now have an 'upgrade/instructions.xml' file the {@link ManagedThingProvider} is now obliged to apply + * those instructions to this test thing. And if the test thing is undergoing such an upgrade, the tests beyond + * this line will fail. So we add a 'thingTypeVersion' property to prevent such update process. + */ + thingBuilder.withProperty("thingTypeVersion", "1"); + Thing thing = thingBuilder.build(); thingProvider.add(thing); waitForAssert(() -> assertNotNull(thing.getHandler()));