diff --git a/bom/openhab-addons/pom.xml b/bom/openhab-addons/pom.xml index 07941305d1304..c40c628243f53 100644 --- a/bom/openhab-addons/pom.xml +++ b/bom/openhab-addons/pom.xml @@ -414,6 +414,11 @@ org.openhab.binding.hyperion ${project.version} + + org.openhab.addons.bundles + org.openhab.binding.iammeter + ${project.version} + org.openhab.addons.bundles org.openhab.binding.iaqualink diff --git a/bundles/org.openhab.binding.iammeter/.classpath b/bundles/org.openhab.binding.iammeter/.classpath new file mode 100644 index 0000000000000..a5d95095ccaaf --- /dev/null +++ b/bundles/org.openhab.binding.iammeter/.classpath @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bundles/org.openhab.binding.iammeter/.project b/bundles/org.openhab.binding.iammeter/.project new file mode 100644 index 0000000000000..e0a44d3668856 --- /dev/null +++ b/bundles/org.openhab.binding.iammeter/.project @@ -0,0 +1,23 @@ + + + org.openhab.binding.iammeter + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/bundles/org.openhab.binding.iammeter/NOTICE b/bundles/org.openhab.binding.iammeter/NOTICE new file mode 100644 index 0000000000000..38d625e349232 --- /dev/null +++ b/bundles/org.openhab.binding.iammeter/NOTICE @@ -0,0 +1,13 @@ +This content is produced and maintained by the openHAB project. + +* Project home: https://www.openhab.org + +== Declared Project Licenses + +This program and the accompanying materials are made available under the terms +of the Eclipse Public License 2.0 which is available at +https://www.eclipse.org/legal/epl-2.0/. + +== Source Code + +https://github.com/openhab/openhab-addons diff --git a/bundles/org.openhab.binding.iammeter/README.md b/bundles/org.openhab.binding.iammeter/README.md new file mode 100644 index 0000000000000..b6556993aff83 --- /dev/null +++ b/bundles/org.openhab.binding.iammeter/README.md @@ -0,0 +1,54 @@ +# Iammeter Binding + +[Iammeter](https://www.iammeter.com) provides real-time readings of single-phase (WEM3080, WEM3162) and three-phase (WEM3080T) meters from IAMMETER over Wi-Fi. + +## Use of the binding + +The Iammeter is exposed as one thing with a number of channels that can be used to read the values for different aspects of your Iammeter devices. + +## Setup of the binding + +You can add the Iammeter device via the openHAB UI manually. + + +## Available channels + +The following table is taken from the official manual and contains all available channels. + +Single-phase energy meter (WEM3080/WEM3162) +|Name|Unit|Description|Type| +|----|----|----|----| +|voltage_a|V|Voltage|Number| +|current_a|A|Current|Number| +|power_a|W|Active power|Number| +|importenergy_a|kWh|Energy consumption from gird|Number| +|exportgrid_a|kWh|Energy export to grid|Number| + +Three-phase energy meter (WEM3080T) +|Name|Unit|Description|Type| +|----|----|----|----| +|voltage_a|V|A phase voltage|Number| +|current_a|A|A phase current|Number| +|power_a|W|A phase active power|Number| +|importenergy_a|kWh|A phase import energy|Number| +|exportgrid_a|kWh|A phase export energy|Number| +|frequency_a|kWh|A phase frequency|Number| +|pf_a|kWh|A phase power factor|Number| +|voltage_b|V|B phase voltage|Number| +|current_b|A|B phase current|Number| +|power_b|W|B phase active power|Number| +|importenergy_b|kWh|B phase import energy|Number| +|exportgrid_b|kWh|B phase export energy|Number| +|frequency_b|kWh|B phase frequency|Number| +|pf_b|kWh|B phase power factor|Number| +|voltage_c|V|C phase voltage|Number| +|current_c|A|C phase current|Number| +|power_c|W|C phase active power|Number| +|importenergy_c|kWh|C phase import energy|Number| +|exportgrid_c|kWh|C phase export energy|Number| +|frequency_c|kWh|C phase frequency|Number| +|pf_c|kWh|C phase power factor|Number| + +## More information + +More information about the Iammeter devices can be found in the [Iammeter website](https://www.iammeter.com). diff --git a/bundles/org.openhab.binding.iammeter/pom.xml b/bundles/org.openhab.binding.iammeter/pom.xml new file mode 100644 index 0000000000000..566bb1386b83e --- /dev/null +++ b/bundles/org.openhab.binding.iammeter/pom.xml @@ -0,0 +1,17 @@ + + + + 4.0.0 + + + org.openhab.addons.bundles + org.openhab.addons.reactor.bundles + 2.5.8-SNAPSHOT + + + org.openhab.binding.iammeter + + openHAB Add-ons :: Bundles :: Iammeter Binding + + diff --git a/bundles/org.openhab.binding.iammeter/src/main/feature/feature.xml b/bundles/org.openhab.binding.iammeter/src/main/feature/feature.xml new file mode 100644 index 0000000000000..113a32aca1d3f --- /dev/null +++ b/bundles/org.openhab.binding.iammeter/src/main/feature/feature.xml @@ -0,0 +1,9 @@ + + + mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/${ohc.version}/xml/features + + + openhab-runtime-base + mvn:org.openhab.addons.bundles/org.openhab.binding.iammeter/${project.version} + + diff --git a/bundles/org.openhab.binding.iammeter/src/main/java/org/openhab/binding/iammeter/internal/IammeterBindingConstants.java b/bundles/org.openhab.binding.iammeter/src/main/java/org/openhab/binding/iammeter/internal/IammeterBindingConstants.java new file mode 100644 index 0000000000000..937b86e9ef864 --- /dev/null +++ b/bundles/org.openhab.binding.iammeter/src/main/java/org/openhab/binding/iammeter/internal/IammeterBindingConstants.java @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2010-2020 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.iammeter.internal; + +import org.eclipse.jdt.annotation.NonNullByDefault; +import org.eclipse.smarthome.core.thing.ThingTypeUID; + +/** + * The {@link IammeterBindingConstants} class defines common constants, which are + * used across the whole binding. + * + * @author yang bo - Initial contribution + */ +@NonNullByDefault +public class IammeterBindingConstants { + + public static final String BINDING_ID = "iammeter"; + + // List of all Thing Type UIDs + public static final ThingTypeUID THING_TYPE_POWERMETER = new ThingTypeUID(BINDING_ID, "powermeter"); + +} diff --git a/bundles/org.openhab.binding.iammeter/src/main/java/org/openhab/binding/iammeter/internal/IammeterConfiguration.java b/bundles/org.openhab.binding.iammeter/src/main/java/org/openhab/binding/iammeter/internal/IammeterConfiguration.java new file mode 100644 index 0000000000000..39f2c72efa613 --- /dev/null +++ b/bundles/org.openhab.binding.iammeter/src/main/java/org/openhab/binding/iammeter/internal/IammeterConfiguration.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) 2010-2020 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.iammeter.internal; + +/** + * The {@link IammeterConfiguration} class contains fields mapping thing configuration parameters. + * + * @author yang bo - Initial contribution + */ + +public class IammeterConfiguration { + public String host; + public int port; + public int refreshInterval; +} diff --git a/bundles/org.openhab.binding.iammeter/src/main/java/org/openhab/binding/iammeter/internal/IammeterHandler.java b/bundles/org.openhab.binding.iammeter/src/main/java/org/openhab/binding/iammeter/internal/IammeterHandler.java new file mode 100644 index 0000000000000..50913e84fdff6 --- /dev/null +++ b/bundles/org.openhab.binding.iammeter/src/main/java/org/openhab/binding/iammeter/internal/IammeterHandler.java @@ -0,0 +1,203 @@ +/** + * Copyright (c) 2010-2020 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.iammeter.internal; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.math.BigDecimal; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.TimeUnit; + +import org.eclipse.jdt.annotation.NonNullByDefault; +import org.eclipse.smarthome.core.library.types.DecimalType; +import org.eclipse.smarthome.core.thing.Channel; +import org.eclipse.smarthome.core.thing.ChannelUID; +import org.eclipse.smarthome.core.thing.Thing; +import org.eclipse.smarthome.core.thing.ThingStatus; +import org.eclipse.smarthome.core.thing.ThingStatusDetail; +import org.eclipse.smarthome.core.thing.binding.BaseThingHandler; +import org.eclipse.smarthome.core.thing.binding.builder.ThingBuilder; +import org.eclipse.smarthome.core.types.Command; +import org.eclipse.smarthome.core.types.RefreshType; +import org.eclipse.smarthome.core.types.State; +import org.eclipse.smarthome.core.types.UnDefType; +import org.eclipse.smarthome.io.net.http.HttpUtil; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import com.google.gson.JsonSyntaxException; + +/** + * The {@link IammeterHandler} is responsible for handling commands, which are + * sent to one of the channels. + * + * @author yang bo - Initial contribution + */ +@NonNullByDefault +public class IammeterHandler extends BaseThingHandler { + + private final Logger logger = LoggerFactory.getLogger(IammeterHandler.class); + + public IammeterHandler(Thing thing) { + super(thing); + } + + private final int timeout = 5000; + + @Override + public void handleCommand(ChannelUID channelUID, Command command) { + if (command instanceof RefreshType) { + try{ + refresh(); + } catch (Exception ex) { + logger.warn("refresh error {}" , ex.getMessage()); + } + } + } + + private boolean bExtraChannelRemoved = false; + + @Override + public void initialize() { + IammeterConfiguration config = getConfiguration(); + + Runnable runnable = new Runnable() { + @Override + public void run() { + try{ + refresh(); + } catch (Exception ex) { + logger.warn("refresh error {}" , ex.getMessage()); + } + } + }; + scheduler.scheduleWithFixedDelay(runnable, 0, config.refreshInterval, TimeUnit.SECONDS); + + updateStatus(ThingStatus.UNKNOWN); + scheduler.execute(() -> { + try{ + refresh(); + } catch (Exception ex) { + logger.warn("refresh error {}" , ex.getMessage()); + } + }); + } + + private void refresh() throws Exception { + try { + IammeterConfiguration config = getConfiguration(); + logger.trace("Starting refresh handler"); + String httpMethod = "GET"; + String url = "http://admin:admin@" + config.host + ":" + config.port + "/monitorjson"; + String content = ""; + InputStream stream = new ByteArrayInputStream(content.getBytes(StandardCharsets.UTF_8)); + + String response = HttpUtil.executeUrl(httpMethod, url, stream, null, timeout); + JsonElement iammeterDataElement = new JsonParser().parse(response); + JsonObject iammeterData = iammeterDataElement.getAsJsonObject(); + String keyWord = "Data"; + boolean bRemoveChannels = false; + String channelProfix = ""; + if (iammeterData.has("data") || (iammeterData.has("Data") && iammeterData.has("SN"))) { + bRemoveChannels = true; + if (iammeterData.has("data")) { + keyWord = "data"; + } + for (IammeterWEM3080Channel channelConfig : IammeterWEM3080Channel.values()) { + Channel channel = getThing().getChannel(channelConfig.getId()); + if (channel != null){ + channelProfix = IammeterBindingConstants.THING_TYPE_POWERMETER + ":" + + channel.getUID().getThingUID().getId(); + State state = getDecimal( + iammeterData.get(keyWord).getAsJsonArray().get(channelConfig.getIndex()).toString()); + updateState(channel.getUID(), state); + } + } + } else if (iammeterData.has("Datas") && iammeterData.has("SN")) { + keyWord = "Datas"; + for (IammeterWEM3080TChannel channelConfig : IammeterWEM3080TChannel.values()) { + Channel channel = getThing().getChannel(channelConfig.getId()); + if (channel != null){ + State state = getDecimal(iammeterData.get(keyWord).getAsJsonArray().get(channelConfig.getRow()) + .getAsJsonArray().get(channelConfig.getCol()).toString()); + updateState(channel.getUID(), state); + } + } + } + if (bRemoveChannels) { + if (!bExtraChannelRemoved) { + thingStructureChanged(channelProfix); + } + } + updateStatus(ThingStatus.ONLINE); + // Very rudimentary Exception differentiation + } catch (IOException e) { + updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, + "Communication error with the device: " + e.getMessage()); + } catch (JsonSyntaxException je) { + logger.warn("Invalid JSON when refreshing source {}: {}", getThing().getUID(), je.getMessage()); + } catch (Exception e) { + logger.warn("Error refreshing source {}: {}", getThing().getUID(), e.getMessage(), e); + } + } + + protected void thingStructureChanged(String channelProfix) { + List noUsedItems = new ArrayList<>(); + noUsedItems.add(new ChannelUID(channelProfix + ":frequency_a")); + noUsedItems.add(new ChannelUID(channelProfix + ":pf_a")); + noUsedItems.add(new ChannelUID(channelProfix + ":voltage_b")); + noUsedItems.add(new ChannelUID(channelProfix + ":current_b")); + noUsedItems.add(new ChannelUID(channelProfix + ":power_b")); + noUsedItems.add(new ChannelUID(channelProfix + ":importenergy_b")); + noUsedItems.add(new ChannelUID(channelProfix + ":exportgrid_b")); + noUsedItems.add(new ChannelUID(channelProfix + ":frequency_b")); + noUsedItems.add(new ChannelUID(channelProfix + ":pf_b")); + noUsedItems.add(new ChannelUID(channelProfix + ":voltage_c")); + noUsedItems.add(new ChannelUID(channelProfix + ":current_c")); + noUsedItems.add(new ChannelUID(channelProfix + ":power_c")); + noUsedItems.add(new ChannelUID(channelProfix + ":importenergy_c")); + noUsedItems.add(new ChannelUID(channelProfix + ":exportgrid_c")); + noUsedItems.add(new ChannelUID(channelProfix + ":frequency_c")); + noUsedItems.add(new ChannelUID(channelProfix + ":pf_c")); + ThingBuilder thingBuilder = editThing(); + for (ChannelUID chl : noUsedItems) { + thingBuilder.withoutChannel(chl); + } + updateThing(thingBuilder.build()); + bExtraChannelRemoved = true; + } + + private State getDecimal(String value) { + try { + return new DecimalType(new BigDecimal(value)); + } catch (NumberFormatException e) { + return UnDefType.UNDEF; + } + } + + @Override + public void dispose() { + super.dispose(); + } + + public IammeterConfiguration getConfiguration() { + return this.getConfigAs(IammeterConfiguration.class); + } + +} diff --git a/bundles/org.openhab.binding.iammeter/src/main/java/org/openhab/binding/iammeter/internal/IammeterHandlerFactory.java b/bundles/org.openhab.binding.iammeter/src/main/java/org/openhab/binding/iammeter/internal/IammeterHandlerFactory.java new file mode 100644 index 0000000000000..448ddd0204d2f --- /dev/null +++ b/bundles/org.openhab.binding.iammeter/src/main/java/org/openhab/binding/iammeter/internal/IammeterHandlerFactory.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) 2010-2020 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.iammeter.internal; + +import static org.openhab.binding.iammeter.internal.IammeterBindingConstants.THING_TYPE_POWERMETER; + +import java.util.Collections; +import java.util.Set; + +import org.eclipse.jdt.annotation.NonNullByDefault; +import org.eclipse.jdt.annotation.Nullable; +import org.eclipse.smarthome.core.thing.Thing; +import org.eclipse.smarthome.core.thing.ThingTypeUID; +import org.eclipse.smarthome.core.thing.binding.BaseThingHandlerFactory; +import org.eclipse.smarthome.core.thing.binding.ThingHandler; +import org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory; +import org.osgi.service.component.annotations.Component; + +/** + * The {@link IammeterHandlerFactory} is responsible for creating things and thing + * handlers. + * + * @author yangbo - Initial contribution + */ +@NonNullByDefault +@Component(configurationPid = "binding.iammeter", service = ThingHandlerFactory.class) +public class IammeterHandlerFactory extends BaseThingHandlerFactory { + + private static final Set SUPPORTED_THING_TYPES_UIDS = Collections.singleton(THING_TYPE_POWERMETER); + + @Override + public boolean supportsThingType(ThingTypeUID thingTypeUID) { + return SUPPORTED_THING_TYPES_UIDS.contains(thingTypeUID); + } + + @Override + protected @Nullable ThingHandler createHandler(Thing thing) { + ThingTypeUID thingTypeUID = thing.getThingTypeUID(); + + if (THING_TYPE_POWERMETER.equals(thingTypeUID)) { + return new IammeterHandler(thing); + } + + return null; + } +} diff --git a/bundles/org.openhab.binding.iammeter/src/main/java/org/openhab/binding/iammeter/internal/IammeterWEM3080Channel.java b/bundles/org.openhab.binding.iammeter/src/main/java/org/openhab/binding/iammeter/internal/IammeterWEM3080Channel.java new file mode 100644 index 0000000000000..e8fb946d99576 --- /dev/null +++ b/bundles/org.openhab.binding.iammeter/src/main/java/org/openhab/binding/iammeter/internal/IammeterWEM3080Channel.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) 2010-2020 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.iammeter.internal; + +/** + * The {@link IammeterWEM3080Channel} Enum defines common constants, which are + * used across the whole binding. + * + * @author yang bo - Initial contribution + */ +public enum IammeterWEM3080Channel { + + CHANNEL_VOLTAGE("voltage_a", 0), + CHANNEL_CURRENT("current_a", 1), + CHANNEL_POWER("power_a", 2), + CHANNEL_IMPORTENERGY("importenergy_a", 3), + CHANNEL_EXPORTGRID("exportgrid_a", 4); + + private final String id; + private final int index; + + IammeterWEM3080Channel(String id, int index) { + this.id = id; + this.index = index; + } + + public String getId() { + return id; + } + + public int getIndex() { + return index; + } +} diff --git a/bundles/org.openhab.binding.iammeter/src/main/java/org/openhab/binding/iammeter/internal/IammeterWEM3080TChannel.java b/bundles/org.openhab.binding.iammeter/src/main/java/org/openhab/binding/iammeter/internal/IammeterWEM3080TChannel.java new file mode 100644 index 0000000000000..dd68e1e198094 --- /dev/null +++ b/bundles/org.openhab.binding.iammeter/src/main/java/org/openhab/binding/iammeter/internal/IammeterWEM3080TChannel.java @@ -0,0 +1,66 @@ +/** + * Copyright (c) 2010-2020 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.iammeter.internal; + +/** + * The {@link IammeterWEM3080TChannel} Enum defines common constants, which are + * used across the whole binding. + * + * @author Johann Richard - Initial contribution + */ +public enum IammeterWEM3080TChannel { + + CHANNEL_VOLTAGE_A("voltage_a", 0, 0), + CHANNEL_CURRENT_A("current_a", 0, 1), + CHANNEL_POWER_A("power_a", 0, 2), + CHANNEL_IMPORTENERGY_A("importenergy_a", 0, 3), + CHANNEL_EXPORTGRID_A("exportgrid_a", 0, 4), + CHANNEL_FREQUENCY_A("frequency_a", 0, 5), + CHANNEL_PF_A("pf_a", 0, 6), + CHANNEL_VOLTAGE_B("voltage_b", 1, 0), + CHANNEL_CURRENT_B("current_b", 1, 1), + CHANNEL_POWER_B("power_b", 1, 2), + CHANNEL_IMPORTENERGY_B("importenergy_b", 1, 3), + CHANNEL_EXPORTGRID_B("exportgrid_b", 1, 4), + CHANNEL_FREQUENCY_B("frequency_b", 1, 5), + CHANNEL_PF_B("pf_b", 1, 6), + CHANNEL_VOLTAGE_C("voltage_c", 2, 0), + CHANNEL_CURRENT_C("current_c", 2, 1), + CHANNEL_POWER_C("power_c", 2, 2), + CHANNEL_IMPORTENERGY_C("importenergy_c", 2, 3), + CHANNEL_EXPORTGRID_C("exportgrid_c", 2, 4), + CHANNEL_FREQUENCY_C("frequency_c", 2, 5), + CHANNEL_PF_C("pf_c", 2, 6); + + private final String id; + private final int row; + private final int col; + + IammeterWEM3080TChannel(String id, int r, int c) { + this.id = id; + this.row = r; + this.col = c; + } + + public String getId() { + return id; + } + + public int getRow() { + return row; + } + + public int getCol() { + return col; + } +} diff --git a/bundles/org.openhab.binding.iammeter/src/main/resources/ESH-INF/binding/binding.xml b/bundles/org.openhab.binding.iammeter/src/main/resources/ESH-INF/binding/binding.xml new file mode 100644 index 0000000000000..01c5c2d52c390 --- /dev/null +++ b/bundles/org.openhab.binding.iammeter/src/main/resources/ESH-INF/binding/binding.xml @@ -0,0 +1,10 @@ + + + + Iammeter Binding + This is the binding for Iammeter. + yang bo + + diff --git a/bundles/org.openhab.binding.iammeter/src/main/resources/ESH-INF/i18n/iammeter_xx_XX.properties b/bundles/org.openhab.binding.iammeter/src/main/resources/ESH-INF/i18n/iammeter_xx_XX.properties new file mode 100644 index 0000000000000..6b152e1fd7d22 --- /dev/null +++ b/bundles/org.openhab.binding.iammeter/src/main/resources/ESH-INF/i18n/iammeter_xx_XX.properties @@ -0,0 +1,15 @@ +# binding +binding.iammeter.name = +binding.iammeter.description = + +# thing types +thing-type.iammeter.powermeter.label = +thing-type.iammeter.powermeter.description = + +# thing type config description +thing-type.config.iammeter.powermeter.voltage_a.label = +thing-type.config.iammeter.powermeter.voltage_a.description = + +# channel types +channel-type.iammeter.voltage_a.label = +channel-type.iammeter.voltage_a.description = diff --git a/bundles/org.openhab.binding.iammeter/src/main/resources/ESH-INF/thing/thing-types.xml b/bundles/org.openhab.binding.iammeter/src/main/resources/ESH-INF/thing/thing-types.xml new file mode 100644 index 0000000000000..4459afbfe6a73 --- /dev/null +++ b/bundles/org.openhab.binding.iammeter/src/main/resources/ESH-INF/thing/thing-types.xml @@ -0,0 +1,182 @@ + + + + + + PowerMeter thing for Iammeter Binding + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IP address for your device + network-address + 127.0.0.1 + + + + Port + 80 + + + + 60 + + + + + + + Number:V + + voltage for phase A + + + + Number:A + + current for phase A + + + + Number:W + + power for phase A + + + + Number:kWh + + importenergy for phase A + + + + Number:kWh + + exportgrid for phase A + + + + Number:Hz + + frequency for phase A + + + + Number + + power factor for phase A + + + + Number:V + + voltage for phase B + + + + Number:A + + current for phase B + + + + Number:W + + power for phase B + + + + Number:kWh + + importenergy for phase B + + + + Number:kWh + + exportgrid for phase B + + + + Number:Hz + + frequency for phase B + + + + Number + + power factor for phase B + + + + Number:V + + voltage for phase C + + + + Number:A + + current for phase C + + + + Number:W + + power for phase C + + + + Number:kWh + + importenergy for phase C + + + + Number:kWh + + exportgrid for phase C + + + + Number:Hz + + frequency for phase C + + + + Number + + power factor for phase C + + + + diff --git a/bundles/pom.xml b/bundles/pom.xml index 59c5909fe9722..0ff8062104b31 100644 --- a/bundles/pom.xml +++ b/bundles/pom.xml @@ -118,6 +118,7 @@ org.openhab.binding.hue org.openhab.binding.hydrawise org.openhab.binding.hyperion + org.openhab.binding.iammeter org.openhab.binding.iaqualink org.openhab.binding.icalendar org.openhab.binding.icloud