mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[luftdateninfo][sensorcommunity] Rename binding to Sensor.Community (#15012)
* [luftdateninfo][sensorcommunity] Rename binding to match the new name Sensor.Community Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
This commit is contained in:
parent
095a5df323
commit
d8376aa6d0
@ -180,7 +180,6 @@
|
||||
/bundles/org.openhab.binding.livisismarthome/ @Novanic
|
||||
/bundles/org.openhab.binding.logreader/ @paulianttila
|
||||
/bundles/org.openhab.binding.loxone/ @ppieczul
|
||||
/bundles/org.openhab.binding.luftdateninfo/ @weymann
|
||||
/bundles/org.openhab.binding.lutron/ @actong @bobadair
|
||||
/bundles/org.openhab.binding.luxom/ @jesperskriasoft
|
||||
/bundles/org.openhab.binding.luxtronikheatpump/ @sgiehl
|
||||
@ -300,6 +299,7 @@
|
||||
/bundles/org.openhab.binding.seneye/ @nikotanghe
|
||||
/bundles/org.openhab.binding.sensebox/ @hakan42
|
||||
/bundles/org.openhab.binding.sensibo/ @seime
|
||||
/bundles/org.openhab.binding.sensorcommunity/ @weymann
|
||||
/bundles/org.openhab.binding.serial/ @MikeJMajor
|
||||
/bundles/org.openhab.binding.serialbutton/ @kaikreuzer
|
||||
/bundles/org.openhab.binding.shelly/ @markus7017
|
||||
|
@ -896,11 +896,6 @@
|
||||
<artifactId>org.openhab.binding.loxone</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openhab.addons.bundles</groupId>
|
||||
<artifactId>org.openhab.binding.luftdateninfo</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openhab.addons.bundles</groupId>
|
||||
<artifactId>org.openhab.binding.lutron</artifactId>
|
||||
@ -1491,6 +1486,11 @@
|
||||
<artifactId>org.openhab.binding.sensibo</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openhab.addons.bundles</groupId>
|
||||
<artifactId>org.openhab.binding.sensorcommunity</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openhab.addons.bundles</groupId>
|
||||
<artifactId>org.openhab.binding.serial</artifactId>
|
||||
|
@ -1,47 +0,0 @@
|
||||
# add-on
|
||||
|
||||
addon.luftdateninfo.name = LuftdatenInfo Binding
|
||||
addon.luftdateninfo.description = Binding to integrate DIY Sensors from luftdaten.info Sensor Community
|
||||
|
||||
# thing types
|
||||
|
||||
thing-type.luftdateninfo.conditions.label = Condition Sensor
|
||||
thing-type.luftdateninfo.conditions.description = Sensor to measure Temperature and Humidity conditions
|
||||
thing-type.luftdateninfo.noise.label = Noise Sensor
|
||||
thing-type.luftdateninfo.noise.description = Sensor to measure noise on location
|
||||
thing-type.luftdateninfo.particulate.label = Particulate Sensor
|
||||
thing-type.luftdateninfo.particulate.description = Sensor to measure Particulate Matter (PM)
|
||||
|
||||
# thing types config
|
||||
|
||||
thing-type.config.luftdateninfo.conditions.ipAddress.label = Internal IP Address
|
||||
thing-type.config.luftdateninfo.conditions.ipAddress.description = Local IP address of your personal owned sensor
|
||||
thing-type.config.luftdateninfo.conditions.sensorid.label = External Sensor ID
|
||||
thing-type.config.luftdateninfo.conditions.sensorid.description = Sensor ID from https://deutschland.maps.sensor.community/
|
||||
thing-type.config.luftdateninfo.noise.ipAddress.label = Internal IP Address
|
||||
thing-type.config.luftdateninfo.noise.ipAddress.description = Local IP address of your personal owned sensor
|
||||
thing-type.config.luftdateninfo.noise.sensorid.label = External Sensor ID
|
||||
thing-type.config.luftdateninfo.noise.sensorid.description = Sensor ID from https://deutschland.maps.sensor.community/
|
||||
thing-type.config.luftdateninfo.particulate.ipAddress.label = Internal IP Address
|
||||
thing-type.config.luftdateninfo.particulate.ipAddress.description = Local IP address of your personal owned sensor
|
||||
thing-type.config.luftdateninfo.particulate.sensorid.label = External Sensor ID
|
||||
thing-type.config.luftdateninfo.particulate.sensorid.description = Sensor ID from https://deutschland.maps.sensor.community/
|
||||
|
||||
# channel types
|
||||
|
||||
channel-type.luftdateninfo.hum-channel.label = Humidity
|
||||
channel-type.luftdateninfo.hum-channel.description = Humidity from the selected Sensor ID
|
||||
channel-type.luftdateninfo.noise-eq-channel.label = Average Noise
|
||||
channel-type.luftdateninfo.noise-eq-channel.description = Average noise level from the selected Sensor ID
|
||||
channel-type.luftdateninfo.noise-max-channel.label = Maximum Noise
|
||||
channel-type.luftdateninfo.noise-max-channel.description = Maximum noise level (last 2.5 minutes) from the selected Sensor ID
|
||||
channel-type.luftdateninfo.noise-min-channel.label = Minimum Noise
|
||||
channel-type.luftdateninfo.noise-min-channel.description = Minimum noise level (last 2.5 minutes) from the selected Sensor ID
|
||||
channel-type.luftdateninfo.pm100-channel.label = Particulate Matter category 10.0
|
||||
channel-type.luftdateninfo.pm25-channel.label = Particulate Matter category 2.5
|
||||
channel-type.luftdateninfo.pressure-channel.label = Atmospheric Pressure
|
||||
channel-type.luftdateninfo.pressure-channel.description = Atmospheric Pressure from the selected Sensor ID
|
||||
channel-type.luftdateninfo.pressure-sea-channel.label = Atmospheric Pressure Sea Level
|
||||
channel-type.luftdateninfo.pressure-sea-channel.description = Atmospheric Pressure at sea level from the selected Sensor ID
|
||||
channel-type.luftdateninfo.temp-channel.label = Temperature
|
||||
channel-type.luftdateninfo.temp-channel.description = Temperature from the selected Sensor ID
|
@ -1,47 +0,0 @@
|
||||
# add-on
|
||||
|
||||
addon.luftdateninfo.name = LuftdatenInfo Binding
|
||||
addon.luftdateninfo.description = Das Binding stellt die Daten der Eigenbau-Sensoren von LuftdatenInfo zur Verfügung
|
||||
|
||||
# thing types
|
||||
|
||||
thing-type.luftdateninfo.conditions.label = Umweltsensor
|
||||
thing-type.luftdateninfo.conditions.description = Messung der Temperatur, Luftfeuchtigkeit und Luftdruck
|
||||
thing-type.luftdateninfo.noise.label = Lärmsensor
|
||||
thing-type.luftdateninfo.noise.description = Messung der Lärmbelastung in der Umgebung
|
||||
thing-type.luftdateninfo.particulate.label = Feinstaubsensor
|
||||
thing-type.luftdateninfo.particulate.description = Messung der Feinstaubbelastung in der Umgebung
|
||||
|
||||
# thing types config
|
||||
|
||||
thing-type.config.luftdateninfo.conditions.ipAddress.label = Interne IP-Adresse
|
||||
thing-type.config.luftdateninfo.conditions.ipAddress.description = Lokale IP-Adresse Ihres persönlichen Sensors
|
||||
thing-type.config.luftdateninfo.conditions.sensorid.label = Externe Sensor-ID
|
||||
thing-type.config.luftdateninfo.conditions.sensorid.description = Sensor-ID von https\://deutschland.maps.sensor.community/
|
||||
thing-type.config.luftdateninfo.noise.ipAddress.label = Interne IP-Adresse
|
||||
thing-type.config.luftdateninfo.noise.ipAddress.description = Lokale IP-Adresse Ihres persönlichen Sensors
|
||||
thing-type.config.luftdateninfo.noise.sensorid.label = Externe Sensor-ID
|
||||
thing-type.config.luftdateninfo.noise.sensorid.description = Sensor-ID von https\://deutschland.maps.sensor.community/
|
||||
thing-type.config.luftdateninfo.particulate.ipAddress.label = Interne IP-Adresse
|
||||
thing-type.config.luftdateninfo.particulate.ipAddress.description = Lokale IP-Adresse Ihres persönlichen Sensors
|
||||
thing-type.config.luftdateninfo.particulate.sensorid.label = Externe Sensor-ID
|
||||
thing-type.config.luftdateninfo.particulate.sensorid.description = Sensor-ID von https\://deutschland.maps.sensor.community/
|
||||
|
||||
# channel types
|
||||
|
||||
channel-type.luftdateninfo.hum-channel.label = Luftfeuchtigkeit
|
||||
channel-type.luftdateninfo.hum-channel.description = Luftfeuchtigkeit der ausgewählten Sensor-ID
|
||||
channel-type.luftdateninfo.noise-eq-channel.label = Durchschnittlicher Lärmpegel
|
||||
channel-type.luftdateninfo.noise-eq-channel.description = Durchschnittlicher Rauschpegel der ausgewählten Sensor-ID
|
||||
channel-type.luftdateninfo.noise-max-channel.label = Maximaler Lärmpegel
|
||||
channel-type.luftdateninfo.noise-max-channel.description = Maximaler Rauschpegel (letzte 2,5 Minuten) der ausgewählten Sensor-ID
|
||||
channel-type.luftdateninfo.noise-min-channel.label = Minimaler Lärmpegel
|
||||
channel-type.luftdateninfo.noise-min-channel.description = Minimaler Rauschpegel (letzte 2,5 Minuten) der ausgewählten Sensor-ID
|
||||
channel-type.luftdateninfo.pm100-channel.label = Feinstaub der Kategorie PM 10.0
|
||||
channel-type.luftdateninfo.pm25-channel.label = Feinstaub der Kategorie PM 2.5
|
||||
channel-type.luftdateninfo.pressure-channel.label = Atmosphärischer Druck
|
||||
channel-type.luftdateninfo.pressure-channel.description = Atmosphärischer Druck der ausgewählten Sensor-ID
|
||||
channel-type.luftdateninfo.pressure-sea-channel.label = Atmosphärischer Druck Auf Meereshöhe
|
||||
channel-type.luftdateninfo.pressure-sea-channel.description = Atmosphärischer Druck auf Seehöhe der ausgewählten Sensor-ID
|
||||
channel-type.luftdateninfo.temp-channel.label = Temperatur
|
||||
channel-type.luftdateninfo.temp-channel.description = Temperatur der ausgewählten Sensor-ID
|
@ -1,6 +1,7 @@
|
||||
# LuftdatenInfo Binding
|
||||
# SensorCommunity Binding
|
||||
|
||||
Binding for the Sensor Community [luftdaten.info](https://luftdaten.info/). The community provides instructions to build sensors on your own and they can be integrated into the database.
|
||||
Binding for the [Sensor.Community](https://sensor.community/).
|
||||
The community provides instructions to build sensors on your own and they can be integrated into the database.
|
||||
With this binding you can integrate your sensor, a sensor nearby or even any sensors you want into openHAB.
|
||||
|
||||
## Supported Things
|
||||
@ -30,18 +31,18 @@ Choose either a local IP address of your personal owned sensor _or_ a sensor id
|
||||
|
||||
Please check in your browser if you can access your sensor with your local IP address.
|
||||
|
||||
![Luftdaten.info Logo](doc/local-sensor.png)
|
||||
![Sensor.Community Logo](doc/local-sensor.png)
|
||||
|
||||
### External Sensor
|
||||
|
||||
Perform the following steps to get the appropriate Sensor ID
|
||||
|
||||
- Go to to [luftdaten.info map](https://deutschland.maps.sensor.community/)
|
||||
- Go to to [Sensor.Community map](https://deutschland.maps.sensor.community/)
|
||||
- Choose your desired value in bottom list - now only the Sensors are displayed which are supporting this
|
||||
- Click on your / any Sensor and the ID is displayed in the top right corner. Note: Sensor ID is just the number without beginning hash #
|
||||
- Enter this Sensor ID into the thing configuration
|
||||
|
||||
![Luftdaten.info Logo](doc/LuftdatenInfo-Map.png)
|
||||
![Sensor.Community Logo](doc/SensorCommunity-Map.png)
|
||||
|
||||
## Channels
|
||||
|
||||
@ -73,38 +74,38 @@ Perform the following steps to get the appropriate Sensor ID
|
||||
|
||||
### Things
|
||||
|
||||
luftdaten.things
|
||||
sensorcommunity.things
|
||||
|
||||
```java
|
||||
Thing luftdateninfo:particulate:pm_sensor "PM Sensor" [ ipAddress=192.168.178.50 ]
|
||||
Thing luftdateninfo:conditions:cond_sensor "Condition Sensor" [ sensorid=28843 ]
|
||||
Thing luftdateninfo:noise:noise_sensor "Noise Sensor" [ sensorid=39745 ]
|
||||
Thing sensorcommunity:particulate:pm_sensor "PM Sensor" [ ipAddress=192.168.178.50 ]
|
||||
Thing sensorcommunity:conditions:cond_sensor "Condition Sensor" [ sensorid=28843 ]
|
||||
Thing sensorcommunity:noise:noise_sensor "Noise Sensor" [ sensorid=39745 ]
|
||||
```
|
||||
|
||||
### Items
|
||||
|
||||
luftdaten.items
|
||||
sensorcommunity.items
|
||||
|
||||
```java
|
||||
Number:Density PM_25 "PM2.5" { channel="luftdateninfo:particulate:pm_sensor:pm25" }
|
||||
Number:Density PM_100 "PM10" { channel="luftdateninfo:particulate:pm_sensor:pm100" }
|
||||
Number:Density PM_25 "PM2.5" { channel="sensorcommunity:particulate:pm_sensor:pm25" }
|
||||
Number:Density PM_100 "PM10" { channel="sensorcommunity:particulate:pm_sensor:pm100" }
|
||||
|
||||
Number:Temperature LDI_Temperature "Temperature" { channel="luftdateninfo:conditions:cond_sensor:temperature" }
|
||||
Number:Dimensionless LDI_Humidity "Humidity" { channel="luftdateninfo:conditions:cond_sensor:humidity" }
|
||||
Number:Pressure LDI_Pressure "Atmospheric Pressure" { channel="luftdateninfo:conditions:cond_sensor:pressure" }
|
||||
Number:Pressure LDI_PressureSea "Pressure sea level" { channel="luftdateninfo:conditions:cond_sensor:pressure-sea" }
|
||||
Number:Temperature LDI_Temperature "Temperature" { channel="sensorcommunity:conditions:cond_sensor:temperature" }
|
||||
Number:Dimensionless LDI_Humidity "Humidity" { channel="sensorcommunity:conditions:cond_sensor:humidity" }
|
||||
Number:Pressure LDI_Pressure "Atmospheric Pressure" { channel="sensorcommunity:conditions:cond_sensor:pressure" }
|
||||
Number:Pressure LDI_PressureSea "Pressure sea level" { channel="sensorcommunity:conditions:cond_sensor:pressure-sea" }
|
||||
|
||||
Number:Dimensionless LDI_NoiseEQ "Noise EQ" { channel="luftdateninfo:noise:noise_sensor:noise-eq" }
|
||||
Number:Dimensionless LDI_NoiseMin "Noise min" { channel="luftdateninfo:noise:noise_sensor:noise-min" }
|
||||
Number:Dimensionless LDI_NoiseMax "Noise max" { channel="luftdateninfo:noise:noise_sensor:noise-max" }
|
||||
Number:Dimensionless LDI_NoiseEQ "Noise EQ" { channel="sensorcommunity:noise:noise_sensor:noise-eq" }
|
||||
Number:Dimensionless LDI_NoiseMin "Noise min" { channel="sensorcommunity:noise:noise_sensor:noise-min" }
|
||||
Number:Dimensionless LDI_NoiseMax "Noise max" { channel="sensorcommunity:noise:noise_sensor:noise-max" }
|
||||
```
|
||||
|
||||
### Sitemap
|
||||
|
||||
LuftdatenInfo.sitemap
|
||||
SensorCommunity.sitemap
|
||||
|
||||
```perl
|
||||
sitemap LuftdatenInfo label="LuftdatenInfo" {
|
||||
sitemap SensorCommunity label="SensorCommunity" {
|
||||
Text item=PM_25 label="Particulate Matter 2.5 [%.1f %unit%]"
|
||||
Text item=PM_100 label="Particulate Matter 10 [%.1f %unit%]"
|
||||
|
Before Width: | Height: | Size: 910 KiB After Width: | Height: | Size: 910 KiB |
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
@ -9,8 +9,8 @@
|
||||
<version>4.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>org.openhab.binding.luftdateninfo</artifactId>
|
||||
<artifactId>org.openhab.binding.sensorcommunity</artifactId>
|
||||
|
||||
<name>openHAB Add-ons :: Bundles :: LuftdatenInfo Binding</name>
|
||||
<name>openHAB Add-ons :: Bundles :: Sensor.Community Binding</name>
|
||||
|
||||
</project>
|
@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<features name="org.openhab.binding.luftdateninfo-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0">
|
||||
<features name="org.openhab.binding.sensorcommunity-${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-luftdateninfo" description="LuftdatenInfo Binding" version="${project.version}">
|
||||
<feature name="openhab-binding-sensorcommunity" description="Sensor.Community Binding" version="${project.version}">
|
||||
<feature>openhab-runtime-base</feature>
|
||||
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.luftdateninfo/${project.version}</bundle>
|
||||
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.sensorcommunity/${project.version}</bundle>
|
||||
</feature>
|
||||
</features>
|
@ -10,21 +10,21 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.luftdateninfo.internal;
|
||||
package org.openhab.binding.sensorcommunity.internal;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.openhab.core.thing.ThingTypeUID;
|
||||
|
||||
/**
|
||||
* The {@link LuftdatenInfoBindingConstants} class defines common constants, which are
|
||||
* The {@link SensorCommunityBindingConstants} class defines common constants, which are
|
||||
* used across the whole binding.
|
||||
*
|
||||
* @author Bernd Weymann - Initial contribution
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class LuftdatenInfoBindingConstants {
|
||||
public class SensorCommunityBindingConstants {
|
||||
|
||||
private static final String BINDING_ID = "luftdateninfo";
|
||||
private static final String BINDING_ID = "sensorcommunity";
|
||||
|
||||
// List of all Thing Type UIDs
|
||||
public static final ThingTypeUID THING_TYPE_PARTICULATE = new ThingTypeUID(BINDING_ID, "particulate");
|
@ -10,18 +10,18 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.luftdateninfo.internal;
|
||||
package org.openhab.binding.sensorcommunity.internal;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.openhab.binding.luftdateninfo.internal.utils.Constants;
|
||||
import org.openhab.binding.sensorcommunity.internal.utils.Constants;
|
||||
|
||||
/**
|
||||
* The {@link LuftdatenInfoConfiguration} class contains fields mapping thing configuration parameters.
|
||||
* The {@link SensorCommunityConfiguration} class contains fields mapping thing configuration parameters.
|
||||
*
|
||||
* @author Bernd Weymann - Initial contribution
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class LuftdatenInfoConfiguration {
|
||||
public class SensorCommunityConfiguration {
|
||||
|
||||
public int sensorid = Constants.UNDEF;
|
||||
|
@ -10,14 +10,14 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.luftdateninfo.internal;
|
||||
package org.openhab.binding.sensorcommunity.internal;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.openhab.binding.luftdateninfo.internal.handler.ConditionHandler;
|
||||
import org.openhab.binding.luftdateninfo.internal.handler.HTTPHandler;
|
||||
import org.openhab.binding.luftdateninfo.internal.handler.NoiseHandler;
|
||||
import org.openhab.binding.luftdateninfo.internal.handler.PMHandler;
|
||||
import org.openhab.binding.sensorcommunity.internal.handler.ConditionHandler;
|
||||
import org.openhab.binding.sensorcommunity.internal.handler.HTTPHandler;
|
||||
import org.openhab.binding.sensorcommunity.internal.handler.NoiseHandler;
|
||||
import org.openhab.binding.sensorcommunity.internal.handler.PMHandler;
|
||||
import org.openhab.core.io.net.http.HttpClientFactory;
|
||||
import org.openhab.core.thing.Thing;
|
||||
import org.openhab.core.thing.ThingTypeUID;
|
||||
@ -31,35 +31,35 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* The {@link LuftdatenInfoHandlerFactory} is responsible for creating things and thing
|
||||
* The {@link SensorCommunityHandlerFactory} is responsible for creating things and thing
|
||||
* handlers.
|
||||
*
|
||||
* @author Bernd Weymann - Initial contribution
|
||||
*/
|
||||
@NonNullByDefault
|
||||
@Component(configurationPid = "binding.luftdateninfo", service = ThingHandlerFactory.class)
|
||||
public class LuftdatenInfoHandlerFactory extends BaseThingHandlerFactory {
|
||||
protected final Logger logger = LoggerFactory.getLogger(LuftdatenInfoHandlerFactory.class);
|
||||
@Component(configurationPid = "binding.sensorcommunity", service = ThingHandlerFactory.class)
|
||||
public class SensorCommunityHandlerFactory extends BaseThingHandlerFactory {
|
||||
protected final Logger logger = LoggerFactory.getLogger(SensorCommunityHandlerFactory.class);
|
||||
|
||||
@Activate
|
||||
public LuftdatenInfoHandlerFactory(final @Reference HttpClientFactory httpClientFactory) {
|
||||
public SensorCommunityHandlerFactory(final @Reference HttpClientFactory httpClientFactory) {
|
||||
HTTPHandler.init(httpClientFactory.getCommonHttpClient());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsThingType(ThingTypeUID thingTypeUID) {
|
||||
return (thingTypeUID.equals(LuftdatenInfoBindingConstants.THING_TYPE_PARTICULATE)
|
||||
|| thingTypeUID.equals(LuftdatenInfoBindingConstants.THING_TYPE_CONDITIONS)
|
||||
|| thingTypeUID.equals(LuftdatenInfoBindingConstants.THING_TYPE_NOISE));
|
||||
return (thingTypeUID.equals(SensorCommunityBindingConstants.THING_TYPE_PARTICULATE)
|
||||
|| thingTypeUID.equals(SensorCommunityBindingConstants.THING_TYPE_CONDITIONS)
|
||||
|| thingTypeUID.equals(SensorCommunityBindingConstants.THING_TYPE_NOISE));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected @Nullable ThingHandler createHandler(Thing thing) {
|
||||
if (thing.getThingTypeUID().equals(LuftdatenInfoBindingConstants.THING_TYPE_PARTICULATE)) {
|
||||
if (thing.getThingTypeUID().equals(SensorCommunityBindingConstants.THING_TYPE_PARTICULATE)) {
|
||||
return new PMHandler(thing);
|
||||
} else if (thing.getThingTypeUID().equals(LuftdatenInfoBindingConstants.THING_TYPE_CONDITIONS)) {
|
||||
} else if (thing.getThingTypeUID().equals(SensorCommunityBindingConstants.THING_TYPE_CONDITIONS)) {
|
||||
return new ConditionHandler(thing);
|
||||
} else if (thing.getThingTypeUID().equals(LuftdatenInfoBindingConstants.THING_TYPE_NOISE)) {
|
||||
} else if (thing.getThingTypeUID().equals(SensorCommunityBindingConstants.THING_TYPE_NOISE)) {
|
||||
return new NoiseHandler(thing);
|
||||
}
|
||||
logger.info("Handler for {} not found", thing.getThingTypeUID());
|
@ -10,12 +10,12 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.luftdateninfo.internal.dto;
|
||||
package org.openhab.binding.sensorcommunity.internal.dto;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
/**
|
||||
* The {@link LuftdatenInfo} class definition for Logging identification
|
||||
* The {@link SensorCommunity} class definition for Logging identification
|
||||
*
|
||||
* @author Bernd Weymann - Initial contribution
|
||||
*/
|
@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.luftdateninfo.internal.dto;
|
||||
package org.openhab.binding.sensorcommunity.internal.dto;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.luftdateninfo.internal.dto;
|
||||
package org.openhab.binding.sensorcommunity.internal.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.luftdateninfo.internal.dto;
|
||||
package org.openhab.binding.sensorcommunity.internal.dto;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.luftdateninfo.internal.dto;
|
||||
package org.openhab.binding.sensorcommunity.internal.dto;
|
||||
|
||||
/**
|
||||
* The {@link SensorType} Data Transfer Object
|
@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.luftdateninfo.internal.handler;
|
||||
package org.openhab.binding.sensorcommunity.internal.handler;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Optional;
|
||||
@ -19,9 +19,9 @@ import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.openhab.binding.luftdateninfo.internal.LuftdatenInfoConfiguration;
|
||||
import org.openhab.binding.luftdateninfo.internal.utils.Constants;
|
||||
import org.openhab.binding.luftdateninfo.internal.utils.DateTimeUtils;
|
||||
import org.openhab.binding.sensorcommunity.internal.SensorCommunityConfiguration;
|
||||
import org.openhab.binding.sensorcommunity.internal.utils.Constants;
|
||||
import org.openhab.binding.sensorcommunity.internal.utils.DateTimeUtils;
|
||||
import org.openhab.core.thing.ChannelUID;
|
||||
import org.openhab.core.thing.Thing;
|
||||
import org.openhab.core.thing.ThingStatus;
|
||||
@ -40,12 +40,12 @@ import org.slf4j.LoggerFactory;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public abstract class BaseSensorHandler extends BaseThingHandler {
|
||||
private static final LuftdatenInfoConfiguration DEFAULT_CONFIG = new LuftdatenInfoConfiguration();
|
||||
private static final SensorCommunityConfiguration DEFAULT_CONFIG = new SensorCommunityConfiguration();
|
||||
private static final String EMPTY = "";
|
||||
|
||||
protected static final int REFRESH_INTERVAL_MIN = 5;
|
||||
protected final Logger logger = LoggerFactory.getLogger(BaseSensorHandler.class);
|
||||
protected LuftdatenInfoConfiguration config = DEFAULT_CONFIG;
|
||||
protected SensorCommunityConfiguration config = DEFAULT_CONFIG;
|
||||
protected ConfigStatus configStatus = ConfigStatus.UNKNOWN;
|
||||
protected ThingStatus myThingStatus = ThingStatus.UNKNOWN;
|
||||
protected UpdateStatus lastUpdateStatus = UpdateStatus.UNKNOWN;
|
||||
@ -99,7 +99,7 @@ public abstract class BaseSensorHandler extends BaseThingHandler {
|
||||
}
|
||||
|
||||
private void startUp() {
|
||||
config = getConfigAs(LuftdatenInfoConfiguration.class);
|
||||
config = getConfigAs(SensorCommunityConfiguration.class);
|
||||
configStatus = checkConfig(config);
|
||||
if (configStatus == ConfigStatus.INTERNAL_SENSOR_OK || configStatus == ConfigStatus.EXTERNAL_SENSOR_OK) {
|
||||
// start getting values
|
||||
@ -139,7 +139,7 @@ public abstract class BaseSensorHandler extends BaseThingHandler {
|
||||
* @param c
|
||||
* @return
|
||||
*/
|
||||
private ConfigStatus checkConfig(@Nullable LuftdatenInfoConfiguration c) {
|
||||
private ConfigStatus checkConfig(@Nullable SensorCommunityConfiguration c) {
|
||||
if (c != null) {
|
||||
if (c.ipAddress != null && !Constants.EMPTY.equals(c.ipAddress)) {
|
||||
sensorUrl = Optional.of("http://" + c.ipAddress + "/data.json");
|
@ -10,10 +10,10 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.luftdateninfo.internal.handler;
|
||||
package org.openhab.binding.sensorcommunity.internal.handler;
|
||||
|
||||
import static org.openhab.binding.luftdateninfo.internal.LuftdatenInfoBindingConstants.*;
|
||||
import static org.openhab.binding.luftdateninfo.internal.utils.Constants.*;
|
||||
import static org.openhab.binding.sensorcommunity.internal.SensorCommunityBindingConstants.*;
|
||||
import static org.openhab.binding.sensorcommunity.internal.utils.Constants.*;
|
||||
import static org.openhab.core.library.unit.MetricPrefix.HECTO;
|
||||
|
||||
import java.util.List;
|
||||
@ -24,8 +24,8 @@ import javax.measure.quantity.Temperature;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.openhab.binding.luftdateninfo.internal.dto.SensorDataValue;
|
||||
import org.openhab.binding.luftdateninfo.internal.utils.NumberUtils;
|
||||
import org.openhab.binding.sensorcommunity.internal.dto.SensorDataValue;
|
||||
import org.openhab.binding.sensorcommunity.internal.utils.NumberUtils;
|
||||
import org.openhab.core.library.types.QuantityType;
|
||||
import org.openhab.core.library.unit.SIUnits;
|
||||
import org.openhab.core.library.unit.Units;
|
@ -10,9 +10,9 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.luftdateninfo.internal.handler;
|
||||
package org.openhab.binding.sensorcommunity.internal.handler;
|
||||
|
||||
import static org.openhab.binding.luftdateninfo.internal.utils.Constants.*;
|
||||
import static org.openhab.binding.sensorcommunity.internal.utils.Constants.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
@ -24,9 +24,9 @@ import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.eclipse.jetty.client.HttpClient;
|
||||
import org.eclipse.jetty.client.api.Request;
|
||||
import org.eclipse.jetty.client.util.BufferingResponseListener;
|
||||
import org.openhab.binding.luftdateninfo.internal.dto.SensorData;
|
||||
import org.openhab.binding.luftdateninfo.internal.dto.SensorDataValue;
|
||||
import org.openhab.binding.luftdateninfo.internal.utils.DateTimeUtils;
|
||||
import org.openhab.binding.sensorcommunity.internal.dto.SensorData;
|
||||
import org.openhab.binding.sensorcommunity.internal.dto.SensorDataValue;
|
||||
import org.openhab.binding.sensorcommunity.internal.utils.DateTimeUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
@ -10,10 +10,10 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.luftdateninfo.internal.handler;
|
||||
package org.openhab.binding.sensorcommunity.internal.handler;
|
||||
|
||||
import static org.openhab.binding.luftdateninfo.internal.LuftdatenInfoBindingConstants.*;
|
||||
import static org.openhab.binding.luftdateninfo.internal.utils.Constants.*;
|
||||
import static org.openhab.binding.sensorcommunity.internal.SensorCommunityBindingConstants.*;
|
||||
import static org.openhab.binding.sensorcommunity.internal.utils.Constants.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -21,8 +21,8 @@ import javax.measure.quantity.Dimensionless;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.openhab.binding.luftdateninfo.internal.dto.SensorDataValue;
|
||||
import org.openhab.binding.luftdateninfo.internal.utils.NumberUtils;
|
||||
import org.openhab.binding.sensorcommunity.internal.dto.SensorDataValue;
|
||||
import org.openhab.binding.sensorcommunity.internal.utils.NumberUtils;
|
||||
import org.openhab.core.library.types.QuantityType;
|
||||
import org.openhab.core.library.unit.Units;
|
||||
import org.openhab.core.thing.Thing;
|
@ -10,17 +10,17 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.luftdateninfo.internal.handler;
|
||||
package org.openhab.binding.sensorcommunity.internal.handler;
|
||||
|
||||
import static org.openhab.binding.luftdateninfo.internal.LuftdatenInfoBindingConstants.*;
|
||||
import static org.openhab.binding.luftdateninfo.internal.utils.Constants.*;
|
||||
import static org.openhab.binding.sensorcommunity.internal.SensorCommunityBindingConstants.*;
|
||||
import static org.openhab.binding.sensorcommunity.internal.utils.Constants.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.openhab.binding.luftdateninfo.internal.dto.SensorDataValue;
|
||||
import org.openhab.binding.luftdateninfo.internal.utils.NumberUtils;
|
||||
import org.openhab.binding.sensorcommunity.internal.dto.SensorDataValue;
|
||||
import org.openhab.binding.sensorcommunity.internal.utils.NumberUtils;
|
||||
import org.openhab.core.library.dimension.Density;
|
||||
import org.openhab.core.library.types.QuantityType;
|
||||
import org.openhab.core.library.unit.Units;
|
@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.luftdateninfo.internal.utils;
|
||||
package org.openhab.binding.sensorcommunity.internal.utils;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
|
@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.luftdateninfo.internal.utils;
|
||||
package org.openhab.binding.sensorcommunity.internal.utils;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.luftdateninfo.internal.utils;
|
||||
package org.openhab.binding.sensorcommunity.internal.utils;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
|
@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<addon:addon id="luftdateninfo" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
<addon:addon id="sensorcommunity" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:addon="https://openhab.org/schemas/addon/v1.0.0"
|
||||
xsi:schemaLocation="https://openhab.org/schemas/addon/v1.0.0 https://openhab.org/schemas/addon-1.0.0.xsd">
|
||||
|
||||
<type>binding</type>
|
||||
<name>LuftdatenInfo Binding</name>
|
||||
<description>Binding to integrate DIY Sensors from luftdaten.info Sensor Community</description>
|
||||
<name>Sensor.Community Binding</name>
|
||||
<description>Binding to integrate DIY Sensors from Sensor.Community</description>
|
||||
<connection>hybrid</connection>
|
||||
|
||||
</addon:addon>
|
@ -0,0 +1,47 @@
|
||||
# add-on
|
||||
|
||||
addon.sensorcommunity.name = Sensor.Community Binding
|
||||
addon.sensorcommunity.description = Binding to integrate DIY Sensors from Sensor.Community
|
||||
|
||||
# thing types
|
||||
|
||||
thing-type.sensorcommunity.conditions.label = Condition Sensor
|
||||
thing-type.sensorcommunity.conditions.description = Sensor to measure Temperature and Humidity conditions
|
||||
thing-type.sensorcommunity.noise.label = Noise Sensor
|
||||
thing-type.sensorcommunity.noise.description = Sensor to measure noise on location
|
||||
thing-type.sensorcommunity.particulate.label = Particulate Sensor
|
||||
thing-type.sensorcommunity.particulate.description = Sensor to measure Particulate Matter (PM)
|
||||
|
||||
# thing types config
|
||||
|
||||
thing-type.config.sensorcommunity.conditions.ipAddress.label = Internal IP Address
|
||||
thing-type.config.sensorcommunity.conditions.ipAddress.description = Local IP address of your personal owned sensor
|
||||
thing-type.config.sensorcommunity.conditions.sensorid.label = External Sensor ID
|
||||
thing-type.config.sensorcommunity.conditions.sensorid.description = Sensor ID from https://deutschland.maps.sensor.community/
|
||||
thing-type.config.sensorcommunity.noise.ipAddress.label = Internal IP Address
|
||||
thing-type.config.sensorcommunity.noise.ipAddress.description = Local IP address of your personal owned sensor
|
||||
thing-type.config.sensorcommunity.noise.sensorid.label = External Sensor ID
|
||||
thing-type.config.sensorcommunity.noise.sensorid.description = Sensor ID from https://deutschland.maps.sensor.community/
|
||||
thing-type.config.sensorcommunity.particulate.ipAddress.label = Internal IP Address
|
||||
thing-type.config.sensorcommunity.particulate.ipAddress.description = Local IP address of your personal owned sensor
|
||||
thing-type.config.sensorcommunity.particulate.sensorid.label = External Sensor ID
|
||||
thing-type.config.sensorcommunity.particulate.sensorid.description = Sensor ID from https://deutschland.maps.sensor.community/
|
||||
|
||||
# channel types
|
||||
|
||||
channel-type.sensorcommunity.hum-channel.label = Humidity
|
||||
channel-type.sensorcommunity.hum-channel.description = Humidity from the selected Sensor ID
|
||||
channel-type.sensorcommunity.noise-eq-channel.label = Average Noise
|
||||
channel-type.sensorcommunity.noise-eq-channel.description = Average noise level from the selected Sensor ID
|
||||
channel-type.sensorcommunity.noise-max-channel.label = Maximum Noise
|
||||
channel-type.sensorcommunity.noise-max-channel.description = Maximum noise level (last 2.5 minutes) from the selected Sensor ID
|
||||
channel-type.sensorcommunity.noise-min-channel.label = Minimum Noise
|
||||
channel-type.sensorcommunity.noise-min-channel.description = Minimum noise level (last 2.5 minutes) from the selected Sensor ID
|
||||
channel-type.sensorcommunity.pm100-channel.label = Particulate Matter category 10.0
|
||||
channel-type.sensorcommunity.pm25-channel.label = Particulate Matter category 2.5
|
||||
channel-type.sensorcommunity.pressure-channel.label = Atmospheric Pressure
|
||||
channel-type.sensorcommunity.pressure-channel.description = Atmospheric Pressure from the selected Sensor ID
|
||||
channel-type.sensorcommunity.pressure-sea-channel.label = Atmospheric Pressure Sea Level
|
||||
channel-type.sensorcommunity.pressure-sea-channel.description = Atmospheric Pressure at sea level from the selected Sensor ID
|
||||
channel-type.sensorcommunity.temp-channel.label = Temperature
|
||||
channel-type.sensorcommunity.temp-channel.description = Temperature from the selected Sensor ID
|
@ -0,0 +1,47 @@
|
||||
# add-on
|
||||
|
||||
addon.sensorcommunity.name = Sensor.Community Binding
|
||||
addon.sensorcommunity.description = Das Binding stellt die Daten der Eigenbau-Sensoren von Sensor.Community zur Verfügung
|
||||
|
||||
# thing types
|
||||
|
||||
thing-type.sensorcommunity.conditions.label = Umweltsensor
|
||||
thing-type.sensorcommunity.conditions.description = Messung der Temperatur, Luftfeuchtigkeit und Luftdruck
|
||||
thing-type.sensorcommunity.noise.label = Lärmsensor
|
||||
thing-type.sensorcommunity.noise.description = Messung der Lärmbelastung in der Umgebung
|
||||
thing-type.sensorcommunity.particulate.label = Feinstaubsensor
|
||||
thing-type.sensorcommunity.particulate.description = Messung der Feinstaubbelastung in der Umgebung
|
||||
|
||||
# thing types config
|
||||
|
||||
thing-type.config.sensorcommunity.conditions.ipAddress.label = Interne IP-Adresse
|
||||
thing-type.config.sensorcommunity.conditions.ipAddress.description = Lokale IP-Adresse Ihres persönlichen Sensors
|
||||
thing-type.config.sensorcommunity.conditions.sensorid.label = Externe Sensor-ID
|
||||
thing-type.config.sensorcommunity.conditions.sensorid.description = Sensor-ID von https\://deutschland.maps.sensor.community/
|
||||
thing-type.config.sensorcommunity.noise.ipAddress.label = Interne IP-Adresse
|
||||
thing-type.config.sensorcommunity.noise.ipAddress.description = Lokale IP-Adresse Ihres persönlichen Sensors
|
||||
thing-type.config.sensorcommunity.noise.sensorid.label = Externe Sensor-ID
|
||||
thing-type.config.sensorcommunity.noise.sensorid.description = Sensor-ID von https\://deutschland.maps.sensor.community/
|
||||
thing-type.config.sensorcommunity.particulate.ipAddress.label = Interne IP-Adresse
|
||||
thing-type.config.sensorcommunity.particulate.ipAddress.description = Lokale IP-Adresse Ihres persönlichen Sensors
|
||||
thing-type.config.sensorcommunity.particulate.sensorid.label = Externe Sensor-ID
|
||||
thing-type.config.sensorcommunity.particulate.sensorid.description = Sensor-ID von https\://deutschland.maps.sensor.community/
|
||||
|
||||
# channel types
|
||||
|
||||
channel-type.sensorcommunity.hum-channel.label = Luftfeuchtigkeit
|
||||
channel-type.sensorcommunity.hum-channel.description = Luftfeuchtigkeit der ausgewählten Sensor-ID
|
||||
channel-type.sensorcommunity.noise-eq-channel.label = Durchschnittlicher Lärmpegel
|
||||
channel-type.sensorcommunity.noise-eq-channel.description = Durchschnittlicher Rauschpegel der ausgewählten Sensor-ID
|
||||
channel-type.sensorcommunity.noise-max-channel.label = Maximaler Lärmpegel
|
||||
channel-type.sensorcommunity.noise-max-channel.description = Maximaler Rauschpegel (letzte 2,5 Minuten) der ausgewählten Sensor-ID
|
||||
channel-type.sensorcommunity.noise-min-channel.label = Minimaler Lärmpegel
|
||||
channel-type.sensorcommunity.noise-min-channel.description = Minimaler Rauschpegel (letzte 2,5 Minuten) der ausgewählten Sensor-ID
|
||||
channel-type.sensorcommunity.pm100-channel.label = Feinstaub der Kategorie PM 10.0
|
||||
channel-type.sensorcommunity.pm25-channel.label = Feinstaub der Kategorie PM 2.5
|
||||
channel-type.sensorcommunity.pressure-channel.label = Atmosphärischer Druck
|
||||
channel-type.sensorcommunity.pressure-channel.description = Atmosphärischer Druck der ausgewählten Sensor-ID
|
||||
channel-type.sensorcommunity.pressure-sea-channel.label = Atmosphärischer Druck Auf Meereshöhe
|
||||
channel-type.sensorcommunity.pressure-sea-channel.description = Atmosphärischer Druck auf Seehöhe der ausgewählten Sensor-ID
|
||||
channel-type.sensorcommunity.temp-channel.label = Temperatur
|
||||
channel-type.sensorcommunity.temp-channel.description = Temperatur der ausgewählten Sensor-ID
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<thing:thing-descriptions bindingId="luftdateninfo"
|
||||
<thing:thing-descriptions bindingId="sensorcommunity"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:thing="https://openhab.org/schemas/thing-description/v1.0.0"
|
||||
xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0 https://openhab.org/schemas/thing-description-1.0.0.xsd">
|
@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.luftdateninfo.internal;
|
||||
package org.openhab.binding.sensorcommunity.internal;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.openhab.core.library.unit.MetricPrefix.HECTO;
|
||||
@ -19,10 +19,10 @@ import java.util.HashMap;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.openhab.binding.luftdateninfo.internal.handler.BaseSensorHandler.UpdateStatus;
|
||||
import org.openhab.binding.luftdateninfo.internal.mock.ConditionHandlerExtension;
|
||||
import org.openhab.binding.luftdateninfo.internal.mock.ThingMock;
|
||||
import org.openhab.binding.luftdateninfo.internal.util.FileReader;
|
||||
import org.openhab.binding.sensorcommunity.internal.handler.BaseSensorHandler.UpdateStatus;
|
||||
import org.openhab.binding.sensorcommunity.internal.mock.ConditionHandlerExtension;
|
||||
import org.openhab.binding.sensorcommunity.internal.mock.ThingMock;
|
||||
import org.openhab.binding.sensorcommunity.internal.util.FileReader;
|
||||
import org.openhab.core.library.types.QuantityType;
|
||||
import org.openhab.core.library.unit.SIUnits;
|
||||
import org.openhab.core.library.unit.Units;
|
@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.luftdateninfo.internal;
|
||||
package org.openhab.binding.sensorcommunity.internal;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
@ -18,10 +18,10 @@ import java.util.List;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.openhab.binding.luftdateninfo.internal.dto.SensorData;
|
||||
import org.openhab.binding.luftdateninfo.internal.dto.SensorDataValue;
|
||||
import org.openhab.binding.luftdateninfo.internal.util.FileReader;
|
||||
import org.openhab.binding.luftdateninfo.internal.utils.Constants;
|
||||
import org.openhab.binding.sensorcommunity.internal.dto.SensorData;
|
||||
import org.openhab.binding.sensorcommunity.internal.dto.SensorDataValue;
|
||||
import org.openhab.binding.sensorcommunity.internal.util.FileReader;
|
||||
import org.openhab.binding.sensorcommunity.internal.utils.Constants;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
|
@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.luftdateninfo.internal;
|
||||
package org.openhab.binding.sensorcommunity.internal;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
@ -21,9 +21,9 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.openhab.binding.luftdateninfo.internal.dto.SensorDataValue;
|
||||
import org.openhab.binding.luftdateninfo.internal.handler.HTTPHandler;
|
||||
import org.openhab.binding.luftdateninfo.internal.util.FileReader;
|
||||
import org.openhab.binding.sensorcommunity.internal.dto.SensorDataValue;
|
||||
import org.openhab.binding.sensorcommunity.internal.handler.HTTPHandler;
|
||||
import org.openhab.binding.sensorcommunity.internal.util.FileReader;
|
||||
|
||||
/**
|
||||
* The {@link HTTPHandlerEvalTest} test all evaluations on SensorDataValues
|
@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.luftdateninfo.internal;
|
||||
package org.openhab.binding.sensorcommunity.internal;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
@ -19,10 +19,10 @@ import java.util.Objects;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.openhab.binding.luftdateninfo.internal.dto.SensorDataValue;
|
||||
import org.openhab.binding.luftdateninfo.internal.handler.HTTPHandler;
|
||||
import org.openhab.binding.luftdateninfo.internal.util.FileReader;
|
||||
import org.openhab.binding.luftdateninfo.internal.utils.Constants;
|
||||
import org.openhab.binding.sensorcommunity.internal.dto.SensorDataValue;
|
||||
import org.openhab.binding.sensorcommunity.internal.handler.HTTPHandler;
|
||||
import org.openhab.binding.sensorcommunity.internal.util.FileReader;
|
||||
import org.openhab.binding.sensorcommunity.internal.utils.Constants;
|
||||
|
||||
/**
|
||||
* The {@link HTTPHandlerValueTest} test values decoding of HTTPHandler
|
@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.luftdateninfo.internal;
|
||||
package org.openhab.binding.sensorcommunity.internal;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
@ -18,10 +18,10 @@ import java.util.HashMap;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.openhab.binding.luftdateninfo.internal.handler.BaseSensorHandler.UpdateStatus;
|
||||
import org.openhab.binding.luftdateninfo.internal.mock.NoiseHandlerExtension;
|
||||
import org.openhab.binding.luftdateninfo.internal.mock.ThingMock;
|
||||
import org.openhab.binding.luftdateninfo.internal.util.FileReader;
|
||||
import org.openhab.binding.sensorcommunity.internal.handler.BaseSensorHandler.UpdateStatus;
|
||||
import org.openhab.binding.sensorcommunity.internal.mock.NoiseHandlerExtension;
|
||||
import org.openhab.binding.sensorcommunity.internal.mock.ThingMock;
|
||||
import org.openhab.binding.sensorcommunity.internal.util.FileReader;
|
||||
import org.openhab.core.library.types.QuantityType;
|
||||
import org.openhab.core.library.unit.Units;
|
||||
|
@ -10,13 +10,13 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.luftdateninfo.internal;
|
||||
package org.openhab.binding.sensorcommunity.internal;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.openhab.binding.luftdateninfo.internal.utils.NumberUtils;
|
||||
import org.openhab.binding.sensorcommunity.internal.utils.NumberUtils;
|
||||
|
||||
/**
|
||||
* The {@link NumberTest} Test rounding and converting Numbers
|
@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.luftdateninfo.internal;
|
||||
package org.openhab.binding.sensorcommunity.internal;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
@ -18,12 +18,12 @@ import java.util.HashMap;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.openhab.binding.luftdateninfo.internal.handler.BaseSensorHandler.ConfigStatus;
|
||||
import org.openhab.binding.luftdateninfo.internal.handler.BaseSensorHandler.LifecycleStatus;
|
||||
import org.openhab.binding.luftdateninfo.internal.handler.BaseSensorHandler.UpdateStatus;
|
||||
import org.openhab.binding.luftdateninfo.internal.mock.PMHandlerExtension;
|
||||
import org.openhab.binding.luftdateninfo.internal.mock.ThingMock;
|
||||
import org.openhab.binding.luftdateninfo.internal.util.FileReader;
|
||||
import org.openhab.binding.sensorcommunity.internal.handler.BaseSensorHandler.ConfigStatus;
|
||||
import org.openhab.binding.sensorcommunity.internal.handler.BaseSensorHandler.LifecycleStatus;
|
||||
import org.openhab.binding.sensorcommunity.internal.handler.BaseSensorHandler.UpdateStatus;
|
||||
import org.openhab.binding.sensorcommunity.internal.mock.PMHandlerExtension;
|
||||
import org.openhab.binding.sensorcommunity.internal.mock.ThingMock;
|
||||
import org.openhab.binding.sensorcommunity.internal.util.FileReader;
|
||||
import org.openhab.core.library.types.QuantityType;
|
||||
import org.openhab.core.library.unit.Units;
|
||||
import org.slf4j.Logger;
|
@ -10,11 +10,11 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.luftdateninfo.internal.mock;
|
||||
package org.openhab.binding.sensorcommunity.internal.mock;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.openhab.binding.luftdateninfo.internal.handler.ConditionHandler;
|
||||
import org.openhab.binding.sensorcommunity.internal.handler.ConditionHandler;
|
||||
import org.openhab.core.thing.Thing;
|
||||
import org.openhab.core.types.State;
|
||||
|
@ -10,11 +10,11 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.luftdateninfo.internal.mock;
|
||||
package org.openhab.binding.sensorcommunity.internal.mock;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.openhab.binding.luftdateninfo.internal.handler.NoiseHandler;
|
||||
import org.openhab.binding.sensorcommunity.internal.handler.NoiseHandler;
|
||||
import org.openhab.core.thing.Thing;
|
||||
import org.openhab.core.types.State;
|
||||
|
@ -10,11 +10,11 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.luftdateninfo.internal.mock;
|
||||
package org.openhab.binding.sensorcommunity.internal.mock;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.openhab.binding.luftdateninfo.internal.handler.PMHandler;
|
||||
import org.openhab.binding.sensorcommunity.internal.handler.PMHandler;
|
||||
import org.openhab.core.thing.Thing;
|
||||
import org.openhab.core.types.State;
|
||||
|
@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.luftdateninfo.internal.mock;
|
||||
package org.openhab.binding.sensorcommunity.internal.mock;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
@ -111,12 +111,12 @@ public class ThingMock implements Thing {
|
||||
|
||||
@Override
|
||||
public ThingUID getUID() {
|
||||
return new ThingUID("luftdateninfo", "test");
|
||||
return new ThingUID("sensorcommunity", "test");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ThingTypeUID getThingTypeUID() {
|
||||
return new ThingTypeUID("luftdateninfo:any");
|
||||
return new ThingTypeUID("sensorcommunity:any");
|
||||
}
|
||||
|
||||
@Override
|
@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.luftdateninfo.internal.util;
|
||||
package org.openhab.binding.sensorcommunity.internal.util;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
@ -19,7 +19,7 @@ import java.time.format.DateTimeParseException;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.openhab.binding.luftdateninfo.internal.utils.DateTimeUtils;
|
||||
import org.openhab.binding.sensorcommunity.internal.utils.DateTimeUtils;
|
||||
|
||||
/**
|
||||
* The {@link DateTimeTest} Test DateTimeFormatter provided in utils package
|
@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.luftdateninfo.internal.util;
|
||||
package org.openhab.binding.sensorcommunity.internal.util;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
@ -32,7 +32,7 @@
|
||||
"sensor": {
|
||||
"sensor_type": {
|
||||
"id": 29,
|
||||
"manufacturer": "Luftdaten.info",
|
||||
"manufacturer": "Sensor.Community",
|
||||
"name": "Laerm"
|
||||
},
|
||||
"pin": "15",
|
||||
@ -72,7 +72,7 @@
|
||||
"sensor": {
|
||||
"sensor_type": {
|
||||
"id": 29,
|
||||
"manufacturer": "Luftdaten.info",
|
||||
"manufacturer": "Sensor.Community",
|
||||
"name": "Laerm"
|
||||
},
|
||||
"pin": "15",
|
@ -214,7 +214,6 @@
|
||||
<module>org.openhab.binding.livisismarthome</module>
|
||||
<module>org.openhab.binding.logreader</module>
|
||||
<module>org.openhab.binding.loxone</module>
|
||||
<module>org.openhab.binding.luftdateninfo</module>
|
||||
<module>org.openhab.binding.lutron</module>
|
||||
<module>org.openhab.binding.luxom</module>
|
||||
<module>org.openhab.binding.luxtronikheatpump</module>
|
||||
@ -334,6 +333,7 @@
|
||||
<module>org.openhab.binding.seneye</module>
|
||||
<module>org.openhab.binding.sensebox</module>
|
||||
<module>org.openhab.binding.sensibo</module>
|
||||
<module>org.openhab.binding.sensorcommunity</module>
|
||||
<module>org.openhab.binding.serial</module>
|
||||
<module>org.openhab.binding.serialbutton</module>
|
||||
<module>org.openhab.binding.shelly</module>
|
||||
|
Loading…
Reference in New Issue
Block a user