Zigbee access to Nortek Serial Ports on RaspberryPi 3+

Tags: #<Tag:0x00007f616f08cac8>

Old programmer, new to OpenHAB…

1st: TTY parameter add to /etc/default/openhab2 with something like …EXTRA_JAVA_OPTS=
“-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyUSB1” I already see an entry for EXTRA_JAVA_OPTS="-Xms1024m -Xmx2048m"

  1. Do I add another line with EXTRA*
  2. Do I edit that existing line and add the port info
  3. If I want to add the well documented installation xbootclass for jython same question?
  4. So far nothing seems to allow ZigBee I get 0.000912] console [tty1] enabled
    [ 0.815927] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 81, base_baud = 0) is a PL011 rev2
    [ 16.946338] usb 1-1.5: cp210x converter now attached to ttyUSB0
    [ 16.959446] usb 1-1.5: cp210x converter now attached to ttyUSB1
  5. I see a lot of discussion about baud rate, but never read anyone say where to place that information? Any idea?

What openHab version?

I have a USBZB-1 as a test stick but have only used Z-Wave. I have installed the Zigbee binding a couple of times and got the coordinator recognized as online.

I’m running 2.5.2. I have the Zwave online but I don’t have a Zwave thing to test. I have mostly ZigBee so can’t see. I also have Hue hub and have added things so its not at that level. It’s more about the syntax for adding the port information. I tried to concatenate the JAVA stuff, but didn’t work. commented out now. I don’t know how to put the SERIALPORT into the line EXTRA_JAVA_OPTS?

Origiinal

EXTRA_JAVA_OPTS="-Xms250m -Xmx350m"
##MEMORY_OPTS="-Xms250m -Xmx350m"
##SERIALPORT_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyUSB1"
##JYTHON_OPTS="-Xbootclasspath/a:/etc/openhab2/automation/jython/jython-stanalone-2.7.0.jar -Dpython.home=/etc/openhab2/automation/jython -Dpython.path=/etc/openhab2/automation/lib/python"

No, it all needs to be combined. You will need something like this…

EXTRA_JAVA_OPTS="-Xms1024m -Xmx2048m -Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyUSB1"

I recommend the beta bundle, which includes Jython and the helper libraries. Using the bundle, there is no need to add anything to EXTRA_JAVA_OPTS.

If you do not want to use the bundle, then…

EXTRA_JAVA_OPTS="-Xms1024m -Xmx2048m -Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyUSB1 -Xbootclasspath/a:/etc/openhab2/automation/jython/jython-standalone-2.7.0.jar -Dpython.home=/etc/openhab2/automation/jython -Dpython.path=/etc/openhab2/automation/lib/python"

That line is getting a liitle long, so let’s add some line breaks…

EXTRA_JAVA_OPTS="-Xms1024m -Xmx2048m \
-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyUSB1 \
-Xbootclasspath/a:/etc/openhab2/automation/jython/jython-standalone-2.7.0.jar \
-Dpython.home=/etc/openhab2/automation/jython \
-Dpython.path=/etc/openhab2/automation/lib/python"

You configure the controller/coordinator Thing. I prefer using Habmin…

1 Like

This looks great, I need to eat, but I’ll try after I’m full and sleep That way my brain stays out of the way!!!

You need your brain’s help to work with openHAB. :wink:

Success!!! Thanks so much for your help. I cleaned up my /etc/default/openhab2 folder with the edits you suggested. I need to go look at Jython because I think the only thing I installed was Python.
My goal was to use JavaScript, but the examples were far and few between and there were more Python. I’m still trying to figure out if Jython is just Python running on Java.
That is also a new concept, coming from the embedded development world I’m used to things running not “on top of” but “inside”. I guess its a VM and your run Python on top of it.

I installed HABmin, but nothing showed up. Someone said its end of life since the guy working on it hasn’t done anything in 2 years. Your probably on it from a historical perspective.

Anyway, thanks so much for your help. I’m adding things in Zigbee!!!

Jython is basically a Java port of Python 2.

If you mean the Z-Wave map, it needs to see a total network heal before the map is populated, I believe.