Skip to content

Commit

Permalink
- fixed log output
Browse files Browse the repository at this point in the history
- actually bump rev to 0.3
  • Loading branch information
owagner committed Mar 14, 2015
1 parent 773eaef commit d6a624b
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ EEP specifics
-------------

* F6-02
* F6-03 ***
* F6-03

Rocker switches. Publishes state to subtopics "AI", "AO" etc. as either 1 for pressed
or 0 for released. The published messages are not retained, as those are one-shot
events. Dual-button presses are reported on the respective dual-button topic, e.g. "AIBI".

* F6-10-00 ***
* F6-10-00

Window handle: val=0 down, val=1 left/right, val=2 up

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = '0.2'
version = '0.3'

apply plugin: 'java'
apply plugin: 'eclipse'
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/com/tellerulam/eno2mqtt/Device.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,11 @@ public synchronized void setState(String key,Object value)
state=new HashMap<>();
state.put(key,value);
}

@SuppressWarnings("boxing")
@Override
public String toString()
{
return "{"+Long.toHexString(id)+"/"+name+"|"+eep.getClass().getName()+"}";
}
}
2 changes: 1 addition & 1 deletion src/main/java/com/tellerulam/eno2mqtt/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ public static void main(String[] args) throws MqttException, SecurityException,
}
System.setProperty("eno2mqtt."+sp[0],sp[1]);
}
Logger.getLogger(Main.class.getName()).info("eno2mqtt V"+getVersion()+" (C) 2015 Oliver Wagner <owagner@tellerulam.com>");
SyslogHandler.readConfig();
Logger.getLogger(Main.class.getName()).info("eno2mqtt V"+getVersion()+" (C) 2015 Oliver Wagner <owagner@tellerulam.com>");
DeviceManager.readDeviceList();
MQTTHandler.init();
TCM310Connector.setupConnections();
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/com/tellerulam/eno2mqtt/TCM310Connector.java
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ private static class SerialConnector extends TCM310Connector
{
SerialConnector(String port)
{
L.info("Using serial port "+port);
NRSerialPort serial=new NRSerialPort(port,57600);
serial.connect();
is=serial.getInputStream();
Expand All @@ -220,6 +221,7 @@ private static class NetworkConnector extends TCM310Connector
{
NetworkConnector(String hostspec) throws NumberFormatException, UnknownHostException, IOException
{
L.info("Using network connection to "+hostspec);
String spec[]=hostspec.split(":",2);
@SuppressWarnings("resource")
Socket s=new Socket(spec[0],spec.length==2?Integer.parseInt(spec[1]):23000);
Expand All @@ -230,7 +232,7 @@ private static class NetworkConnector extends TCM310Connector

static void setupConnections() throws NumberFormatException, UnknownHostException, IOException, InterruptedException
{
String connectionspecs=System.getProperty("eno2mqtt.eno.usb300");
String connectionspecs=System.getProperty("eno2mqtt.eno.tcm");
if(connectionspecs==null)
throw new IllegalArgumentException("You must specify a serial or network connection to an USB300 device");
String specs[]=connectionspecs.split(",");
Expand All @@ -247,6 +249,6 @@ static void setupConnections() throws NumberFormatException, UnknownHostExceptio
}
}

private final Logger L=Logger.getLogger(getClass().getName());
private static final Logger L=Logger.getLogger(TCM310Connector.class.getName());

}

0 comments on commit d6a624b

Please sign in to comment.