owagner / eno2mqtt

Enocean (TCM310) to MQTT adapter
MIT License
10 stars 2 forks source link

Connecting serial Port #4

Open zhaijohan opened 8 years ago

zhaijohan commented 8 years ago

Hi Oliver,

I have some issues by connecting my USB300 and use this pluging on my rasberry pi. Can you please tell me, what I have forgotten ?

Output: `INFO: ESP(1): Using serial port dev/ttyUSB0 SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. Failed to connect on port: dev/ttyUSB0 exception: nu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:294) at gnu.io.NRSerialPort.connect(NRSerialPort.java:48) at com.tellerulam.eno2mqtt.ESP3Connector$SerialConnector.connect(ESP3Connector.java:338) at com.tellerulam.eno2mqtt.ESP3Connector.run(ESP3Connector.java:214) Jul 21, 2016 4:53:47 PM com.tellerulam.eno2mqtt.ESP3Connector run WARNING: ESP(1): Error in ESP3 communication handler, retrying in 10s java.lang.NullPointerException at gnu.io.NRSerialPort.getInputStream(NRSerialPort.java:80) at com.tellerulam.eno2mqtt.ESP3Connector$SerialConnector.connect(ESP3Connector.java:339) at com.tellerulam.eno2mqtt.ESP3Connector.run(ESP3Connector.java:214)

java.lang.NullPointerException at gnu.io.NRSerialPort.getInputStream(NRSerialPort.java:80) at gnu.io.NRSerialPort.disconnect(NRSerialPort.java:99) at com.tellerulam.eno2mqtt.ESP3Connector$SerialConnector.disconnect(ESP3Connector.java:346) at com.tellerulam.eno2mqtt.ESP3Connector.run(ESP3Connector.java:226) Jul 21, 2016 4:53:57 PM com.tellerulam.eno2mqtt.ESP3Connector$SerialConnect `

Comand: java -jar eno2mqtt.jar eno.esp3=dev/ttyUSB0 eno.deviceList=sample_devicelist_file.txt

Thanks for any help,

Best regards,

Johan

ctr49 commented 7 years ago

In case you haven't figured it out yet, there is a missing "/" in front of your device definition, it should be "/dev/ttyUSB0" not "dev/ttyUSB0". I'd recommend a udev rule to get a static device name though.