-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial Contribution for OH2 Max!Cube binding #46
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/> | ||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | ||
<classpathentry kind="src" path="src/main/java"/> | ||
<classpathentry kind="output" path="target/classes"/> | ||
</classpath> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>org.openhab.binding.maxcube</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.pde.ManifestBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.pde.SchemaBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.pde.ds.core.builder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.pde.PluginNature</nature> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
</natures> | ||
</projectDescription> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<binding:binding id="maxcube" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:binding="http://eclipse.org/smarthome/schemas/binding/v1.0.0" | ||
xsi:schemaLocation="http://eclipse.org/smarthome/schemas/binding/v1.0.0 http://eclipse.org/smarthome/schemas/binding-1.0.0.xsd"> | ||
|
||
<name>MAX! Cube Binding</name> | ||
<description>This is the binding for eQ-3 MAX! Home Solution controlled via the MAX! Cube Lan Gateway.</description> | ||
<author>Marcel Verpaalen</author> | ||
|
||
</binding:binding> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<thing:thing-descriptions bindingId="maxcube" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:thing="http://eclipse.org/smarthome/schemas/thing-description/v1.0.0" | ||
xsi:schemaLocation="http://eclipse.org/smarthome/schemas/thing-description/v1.0.0 org.eclipse.smarthome.thing-description.xsd"> | ||
|
||
<bridge-type id="bridge"> | ||
<label>MAX!Cube LAN gateway</label> | ||
<description>This bridge represents the MAX!Cube LAN gateway.</description> | ||
|
||
<config-description> | ||
<parameter name="ipAddress" type="text"> | ||
<context>network_address</context> | ||
<label>MAX!Cube LAN gateway IP</label> | ||
<description>The IP address of the MAX!Cube LAN gateway</description> | ||
<required>true</required> | ||
</parameter> | ||
<parameter name="port" type="integer"> | ||
<context>port</context> | ||
<label>MAX!Cube LAN gateway port</label> | ||
<description>Port of the LAN gateway</description> | ||
<default>62910</default> | ||
<required>false</required> | ||
</parameter> | ||
<parameter name="refreshInterval" type="integer"> | ||
<label>Refresh Interval</label> | ||
<description>The refresh interval in ms which is used to poll given MAX!Cube.</description> | ||
<default>30000</default> | ||
<required>false</required> | ||
</parameter> | ||
<parameter name="serialNumber" type="text"> | ||
<label>Serial Number</label> | ||
<description>The Serial Number identifies one specific device.</description> | ||
<required>true</required> | ||
</parameter> | ||
</config-description> | ||
</bridge-type> | ||
|
||
|
||
</thing:thing-descriptions> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,168 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<thing:thing-descriptions bindingId="maxcube" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:thing="http://eclipse.org/smarthome/schemas/thing-description/v1.0.0" | ||
xsi:schemaLocation="http://eclipse.org/smarthome/schemas/thing-description/v1.0.0 http://eclipse.org/smarthome/schemas/thing-description-1.0.0.xsd"> | ||
|
||
<thing-type id="thermostat"> | ||
<supported-bridge-type-refs> | ||
<bridge-type-ref id="bridge" /> | ||
</supported-bridge-type-refs> | ||
|
||
<label>MAX! HeathingThermostat</label> | ||
<description>This is a MAX! HeathingThermostat</description> | ||
|
||
<channels> | ||
<channel id="valve" typeId="valve" /> | ||
<channel id="battery_low" typeId="battery" /> | ||
<channel id="mode" typeId="mode" /> | ||
<channel id="actual_temp" typeId="actual_temp" /> | ||
<channel id="set_temp" typeId="set_temp" /> | ||
</channels> | ||
|
||
<config-description> | ||
<parameter name="serialNumber" type="text"> | ||
<label>Serial Number</label> | ||
<description>The Serial Number identifies one specific device.</description> | ||
<required>true</required> | ||
</parameter> | ||
</config-description> | ||
</thing-type> | ||
|
||
<thing-type id="thermostatplus"> | ||
<supported-bridge-type-refs> | ||
<bridge-type-ref id="bridge" /> | ||
</supported-bridge-type-refs> | ||
|
||
<label>MAX! HeathingThermostat+</label> | ||
<description>This is a MAX! HeathingThermostat+</description> | ||
|
||
<channels> | ||
<channel id="valve" typeId="valve" /> | ||
<channel id="battery_low" typeId="battery" /> | ||
<channel id="mode" typeId="mode" /> | ||
<channel id="actual_temp" typeId="actual_temp" /> | ||
<channel id="set_temp" typeId="set_temp" /> | ||
</channels> | ||
|
||
<config-description> | ||
<parameter name="serialNumber" type="text"> | ||
<label>Serial Number</label> | ||
<description>The Serial Number identifies one specific device.</description> | ||
<required>true</required> | ||
</parameter> | ||
</config-description> | ||
</thing-type> | ||
|
||
<thing-type id="wallthermostat"> | ||
<supported-bridge-type-refs> | ||
<bridge-type-ref id="bridge" /> | ||
</supported-bridge-type-refs> | ||
|
||
<label>MAX! WallThermostat+</label> | ||
<description>This is a MAX! WallThermostat+</description> | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove empty line here |
||
<channels> | ||
<channel id="valve" typeId="valve" /> | ||
<channel id="battery_low" typeId="battery" /> | ||
<channel id="mode" typeId="mode" /> | ||
<channel id="actual_temp" typeId="actual_temp" /> | ||
<channel id="set_temp" typeId="set_temp" /> | ||
</channels> | ||
|
||
<config-description> | ||
<parameter name="serialNumber" type="text"> | ||
<label>Serial Number</label> | ||
<description>The Serial Number identifies one specific device.</description> | ||
<required>true</required> | ||
</parameter> | ||
</config-description> | ||
</thing-type> | ||
|
||
<thing-type id="ecoswitch"> | ||
<supported-bridge-type-refs> | ||
<bridge-type-ref id="bridge" /> | ||
</supported-bridge-type-refs> | ||
|
||
<label>MAX! Ecoswitch</label> | ||
<description>This is a MAX! EcoSwitch</description> | ||
|
||
<channels> | ||
<channel id="eco_mode" typeId="eco_mode" /> | ||
<channel id="battery_low" typeId="battery" /> | ||
</channels> | ||
|
||
<config-description> | ||
<parameter name="serialNumber" type="text"> | ||
<label>Serial Number</label> | ||
<description>The Serial Number identifies one specific device.</description> | ||
<required>true</required> | ||
</parameter> | ||
</config-description> | ||
</thing-type> | ||
|
||
<thing-type id="shuttercontact"> | ||
<supported-bridge-type-refs> | ||
<bridge-type-ref id="bridge" /> | ||
</supported-bridge-type-refs> | ||
|
||
<label>MAX! Shutter Contact</label> | ||
<description>This is a MAX! Shutter Contact</description> | ||
|
||
<channels> | ||
<channel id="contact_state" typeId="contact_state" /> | ||
<channel id="battery_low" typeId="battery" /> | ||
</channels> | ||
|
||
<config-description> | ||
<parameter name="serialNumber" type="text"> | ||
<label>Serial Number</label> | ||
<description>The Serial Number identifies one specific device.</description> | ||
<required>true</required> | ||
</parameter> | ||
</config-description> | ||
</thing-type> | ||
|
||
<channel-type id="valve"> | ||
<item-type>Number</item-type> | ||
<label>Valve Position</label> | ||
<description>Thermostat Valve Position</description> | ||
</channel-type> | ||
|
||
<channel-type id="battery"> | ||
<item-type>Switch</item-type> | ||
<label>Battery Level Low</label> | ||
<description>Battery charge Level</description> | ||
</channel-type> | ||
|
||
<channel-type id="mode"> | ||
<item-type>String</item-type> | ||
<label>Mode</label> | ||
<description>Thermostat Mode Setting</description> | ||
</channel-type> | ||
|
||
<channel-type id="actual_temp"> | ||
<item-type>Number</item-type> | ||
<label>Actual Temperature</label> | ||
<description>Actual measured room temperature</description> | ||
</channel-type> | ||
|
||
<channel-type id="set_temp"> | ||
<item-type>Number</item-type> | ||
<label>Set Temperature</label> | ||
<description>Thermostat temperature setpoint</description> | ||
</channel-type> | ||
|
||
<channel-type id="contact_state"> | ||
<item-type>Contact</item-type> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For the window contact, this is fine, for the eco switch I would rather define another channel "autoMode" with Switch item type (OFF meaning ECO, ON meaning AUTO) |
||
<label>Contact State</label> | ||
<description>Contact state information</description> | ||
</channel-type> | ||
|
||
<channel-type id="eco_mode"> | ||
<item-type>Switch</item-type> | ||
<label>Eco Mode</label> | ||
<description>Eco Mode Activated</description> | ||
</channel-type> | ||
|
||
</thing:thing-descriptions> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Manifest-Version: 1.0 | ||
Bundle-ManifestVersion: 2 | ||
Bundle-Name: MaxCube Binding | ||
Bundle-SymbolicName: org.openhab.binding.maxcube;singleton:=true | ||
Bundle-Vendor: openHAB | ||
Bundle-Version: 2.0.0.qualifier | ||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7 | ||
Bundle-ClassPath: . | ||
Import-Package: com.google.common.collect, | ||
org.apache.commons.net.util, | ||
org.eclipse.smarthome.config.core, | ||
org.eclipse.smarthome.config.discovery, | ||
org.eclipse.smarthome.core.common.registry, | ||
org.eclipse.smarthome.core.library.items, | ||
org.eclipse.smarthome.core.library.types, | ||
org.eclipse.smarthome.core.thing, | ||
org.eclipse.smarthome.core.thing.binding, | ||
org.eclipse.smarthome.core.types, | ||
org.openhab.core.library.types, | ||
org.openhab.core.types, | ||
org.osgi.framework, | ||
org.slf4j | ||
Service-Component: OSGI-INF/* | ||
Export-Package: org.openhab.binding.maxcube | ||
Require-Bundle: com.google.guava | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
|
||
Copyright (c) 2014 openHAB UG (haftungsbeschraenkt) and others. | ||
All rights reserved. This program and the accompanying materials | ||
are made available under the terms of the Eclipse Public License v1.0 | ||
which accompanies this distribution, and is available at | ||
http://www.eclipse.org/legal/epl-v10.html | ||
|
||
--> | ||
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="org.openhab.binding.maxcube.internal.discovery"> | ||
|
||
<implementation class="org.openhab.binding.maxcube.internal.discovery.MaxCubeBridgeDiscovery"/> | ||
|
||
<service> | ||
<provide interface="org.eclipse.smarthome.config.discovery.DiscoveryService"/> | ||
</service> | ||
|
||
</scr:component> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
|
||
Copyright (c) 2014 openHAB UG (haftungsbeschraenkt) and others. | ||
All rights reserved. This program and the accompanying materials | ||
are made available under the terms of the Eclipse Public License v1.0 | ||
which accompanies this distribution, and is available at | ||
http://www.eclipse.org/legal/epl-v10.html | ||
|
||
--> | ||
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="org.openhab.binding.maxcube.internal.factory.MaxCubeHandlerFactory"> | ||
|
||
<implementation class="org.openhab.binding.maxcube.internal.factory.MaxCubeHandlerFactory"/> | ||
|
||
<service> | ||
<provide interface="org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory"/> | ||
</service> | ||
|
||
</scr:component> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
source.. = src/main/java/ | ||
output.. = target/classes | ||
bin.includes = META-INF/,\ | ||
.,\ | ||
OSGI-INF/,\ | ||
ESH-INF/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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/maven-v4_0_0.xsd"> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>org.openhab</groupId> | ||
<artifactId>binding</artifactId> | ||
<version>2.0.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<properties> | ||
<bundle.symbolicName>org.openhab.binding.maxcube</bundle.symbolicName> | ||
<bundle.namespace>org.openhab.binding.maxcube</bundle.namespace> | ||
</properties> | ||
|
||
<groupId>org.openhab.binding</groupId> | ||
<artifactId>org.openhab.binding.maxcube</artifactId> | ||
<version>2.0.0-SNAPSHOT</version> | ||
|
||
<name>MaxCube Binding</name> | ||
<packaging>eclipse-plugin</packaging> | ||
|
||
</project> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a
<default>
tag here as wellThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, which tag I missed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed my comment, I should not use unescaped HTML tags in comments ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay, got it. Added defaults to refresh and port