Zigbee - XBee - Coordinator stuck on UNKNOWN

The Coordinator Thing in Paper UI said that:

What binding version are you using?

The latest that gets installed when you install the binding today via Paper UI.

Ok, so you will need to upgrade to the latest version.

Please see the following thread which has a script to update. This can load the latest libraries - the latest version is 1.1.8 (I think the script will ask for this). This should solve your problem as the 2.4 release has a bug with the XBee coordinator.

Great. Thank you.
Would you have a link to that threat? :slight_smile:

Oops - apologies. I meant to paste it in earlier…

1 Like

That fixed it. Thanks a lot.

I had to go the manual way and download
2.5.0 Zigbee Binding

2.5.0 XBee Binding

Smartsystems Zigbee Jar 1.1.8

Smartsystems XBee Jar 1.1.8

manually and copy them to the addons folder, since I could not figure out how to run the bash with openhab.

But now it works again !!! :+1:

1 Like

Hello, could you help me I have an equivalent error:
2019-02-14 03:23:11.514 [hingStatusInfoChangedEvent] - ‘zigbee:coordinator_xbee:bf3b443d’ changed from UNINITIALIZED to INITIALIZING

2019-02-14 03:23:11.549 [me.event.ThingUpdatedEvent] - Thing 'zigbee:coordinator_xbee:bf3b443d' has been updated.

2019-02-14 03:23:11.578 [me.event.ThingUpdatedEvent] - Thing 'zigbee:coordinator_xbee:bf3b443d' has been updated.

2019-02-14 03:23:11.605 [me.event.ThingUpdatedEvent] - Thing 'zigbee:coordinator_xbee:bf3b443d' has been updated.

2019-02-14 03:23:11.633 [me.event.ThingUpdatedEvent] - Thing 'zigbee:coordinator_xbee:bf3b443d' has been updated.

2019-02-14 03:23:11.637 [hingStatusInfoChangedEvent] - 'zigbee:coordinator_xbee:bf3b443d' changed from INITIALIZING to UNKNOWN

==> /var/log/openhab2/openhab.log <==

2019-02-14 03:23:12.743 [ERROR] [ding.zigbee.handler.ZigBeeSerialPort] - Serial Error: Port /dev/ttyUSB2 in use.

2019-02-14 03:23:12.746 [ERROR] [.zigbee.dongle.xbee.ZigBeeDongleXBee] - Unable to open XBee serial port

==> /var/log/openhab2/events.log <==

2019-02-14 03:23:12.756 [hingStatusInfoChangedEvent] - 'zigbee:coordinator_xbee:bf3b443d' changed from UNKNOWN to OFFLINE: Failed to open communications port

2019-02-14 03:23:12.769 [hingStatusInfoChangedEvent] - 'zigbee:coordinator_xbee:bf3b443d' changed from OFFLINE: Failed to open communications port to OFFLINE (COMMUNICATION_ERROR)

thank you !

Take a look at your log - it shows that the serial port can’t be opened.

Yes but I don’t know why. Here is another problem I have, the xbee USB key is detected as an enocean binding (USB 300)? But I do have the enocean USB 300 on another port: the ttyUSB1 port.


In fact here is my mapping for the serial ports:

cat /etc/udev/rules.d/*
SUBSYSTEM=="input", GROUP="input", MODE="0660"
SUBSYSTEM=="i2c-dev", GROUP="i2c", MODE="0660"
SUBSYSTEM=="spidev", GROUP="spi", MODE="0660"
SUBSYSTEM=="bcm2835-gpiomem", GROUP="gpio", MODE="0660"

SUBSYSTEM=="gpio", GROUP="gpio", MODE="0660"
SUBSYSTEM=="gpio*", PROGRAM="/bin/sh -c '\
        chown -R root:gpio /sys/class/gpio && chmod -R 770 /sys/class/gpio;\
        chown -R root:gpio /sys/devices/virtual/gpio && chmod -R 770 /sys/devices/virtual/gpio;\
        chown -R root:gpio /sys$devpath && chmod -R 770 /sys$devpath\
'"

KERNEL=="ttyAMA[01]", PROGRAM="/bin/sh -c '\
        ALIASES=/proc/device-tree/aliases; \
        if cmp -s $ALIASES/uart0 $ALIASES/serial0; then \
                echo 0;\
        elif cmp -s $ALIASES/uart0 $ALIASES/serial1; then \
                echo 1; \
        else \
                exit 1; \
        fi\
'", SYMLINK+="serial%c"

KERNEL=="ttyS0", PROGRAM="/bin/sh -c '\
        ALIASES=/proc/device-tree/aliases; \
        if cmp -s $ALIASES/uart1 $ALIASES/serial0; then \
                echo 0; \
        elif cmp -s $ALIASES/uart1 $ALIASES/serial1; then \
                echo 1; \
        else \
                exit 1; \
        fi \
'", SYMLINK+="serial%c"
SUBSYSTEM=="tty", ATTRS{serial}=="FT2PT0KS", SYMLINK+="enocean0"
SUBSYSTEM=="tty", ATTRS{product}=="RFXtrx433XL", ATTRS{serial}=="DO2ZWA2T", SYMLINK+="rfxtrx0"
SUBSYSTEM=="tty", ATTRS{product}=="XStick", SYMLINK+="xbee0"

and here is the result:

ls -l /dev/enocean0
lrwxrwxrwx 1 root root 7 Feb 16 16:04 /dev/enocean0 -> ttyUSB1

ls -l /dev/xbee0
lrwxrwxrwx 1 root root 7 Feb 17 12:38 /dev/xbee0 -> ttyUSB2

ls -l /dev/rfxtrx0
lrwxrwxrwx 1 root root 7 Feb 16 16:04 /dev/rfxtrx0 -> ttyUSB0

And when I want to add the xbee USB key manually I don’t have the choice for the port:

When I do

sudo lsof | grep ttyUSB2

There is nothing

What should I do ?

Possibly it is the same problem - I suspct that maybe the Enocean is detecting this device as an Enocean dongle, and this might be holding the port.

Either way, this is a bug with the Enocean binding - if you don’t have Enocean, why do you have the binding installed?

But I do have the enocean USB 300 on another port: the ttyUSB1 port.
ls -l /dev/enocean0 lrwxrwxrwx 1 root root 7 Feb 16 16:04 /dev/enocean0 -> ttyUSB1
And the udev rule that makes the simlink:

cat /etc/udev/rules.d/enocean.rules
SUBSYSTEM=="tty", ATTRS{serial}=="FT2PT0KS", SYMLINK+="enocean0"

Ok, then I suspect this is a bug in the Enocean binding and it probably needs to be fixed there.

That is irrelevant though. Probably the binding is looking at all USB ports to try and autodetect the stick, and it’s not doing this correctly.

I’m trying to uninstall the enocean binding and try again. I’ll let you know in a few minutes

I uninstalled the interfering enocean binding, rebooted, the serials ports are now:
ttyUSB1 for the xbee key
ttyUSB0 for the rfxcom
ttyUSB2 for the enocean key
.
I cannot choose ttyUSB1 for the xbee key in the zigbee manuall add thing:

Sorry, but I’m not really sure how this works. This is not part of the binding - it’s added somewhere else in the system.

Now, I uinstalled the zigbee binding via PaperUI and tried the script : Zigbee and Z-Wave manual install script

Here are the versions I have installed now:

300 │ Active   │  80 │ 2.5.0.201902161217     │ ZigBee CC2531 Binding
301 │ Active   │  80 │ 1.1.6                  │ com.zsmartsystems.zigbee.dongle.telegesis
302 │ Active   │  80 │ 1.1.6                  │ com.zsmartsystems.zigbee.dongle.ember
303 │ Active   │  80 │ 1.1.6                  │ com.zsmartsystems.zigbee.dongle.xbee
304 │ Active   │  80 │ 2.5.0.201902161217     │ ZigBee XBee Binding
305 │ Active   │  80 │ 2.5.0.201902161217     │ ZigBee Binding
306 │ Active   │  80 │ 2.5.0.201902161217     │ ZigBee Ember Binding
307 │ Active   │  80 │ 1.1.6                  │ com.zsmartsystems.zigbee
308 │ Active   │  80 │ 1.1.6                  │ com.zsmartsystems.zigbee.dongle.cc2531
309 │ Active   │  80 │ 2.5.0.201902161217     │ ZigBee Telegesis Binding

I unplugged everything and had only the xbee USB key plugged in this time.

Then I rebooted

This time I have my xbee key connected to ttyUSB0

lrwxrwxrwx 1 root root 7 Feb 17 13:43 xbee0 -> ttyUSB0

I have a problem with the binding now:

2019-02-17 13:44:08.881 [ERROR] [org.openhab.binding.zigbee          ] - bundle org.openhab.binding.zigbee:2.5.0.201902161217 (305)[org.openhab.binding.zigbee.internal.converter.ZigBeeChannelConverterFactory(41)] : Could not load implementation object class org.openhab.binding.zigbee.internal.converter.ZigBeeChannelConverterFactory

java.lang.ClassNotFoundException: org.openhab.binding.zigbee.internal.converter.ZigBeeChannelConverterFactory cannot be found by org.openhab.binding.zigbee_2.5.0.201902161217

more details:

https://pastebin.com/PvYGWyCD

This time I can type the serial port manually (now that I have unplugged all the others keys - enocean and rfxcom):

I try to put /dev/ttyUSB0

And here what happens:

    2019-02-17 13:52:26.974 [DEBUG] [org.openhab.binding.zigbee.xbee     ] - ServiceEvent REGISTERED - {org.openhab.binding.zigbee.handler.ZigBeeCoordinatorHandler}={service.id=411, service.bundleid=304, service.scope=singleton} - org.openhab.binding.zigbee.xbee

==> /var/log/openhab2/events.log <==

2019-02-17 13:52:27.000 [hingStatusInfoChangedEvent] - 'zigbee:coordinator_xbee:a94d1e93' changed from UNINITIALIZED to INITIALIZING

==> /var/log/openhab2/openhab.log <==

2019-02-17 13:52:27.019 [DEBUG] [ding.zigbee.xbee.handler.XBeeHandler] - Initializing ZigBee XBee serial bridge handler.

2019-02-17 13:52:27.025 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Initializing ZigBee network [zigbee:coordinator_xbee:a94d1e93].

2019-02-17 13:52:27.029 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Channel 0

2019-02-17 13:52:27.033 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - PANID 0

2019-02-17 13:52:27.036 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - EPANID 0000000000000000

2019-02-17 13:52:27.042 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Network Key 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

2019-02-17 13:52:27.043 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Link Key null

2019-02-17 13:52:27.046 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Config: zigbee_initialise found, initializeNetwork=false

2019-02-17 13:52:27.048 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - ExtendedPanId or PanId not set: initializeNetwork=true

2019-02-17 13:52:27.050 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Network Key String 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

2019-02-17 13:52:27.055 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Network key initialised 7713C64167DF439C679DE5FEE714D0B1

2019-02-17 13:52:27.057 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Network key final array 7713C64167DF439C679DE5FEE714D0B1

2019-02-17 13:52:27.059 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Link Key String 

2019-02-17 13:52:27.061 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Link Key String has invalid format. Revert to default key.

2019-02-17 13:52:27.063 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Initialising network

2019-02-17 13:52:27.065 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Channel set to 11.

2019-02-17 13:52:27.117 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Created random ZigBee PAN ID [274D].

==> /var/log/openhab2/events.log <==

2019-02-17 13:52:27.120 [me.event.ThingUpdatedEvent] - Thing 'zigbee:coordinator_xbee:a94d1e93' has been updated.

==> /var/log/openhab2/openhab.log <==

2019-02-17 13:52:27.160 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Created random ZigBee extended PAN ID [40C5022FC2CDE2CF].

==> /var/log/openhab2/events.log <==

2019-02-17 13:52:27.161 [me.event.ThingUpdatedEvent] - Thing 'zigbee:coordinator_xbee:a94d1e93' has been updated.

2019-02-17 13:52:27.193 [me.event.ThingUpdatedEvent] - Thing 'zigbee:coordinator_xbee:a94d1e93' has been updated.

2019-02-17 13:52:27.222 [me.event.ThingUpdatedEvent] - Thing 'zigbee:coordinator_xbee:a94d1e93' has been updated.

==> /var/log/openhab2/openhab.log <==

2019-02-17 13:52:27.222 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Link key final array 5A6967426565416C6C69616E63653039

2019-02-17 13:52:27.245 [DEBUG] [ding.zigbee.xbee.handler.XBeeHandler] - ZigBee XBee Coordinator opening Port:'/dev/ttyUSB0' PAN:274d, EPAN:40C5022FC2CDE2CF, Channel:11

==> /var/log/openhab2/events.log <==

2019-02-17 13:52:27.261 [hingStatusInfoChangedEvent] - 'zigbee:coordinator_xbee:a94d1e93' changed from INITIALIZING to UNKNOWN

==> /var/log/openhab2/openhab.log <==

2019-02-17 13:52:27.259 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Scheduling ZigBee start

2019-02-17 13:52:28.266 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - ZigBee network starting

2019-02-17 13:52:28.268 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Initialising ZigBee coordinator

2019-02-17 13:52:28.312 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Mesh Update Period 86400

2019-02-17 13:52:28.320 [DEBUG] [tsystems.zigbee.ZigBeeNetworkManager] - Adding supported cluster 1280

2019-02-17 13:52:28.326 [DEBUG] [com.zsmartsystems.zigbee.ZigBeeNode ] - ClusterMatcher starting

2019-02-17 13:52:28.450 [DEBUG] [com.zsmartsystems.zigbee.ZigBeeNode ] - ClusterMatcher adding cluster IAS_ZONE

2019-02-17 13:52:28.454 [DEBUG] [tsystems.zigbee.ZigBeeNetworkManager] - Adding supported cluster 25

2019-02-17 13:52:28.455 [DEBUG] [com.zsmartsystems.zigbee.ZigBeeNode ] - ClusterMatcher adding cluster OTA_UPGRADE

2019-02-17 13:52:28.469 [DEBUG] [nal.ZigBeeNetworkStateSerializerImpl] - Loading ZigBee network state: Start.

2019-02-17 13:52:28.472 [DEBUG] [nal.ZigBeeNetworkStateSerializerImpl] - Loading ZigBee network state: File does not exist

2019-02-17 13:52:28.476 [DEBUG] [.zigbee.dongle.xbee.ZigBeeDongleXBee] - XBee dongle initialize.

2019-02-17 13:52:28.476 [DEBUG] [tsystems.zigbee.ZigBeeNetworkManager] - Network state is updated to UNINITIALISED

2019-02-17 13:52:28.478 [DEBUG] [ding.zigbee.handler.ZigBeeSerialPort] - Connecting to serial port [/dev/ttyUSB0] at 9600 baud, flow control FLOWCONTROL_OUT_RTSCTS.

2019-02-17 13:52:28.481 [DEBUG] [ding.zigbee.handler.ZigBeeSerialPort] - No communication ports found, cannot connect to [/dev/ttyUSB0]

2019-02-17 13:52:28.483 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - null: networkStateUpdated called with state=UNINITIALISED

2019-02-17 13:52:28.484 [ERROR] [.zigbee.dongle.xbee.ZigBeeDongleXBee] - Unable to open XBee serial port

2019-02-17 13:52:28.487 [DEBUG] [tsystems.zigbee.ZigBeeNetworkManager] - Network state is updated to OFFLINE

2019-02-17 13:52:28.489 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - null: networkStateUpdated called with state=OFFLINE

==> /var/log/openhab2/events.log <==

2019-02-17 13:52:28.498 [hingStatusInfoChangedEvent] - 'zigbee:coordinator_xbee:a94d1e93' changed from UNKNOWN to OFFLINE: Failed to open communications port

2019-02-17 13:52:28.503 [hingStatusInfoChangedEvent] - 'zigbee:coordinator_xbee:a94d1e93' changed from OFFLINE: Failed to open communications port to OFFLINE (COMMUNICATION_ERROR)

==> /var/log/openhab2/openhab.log <==

2019-02-17 13:52:29.510 [DEBUG] [nal.ZigBeeNetworkStateSerializerImpl] - Saving ZigBee network state

2019-02-17 13:52:29.533 [DEBUG] [nal.ZigBeeNetworkStateSerializerImpl] - Saving ZigBee network state: Start.

2019-02-17 13:52:29.561 [DEBUG] [nal.ZigBeeNetworkStateSerializerImpl] - Saving ZigBee network state: Done.

I also tried to install manually the addon:

pwd
/usr/share/openhab2/addons
[14:20:38] openhabian@openHABianPi:/usr/share/openhab2/addons$ ls
archive  com.zsmartsystems.zigbee-1.1.8.jar  com.zsmartsystems.zigbee.dongle.xbee-1.1.8.jar  org.openhab.binding.zigbee-2.5.0-SNAPSHOT.jar  org.openhab.binding.zigbee.xbee-2.5.0-SNAPSHOT.jar

still have this problem:

https://pastebin.com/FtY87YJJ

The links are not working now. where can i get the .jar files ?

https://ci.openhab.org/job/openHAB2-Bundles/lastSuccessfulBuild/artifact/bindings/org.openhab.binding.zigbee/

and

https://dl.bintray.com/zsmartsystems/com.zsmartsystems/com/zsmartsystems/zigbee/

1 Like