Do you have the serial package installed --> org.openhab.io.transport.serial-1.8.2.jar?
Did you add openhab to dialout group -> sudo usermod -a -G dialout openhab
What is the error on you logs?
Do you have the serial package installed --> org.openhab.io.transport.serial-1.8.2.jar?
Did you add openhab to dialout group -> sudo usermod -a -G dialout openhab
What is the error on you logs?
for me I had to put -Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0\ right at the begining for it to work at usr/share/openhab/bin/openhab.sh - i removed from /etc/init.d/openhab it did not make a difference. below is how it looks for me. also check the output if dmesg for changes in tty. I also use jessie on a RPi3
JAVA_ARGS_DEFAULT="-Dosgi.clean=true
-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0
-Duser.timezone=America/Los_Angeles
-Declipse.ignoreApp=true
-Dosgi.noShutdown=true
-Djetty.port=${HTTP_PORT}
-Dopenhab.configfile="${OPENHAB_CONF_DIR}/configurations/openhab.cfg"
-Dopenhab.configdir="${OPENHAB_CONF_DIR}/configurations"
-Dopenhab.logdir="${OPENHAB_LOG_DIR}"
-Dsmarthome.userdata="${OPENHAB_USER_DATA_DIR}"
-Djetty.home="${OPENHAB_DIR}"
-Djetty.port.ssl=${HTTPS_PORT}
-Djetty.config="${OPENHAB_CONF_DIR}/jetty"
-Djetty.logs="${OPENHAB_LOG_DIR}"
-Djetty.rundir="${OPENHAB_DIR}"
-Dfelix.fileinstall.dir="${OPENHAB_DIR}/addons"
-Dfelix.fileinstall.filter=.*\.jar
-Djava.library.path="${OPENHAB_DIR}/lib"
-Djava.security.auth.login.config="${OPENHAB_CONF_DIR}/login.conf"
-Dorg.quartz.properties="${OPENHAB_CONF_DIR}/quartz.properties"
-Dequinox.ds.block_timeout=240000
-Dequinox.scr.waitTimeOnBlock=60000
-Dfelix.fileinstall.active.level=4
-Djava.awt.headless=true
-jar ${LAUNCHER}
-configuration ${OPENHAB_WORKSPACE_DIR}
-data ${OPENHAB_WORKSPACE_DIR}
-console ${TELNET_PORT}" \
~ $ dmesg |grep tty
[ 0.000000] Kernel command line: 8250.nr_uarts=1 dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2709.boardrev=0xa02082 bcm2709.serial=0x71ef84a5 smsc95xx.macaddr=B8:27:EB:EF:84:A5 bcm2708_fb.fbswap=1 bcm2709.uart_clock=48000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000 dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
[ 0.001288] console [tty1] enabled
[ 0.267235] 3f215040.uart: ttyS0 at MMIO 0x3f215040 (irq = 29, base_baud = 50000000) is a 16550
[ 0.919548] 3f201000.uart: ttyAMA0 at MMIO 0x3f201000 (irq = 83, base_baud = 0) is a PL011 rev2
[ 2.166808] systemd[1]: Starting system-getty.slice.
[ 2.170421] systemd[1]: Created slice system-getty.slice.
[ 3.635870] usb 1-1.2: ch341-uart converter now attached to ttyUSB0
Thank worked with change to openhab.sh - I had to put -Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0 at the begining to be able to work. I'm not sure why it would workthere and not on the /etc/init.d/openhab. Also there is not start.sh when you install using apt-get it is named opendhab.sh
Thanks!!
@ted said:
-Dgnu.io.rxtx.SerialPorts=/dev/ttyAMA0
I tried that but it did not work - this is how part of the /etc/init.d/openhab looks - any other ideas - i did not needed this with the RPi2 and wheezy
JAVA_ARGS_DEFAULT="-Dosgi.clean=true
-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0
-Declipse.ignoreApp=true
-Dosgi.noShutdown=true
-Djetty.port=${HTTP_PORT}
-Dopenhab.configfile="${OPENHAB_CONF_DIR}/configurations/openhab.cfg"
-Dopenhab.configdir="${OPENHAB_CONF_DIR}/configurations"
-Dopenhab.logdir="${OPENHAB_LOG_DIR}"
-Dsmarthome.userdata="${OPENHAB_USER_DATA_DIR}"
-Djetty.home="${OPENHAB_DIR}"
-Djetty.port.ssl=${HTTPS_PORT}
-Djetty.config="${OPENHAB_CONF_DIR}/jetty"
-Djetty.logs="${OPENHAB_LOG_DIR}"
-Djetty.rundir="${OPENHAB_DIR}"
-Dfelix.fileinstall.dir="${OPENHAB_DIR}/addons"
-Dfelix.fileinstall.filter=.*\.jar
-Djava.library.path="${OPENHAB_DIR}/lib"
-Djava.security.auth.login.config="${OPENHAB_CONF_DIR}/login.conf"
-Dorg.quartz.properties="${OPENHAB_CONF_DIR}/quartz.properties"
-Dequinox.ds.block_timeout=240000
-Dequinox.scr.waitTimeOnBlock=60000
-Dfelix.fileinstall.active.level=4
-Djava.awt.headless=true
-jar ${LAUNCHER}
-configuration ${OPENHAB_WORKSPACE_DIR}
-data ${OPENHAB_WORKSPACE_DIR}
-console ${TELNET_PORT}"
I recently moved my OpenHab install from a Raspberry PI 2 to a Raspberry Pi 3 from wheezy to jessie and now the biding is not working. Everything was working perfectly with the previous install now i keep getting the following message, serial port exist and it works. I suspect it has do to with the change from wheezy to jessie but nothing i tries is working.
2016-03-25 19:28:20 DEBUG o.o.b.m.i.MySensorsBinding[:96]- activate
2016-03-25 19:28:20 ERROR o.o.b.m.i.gateway.Serial[:70]- Unable to find Serial port '/dev/ttyUSB0'
[ 3137.417846] usb 1-1.5: new full-speed USB device number 6 using dwc_otg
[ 3137.520958] usb 1-1.5: New USB device found, idVendor=1a86, idProduct=7523
[ 3137.520979] usb 1-1.5: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 3137.520992] usb 1-1.5: Product: USB2.0-Serial
[ 3137.522050] ch341 1-1.5:1.0: ch341-uart converter detected
[ 3137.525880] usb 1-1.5: ch341-uart converter now attached to ttyUSB0
regards
Harry