Skip to content

Commit

Permalink
[freeathome] Rename binding from freeathomesystem (openhab#16718)
Browse files Browse the repository at this point in the history
* Remove 'System' from the binding name

Signed-off-by: Leo Siepel <leosiepel@gmail.com>
  • Loading branch information
lsiepel authored May 5, 2024
1 parent cc439e2 commit f9d9dc2
Show file tree
Hide file tree
Showing 38 changed files with 123 additions and 125 deletions.
2 changes: 1 addition & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
/bundles/org.openhab.binding.folderwatcher/ @goopilot
/bundles/org.openhab.binding.folding/ @fa2k
/bundles/org.openhab.binding.foobot/ @airboxlab @Hilbrand
/bundles/org.openhab.binding.freeathomesystem/ @andrasU
/bundles/org.openhab.binding.freeathome/ @andrasU
/bundles/org.openhab.binding.freebox/ @lolodomo
/bundles/org.openhab.binding.freeboxos/ @clinique
/bundles/org.openhab.binding.freecurrency/ @J-N-K
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Things are all discovered automatically and visible on the openHAB UI after push
In order to manually configure a Thing:

```java
Bridge freeathomesystem:bridge:mysysap [ ipAddress="...", username="...", password="..." ]
Bridge freeathome:bridge:mysysap [ ipAddress="...", username="...", password="..." ]
{
Thing device ABB700000001
Thing device ABB700000012
Expand All @@ -116,20 +116,20 @@ The creation of the openHAB channels to operate the free@home device is happenin
Sample for the free@home thermostat device

```java
Switch Livingroom_Thermostat_Switch "Thermostat Siwtch" <temperature> (Livingroom) { channel="freeathomesystem:device:312095ad75:ABB700000001:ch0000#controller-on-off-request" }
Switch LivingRoom_Thermostat_EcoOnOff "Thermostat Eco Activation" <switch> (Livingroom) { channel="freeathomesystem:device:312095ad75:ABB700000001:ch0000#eco-mode-on-off-request" }
Number LivingRoom_Thermostat_MeasuredTemperature "Measured Temperature" <temperature> (Livingroom) ["Temperature"] { channel="freeathomesystem:device:312095ad75:ABB700000001:ch0000#measured-temperature" }
Number LivingRoom_Thermostat_SetpointTemperature "Setpoint Temperature" <temperature> (Livingroom) ["Setpoint", "Temperature"] { channel="freeathomesystem:device:312095ad75:ABB700000001:ch0000#absolute-setpoint-temperature" }
Number LivingRoom_ThermostatHeatingActive "Thermostat Heating Active" <temperature> (Livingroom) ["Status"] { channel="freeathomesystem:device:312095ad75:ABB700000001:ch0000#heating-active" }
Number LivingRoom_ThermostatHeatingDemand "Thermostat Heating Demand" <temperature> (Livingroom) ["Status"] { channel="freeathomesystem:device:312095ad75:ABB700000001:ch0000#status-indication" }
Switch Livingroom_Thermostat_Switch "Thermostat Siwtch" <temperature> (Livingroom) { channel="freeathome:device:312095ad75:ABB700000001:ch0000#controller-on-off-request" }
Switch LivingRoom_Thermostat_EcoOnOff "Thermostat Eco Activation" <switch> (Livingroom) { channel="freeathome:device:312095ad75:ABB700000001:ch0000#eco-mode-on-off-request" }
Number LivingRoom_Thermostat_MeasuredTemperature "Measured Temperature" <temperature> (Livingroom) ["Temperature"] { channel="freeathome:device:312095ad75:ABB700000001:ch0000#measured-temperature" }
Number LivingRoom_Thermostat_SetpointTemperature "Setpoint Temperature" <temperature> (Livingroom) ["Setpoint", "Temperature"] { channel="freeathome:device:312095ad75:ABB700000001:ch0000#absolute-setpoint-temperature" }
Number LivingRoom_ThermostatHeatingActive "Thermostat Heating Active" <temperature> (Livingroom) ["Status"] { channel="freeathome:device:312095ad75:ABB700000001:ch0000#heating-active" }
Number LivingRoom_ThermostatHeatingDemand "Thermostat Heating Demand" <temperature> (Livingroom) ["Status"] { channel="freeathome:device:312095ad75:ABB700000001:ch0000#status-indication" }
```

Sample for the free@home device for switch

```java
Switch Livingroom_Switch "Livingroom Switch" <switch> (Livingroom) ["Light"] { channel="freeathomesystem:device:312095ad75:ABB700000012:ch0000#switch-on-off" }
Switch Livingroom_Lamp "Livingroom Lamp" <switch> (Livingroom) ["Light"] { channel="freeathomesystem:device:312095ad75:ABB700000012:ch0006#switch-on-off" }
Switch Livingroom_Aux "Livingroom Aux Switch" <switch> (Livingroom) ["Light"] { channel="freeathomesystem:device:312095ad75:ABB700000012:ch000b#switch-on-off" }
Switch Livingroom_Switch "Livingroom Switch" <switch> (Livingroom) ["Light"] { channel="freeathome:device:312095ad75:ABB700000012:ch0000#switch-on-off" }
Switch Livingroom_Lamp "Livingroom Lamp" <switch> (Livingroom) ["Light"] { channel="freeathome:device:312095ad75:ABB700000012:ch0006#switch-on-off" }
Switch Livingroom_Aux "Livingroom Aux Switch" <switch> (Livingroom) ["Light"] { channel="freeathome:device:312095ad75:ABB700000012:ch000b#switch-on-off" }
```

# Communities
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<version>4.2.0-SNAPSHOT</version>
</parent>

<artifactId>org.openhab.binding.freeathomesystem</artifactId>
<artifactId>org.openhab.binding.freeathome</artifactId>

<name>openHAB Add-ons :: Bundles :: FreeAtHomeSystem Binding</name>
<name>openHAB Add-ons :: Bundles :: FreeAtHome Binding</name>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<features name="org.openhab.binding.freeathome-${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>

<feature name="openhab-binding-freeathome" description="FreeAtHome Binding" version="${project.version}">
<feature>openhab-runtime-base</feature>
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.freeathome/${project.version}</bundle>
</feature>
</features>
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,25 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.freeathomesystem.internal;
package org.openhab.binding.freeathome.internal;

import java.util.Set;

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

/**
* The {@link FreeAtHomeSystemBindingConstants} class defines common constants, which are
* The {@link FreeAtHomeBindingConstants} class defines common constants, which are
* used across the whole binding.
*
* @author Andras Uhrin - Initial contribution
*/
@NonNullByDefault
public class FreeAtHomeSystemBindingConstants {
public class FreeAtHomeBindingConstants {

public static final String CONFIG_DESCRIPTION_URI_THING_PREFIX = "thing-type";

public static final String BINDING_ID = "freeathomesystem";
public static final String BINDING_ID = "freeathome";

// List of all Thing Type UIDs
public static final String BRIDGE_TYPE_ID = "gateway";
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.freeathomesystem.internal;
package org.openhab.binding.freeathome.internal;

import java.time.Instant;
import java.util.HashMap;
Expand All @@ -22,9 +22,9 @@

import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.openhab.binding.freeathomesystem.internal.datamodel.FreeAtHomeDeviceDescription;
import org.openhab.binding.freeathomesystem.internal.handler.FreeAtHomeBridgeHandler;
import org.openhab.binding.freeathomesystem.internal.util.FreeAtHomeHttpCommunicationException;
import org.openhab.binding.freeathome.internal.datamodel.FreeAtHomeDeviceDescription;
import org.openhab.binding.freeathome.internal.handler.FreeAtHomeBridgeHandler;
import org.openhab.binding.freeathome.internal.util.FreeAtHomeHttpCommunicationException;
import org.openhab.core.config.discovery.AbstractThingHandlerDiscoveryService;
import org.openhab.core.config.discovery.DiscoveryResult;
import org.openhab.core.config.discovery.DiscoveryResultBuilder;
Expand All @@ -34,14 +34,14 @@
import org.slf4j.LoggerFactory;

/**
* The {@link FreeAtHomeSystemDiscoveryService} is responsible for performing discovery of things
* The {@link FreeAtHomeDiscoveryService} is responsible for performing discovery of things
*
* @author Andras Uhrin - Initial contribution
*/
@NonNullByDefault
public class FreeAtHomeSystemDiscoveryService extends AbstractThingHandlerDiscoveryService<FreeAtHomeBridgeHandler> {
public class FreeAtHomeDiscoveryService extends AbstractThingHandlerDiscoveryService<FreeAtHomeBridgeHandler> {

private final Logger logger = LoggerFactory.getLogger(FreeAtHomeSystemDiscoveryService.class);
private final Logger logger = LoggerFactory.getLogger(FreeAtHomeDiscoveryService.class);
private @Nullable ScheduledFuture<?> backgroundDiscoveryJob = null;

private static final long BACKGROUND_DISCOVERY_DELAY = 1L;
Expand All @@ -60,8 +60,7 @@ public void run() {
for (int i = 0; (i < deviceList.size()) && !isScanTerminated; i++) {
FreeAtHomeDeviceDescription device = thingHandler.getFreeatHomeDeviceDescription(deviceList.get(i));

ThingUID uid = new ThingUID(FreeAtHomeSystemBindingConstants.DEVICE_TYPE_UID, bridgeUID,
device.deviceId);
ThingUID uid = new ThingUID(FreeAtHomeBindingConstants.DEVICE_TYPE_UID, bridgeUID, device.deviceId);
Map<String, Object> properties = new HashMap<>(1);
properties.put("deviceId", device.deviceId);
properties.put("interface", device.interfaceType);
Expand All @@ -88,18 +87,17 @@ public void run() {
}
};

public FreeAtHomeSystemDiscoveryService(int timeout) {
super(FreeAtHomeBridgeHandler.class, FreeAtHomeSystemBindingConstants.SUPPORTED_THING_TYPES_UIDS, timeout,
false);
public FreeAtHomeDiscoveryService(int timeout) {
super(FreeAtHomeBridgeHandler.class, FreeAtHomeBindingConstants.SUPPORTED_THING_TYPES_UIDS, timeout, false);
}

public FreeAtHomeSystemDiscoveryService() {
public FreeAtHomeDiscoveryService() {
this(90);
}

@Override
public Set<ThingTypeUID> getSupportedThingTypes() {
return Set.of(FreeAtHomeSystemBindingConstants.BRIDGE_TYPE_UID);
return Set.of(FreeAtHomeBindingConstants.BRIDGE_TYPE_UID);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.freeathomesystem.internal;
package org.openhab.binding.freeathome.internal;

import static org.openhab.binding.freeathomesystem.internal.FreeAtHomeSystemBindingConstants.*;
import static org.openhab.binding.freeathome.internal.FreeAtHomeBindingConstants.*;

import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.jetty.client.HttpClient;
import org.openhab.binding.freeathomesystem.internal.handler.FreeAtHomeBridgeHandler;
import org.openhab.binding.freeathomesystem.internal.handler.FreeAtHomeDeviceHandler;
import org.openhab.binding.freeathomesystem.internal.type.FreeAtHomeChannelTypeProvider;
import org.openhab.binding.freeathomesystem.internal.type.FreeAtHomeThingTypeProvider;
import org.openhab.binding.freeathome.internal.handler.FreeAtHomeBridgeHandler;
import org.openhab.binding.freeathome.internal.handler.FreeAtHomeDeviceHandler;
import org.openhab.binding.freeathome.internal.type.FreeAtHomeChannelTypeProvider;
import org.openhab.binding.freeathome.internal.type.FreeAtHomeThingTypeProvider;
import org.openhab.core.i18n.LocaleProvider;
import org.openhab.core.i18n.TranslationProvider;
import org.openhab.core.io.net.http.HttpClientFactory;
Expand All @@ -39,24 +39,24 @@
import org.slf4j.LoggerFactory;

/**
* The {@link FreeAtHomeSystemHandlerFactory} is responsible for creating things and thing
* The {@link FreeAtHomeHandlerFactory} is responsible for creating things and thing
* handlers.
*
* @author Andras Uhrin - Initial contribution
*/
@NonNullByDefault
@Component(configurationPid = "binding.freeathomesystem", service = ThingHandlerFactory.class)
public class FreeAtHomeSystemHandlerFactory extends BaseThingHandlerFactory {
@Component(configurationPid = "binding.freeathome", service = ThingHandlerFactory.class)
public class FreeAtHomeHandlerFactory extends BaseThingHandlerFactory {

private final Logger logger = LoggerFactory.getLogger(FreeAtHomeSystemHandlerFactory.class);
private final Logger logger = LoggerFactory.getLogger(FreeAtHomeHandlerFactory.class);

private final HttpClient httpClient;
private final FreeAtHomeChannelTypeProvider channelTypeProvider;
private final TranslationProvider i18nProvider;
private final LocaleProvider localeProvider;

@Activate
public FreeAtHomeSystemHandlerFactory(@Reference FreeAtHomeThingTypeProvider thingTypeProvider,
public FreeAtHomeHandlerFactory(@Reference FreeAtHomeThingTypeProvider thingTypeProvider,
@Reference FreeAtHomeChannelTypeProvider channelTypeProvider, @Reference TranslationProvider i18nProvider,
@Reference LocaleProvider localeProvider, @Reference HttpClientFactory httpClientFactory,
ComponentContext componentContext) {
Expand All @@ -66,7 +66,7 @@ public FreeAtHomeSystemHandlerFactory(@Reference FreeAtHomeThingTypeProvider thi
this.localeProvider = localeProvider;

// create httpClient
httpClient = httpClientFactory.createHttpClient(FreeAtHomeSystemBindingConstants.BINDING_ID);
httpClient = httpClientFactory.createHttpClient(FreeAtHomeBindingConstants.BINDING_ID);

// Configure client
httpClient.setFollowRedirects(false);
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.freeathomesystem.internal.configuration;
package org.openhab.binding.freeathome.internal.configuration;

import org.eclipse.jdt.annotation.NonNullByDefault;

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.freeathomesystem.internal.configuration;
package org.openhab.binding.freeathome.internal.configuration;

import org.eclipse.jdt.annotation.NonNullByDefault;

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.freeathomesystem.internal.datamodel;
package org.openhab.binding.freeathome.internal.datamodel;

import java.util.Iterator;
import java.util.Set;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.freeathomesystem.internal.datamodel;
package org.openhab.binding.freeathome.internal.datamodel;

import static org.openhab.binding.freeathomesystem.internal.datamodel.FreeAtHomeDatapoint.*;
import static org.openhab.binding.freeathome.internal.datamodel.FreeAtHomeDatapoint.*;

import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.openhab.binding.freeathomesystem.internal.util.FreeAtHomeGeneralException;
import org.openhab.binding.freeathomesystem.internal.util.PidTranslationUtils;
import org.openhab.binding.freeathomesystem.internal.valuestateconverter.BooleanValueStateConverter;
import org.openhab.binding.freeathomesystem.internal.valuestateconverter.DecimalValueStateConverter;
import org.openhab.binding.freeathomesystem.internal.valuestateconverter.ShuttercontrolValueStateConverter;
import org.openhab.binding.freeathomesystem.internal.valuestateconverter.ValueStateConverter;
import org.openhab.binding.freeathome.internal.util.FreeAtHomeGeneralException;
import org.openhab.binding.freeathome.internal.util.PidTranslationUtils;
import org.openhab.binding.freeathome.internal.valuestateconverter.BooleanValueStateConverter;
import org.openhab.binding.freeathome.internal.valuestateconverter.DecimalValueStateConverter;
import org.openhab.binding.freeathome.internal.valuestateconverter.ShuttercontrolValueStateConverter;
import org.openhab.binding.freeathome.internal.valuestateconverter.ValueStateConverter;
import org.openhab.core.library.CoreItemFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.freeathomesystem.internal.datamodel;
package org.openhab.binding.freeathome.internal.datamodel;

import static org.openhab.binding.freeathomesystem.internal.datamodel.FreeAtHomeDatapoint.*;
import static org.openhab.binding.freeathomesystem.internal.util.FidTranslationUtils.*;
import static org.openhab.binding.freeathome.internal.datamodel.FreeAtHomeDatapoint.*;
import static org.openhab.binding.freeathome.internal.util.FidTranslationUtils.*;

import java.util.ArrayList;
import java.util.List;

import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.openhab.binding.freeathomesystem.internal.util.FidTranslationUtils;
import org.openhab.binding.freeathomesystem.internal.util.FreeAtHomeGeneralException;
import org.openhab.binding.freeathome.internal.util.FidTranslationUtils;
import org.openhab.binding.freeathome.internal.util.FreeAtHomeGeneralException;
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.freeathomesystem.internal.datamodel;
package org.openhab.binding.freeathome.internal.datamodel;

import java.util.ArrayList;
import java.util.List;
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.freeathomesystem.internal.handler;
package org.openhab.binding.freeathome.internal.handler;

import java.io.IOException;
import java.io.StringReader;
Expand Down Expand Up @@ -50,10 +50,10 @@
import org.eclipse.jetty.websocket.api.WebSocketListener;
import org.eclipse.jetty.websocket.client.ClientUpgradeRequest;
import org.eclipse.jetty.websocket.client.WebSocketClient;
import org.openhab.binding.freeathomesystem.internal.FreeAtHomeSystemDiscoveryService;
import org.openhab.binding.freeathomesystem.internal.configuration.FreeAtHomeBridgeHandlerConfiguration;
import org.openhab.binding.freeathomesystem.internal.datamodel.FreeAtHomeDeviceDescription;
import org.openhab.binding.freeathomesystem.internal.util.FreeAtHomeHttpCommunicationException;
import org.openhab.binding.freeathome.internal.FreeAtHomeDiscoveryService;
import org.openhab.binding.freeathome.internal.configuration.FreeAtHomeBridgeHandlerConfiguration;
import org.openhab.binding.freeathome.internal.datamodel.FreeAtHomeDeviceDescription;
import org.openhab.binding.freeathome.internal.util.FreeAtHomeHttpCommunicationException;
import org.openhab.core.thing.Bridge;
import org.openhab.core.thing.ChannelUID;
import org.openhab.core.thing.ThingStatus;
Expand Down Expand Up @@ -128,7 +128,7 @@ public void handleCommand(ChannelUID channelUID, Command command) {

@Override
public Collection<Class<? extends ThingHandlerService>> getServices() {
return List.of(FreeAtHomeSystemDiscoveryService.class);
return List.of(FreeAtHomeDiscoveryService.class);
}

/**
Expand Down
Loading

0 comments on commit f9d9dc2

Please sign in to comment.