+++ /dev/null
-/**
- * Copyright (c) 2010-2024 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.freeboxos.internal.config;
-
-import org.eclipse.jdt.annotation.NonNullByDefault;
-
-/**
- * The {@link LandlineConfiguration} is responsible for holding
- * configuration informations associated to a Freebox Phone thing type
- *
- * @author Gaƫl L'hopital - Initial contribution
- */
-@NonNullByDefault
-public class LandlineConfiguration extends ApiConsumerConfiguration {
- public int id = 1;
-
- LandlineConfiguration() {
- refreshInterval = 2;
- }
-}
}
public DiscoveryResultBuilder configure(ThingUID bridgeUID, Status config) {
- ThingUID thingUID = new ThingUID(Type.DECT.equals(config.type()) ? THING_TYPE_DECT : THING_TYPE_FXS, bridgeUID,
- Integer.toString(config.id()));
+ ThingUID thingUID;
+ String label;
+ if (Type.DECT.equals(config.type())) {
+ thingUID = new ThingUID(THING_TYPE_DECT, bridgeUID, Integer.toString(config.id()));
+ label = "DECT Phone";
+ } else {
+ thingUID = new ThingUID(THING_TYPE_FXS, bridgeUID, Integer.toString(config.id()));
+ label = "Landline Phone";
+ }
logger.debug("Adding new Freebox Phone {} to inbox", thingUID);
return DiscoveryResultBuilder.create(thingUID).withBridge(bridgeUID)
- .withProperty(ClientConfiguration.ID, config.id()).withLabel(config.type().name())
+ .withProperty(ClientConfiguration.ID, config.id()).withLabel(label)
.withRepresentationProperty(ClientConfiguration.ID);
}
}
logger.debug("Error discovering phones: {}", e.getMessage());
}
if (!statuses.isEmpty()) {
- ThingUID thingUID = new ThingUID(THING_TYPE_CALL, bridgeUID, "landline");
+ ThingUID thingUID = new ThingUID(THING_TYPE_CALL, bridgeUID, "calls");
logger.debug("Adding new Call thing {} to inbox", thingUID);
DiscoveryResult discoveryResult = DiscoveryResultBuilder.create(thingUID).withBridge(bridgeUID)
- .withLabel("Freebox Calls").build();
+ .withLabel("Phone Calls").build();
thingDiscovered(discoveryResult);
}
}
<config-description uri="thing-type:freeboxos:phone">
<parameter name="refreshInterval" type="integer" min="1" unit="s">
- <label>State Refresh Interval</label>
+ <label>Refresh Interval</label>
<description>The refresh interval in seconds which is used to poll for phone state.</description>
<default>30</default>
</parameter>
<config-description uri="thing-type:freeboxos:call">
<parameter name="refreshInterval" type="integer" min="1" unit="s">
- <label>State Refresh Interval</label>
- <description>The refresh interval in seconds which is used to poll for phone state.</description>
- <default>2</default>
+ <label>Refresh Interval</label>
+ <description>The refresh interval in seconds which is used to poll for phone calls.</description>
+ <default>30</default>
</parameter>
</config-description>
thing-type.freeboxos.api.description = Bridge between hosts and the API rest service
thing-type.freeboxos.basic-shutter.label = Freebox Home Basic Shutter
thing-type.freeboxos.basic-shutter.description = The Basic Shutter (UP,DOWN,STOP) configured in your Freebox Delta Server
-thing-type.freeboxos.call.label = Calls
+thing-type.freeboxos.call.label = Phone Calls
thing-type.freeboxos.call.description = Provides various informations regarding the phone calls
-thing-type.freeboxos.dect.label = DECT
+thing-type.freeboxos.dect.label = DECT Phone
thing-type.freeboxos.dect.description = Provides various informations regarding the DECT state and configuration
thing-type.freeboxos.dect.channel.gain-rx.label = Gain RX
thing-type.freeboxos.dect.channel.gain-tx.label = Gain TX
thing-type.freeboxos.freeplug.channel.rate-down.description = Current RX rate
thing-type.freeboxos.freeplug.channel.rate-up.label = Tx Rate
thing-type.freeboxos.freeplug.channel.rate-up.description = Current TX Rate
-thing-type.freeboxos.fxs.label = Landline
+thing-type.freeboxos.fxs.label = Landline Phone
thing-type.freeboxos.fxs.description = Provides various informations regarding the landline state
thing-type.freeboxos.host.label = Network Device
thing-type.freeboxos.host.description = Provides network device reachability
bridge-type.config.freeboxos.api.httpsPort.description = Port to use for HTTPS access to the Freebox Api
bridge-type.config.freeboxos.api.wsReconnectInterval.label = Websocket Reconnect Interval
bridge-type.config.freeboxos.api.wsReconnectInterval.description = Disconnection interval, in minutes- 0 disables websocket usage
-thing-type.config.freeboxos.call.refreshInterval.label = State Refresh Interval
-thing-type.config.freeboxos.call.refreshInterval.description = The refresh interval in seconds which is used to poll for phone state.
+thing-type.config.freeboxos.call.refreshInterval.label = Refresh Interval
+thing-type.config.freeboxos.call.refreshInterval.description = The refresh interval in seconds which is used to poll for phone calls.
thing-type.config.freeboxos.home-node.id.label = ID
thing-type.config.freeboxos.home-node.id.description = Id of the Home Node
thing-type.config.freeboxos.home-node.refreshInterval.label = Refresh Interval
thing-type.config.freeboxos.host.refreshInterval.description = The refresh interval in seconds which is used to poll given device
thing-type.config.freeboxos.phone.id.label = ID
thing-type.config.freeboxos.phone.id.description = Id of the phone line
-thing-type.config.freeboxos.phone.refreshInterval.label = State Refresh Interval
+thing-type.config.freeboxos.phone.refreshInterval.label = Refresh Interval
thing-type.config.freeboxos.phone.refreshInterval.description = The refresh interval in seconds which is used to poll for phone state.
thing-type.config.freeboxos.player.acceptAllMp3.label = Accept All MP3
thing-type.config.freeboxos.player.acceptAllMp3.description = Accept any bitrate for MP3 audio or only bitrates greater than 64 kbps
<bridge-type-ref id="api"/>
</supported-bridge-type-refs>
- <label>Landline</label>
+ <label>Landline Phone</label>
<description>Provides various informations regarding the landline state</description>
<channels>
<bridge-type-ref id="api"/>
</supported-bridge-type-refs>
- <label>DECT</label>
+ <label>DECT Phone</label>
<description>Provides various informations regarding the DECT state and configuration</description>
<channels>
<bridge-type-ref id="api"/>
</supported-bridge-type-refs>
- <label>Calls</label>
+ <label>Phone Calls</label>
<description>Provides various informations regarding the phone calls</description>
<channel-groups>