Skip to content

Commit

Permalink
* 0.7 - 2015/07/18 - owagner
Browse files Browse the repository at this point in the history
  - fixed direct datapoint set variant of _inc fields
  - updated eclipse-paho to 1.0.2
  • Loading branch information
owagner committed Jul 18, 2015
1 parent 41aedda commit dcf8e32
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,13 @@ Dependencies

History
-------
* 0.7 - 2015/07/18 - owagner
- fixed direct datapoint set variant of _inc fields
- updated eclipse-paho to 1.0.2

* 0.6 - 2015/07/15 - owagner
- updated SDK libs to 1.8
- added support for the "_inc" variants of fields. Implements [3]
- added support for the "_inc" variants of fields. Implements #3

* 0.5 - 2015/06/25 - owagner
- fix syslog logging to ignore intermediate IO errors
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = '0.6'
version = '0.7'

apply plugin: 'java'
apply plugin: 'eclipse'
Expand All @@ -15,7 +15,7 @@ repositories {

dependencies {
compile 'com.eclipsesource.minimal-json:minimal-json:0.9.2'
compile 'org.eclipse.paho:mqtt-client:0.4.0'
compile 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.0.2'
compile files(
'lib/huelocalsdk.jar',
'lib/huesdkresources.jar'
Expand All @@ -27,7 +27,7 @@ task listJars << {
}

jar {
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } } { exclude "META-INF/**" }
archiveName 'hue2mqtt.jar'
manifest {
attributes 'Main-Class': 'com.tellerulam.hue2mqtt.Main',
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/tellerulam/hue2mqtt/MQTTHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public void run()

private boolean shouldBeConnected;

private final Pattern topicPattern=Pattern.compile("([^/]+/[^/]+)(?:/(on|bri|hue|sat|ct|alert|effect|colormode|reachable|x|y|transitiontime))?");
private final Pattern topicPattern=Pattern.compile("([^/]+/[^/]+)(?:/((?:on|bri|hue|sat|ct|alert|effect|colormode|reachable|x|y|transitiontime)(?:_inc)?))?");

private final Map<String,Integer> transitionTimeCache=new HashMap<>();

Expand All @@ -90,7 +90,7 @@ void processSet(String topic,MqttMessage msg)
// Third format
if("transitiontime".equals(m.group(2)))
{
// We only cache that, for future refernece
// We only cache that, for future reference
transitionTimeCache.put(m.group(1),Integer.valueOf(payload));
return;
}
Expand Down

0 comments on commit dcf8e32

Please sign in to comment.