Skip to content

Commit

Permalink
Merge branch 'openhab:main' into #17807-govee
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewfg authored Dec 11, 2024
2 parents 14280b4 + 2a58b8e commit 7886e93
Show file tree
Hide file tree
Showing 418 changed files with 18,829 additions and 1,954 deletions.
18 changes: 14 additions & 4 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
/bundles/org.openhab.binding.anel/ @paphko
/bundles/org.openhab.binding.anthem/ @mhilbush
/bundles/org.openhab.binding.argoclima/ @mbronk
/bundles/org.openhab.binding.asuswrt/ @wildcs
/bundles/org.openhab.binding.astro/ @gerrieg
/bundles/org.openhab.binding.asuswrt/ @wildcs
/bundles/org.openhab.binding.atlona/ @mlobstein
/bundles/org.openhab.binding.autelis/ @digitaldan
/bundles/org.openhab.binding.automower/ @maxpg
Expand All @@ -58,6 +58,7 @@
/bundles/org.openhab.binding.boschindego/ @jofleck @jlaur
/bundles/org.openhab.binding.boschshc/ @david-pace @GerdZanker
/bundles/org.openhab.binding.bosesoundtouch/ @marvkis @tratho
/bundles/org.openhab.binding.broadlink/ @dag81
/bundles/org.openhab.binding.broadlinkthermostat/ @flo-02-mu
/bundles/org.openhab.binding.bsblan/ @hypetsch
/bundles/org.openhab.binding.bticinosmarther/ @MrRonfo
Expand Down Expand Up @@ -118,6 +119,7 @@
/bundles/org.openhab.binding.fenecon/ @nixoso
/bundles/org.openhab.binding.fineoffsetweatherstation/ @Andy2003
/bundles/org.openhab.binding.flicbutton/ @pfink
/bundles/org.openhab.binding.flume/ @jsjames
/bundles/org.openhab.binding.fmiweather/ @ssalonen
/bundles/org.openhab.binding.folderwatcher/ @goopilot
/bundles/org.openhab.binding.folding/ @fa2k
Expand All @@ -139,6 +141,7 @@
/bundles/org.openhab.binding.gpio/ @nils-bauer
/bundles/org.openhab.binding.gpstracker/ @gbicskei
/bundles/org.openhab.binding.gree/ @markus7017
/bundles/org.openhab.binding.gridbox/ @benediktkuntz
/bundles/org.openhab.binding.groheondus/ @FlorianSW
/bundles/org.openhab.binding.groupepsa/ @arjanmels
/bundles/org.openhab.binding.growatt/ @andrewfg
Expand All @@ -159,6 +162,7 @@
/bundles/org.openhab.binding.hpprinter/ @cossey
/bundles/org.openhab.binding.http/ @J-N-K
/bundles/org.openhab.binding.hue/ @cweitkamp @andrewfg
/bundles/org.openhab.binding.huesync/ @pgfeller
/bundles/org.openhab.binding.hydrawise/ @digitaldan
/bundles/org.openhab.binding.hyperion/ @tavalin
/bundles/org.openhab.binding.iammeter/ @lewei50
Expand Down Expand Up @@ -194,6 +198,7 @@
/bundles/org.openhab.binding.lgtvserial/ @fa2k
/bundles/org.openhab.binding.lgwebos/ @sprehn
/bundles/org.openhab.binding.lifx/ @wborn
/bundles/org.openhab.binding.linktap/ @dag81
/bundles/org.openhab.binding.linky/ @clinique @lolodomo
/bundles/org.openhab.binding.linuxinput/ @t-8ch
/bundles/org.openhab.binding.liquidcheck/ @marcelGoerentz
Expand All @@ -216,6 +221,7 @@
/bundles/org.openhab.binding.meteoblue/ @9037568
/bundles/org.openhab.binding.meteofrance/ @clinique
/bundles/org.openhab.binding.meteostick/ @cdjackson
/bundles/org.openhab.binding.metofficedatahub/ @dag81
/bundles/org.openhab.binding.mffan/ @mark-brooks-180
/bundles/org.openhab.binding.miele/ @kgoderis @jlaur
/bundles/org.openhab.binding.mielecloud/ @BjoernLange
Expand All @@ -228,6 +234,7 @@
/bundles/org.openhab.binding.modbus/ @ssalonen
/bundles/org.openhab.binding.modbus.e3dc/ @weymann
/bundles/org.openhab.binding.modbus.helioseasycontrols/ @bern77
/bundles/org.openhab.binding.modbus.kermi/ @KaaNee
/bundles/org.openhab.binding.modbus.sbc/ @fwolter
/bundles/org.openhab.binding.modbus.stiebeleltron/ @pail23
/bundles/org.openhab.binding.modbus.studer/ @giovannimirulla
Expand All @@ -242,10 +249,11 @@
/bundles/org.openhab.binding.mqtt.homeassistant/ @antroids @ccutrer
/bundles/org.openhab.binding.mqtt.homie/ @ccutrer
/bundles/org.openhab.binding.mqtt.ruuvigateway/ @ssalonen
/bundles/org.openhab.binding.mycroft/ @dalgwen
/bundles/org.openhab.binding.mybmw/ @ntruchsess @mherwege @martingrassl
/bundles/org.openhab.binding.mycroft/ @dalgwen
/bundles/org.openhab.binding.mynice/ @clinique
/bundles/org.openhab.binding.mystrom/ @pail23
/bundles/org.openhab.binding.myuplink/ @alexf2015
/bundles/org.openhab.binding.nanoleaf/ @stefan-hoehn
/bundles/org.openhab.binding.neato/ @jjlauterbach
/bundles/org.openhab.binding.neeo/ @morph166955
Expand Down Expand Up @@ -308,10 +316,10 @@
/bundles/org.openhab.binding.radiobrowser/ @skinah
/bundles/org.openhab.binding.radiothermostat/ @mlobstein
/bundles/org.openhab.binding.regoheatpump/ @crnjan
/bundles/org.openhab.binding.revogi/ @andibraeu
/bundles/org.openhab.binding.remoteopenhab/ @lolodomo
/bundles/org.openhab.binding.renault/ @dougculnane
/bundles/org.openhab.binding.resol/ @ramack
/bundles/org.openhab.binding.revogi/ @andibraeu
/bundles/org.openhab.binding.rfxcom/ @martinvw @paulianttila
/bundles/org.openhab.binding.rme/ @kgoderis
/bundles/org.openhab.binding.robonect/ @reyem
Expand All @@ -332,6 +340,7 @@
/bundles/org.openhab.binding.serial/ @MikeJMajor
/bundles/org.openhab.binding.serialbutton/ @kaikreuzer
/bundles/org.openhab.binding.shelly/ @markus7017
/bundles/org.openhab.binding.siemenshvac/ @lo92fr
/bundles/org.openhab.binding.siemensrds/ @andrewfg
/bundles/org.openhab.binding.silvercrestwifisocket/ @jmvaz
/bundles/org.openhab.binding.sinope/ @chaton78
Expand Down Expand Up @@ -402,6 +411,7 @@
/bundles/org.openhab.binding.visualcrossing/ @magx2
/bundles/org.openhab.binding.vitotronic/ @steand
/bundles/org.openhab.binding.vizio/ @mlobstein
/bundles/org.openhab.binding.volumio/ @miloit
/bundles/org.openhab.binding.volvooncall/ @Jamstah
/bundles/org.openhab.binding.warmup/ @jamesmelville
/bundles/org.openhab.binding.weathercompany/ @mhilbush
Expand All @@ -411,6 +421,7 @@
/bundles/org.openhab.binding.wemo/ @hmerk @jlaur
/bundles/org.openhab.binding.wifiled/ @openhab/add-ons-maintainers
/bundles/org.openhab.binding.windcentrale/ @marcelrv @wborn
/bundles/org.openhab.binding.wiz/ @ccutrer @frejos
/bundles/org.openhab.binding.wlanthermo/ @CSchlipp
/bundles/org.openhab.binding.wled/ @Skinah
/bundles/org.openhab.binding.wolfsmartset/ @BoBiene
Expand All @@ -422,7 +433,6 @@
/bundles/org.openhab.binding.yamahareceiver/ @zarusz
/bundles/org.openhab.binding.yeelight/ @claell
/bundles/org.openhab.binding.yioremote/ @miloit
/bundles/org.openhab.binding.volumio/ @miloit
/bundles/org.openhab.binding.zoneminder/ @mhilbush
/bundles/org.openhab.binding.zway/ @pathec
/bundles/org.openhab.io.homekit/ @andylintner @ccutrer @yfre
Expand Down
15 changes: 15 additions & 0 deletions bom/openhab-addons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,11 @@
<artifactId>org.openhab.binding.hue</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.huesync</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.hydrawise</artifactId>
Expand Down Expand Up @@ -1236,6 +1241,11 @@
<artifactId>org.openhab.binding.mystrom</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.myuplink</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.nanoleaf</artifactId>
Expand Down Expand Up @@ -2071,6 +2081,11 @@
<artifactId>org.openhab.binding.windcentrale</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.wiz</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.wlanthermo</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,15 @@ public void scopeValues(ScriptEngine scriptEngine, Map<String, Object> scopeValu
ImportCustomizer importCustomizer = new ImportCustomizer();
for (Map.Entry<String, Object> entry : scopeValues.entrySet()) {
if (entry.getValue() instanceof Class<?> clazz) {
importCustomizer.addImport(entry.getKey(), clazz.getCanonicalName());
String canonicalName = clazz.getCanonicalName();
try {
// Only add imports for classes that are available to the classloader
getClass().getClassLoader().loadClass(canonicalName);
importCustomizer.addImport(entry.getKey(), canonicalName);
logger.debug("Added import for {} as {}", entry.getKey(), canonicalName);
} catch (ClassNotFoundException e) {
logger.debug("Unable to add import for {} as {}", entry.getKey(), canonicalName, e);
}
} else {
scriptEngine.put(entry.getKey(), entry.getValue());
}
Expand Down
4 changes: 2 additions & 2 deletions bundles/org.openhab.automation.jrubyscripting/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<name>openHAB Add-ons :: Bundles :: Automation :: JRuby Scripting</name>

<properties>
<bnd.importpackage>com.sun.nio.*;resolution:=optional,com.sun.security.*;resolution:=optional,org.apache.tools.ant.*;resolution:=optional,org.bouncycastle.*;resolution:=optional,org.joda.*;resolution:=optional,sun.management.*;resolution:=optional,sun.nio.*;resolution:=optional,jakarta.annotation;resolution:=optional</bnd.importpackage>
<jruby.version>9.4.8.0</jruby.version>
<bnd.importpackage>com.sun.nio.*;resolution:=optional,com.sun.security.*;resolution:=optional,org.apache.tools.ant.*;resolution:=optional,org.bouncycastle.*;resolution:=optional,org.joda.*;resolution:=optional,sun.management.*;resolution:=optional,sun.nio.*;resolution:=optional,jakarta.annotation;resolution:=optional,jdk.crac.management;resolution:=optional</bnd.importpackage>
<jruby.version>9.4.9.0</jruby.version>
</properties>

<dependencies>
Expand Down
13 changes: 10 additions & 3 deletions bundles/org.openhab.automation.jsscripting/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -809,13 +809,20 @@ See [openhab-js : actions.NotificationBuilder](https://openhab.github.io/openhab
The cache namespace provides both a private and a shared cache that can be used to set and retrieve data that will be persisted between subsequent runs of the same or between scripts.
The private cache can only be accessed by the same script and is cleared when the script is unloaded.
You can use it to store both primitives and objects, e.g. store timers or counters between subsequent runs of that script.
You can use it to store primitives and objects, e.g. store timers or counters between subsequent runs of that script.
When a script is unloaded and its cache is cleared, all timers (see [`createTimer`](#createtimer)) stored in its private cache are automatically cancelled.
The shared cache is shared across all rules and scripts, it can therefore be accessed from any automation language.
The access to every key is tracked and the key is removed when all scripts that ever accessed that key are unloaded.
If that key stored a timer, the timer will be cancelled.
You can use it to store **only primitives**, as storing objects is not thread-safe and can cause script execution failures.
You can use it to store primitives and **Java** objects, e.g. store timers or counters between multiple scripts.
Due to a multi-threading limitation in GraalJS (the JavaScript engine used by JavaScript Scripting), it is not recommended to store JavaScript objects in the shared cache.
Multi-threaded access to JavaScript objects will lead to script execution failure!
You can work-around that limitation by either serialising and deserialising JS objects or by switching to their Java counterparts.
Timers as created by [`createTimer`](#createtimer) can be stored in the shared cache.
The ids of timers and intervals as created by `setTimeout` and `setInterval` cannot be shared across scripts as these ids are local to the script where they were created.
See [openhab-js : cache](https://openhab.github.io/openhab-js/cache.html) for full API documentation.
Expand Down Expand Up @@ -1240,7 +1247,7 @@ Operations and conditions can also optionally take functions:
```javascript
rules.when().item("F1_light").changed().then(event => {
console.log(event);
console.log(event);
}).build("Test Rule", "My Test Rule");
```
Expand Down
2 changes: 1 addition & 1 deletion bundles/org.openhab.automation.jsscripting/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<!-- Remember to check if the fix https://github.com/openhab/openhab-core/pull/4437 still works when upgrading GraalJS -->
<graal.version>22.0.0.2</graal.version> <!-- DO NOT UPGRADE: 22.0.0.2 is the latest version working on armv7l / OpenJDK 11.0.16 & armv7l / Zulu 17.0.5+8 -->
<oh.version>${project.version}</oh.version>
<ohjs.version>[email protected].0</ohjs.version>
<ohjs.version>[email protected].1</ohjs.version>
</properties>

<build>
Expand Down
2 changes: 1 addition & 1 deletion bundles/org.openhab.binding.airgradient/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
<property name="firmwareVersion"/>
<property name="serialNumber"/>
<property name="modelId"/>
<property name="thingTypeVersion">1</property>
</properties>
<representation-property>serialNumber</representation-property>

Expand Down Expand Up @@ -121,6 +122,7 @@
<property name="firmwareVersion"/>
<property name="serialNumber"/>
<property name="modelId"/>
<property name="thingTypeVersion">1</property>
</properties>
<representation-property>location</representation-property>

Expand Down Expand Up @@ -161,7 +163,7 @@
</channel-type>

<channel-type id="wifi">
<item-type>Number</item-type>
<item-type unitHint="dBm">Number:Power</item-type>
<label>RSSI</label>
<description>Received signal strength indicator</description>
<category>QualityOfService</category>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<update:update-descriptions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:update="https://openhab.org/schemas/update-description/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/update-description/v1.0.0 https://openhab.org/schemas/update-description-1.0.0.xsd">

<thing-type uid="airgradient:airgradient-local">
<instruction-set targetVersion="1">
<update-channel id="wifi">
<type>airgradient:wifi</type>
</update-channel>
</instruction-set>
</thing-type>

<thing-type uid="airgradient:airgradient-location">
<instruction-set targetVersion="1">
<update-channel id="wifi">
<type>airgradient:wifi</type>
</update-channel>
</instruction-set>
</thing-type>

</update:update-descriptions>
Original file line number Diff line number Diff line change
Expand Up @@ -579,15 +579,17 @@ public void connect() {
logger.trace("{} - Starting Reader Thread for {}:{}", handler.getThingID(), config.ipAddress,
config.googletvPort);

Thread readerThread = new Thread(this::readerThreadJob, "GoogleTV reader " + handler.getThingID());
Thread readerThread = new Thread(this::readerThreadJob,
"OH-binding-" + handler.getThingUID() + "-GoogleTVReader");
readerThread.setDaemon(true);
readerThread.start();
this.readerThread = readerThread;

logger.trace("{} - Starting Sender Thread for {}:{}", handler.getThingID(), config.ipAddress,
config.googletvPort);

Thread senderThread = new Thread(this::senderThreadJob, "GoogleTV sender " + handler.getThingID());
Thread senderThread = new Thread(this::senderThreadJob,
"OH-binding-" + handler.getThingUID() + "-GoogleTVSender");
senderThread.setDaemon(true);
senderThread.start();
this.senderThread = senderThread;
Expand Down Expand Up @@ -698,12 +700,14 @@ public void shimInitialize() {
this.shimServerSocket = serverSocket;
this.shimQueue.clear();

Thread readerThread = new Thread(this::shimReaderThreadJob, "GoogleTV shim reader");
Thread readerThread = new Thread(this::shimReaderThreadJob,
"OH-binding-" + handler.getThingUID() + "-GoogleTVShimReader");
readerThread.setDaemon(true);
readerThread.start();
this.shimReaderThread = readerThread;

Thread senderThread = new Thread(this::shimSenderThreadJob, "GoogleTV shim sender");
Thread senderThread = new Thread(this::shimSenderThreadJob,
"OH-binding-" + handler.getThingUID() + "-GoogleTVShimSender");
senderThread.setDaemon(true);
senderThread.start();
this.shimSenderThread = senderThread;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -443,12 +443,14 @@ public void connect() {

setStatus(false, "offline.initializing");

Thread readerThread = new Thread(this::readerThreadJob, "ShieldTV reader " + handler.getThingID());
Thread readerThread = new Thread(this::readerThreadJob,
"OH-binding-" + handler.getThingUID() + "-ShieldTVReader");
readerThread.setDaemon(true);
readerThread.start();
this.readerThread = readerThread;

Thread senderThread = new Thread(this::senderThreadJob, "ShieldTV sender " + handler.getThingID());
Thread senderThread = new Thread(this::senderThreadJob,
"OH-binding-" + handler.getThingUID() + "-ShieldTVSender");
senderThread.setDaemon(true);
senderThread.start();
this.senderThread = senderThread;
Expand Down Expand Up @@ -513,13 +515,13 @@ public void shimInitialize() {
this.shimServerSocket = serverSocket;

Thread readerThread = new Thread(this::shimReaderThreadJob,
"ShieldTV shim reader " + handler.getThingID());
"OH-binding-" + handler.getThingUID() + "-ShieldTVShimReader");
readerThread.setDaemon(true);
readerThread.start();
this.shimReaderThread = readerThread;

Thread senderThread = new Thread(this::shimSenderThreadJob,
"ShieldTV shim sender" + handler.getThingID());
"OH-binding-" + handler.getThingUID() + "-ShieldTVShimSender");
senderThread.setDaemon(true);
senderThread.start();
this.shimSenderThread = senderThread;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,12 @@ private synchronized void connect() {
scheduleConnectRetry(reconnectIntervalMinutes);
return;
}
Thread localReaderThread = new Thread(this::readerThreadJob, "Anthem reader");
Thread localReaderThread = new Thread(this::readerThreadJob, "OH-binding-" + getThing().getUID() + "-Reader");
localReaderThread.setDaemon(true);
localReaderThread.start();
this.readerThread = localReaderThread;

Thread localSenderThread = new Thread(this::senderThreadJob, "Anthem sender");
Thread localSenderThread = new Thread(this::senderThreadJob, "OH-binding-" + getThing().getUID() + "-Sender");
localSenderThread.setDaemon(true);
localSenderThread.start();
this.senderThread = localSenderThread;
Expand Down
Loading

0 comments on commit 7886e93

Please sign in to comment.