Skip to content

Commit

Permalink
MAX! binding updates based on comments Kai
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Verpaalen <[email protected]>
  • Loading branch information
marcelrv committed Nov 21, 2014
1 parent 45e8433 commit 6fba8ad
Show file tree
Hide file tree
Showing 20 changed files with 331 additions and 252 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
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>
<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
Expand Up @@ -13,7 +13,7 @@
<context>network_address</context>
<label>MAX!Cube LAN gateway IP</label>
<description>The IP address of the MAX!Cube LAN gateway</description>
<required>false</required>
<required>true</required>
</parameter>
<parameter name="port" type="integer">
<context>port</context>
Expand All @@ -30,8 +30,8 @@
</parameter>
<parameter name="serialNumber" type="text">
<label>Serial Number</label>
<description>The Serial Number identifier identifies one specific device.</description>
<required>false</required>
<description>The Serial Number identifies one specific device.</description>
<required>true</required>
</parameter>
</config-description>
</bridge-type>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,17 @@
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">

<!-- All Thermostats (Heating, Heating+, Wall) -->
<thing-type id="thermostat">
<supported-bridge-type-refs>
<bridge-type-ref id="bridge" />
</supported-bridge-type-refs>

<label>MaxCube HeathingThermostat</label>
<description>MaxCube HeathingThermostat</description>
<label>MAX! HeathingThermostat</label>
<description>This is a MAX! HeathingThermostat</description>

<channels>
<channel id="valve" typeId="valve" />
<channel id="battery" typeId="battery" />
<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" />
Expand All @@ -24,45 +23,115 @@
<config-description>
<parameter name="serialNumber" type="text">
<label>Serial Number</label>
<description>The Serial Number identifier identifies one specific device.</description>
<description>The Serial Number identifies one specific device.</description>
<required>true</required>
</parameter>
</config-description>
</thing-type>

<!-- All Switches (EcoSwitch, Pushbutton/ShutterContact) -->
<thing-type id="switch">
<thing-type id="thermostatplus">
<supported-bridge-type-refs>
<bridge-type-ref id="bridge" />
</supported-bridge-type-refs>

<label>MaxCube Switches</label>
<description>MaxCube All Switches (EcoSwitch, Pushbutton/ShutterContact)</description>
<label>MAX! HeathingThermostat+</label>
<description>This is a MAX! HeathingThermostat+</description>

<channels>
<channel id="state" typeId="switch_state" />
<channel id="battery" typeId="battery" />
<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>

<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 identifier identifies one specific device.</description>
<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>String</item-type>
<label>Battery Level</label>
<item-type>Switch</item-type>
<label>Battery Level Low</label>
<description>Battery charge Level</description>
</channel-type>

Expand All @@ -84,11 +153,16 @@
<description>Thermostat temperature setpoint</description>
</channel-type>


<channel-type id="switch_state">
<channel-type id="contact_state">
<item-type>Contact</item-type>
<label>Switch state</label>
<description>Switch state information</description>
<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>
11 changes: 6 additions & 5 deletions addons/binding/org.openhab.binding.maxcube/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,20 @@ Bundle-Version: 2.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-ClassPath: .
Import-Package: com.google.common.collect,
org.apache.commons.net.util;version="3.2.0",
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;version="1.8.0",
org.osgi.framework,
org.slf4j
Service-Component: OSGI-INF/*
Export-Package: org.openhab.binding.maxcube,
org.openhab.binding.maxcube.internal.handler
Require-Bundle: org.eclipse.osgi.services
Export-Package: org.openhab.binding.maxcube
Require-Bundle: com.google.guava

Original file line number Diff line number Diff line change
Expand Up @@ -24,33 +24,42 @@
public class MaxCubeBinding {

public static final String BINDING_ID = "maxcube";
public static final String SERIAL_NUMBER = "serialNumber";


// List of main device types
public static final String DEVICE_THERMOSTAT = "thermostat";
public static final String DEVICE_SWITCH = "switch";
public static final String DEVICE_THERMOSTATPLUS = "thermostatplus";
public static final String DEVICE_WALLTHERMOSTAT = "wallthermostat";
public static final String DEVICE_ECOSWITCH = "ecoswitch";
public static final String DEVICE_SHUTTERCONTACT = "shuttercontact";
public static final String BRIDGE_MAXCUBE = "bridge";

// List of all Thing Type UIDs
public final static ThingTypeUID HEATHINGTHERMOSTAT_THING_TYPE = new ThingTypeUID(BINDING_ID, DEVICE_THERMOSTAT);
public final static ThingTypeUID SWITCH_THING_TYPE = new ThingTypeUID(BINDING_ID, DEVICE_SWITCH);

// List of all Thing Type UIDs
public final static ThingTypeUID HEATINGTHERMOSTAT_THING_TYPE = new ThingTypeUID(BINDING_ID, DEVICE_THERMOSTAT);
public final static ThingTypeUID HEATINGTHERMOSTATPLUS_THING_TYPE = new ThingTypeUID(BINDING_ID, DEVICE_THERMOSTATPLUS);
public final static ThingTypeUID WALLTHERMOSTAT_THING_TYPE = new ThingTypeUID(BINDING_ID, DEVICE_WALLTHERMOSTAT);
public final static ThingTypeUID ECOSWITCH_THING_TYPE = new ThingTypeUID(BINDING_ID, DEVICE_ECOSWITCH);
public final static ThingTypeUID SHUTTERCONTACT_THING_TYPE = new ThingTypeUID(BINDING_ID, DEVICE_SHUTTERCONTACT);
public final static ThingTypeUID CUBEBRIDGE_THING_TYPE = new ThingTypeUID(BINDING_ID, BRIDGE_MAXCUBE);

// List of all Channel ids
public final static String CHANNEL_VALVE = "valve";
public final static String CHANNEL_BATTERY = "battery";
public final static String CHANNEL_BATTERY = "battery_low";
public final static String CHANNEL_MODE = "mode";
public final static String CHANNEL_ACTUALTEMP = "actual_temp";
public final static String CHANNEL_SETTEMP = "set_temp";
public final static String CHANNEL_SWITCH_STATE = "state";
public final static String CHANNEL_SWITCH_STATE = "eco_mode";
public final static String CHANNEL_CONTACT_STATE = "contact_state";

public final static Collection<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Lists.newArrayList(
HEATHINGTHERMOSTAT_THING_TYPE, SWITCH_THING_TYPE, CUBEBRIDGE_THING_TYPE);
HEATINGTHERMOSTAT_THING_TYPE, HEATINGTHERMOSTATPLUS_THING_TYPE, WALLTHERMOSTAT_THING_TYPE,
ECOSWITCH_THING_TYPE, SHUTTERCONTACT_THING_TYPE, CUBEBRIDGE_THING_TYPE);

public final static Set<ThingTypeUID> SUPPORTED_DEVICE_THING_TYPES_UIDS =ImmutableSet.of(
HEATHINGTHERMOSTAT_THING_TYPE,SWITCH_THING_TYPE);

HEATINGTHERMOSTAT_THING_TYPE, HEATINGTHERMOSTATPLUS_THING_TYPE, WALLTHERMOSTAT_THING_TYPE,
ECOSWITCH_THING_TYPE, SHUTTERCONTACT_THING_TYPE);


public final static Set<ThingTypeUID> SUPPORTED_BRIDGE_THING_TYPES_UIDS =ImmutableSet.of(
CUBEBRIDGE_THING_TYPE);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
package org.openhab.binding.maxcube.config;
/**
* Copyright (c) 2014 openHAB UG (haftungsbeschraenkt) and others.
* All rights reserved. This program and the accompanying materials
Expand All @@ -7,7 +6,7 @@
* http://www.eclipse.org/legal/epl-v10.html
*/


package org.openhab.binding.maxcube.config;

/**
* Configuration class for {@link MaxCubeBinding} bridge
Expand All @@ -28,7 +27,7 @@ public class MaxCubeBridgeConfiguration {
public String ipAddress;

/**
* The port of the MAX!Cube LAN gateway as provided at
* The port of the MAX! Cube LAN gateway as provided at
* http://www.elv.de/controller.aspx?cid=824&detail=10&detail2=3484
*/
public int port = (int) 62910;
Expand Down

This file was deleted.

Loading

0 comments on commit 6fba8ad

Please sign in to comment.