Skip to content

Commit

Permalink
First commit for iammeter devices.
Browse files Browse the repository at this point in the history
Signed-off-by: lewei50 <service@lewei50.com>
  • Loading branch information
lewei50 committed Aug 4, 2020
1 parent bd4d96a commit 19ce9bc
Show file tree
Hide file tree
Showing 17 changed files with 787 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bom/openhab-addons/pom.xml
Expand Up @@ -414,6 +414,11 @@
<artifactId>org.openhab.binding.hyperion</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.iammeter</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.iaqualink</artifactId>
Expand Down
32 changes: 32 additions & 0 deletions bundles/org.openhab.binding.iammeter/.classpath
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
23 changes: 23 additions & 0 deletions bundles/org.openhab.binding.iammeter/.project
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.openhab.binding.iammeter</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
13 changes: 13 additions & 0 deletions 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
54 changes: 54 additions & 0 deletions 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).
17 changes: 17 additions & 0 deletions bundles/org.openhab.binding.iammeter/pom.xml
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.addons.reactor.bundles</artifactId>
<version>2.5.8-SNAPSHOT</version>
</parent>

<artifactId>org.openhab.binding.iammeter</artifactId>

<name>openHAB Add-ons :: Bundles :: Iammeter Binding</name>

</project>
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<features name="org.openhab.binding.iammeter-${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-iammeter" description="Iammeter Binding" version="${project.version}">
<feature>openhab-runtime-base</feature>
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.iammeter/${project.version}</bundle>
</feature>
</features>
@@ -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");

}
@@ -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;
}

0 comments on commit 19ce9bc

Please sign in to comment.