Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@
/bundles/org.openhab.binding.heliosventilation/ @ramack
/bundles/org.openhab.binding.heos/ @Wire82
/bundles/org.openhab.binding.herzborg/ @Sonic-Amiga
/bundles/org.openhab.binding.homeassistant/ @antroids @ccutrer
/bundles/org.openhab.binding.homeconnect/ @bruestel
/bundles/org.openhab.binding.homematic/ @FStolte @gerrieg @mdicke2s
/bundles/org.openhab.binding.homewizard/ @Daniel-42
Expand Down Expand Up @@ -257,8 +258,6 @@
/bundles/org.openhab.binding.mqtt.awtrixlight/ @DrRSatzteil
/bundles/org.openhab.binding.mqtt.espmilighthub/ @Skinah
/bundles/org.openhab.binding.mqtt.fpp/ @computergeek1507
/bundles/org.openhab.binding.mqtt.generic/ @ccutrer
/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.mspa/ @weymann
Expand Down
15 changes: 5 additions & 10 deletions bom/openhab-addons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,11 @@
<artifactId>org.openhab.binding.herzborg</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.homeassistant</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.homeconnect</artifactId>
Expand Down Expand Up @@ -1266,16 +1271,6 @@
<artifactId>org.openhab.binding.mqtt.espmilighthub</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.mqtt.generic</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.mqtt.homeassistant</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.mqtt.homie</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Home Assistant MQTT Components Binding

NOTE: This binding is provided by the [MQTT binding](https://www.openhab.org/addons/bindings/mqtt/), and therefore no explicit installation is necessary beyond installing the MQTT binding.
# Home Assistant Binding

Devices that use [Home Assistant MQTT Discovery](https://www.home-assistant.io/integrations/mqtt/#mqtt-discovery) are automatically configured with this binding.
Components that share a common `device.identifiers` will automatically be grouped together as a single Thing.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
<version>5.1.0-SNAPSHOT</version>
</parent>

<artifactId>org.openhab.binding.mqtt.homeassistant</artifactId>
<artifactId>org.openhab.binding.homeassistant</artifactId>

<name>openHAB Add-ons :: Bundles :: MQTT HomeAssistant Convention</name>
<name>openHAB Add-ons :: Bundles :: Home Assistant Binding</name>

<properties>
<!-- define a property to overwrite it on Windows, as venv has a different structure -->
Expand All @@ -26,12 +26,6 @@
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.mqtt.generic</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>

<!-- Graal Polyglot Framework -->
<dependency>
Expand Down Expand Up @@ -185,6 +179,19 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.karaf.tooling</groupId>
<artifactId>karaf-maven-plugin</artifactId>
<version>${karaf.version}</version>
<executions>
<execution>
<id>karaf-feature-verification</id>
<!-- disabled for the per-bundle build due to cross-binding reference to MQTT -->
<!-- it will be verified in features/openhab-addons/pom.xml -->
<phase>none</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<features name="org.openhab.binding.mqtt.homeassistant-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0">
<features name="org.openhab.binding.homeassistant-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0">
<repository>mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/${ohc.version}/xml/features</repository>

<!-- ATTENTION: When modifying this feature, you must also update features/openhab-addons/src/main/resources/footer.xml -->
<feature name="openhab-binding-mqtt-homeassistant" description="MQTT Binding Homeassistant" version="${project.version}">
<feature name="openhab-binding-homeassistant" description="Home Assistant Binding" version="${project.version}">
<feature>openhab-runtime-base</feature>
<feature>openhab-transport-mqtt</feature>
<feature>openhab-binding-mqtt</feature>
<feature dependency="true">openhab.tp-commons-net</feature>
<bundle dependency="true">mvn:org.openhab.osgiify/org.graalvm.llvm.llvm-api/25.0.1</bundle>
<bundle dependency="true">mvn:org.openhab.osgiify/org.graalvm.polyglot.polyglot/25.0.1</bundle>
Expand All @@ -25,9 +24,7 @@
<bundle dependency="true">mvn:org.openhab.osgiify/org.graalvm.truffle.truffle-compiler/25.0.1</bundle>
<bundle dependency="true">mvn:org.openhab.osgiify/org.graalvm.truffle.truffle-nfi/25.0.1</bundle>
<bundle dependency="true">mvn:org.openhab.osgiify/org.graalvm.truffle.truffle-runtime/25.0.1</bundle>
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.mqtt/${project.version}</bundle>
<bundle start-level="81">mvn:org.openhab.addons.bundles/org.openhab.binding.mqtt.generic/${project.version}</bundle>
<bundle start-level="82">mvn:org.openhab.addons.bundles/org.openhab.binding.mqtt.homeassistant/${project.version}</bundle>
<bundle start-level="81">mvn:org.openhab.addons.bundles/org.openhab.binding.homeassistant/${project.version}</bundle>
</feature>

</features>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.mqtt.homeassistant.internal;
package org.openhab.binding.homeassistant.internal;

import java.util.Objects;
import java.util.concurrent.CompletableFuture;
Expand All @@ -19,11 +19,11 @@

import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.openhab.binding.homeassistant.internal.component.AbstractComponent;
import org.openhab.binding.mqtt.generic.ChannelConfigBuilder;
import org.openhab.binding.mqtt.generic.ChannelState;
import org.openhab.binding.mqtt.generic.ChannelStateUpdateListener;
import org.openhab.binding.mqtt.generic.values.Value;
import org.openhab.binding.mqtt.homeassistant.internal.component.AbstractComponent;
import org.openhab.core.config.core.Configuration;
import org.openhab.core.io.transport.mqtt.MqttBrokerConnection;
import org.openhab.core.thing.Channel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.mqtt.homeassistant.internal;
package org.openhab.binding.homeassistant.internal;

import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.binding.mqtt.homeassistant.generic.internal.MqttBindingConstants;
import org.openhab.core.thing.type.ChannelTypeUID;

/**
Expand All @@ -23,23 +22,23 @@
*/
@NonNullByDefault
public enum ComponentChannelType {
COLOR("ha-color"),
DIMMER("ha-dimmer"),
IMAGE("ha-image"),
LOCATION("ha-location"),
NUMBER("ha-number"),
ROLLERSHUTTER("ha-rollershutter"),
STRING("ha-string"),
SWITCH("ha-switch"),
TRIGGER("ha-trigger"),
HUMIDITY("ha-humidity"),
GPS_ACCURACY("ha-gps-accuracy"),
TEMPERATURE("ha-temperature");
COLOR("color"),
DIMMER("dimmer"),
IMAGE("image"),
LOCATION("location"),
NUMBER("number"),
ROLLERSHUTTER("rollershutter"),
STRING("string"),
SWITCH("switch"),
TRIGGER("trigger"),
HUMIDITY("humidity"),
GPS_ACCURACY("gps-accuracy"),
TEMPERATURE("temperature");

final ChannelTypeUID channelTypeUID;

ComponentChannelType(String id) {
channelTypeUID = new ChannelTypeUID(MqttBindingConstants.BINDING_ID, id);
channelTypeUID = new ChannelTypeUID(HomeAssistantBindingConstants.BINDING_ID, id);
}

public ChannelTypeUID getChannelTypeUID() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.mqtt.homeassistant.internal;
package org.openhab.binding.homeassistant.internal;

import java.lang.ref.WeakReference;
import java.util.HashSet;
Expand All @@ -23,13 +23,13 @@

import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.openhab.binding.homeassistant.internal.component.AbstractComponent;
import org.openhab.binding.homeassistant.internal.component.ComponentFactory;
import org.openhab.binding.homeassistant.internal.exception.ConfigurationException;
import org.openhab.binding.homeassistant.internal.exception.UnsupportedComponentException;
import org.openhab.binding.mqtt.generic.AvailabilityTracker;
import org.openhab.binding.mqtt.generic.ChannelStateUpdateListener;
import org.openhab.binding.mqtt.generic.utils.FutureCollector;
import org.openhab.binding.mqtt.homeassistant.internal.component.AbstractComponent;
import org.openhab.binding.mqtt.homeassistant.internal.component.ComponentFactory;
import org.openhab.binding.mqtt.homeassistant.internal.exception.ConfigurationException;
import org.openhab.binding.mqtt.homeassistant.internal.exception.UnsupportedComponentException;
import org.openhab.core.i18n.UnitProvider;
import org.openhab.core.io.transport.mqtt.MqttBrokerConnection;
import org.openhab.core.io.transport.mqtt.MqttMessageSubscriber;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.mqtt.homeassistant.internal;
package org.openhab.binding.homeassistant.internal;

import java.util.ArrayList;
import java.util.Collection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.mqtt.homeassistant.internal;
package org.openhab.binding.homeassistant.internal;

import java.util.Collections;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,25 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.mqtt.homeassistant.generic.internal;
package org.openhab.binding.homeassistant.internal;

import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.core.thing.ThingTypeUID;

/**
* The {@link MqttBindingConstants} class defines common constants, which are
* The {@link HomeAssistantBindingConstants} class defines common constants, which are
* used across the whole binding.
*
* @author David Graeff - Initial contribution
*/
@NonNullByDefault
public class MqttBindingConstants {
public class HomeAssistantBindingConstants {

public static final String BINDING_ID = "mqtt";
public static final String LEGACY_BINDING_ID = "mqtt";
public static final String BINDING_ID = "homeassistant";

// List of all Thing Type UIDs
public static final ThingTypeUID HOMEASSISTANT_MQTT_THING = new ThingTypeUID(BINDING_ID, "homeassistant");
public static final ThingTypeUID LEGACY_MQTT_HOMEASSISTANT_THING = new ThingTypeUID(LEGACY_BINDING_ID,
"homeassistant");
public static final ThingTypeUID HOMEASSISTANT_DEVICE_THING = new ThingTypeUID(BINDING_ID, "device");
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.mqtt.homeassistant.internal;
package org.openhab.binding.homeassistant.internal;

import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.core.thing.ChannelUID;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.mqtt.homeassistant.internal;
package org.openhab.binding.homeassistant.internal;

import java.util.concurrent.CompletableFuture;
import java.util.function.Predicate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.mqtt.homeassistant.internal;
package org.openhab.binding.homeassistant.internal;

import java.util.Map;
import java.util.Optional;
Expand All @@ -19,7 +19,7 @@
import org.eclipse.jdt.annotation.Nullable;
import org.graalvm.polyglot.PolyglotException;
import org.graalvm.polyglot.Value;
import org.openhab.binding.mqtt.homeassistant.internal.component.AbstractComponent;
import org.openhab.binding.homeassistant.internal.component.AbstractComponent;
import org.openhab.core.thing.binding.generic.ChannelTransformation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.mqtt.homeassistant.internal;
package org.openhab.binding.homeassistant.internal;

/**
* Provides the configured and static settings for the Homekit addon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.mqtt.homeassistant.internal;
package org.openhab.binding.homeassistant.internal;

import java.io.File;
import java.nio.file.Path;
Expand All @@ -29,7 +29,7 @@
import org.graalvm.polyglot.Value;
import org.graalvm.python.embedding.GraalPyResources;
import org.graalvm.python.embedding.VirtualFileSystem;
import org.openhab.binding.mqtt.homeassistant.internal.exception.ConfigurationException;
import org.openhab.binding.homeassistant.internal.exception.ConfigurationException;
import org.openhab.core.OpenHAB;
import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Component;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.mqtt.homeassistant.internal;
package org.openhab.binding.homeassistant.internal;

import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.binding.mqtt.generic.MqttChannelStateDescriptionProvider;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.mqtt.homeassistant.internal;
package org.openhab.binding.homeassistant.internal;

import java.util.logging.Handler;
import java.util.logging.LogRecord;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.mqtt.homeassistant.internal.actions;
package org.openhab.binding.homeassistant.internal.actions;

import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.openhab.binding.mqtt.homeassistant.internal.handler.HomeAssistantThingHandler;
import org.openhab.binding.homeassistant.internal.handler.HomeAssistantThingHandler;
import org.openhab.core.automation.annotation.RuleAction;
import org.openhab.core.thing.binding.ThingActions;
import org.openhab.core.thing.binding.ThingActionsScope;
Expand Down
Loading