Skip to content
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

Add Telegesis dongle and Telegesis firmware update #28

Merged
merged 3 commits into from
Nov 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="src" output="target/test-classes" path="src/main/test"/>
<classpathentry kind="lib" path="lib/com.zsmartsystems.zigbee-1.0.0-SNAPSHOT.jar" sourcepath="lib/com.zsmartsystems.zigbee-1.0.0-SNAPSHOT-sources.jar"/>
<classpathentry kind="lib" path="lib/com.zsmartsystems.zigbee.dongle.cc2531-1.0.0-SNAPSHOT.jar" sourcepath="lib/com.zsmartsystems.zigbee.dongle.cc2531-1.0.0-SNAPSHOT-sources.jar"/>
<classpathentry exported="true" kind="lib" path="lib/com.zsmartsystems.zigbee.dongle.ember-1.0.0-SNAPSHOT.jar"/>
<classpathentry kind="lib" path="lib/junit-4.12.jar"/>
<classpathentry kind="lib" path="lib/mockito-all-1.10.19.jar"/>
<classpathentry kind="lib" path="lib/com.zsmartsystems.zigbee-1.0.1-SNAPSHOT.jar" sourcepath="lib/com.zsmartsystems.zigbee-1.0.1-SNAPSHOT-sources.jar"/>
<classpathentry kind="lib" path="lib/com.zsmartsystems.zigbee.dongle.cc2531-1.0.1-SNAPSHOT.jar"/>
<classpathentry kind="lib" path="lib/com.zsmartsystems.zigbee.dongle.ember-1.0.1-SNAPSHOT.jar" sourcepath="lib/com.zsmartsystems.zigbee.dongle.ember-1.0.1-SNAPSHOT-sources.jar"/>
<classpathentry kind="lib" path="lib/com.zsmartsystems.zigbee.dongle.telegesis-1.0.1-SNAPSHOT.jar" sourcepath="lib/com.zsmartsystems.zigbee.dongle.telegesis-1.0.1-SNAPSHOT-sources.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
9 changes: 7 additions & 2 deletions ESH-INF/i18n/thingstate.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
zigbee.status.offline_initialize_fail=Failed to initialize ZigBee transport layer
zigbee.status.offline_startup_fail=Failed to startup ZigBee transport layer
zigbee.status.offline_initializefail=Failed to initialize ZigBee transport layer
zigbee.status.offline_startupfail=Failed to startup ZigBee transport layer
zigbee.status.offline_notinitialized=Not initialized
zigbee.status.offline_noaddress=Node address is not set
zigbee.status.offline_nodenotfound=Node is not found on network

zigbee.firmware.failed=Firmware update failed
132 changes: 70 additions & 62 deletions ESH-INF/thing/_channels.xml
Original file line number Diff line number Diff line change
@@ -1,73 +1,81 @@
<?xml version="1.0" encoding="UTF-8"?>
<thing:thing-descriptions bindingId="zigbee"
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:thing-descriptions bindingId="zigbee" 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">

<!-- Color Channel -->
<channel-type id="color_color">
<item-type>Color</item-type>
<label>Color</label>
<description>The color channel allows to control the color of a light.
<!-- Color Channel -->
<channel-type id="color_color">
<item-type>Color</item-type>
<label>Color</label>
<description>The color channel allows to control the color of a light.
It is also possible to dim values and switch the light on and off.
</description>
<category>ColorLight</category>
</channel-type>
<category>ColorLight</category>
</channel-type>

<!-- Color Temperature Channel -->
<channel-type id="color_temperature">
<item-type>Dimmer</item-type>
<label>Color Temperature</label>
<description>The color temperature channel allows to set the color
<!-- Color Temperature Channel -->
<channel-type id="color_temperature">
<item-type>Dimmer</item-type>
<label>Color Temperature</label>
<description>The color temperature channel allows to set the color
temperature of a light from 0 (cold) to 100 (warm).</description>
<category>ColorLight</category>
</channel-type>
<category>ColorLight</category>
</channel-type>

<!-- Temperature Channel -->
<channel-type id="measurement_temperature">
<item-type>Number</item-type>
<label>Temperature</label>
<description>Indicates the current temperature</description>
<category>Temperature</category>
<state pattern="%0.1f" readOnly="true">
</state>
<config-description>
<parameter name="config_scale" type="text">
<label>Scale</label>
<description>Select the scale for temperature readings</description>
<default>0</default>
<options>
<option value="0">Celsius</option>
<option value="1">Fahrenheit</option>
</options>
</parameter>
</config-description>
</channel-type>
<!-- Temperature Channel -->
<channel-type id="measurement_temperature">
<item-type>Number</item-type>
<label>Temperature</label>
<description>Indicates the current temperature</description>
<category>Temperature</category>
<state pattern="%.1f" readOnly="true">
</state>
<config-description>
<parameter name="config_scale" type="text">
<label>Scale</label>
<description>Select the scale for temperature readings</description>
<default>0</default>
<options>
<option value="0">Celsius</option>
<option value="1">Fahrenheit</option>
</options>
</parameter>
</config-description>
</channel-type>

<!-- Humidity Channel -->
<channel-type id="measurement_relativehumidity">
<item-type>Number</item-type>
<label>Humidity</label>
<description>Indicates the current relative humidity</description>
<category>Humidity</category>
<state pattern="%0.1f" readOnly="true">
</state>
</channel-type>
<!-- Humidity Channel -->
<channel-type id="measurement_relativehumidity">
<item-type>Number</item-type>
<label>Humidity</label>
<description>Indicates the current relative humidity</description>
<category>Humidity</category>
<state pattern="%.1f" readOnly="true">
</state>
</channel-type>

<!-- On Off Switch -->
<channel-type id="switch_onoff">
<item-type>Switch</item-type>
<label>Switch</label>
<description>Switches the power on and off</description>
<category>Light</category>
</channel-type>
<!-- Occupancy sensor -->
<channel-type id="sensor_occupancy">
<item-type>Switch</item-type>
<label>Occupancy</label>
<description>Indicates if an occupancy sensor is triggered</description>
<category>Motion</category>
<state readOnly="true"></state>
</channel-type>

<!-- Level Switch -->
<channel-type id="switch_level">
<item-type>Dimmer</item-type>
<label>Dimmer</label>
<description>Sets the level of the light</description>
<category>Light</category>
</channel-type>
<!-- On Off Switch -->
<channel-type id="switch_onoff">
<item-type>Switch</item-type>
<label>Switch</label>
<description>Switches the power on and off</description>
<category>Light</category>
</channel-type>

</thing:thing-descriptions>
<!-- Level Switch -->
<channel-type id="switch_level">
<item-type>Dimmer</item-type>
<label>Dimmer</label>
<description>Sets the level of the light</description>
<category>Light</category>
</channel-type>

</thing:thing-descriptions>
1 change: 1 addition & 0 deletions ESH-INF/thing/_controller_ember.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<config-description>
<parameter name="zigbee_port" type="text" required="true">
<label>Port</label>
<context>serial-port</context>
<description>Serial Port</description>
</parameter>

Expand Down
88 changes: 88 additions & 0 deletions ESH-INF/thing/_controller_telegesis.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<?xml version="1.0" encoding="UTF-8"?>
<thing:thing-descriptions bindingId="zigbee"
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="coordinator_telegesis">
<label>Telegesis Coordinator</label>
<description>Telegesis ETRX3 Dongle</description>

<config-description>
<parameter name="zigbee_port" type="text" required="true">
<label>Port</label>
<context>serial-port</context>
<description>Serial Port</description>
</parameter>

<parameter name="zigbee_baud" type="integer" required="true">
<label>Baud Rate</label>
<description>Serial Port Baud Rate</description>
<default>19200</default>
<options>
<option value="19200">19200</option>
<option value="38400">38400</option>
<option value="57600">57600</option>
<option value="115200">115200</option>
</options>
</parameter>

<parameter-group name="network">
<context></context>
<label>ZigBee Network Configuration</label>
<description></description>
</parameter-group>

<parameter name="zigbee_initialise" type="boolean" groupName="network">
<label>Reset Controller</label>
<description>Resets the Controller and sets the configuration to the configured values.</description>
<advanced>true</advanced>
</parameter>

<parameter name="zigbee_channel" type="integer" groupName="network" required="false" min="11" max="25">
<label>Channel</label>
<description>Channel number</description>
<default>-1</default>
<options>
<option value="-1">Auto</option>
<option value="11">Channel 11</option>
<option value="12">Channel 12</option>
<option value="13">Channel 13</option>
<option value="14">Channel 14</option>
<option value="15">Channel 15</option>
<option value="16">Channel 16</option>
<option value="17">Channel 17</option>
<option value="18">Channel 18</option>
<option value="19">Channel 19</option>
<option value="20">Channel 20</option>
<option value="21">Channel 21</option>
<option value="22">Channel 22</option>
<option value="23">Channel 23</option>
<option value="24">Channel 24</option>
<option value="25">Channel 25</option>
</options>
<advanced>true</advanced>
</parameter>

<parameter name="zigbee_panid" type="Integer" groupName="network" required="false">
<label>PAN ID</label>
<description>PAN Network ID</description>
<default>0</default>
<options>
<option value="65535">Auto</option>
</options>
<limitToOptions>false</limitToOptions>
<advanced>true</advanced>
</parameter>

<parameter name="zigbee_extendedpanid" type="text" groupName="network" required="false">
<label>Extended PAN ID</label>
<description>Extended PAN Network ID: 16 byte hexadecimal value</description>
<default>0000000000000000</default>
<advanced>true</advanced>
</parameter>

</config-description>
</bridge-type>

</thing:thing-descriptions>
1 change: 1 addition & 0 deletions ESH-INF/thing/_controller_ti2351.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<config-description>
<parameter name="zigbee_port" type="text" required="true">
<label>Port</label>
<context>serial-port</context>
<description>Serial Port</description>
</parameter>

Expand Down
12 changes: 8 additions & 4 deletions META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,33 @@ Bundle-SymbolicName: org.openhab.binding.zigbee;singleton:=true
Bundle-Vendor: openHAB
Bundle-Version: 2.2.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-Activator: org.openhab.binding.zigbee.internal.ZigBeeActivator
Import-Package: com.google.common.collect,
com.thoughtworks.xstream,
com.thoughtworks.xstream.converters,
com.thoughtworks.xstream.io,
com.thoughtworks.xstream.io.xml,
gnu.io,
org.apache.commons.io,
org.eclipse.jdt.annotation;resolution:=optional,
org.eclipse.smarthome.config.core,
org.eclipse.smarthome.config.discovery,
org.eclipse.smarthome.core.i18n,
org.eclipse.smarthome.core.library.types,
org.eclipse.smarthome.core.thing,
org.eclipse.smarthome.core.thing.binding,
org.eclipse.smarthome.core.thing.binding.builder,
org.eclipse.smarthome.core.thing.binding.firmware,
org.eclipse.smarthome.core.thing.type,
org.eclipse.smarthome.core.types,
org.osgi.framework,
org.osgi.service.component.annotations;version="1.3.0",
org.slf4j
Service-Component: OSGI-INF/*.xml
Export-Package: org.openhab.binding.zigbee,
org.openhab.binding.zigbee.handler
Bundle-ClassPath: .,
lib/com.zsmartsystems.zigbee-1.0.0-SNAPSHOT.jar,
lib/com.zsmartsystems.zigbee.dongle.cc2531-1.0.0-SNAPSHOT.jar,
lib/com.zsmartsystems.zigbee.dongle.ember-1.0.0-SNAPSHOT.jar
Bundle-ActivationPolicy: lazy
lib/com.zsmartsystems.zigbee-1.0.1-SNAPSHOT.jar,
lib/com.zsmartsystems.zigbee.dongle.ember-1.0.1-SNAPSHOT.jar,
lib/com.zsmartsystems.zigbee.dongle.cc2531-1.0.1-SNAPSHOT.jar,
lib/com.zsmartsystems.zigbee.dongle.telegesis-1.0.1-SNAPSHOT.jar
2 changes: 2 additions & 0 deletions OSGI-INF/ZigBeeHandlerFactory.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@
<provide interface="org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory"/>
</service>

<reference bind="setTranslationProvider" cardinality="0..1" interface="org.eclipse.smarthome.core.i18n.TranslationProvider" name="TranslationProvider" policy="dynamic" unbind="removeTranslationProvider"/>

</scr:component>
7 changes: 4 additions & 3 deletions build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ bin.includes = META-INF/,\
.,\
OSGI-INF/,\
ESH-INF/,\
lib/com.zsmartsystems.zigbee-1.0.0-SNAPSHOT.jar,\
lib/com.zsmartsystems.zigbee.dongle.cc2531-1.0.0-SNAPSHOT.jar,\
lib/com.zsmartsystems.zigbee.dongle.ember-1.0.0-SNAPSHOT.jar
lib/com.zsmartsystems.zigbee-1.0.1-SNAPSHOT.jar,\
lib/com.zsmartsystems.zigbee.dongle.ember-1.0.1-SNAPSHOT.jar,\
lib/com.zsmartsystems.zigbee.dongle.cc2531-1.0.1-SNAPSHOT.jar,\
lib/com.zsmartsystems.zigbee.dongle.telegesis-1.0.1-SNAPSHOT.jar

Binary file not shown.
Binary file removed lib/com.zsmartsystems.zigbee-1.0.0-SNAPSHOT.jar
Binary file not shown.
Binary file not shown.
Binary file added lib/com.zsmartsystems.zigbee-1.0.1-SNAPSHOT.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ public class ZigBeeBindingConstants {
public static final String BINDING_ID = "zigbee";

// Coordinator (Bridges)
public final static ThingTypeUID COORDINATOR_TYPE_CC2531 = new ThingTypeUID(BINDING_ID, "coordinator_cc2531");
public final static ThingTypeUID COORDINATOR_TYPE_EMBER = new ThingTypeUID(BINDING_ID, "coordinator_ember");
public final static ThingTypeUID COORDINATOR_TYPE_CC2531 = new ThingTypeUID(BINDING_ID, "coordinator_cc2531");
public final static ThingTypeUID COORDINATOR_TYPE_TELEGESIS = new ThingTypeUID(BINDING_ID, "coordinator_telegesis");

// List of Thing Type UIDs
public final static ThingTypeUID THING_TYPE_GENERIC_DEVICE = new ThingTypeUID(BINDING_ID, "device");
Expand All @@ -58,6 +59,8 @@ public class ZigBeeBindingConstants {
public static final String CHANNEL_TEMPERATURE_VALUE = "sensor_temperature";
public static final String CHANNEL_HUMIDITY_VALUE = "sensor_humidity";

public static final String CHANNEL_OCCUPANCY_SENSOR = "sensor_occupancy";

public static final String CHANNEL_PROPERTY_ADDRESS = "zigbee_address";
public static final String CHANNEL_PROPERTY_CLUSTER = "zigbee_cluster";

Expand Down
Loading