XBee S2B

Hi,

I’m new to all this and have started to do some experimentation. I had an XBee S2B module from an old project. I noticed in the bindings that S2C is supported but no mention of S2B. I know one of the key differences is that you have to upload a specific firmware to the S2B to support what mode you want to run it in (ie, coordinator).

Does anyone know if I flash it with a coordinator firmware that it will work with the Zigbee binding?

Thanks!

Yes, but you will need to update to the latest version as there is a bug in 2.4 that prevents the XBee working that I didn’t have time to fix. There is a script to do the update - see this post -:

So I finally went and got my first Zigbee device (Xiaomi Buttons).

I flashed the XBee device. Openhab seems to detect it okay when I turn debug logs on. When I look at the state of the XBee Coordinator Thing it just says Unknown.

When I go ‘Search’ in PaperUI in order to add the button I get this:

2019-02-17 12:38:12.287 [DEBUG] [bee.discovery.ZigBeeDiscoveryService] - Starting ZigBee scan for zigbee:coordinator_xbee:c72f4083

2019-02-17 12:38:12.293 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - ZigBee coordinator is offline - aborted scan for zigbee:coordinator_xbee:c72f4083

When I press the broadcast button on the Button device - the Coordinator binding does seem to pick something up:

2019-02-17 12:42:15.253 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE Data: 00 1E 91 00 15 8D 00 02 10 17 CF FC 1C 00 00 00 13 00 00 42 B4 1C FC CF 17 10 02 00 8D 15 00 80 81

2019-02-17 12:42:15.259 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE: XBeeReceivePacketExplicitEvent [ieeeAddress=00158D00021017CF, networkAddress=64540, sourceEndpoint=0, destinationEndpoint=0, clusterId=19, profileId=0, receiveOptions=UNKNOWN, data=B4 1C FC CF 17 10 02 00 8D 15 00 80]

2019-02-17 12:42:15.263 [DEBUG] [tsystems.zigbee.ZigBeeNetworkManager] - RX APS: ZigBeeApsFrame [sourceAddress=64540/0, destinationAddress=0/0, profile=0000, cluster=19, addressMode=null, radius=0, apsSecurity=false, apsCounter=0, payload=B4 1C FC CF 17 10 02 00 8D 15 00 80]

2019-02-17 12:42:15.267 [DEBUG] [tsystems.zigbee.ZigBeeNetworkManager] - RX CMD: DeviceAnnounce [64540/0 -> 0/0, cluster=0013, TID=NULL, nwkAddrOfInterest=64540, ieeeAddr=00158D00021017CF, capability=128]

The final outcome is that the button device doesn’t come up in PaperUI.

Any help would be much appreciated.

Can you provide an image of what you are looking at?

I’ve not tried these switches - Xiaomi devices tend to be problematic as they aren’t ZigBee. Most of the ones I’ve tried will work if you keep pressing a button to keep it awake during the association phase though.

Here is the picture:

The thing is I’m not sure that Openhab is actually searching since the logs say 'Zigbee coordinator is offline - aborted scan for zigbee:coordinator_xbee:c72f4083. A side note is that PaperUI indicates its searching whereas the log shows that it had aborted.

When I look at the extended logs when I had the xbee coordinator and it initializes it indicates that everything is working. It appears to be correctly detecting the device and setting it up. When you press the physical button, the S2B appears to receive the signal.

This is the log when I add the S2B and it initializes:

2019-02-23 13:29:25.589 [DEBUG] [org.openhab.binding.zigbee.xbee ] - ServiceEvent REGISTERED - {org.openhab.binding.zigbee.handler.ZigBeeCoordinatorHandler}={service.id=397, service.bundleid=232, service.scope=singleton} - org.openhab.binding.zigbee.xbee

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

2019-02-23 13:29:25.632 [hingStatusInfoChangedEvent] - ‘zigbee:coordinator_xbee:81422710’ changed from UNINITIALIZED to INITIALIZING

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

2019-02-23 13:29:25.672 [DEBUG] [ding.zigbee.xbee.handler.XBeeHandler] - Initializing ZigBee XBee serial bridge handler.

2019-02-23 13:29:25.677 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Initializing ZigBee network [zigbee:coordinator_xbee:81422710].

2019-02-23 13:29:25.685 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Channel 0

2019-02-23 13:29:25.689 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - PANID 0

2019-02-23 13:29:25.693 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - EPANID 0000000000000000

2019-02-23 13:29:25.705 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Network Key 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

2019-02-23 13:29:25.710 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Link Key null

2019-02-23 13:29:25.716 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Config: zigbee_initialise found, initializeNetwork=true

2019-02-23 13:29:25.721 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - ExtendedPanId or PanId not set: initializeNetwork=true

2019-02-23 13:29:25.727 [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-23 13:29:25.738 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Network key initialised 980588F0CB853FD5F2ACCCEF1E5ED0D5

2019-02-23 13:29:25.746 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Network key final array 980588F0CB853FD5F2ACCCEF1E5ED0D5

2019-02-23 13:29:25.751 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Link Key String

2019-02-23 13:29:25.756 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Link Key String has invalid format. Revert to default key.

2019-02-23 13:29:25.761 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Initialising network

2019-02-23 13:29:25.766 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Channel set to 11.

2019-02-23 13:29:25.816 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Created random ZigBee PAN ID [F70E].

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

2019-02-23 13:29:25.817 [me.event.ThingUpdatedEvent] - Thing ‘zigbee:coordinator_xbee:81422710’ has been updated.

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

2019-02-23 13:29:25.832 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Created random ZigBee extended PAN ID [B64E370C3FF6B981].

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

2019-02-23 13:29:25.835 [me.event.ThingUpdatedEvent] - Thing ‘zigbee:coordinator_xbee:81422710’ has been updated.

2019-02-23 13:29:25.852 [me.event.ThingUpdatedEvent] - Thing ‘zigbee:coordinator_xbee:81422710’ has been updated.

2019-02-23 13:29:25.866 [me.event.ThingUpdatedEvent] - Thing ‘zigbee:coordinator_xbee:81422710’ has been updated.

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

2019-02-23 13:29:25.867 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Link key final array 5A6967426565416C6C69616E63653039

2019-02-23 13:29:25.906 [DEBUG] [ding.zigbee.xbee.handler.XBeeHandler] - ZigBee XBee Coordinator opening Port:‘/dev/ttyUSB0’ PAN:f70e, EPAN:B64E370C3FF6B981, Channel:11

2019-02-23 13:29:25.934 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Scheduling ZigBee start

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

2019-02-23 13:29:25.937 [hingStatusInfoChangedEvent] - ‘zigbee:coordinator_xbee:81422710’ changed from INITIALIZING to UNKNOWN

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

2019-02-23 13:29:26.948 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - ZigBee network starting

2019-02-23 13:29:26.952 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Initialising ZigBee coordinator

2019-02-23 13:29:27.028 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Mesh Update Period 86400

2019-02-23 13:29:27.045 [DEBUG] [tsystems.zigbee.ZigBeeNetworkManager] - Adding supported cluster 1280

2019-02-23 13:29:27.056 [DEBUG] [com.zsmartsystems.zigbee.ZigBeeNode ] - ClusterMatcher starting

2019-02-23 13:29:27.315 [DEBUG] [com.zsmartsystems.zigbee.ZigBeeNode ] - ClusterMatcher adding cluster IAS_ZONE

2019-02-23 13:29:27.322 [DEBUG] [tsystems.zigbee.ZigBeeNetworkManager] - Adding supported cluster 25

2019-02-23 13:29:27.325 [DEBUG] [com.zsmartsystems.zigbee.ZigBeeNode ] - ClusterMatcher adding cluster OTA_UPGRADE

2019-02-23 13:29:27.348 [DEBUG] [nal.ZigBeeNetworkStateSerializerImpl] - Loading ZigBee network state: Start.

2019-02-23 13:29:27.355 [DEBUG] [nal.ZigBeeNetworkStateSerializerImpl] - Loading ZigBee network state: File does not exist

2019-02-23 13:29:27.360 [DEBUG] [.zigbee.dongle.xbee.ZigBeeDongleXBee] - XBee dongle initialize.

2019-02-23 13:29:27.360 [DEBUG] [tsystems.zigbee.ZigBeeNetworkManager] - Network state is updated to UNINITIALISED

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

2019-02-23 13:29:27.371 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - null: networkStateUpdated called with state=UNINITIALISED

2019-02-23 13:29:27.392 [DEBUG] [ding.zigbee.handler.ZigBeeSerialPort] - Serial port [/dev/ttyUSB0] is initialized.

2019-02-23 13:29:27.411 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - XBeeFrameHandler clearing receive buffer.

2019-02-23 13:29:27.515 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - XBeeFrameHandler cleared receive buffer.

2019-02-23 13:29:27.521 [DEBUG] [.zigbee.dongle.xbee.ZigBeeDongleXBee] - XBee dongle reset 1.

2019-02-23 13:29:27.531 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - XBeeFrameHandler thread started

2019-02-23 13:29:27.555 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE queue: 1: XBeeSetSoftwareResetCommand [frameId=1]

2019-02-23 13:29:27.559 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE: XBeeSetSoftwareResetCommand [frameId=1]

2019-02-23 13:29:27.566 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE Data: 00 04 08 01 46 52 5E

2019-02-23 13:29:27.700 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE Data: 00 05 88 01 46 52 00 DE

2019-02-23 13:29:27.827 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE: XBeeSoftwareResetResponse [frameId=1, commandStatus=OK]

2019-02-23 13:29:30.030 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE Data: 00 02 8A 01 74

2019-02-23 13:29:30.038 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE: XBeeModemStatusEvent [status=WATCHDOG_TIMER_RESET]

2019-02-23 13:29:30.050 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE queue: 1: XBeeSetApiEnableCommand [frameId=2, mode=2]

2019-02-23 13:29:30.053 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE Data: 00 02 8A 06 6F

2019-02-23 13:29:30.053 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE: XBeeSetApiEnableCommand [frameId=2, mode=2]

2019-02-23 13:29:30.056 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE: XBeeModemStatusEvent [status=COORDINATOR_STARTED]

2019-02-23 13:29:30.059 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE Data: 00 05 08 02 41 50 02 62

2019-02-23 13:29:30.191 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE Data: 00 05 88 02 41 50 00 E4

2019-02-23 13:29:30.195 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE: XBeeApiEnableResponse [frameId=2, commandStatus=OK, mode=null]

2019-02-23 13:29:30.201 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE queue: 1: XBeeSetApiModeCommand [frameId=3, mode=3]

2019-02-23 13:29:30.204 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE: XBeeSetApiModeCommand [frameId=3, mode=3]

2019-02-23 13:29:30.209 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE Data: 00 05 08 03 41 4F 03 61

2019-02-23 13:29:30.337 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE Data: 00 05 88 03 41 4F 00 E4

2019-02-23 13:29:30.341 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE: XBeeApiModeResponse [frameId=3, commandStatus=OK, mode=null]

2019-02-23 13:29:30.348 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE queue: 1: XBeeGetHardwareVersionCommand [frameId=4]

2019-02-23 13:29:30.350 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE: XBeeGetHardwareVersionCommand [frameId=4]

2019-02-23 13:29:30.356 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE Data: 00 04 08 04 48 56 55

2019-02-23 13:29:30.482 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE Data: 00 07 88 04 48 56 00 1E 46 71

2019-02-23 13:29:30.489 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE: XBeeHardwareVersionResponse [frameId=4, commandStatus=OK, hardwareVersion=1E 46]

2019-02-23 13:29:30.495 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE queue: 1: XBeeGetFirmwareVersionCommand [frameId=5]

2019-02-23 13:29:30.499 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE: XBeeGetFirmwareVersionCommand [frameId=5]

2019-02-23 13:29:30.505 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE Data: 00 04 08 05 56 52 4A

2019-02-23 13:29:30.640 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE Data: 00 07 88 05 56 52 00 21 A7 02

2019-02-23 13:29:30.645 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE: XBeeFirmwareVersionResponse [frameId=5, commandStatus=OK, firmwareVersion=21 A7]

2019-02-23 13:29:30.652 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE queue: 1: XBeeGetDetailedVersionCommand [frameId=6]

2019-02-23 13:29:30.656 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE: XBeeGetDetailedVersionCommand [frameId=6]

2019-02-23 13:29:30.661 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE Data: 00 04 08 06 56 4C 4F

2019-02-23 13:29:30.785 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE Data: 00 05 88 06 56 4C 02 CD

2019-02-23 13:29:30.789 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE: XBeeDetailedVersionResponse [frameId=6, commandStatus=INVALID_COMMAND]

2019-02-23 13:29:30.795 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE queue: 1: XBeeGetIeeeAddressHighCommand [frameId=7]

2019-02-23 13:29:30.798 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE: XBeeGetIeeeAddressHighCommand [frameId=7]

2019-02-23 13:29:30.803 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE Data: 00 04 08 07 53 48 55

2019-02-23 13:29:30.945 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE Data: 00 09 88 07 53 48 00 00 13 A2 00 20

2019-02-23 13:29:30.951 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE: XBeeIeeeAddressHighResponse [frameId=7, commandStatus=OK, ieeeAddress=00 13 A2 00]

2019-02-23 13:29:30.957 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE queue: 1: XBeeGetIeeeAddressLowCommand [frameId=8]

2019-02-23 13:29:30.959 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE: XBeeGetIeeeAddressLowCommand [frameId=8]

2019-02-23 13:29:30.964 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE Data: 00 04 08 08 53 4C 50

2019-02-23 13:29:31.105 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE Data: 00 09 88 08 53 4C 00 40 E7 65 81 C3

2019-02-23 13:29:31.111 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE: XBeeIeeeAddressLowResponse [frameId=8, commandStatus=OK, ieeeAddress=40 E7 65 81]

2019-02-23 13:29:31.117 [DEBUG] [.zigbee.dongle.xbee.ZigBeeDongleXBee] - XBee IeeeAddress=0013A20040E76581

2019-02-23 13:29:31.123 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE queue: 1: XBeeSetZigbeeStackProfileCommand [frameId=9, stackProfile=2]

2019-02-23 13:29:31.127 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE: XBeeSetZigbeeStackProfileCommand [frameId=9, stackProfile=2]

2019-02-23 13:29:31.133 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE Data: 00 05 08 09 5A 53 02 3F

2019-02-23 13:29:31.264 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE Data: 00 05 88 09 5A 53 00 C1

2019-02-23 13:29:31.269 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE: XBeeZigbeeStackProfileResponse [frameId=9, commandStatus=OK, stackProfile=null]

2019-02-23 13:29:31.277 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE queue: 1: XBeeSetEncryptionEnableCommand [frameId=10, enableEncryption=true]

2019-02-23 13:29:31.281 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE: XBeeSetEncryptionEnableCommand [frameId=10, enableEncryption=true]

2019-02-23 13:29:31.287 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE Data: 00 05 08 0A 45 45 01 62

2019-02-23 13:29:31.423 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE Data: 00 05 88 0A 45 45 00 E3

2019-02-23 13:29:31.429 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE: XBeeEncryptionEnableResponse [frameId=10, commandStatus=OK, enableEncryption=null]

2019-02-23 13:29:31.439 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE queue: 1: XBeeSetEncryptionOptionsCommand [frameId=11, encryptionOptions=[ENABLE_TRUST_CENTRE]]

2019-02-23 13:29:31.443 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE: XBeeSetEncryptionOptionsCommand [frameId=11, encryptionOptions=[ENABLE_TRUST_CENTRE]]

2019-02-23 13:29:31.450 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE Data: 00 05 08 0B 45 4F 02 56

2019-02-23 13:29:31.584 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE Data: 00 05 88 0B 45 4F 00 D8

2019-02-23 13:29:31.589 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE: XBeeEncryptionOptionsResponse [frameId=11, commandStatus=OK]

2019-02-23 13:29:31.596 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE queue: 1: XBeeSetCoordinatorEnableCommand [frameId=12, enable=true]

2019-02-23 13:29:31.600 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE: XBeeSetCoordinatorEnableCommand [frameId=12, enable=true]

2019-02-23 13:29:31.607 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE Data: 00 05 08 0C 43 45 01 62

2019-02-23 13:29:31.743 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE Data: 00 05 88 0C 43 45 02 E1

2019-02-23 13:29:31.749 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE: XBeeCoordinatorEnableResponse [frameId=12, commandStatus=INVALID_COMMAND]

2019-02-23 13:29:31.758 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE queue: 1: XBeeSetNetworkKeyCommand [frameId=13, networkKey=00000000000000000000000000000000]

2019-02-23 13:29:31.765 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE: XBeeSetNetworkKeyCommand [frameId=13, networkKey=00000000000000000000000000000000]

2019-02-23 13:29:31.773 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE Data: 00 14 08 0D 4E 4B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 51

2019-02-23 13:29:31.920 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE Data: 00 05 88 0D 4E 4B 00 D1

2019-02-23 13:29:31.924 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE: XBeeNetworkKeyResponse [frameId=13, commandStatus=OK]

2019-02-23 13:29:31.932 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE queue: 1: XBeeSetLinkKeyCommand [frameId=14, linkKey=5A6967426565416C6C69616E63653039]

2019-02-23 13:29:31.937 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE: XBeeSetLinkKeyCommand [frameId=14, linkKey=5A6967426565416C6C69616E63653039]

2019-02-23 13:29:31.945 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE Data: 00 14 08 0E 4B 59 5A 69 67 42 65 65 41 6C 6C 69 61 6E 63 65 30 39 8D

2019-02-23 13:29:32.081 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE Data: 00 05 88 0E 4B 59 00 C5

2019-02-23 13:29:32.085 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE: XBeeLinkKeyResponse [frameId=14, commandStatus=OK]

2019-02-23 13:29:32.092 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE queue: 1: XBeeSetSaveDataCommand [frameId=15]

2019-02-23 13:29:32.095 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE: XBeeSetSaveDataCommand [frameId=15]

2019-02-23 13:29:32.101 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE Data: 00 04 08 0F 57 52 3F

2019-02-23 13:29:32.231 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE Data: 00 05 88 0F 57 52 00 BF

2019-02-23 13:29:32.236 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE: XBeeSaveDataResponse [frameId=15, commandStatus=OK]

2019-02-23 13:29:32.242 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE queue: 1: XBeeGetPanIdCommand [frameId=16]

2019-02-23 13:29:32.245 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE: XBeeGetPanIdCommand [frameId=16]

2019-02-23 13:29:32.250 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE Data: 00 04 08 10 4F 49 4F

2019-02-23 13:29:32.375 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE Data: 00 07 88 10 4F 49 00 98 3B FC

2019-02-23 13:29:32.379 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE: XBeePanIdResponse [frameId=16, commandStatus=OK, panId=38971]

2019-02-23 13:29:32.386 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE queue: 1: XBeeGetExtendedPanIdCommand [frameId=17]

2019-02-23 13:29:32.389 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE: XBeeGetExtendedPanIdCommand [frameId=17]

2019-02-23 13:29:32.395 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE Data: 00 04 08 11 4F 50 47

2019-02-23 13:29:32.538 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE Data: 00 0D 88 11 4F 50 00 9B BE CC A9 A2 43 F4 7D A3

2019-02-23 13:29:32.544 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE: XBeeExtendedPanIdResponse [frameId=17, commandStatus=OK, extendedPanId=9BBECCA9A243F47D]

2019-02-23 13:29:32.548 [DEBUG] [tsystems.zigbee.ZigBeeNetworkManager] - Network state is updated to INITIALISING

2019-02-23 13:29:32.551 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - null: networkStateUpdated called with state=INITIALISING

2019-02-23 13:29:32.551 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE queue: 1: XBeeGetOperatingChannelCommand [frameId=18]

2019-02-23 13:29:32.554 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE: XBeeGetOperatingChannelCommand [frameId=18]

2019-02-23 13:29:32.559 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE Data: 00 04 08 12 43 48 5A

2019-02-23 13:29:32.695 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE Data: 00 06 88 12 43 48 00 0B CF

2019-02-23 13:29:32.699 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE: XBeeOperatingChannelResponse [frameId=18, commandStatus=OK, channel=11]

2019-02-23 13:29:32.709 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - ZigBee Initialise: Previous device configuration was: channel=CHANNEL_11, PanID=38971, EPanId=9BBECCA9A243F47D

2019-02-23 13:29:32.714 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Link key initialise 5A6967426565416C6C69616E63653039

2019-02-23 13:29:32.718 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Network key initialise 980588F0CB853FD5F2ACCCEF1E5ED0D5

2019-02-23 13:29:32.725 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE queue: 1: XBeeSetScanChannelsCommand [frameId=19, channels=1]

2019-02-23 13:29:32.728 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE: XBeeSetScanChannelsCommand [frameId=19, channels=1]

2019-02-23 13:29:32.734 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE Data: 00 06 08 13 53 43 00 01 4D

2019-02-23 13:29:32.886 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE Data: 00 05 88 13 53 43 00 CE

2019-02-23 13:29:32.891 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE: XBeeScanChannelsResponse [frameId=19, commandStatus=OK, channels=null]

2019-02-23 13:29:32.895 [DEBUG] [.zigbee.dongle.xbee.ZigBeeDongleXBee] - XBee dongle startup.

2019-02-23 13:29:32.897 [DEBUG] [.zigbee.dongle.xbee.ZigBeeDongleXBee] - Reinitialising XBee dongle and forming network.

2019-02-23 13:29:32.900 [DEBUG] [tsystems.zigbee.ZigBeeNetworkManager] - Network state is updated to ONLINE

2019-02-23 13:29:32.900 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE queue: 1: XBeeGetOperatingChannelCommand [frameId=20]

2019-02-23 13:29:32.903 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE: XBeeGetOperatingChannelCommand [frameId=20]

2019-02-23 13:29:32.912 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - TX XBEE Data: 00 04 08 14 43 48 58

2019-02-23 13:29:33.046 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE Data: 00 06 88 14 43 48 00 0B CD

2019-02-23 13:29:33.049 [DEBUG] [ongle.xbee.internal.XBeeFrameHandler] - RX XBEE: XBeeOperatingChannelResponse [frameId=20, commandStatus=OK, channel=11]

2019-02-23 13:29:33.053 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - ZigBee Initialise done. channel=CHANNEL_11, PanId=63246 EPanId=B64E370C3FF6B981

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

2019-02-23 13:29:33.066 [me.event.ThingUpdatedEvent] - Thing ‘zigbee:coordinator_xbee:81422710’ has been updated.

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

2019-02-23 13:29:33.069 [DEBUG] [tsystems.zigbee.ZigBeeNetworkManager] - Adding supported cluster 1280

2019-02-23 13:29:33.072 [DEBUG] [com.zsmartsystems.zigbee.ZigBeeNode ] - ClusterMatcher adding cluster IAS_ZONE

Please can you provide a complete log that shows the full initialisation?

Also, if posting logs inline, please don’t paste them as quotations as it’s really hard to read like this - either use code fences, or use the </> button.

I have the exact same problem with my Digi USB Stick Coordinator being Unknown. I posted the log in another thread.

I’m also watching for a clue here :slight_smile:

In general, it’s not a good idea to cross post, however, if you’re going to cross post, you might as well mention the other thread as I can’t find it.

Sorry for cross posting. It’s just because this issue look the same as mine, which i posted the problem last week in the Beginners section.

Hello everyone.
I have a problem that I could not solve at the moment.

OpenHAB ver: 2.4.0
System: raspbery Pi 3
Zigbee Dongle: xbee
Bundle version com.zsmartsystems.zigbee.* : 1.1.10
Bundle version zigbee binding : 2.4.0

Problem:
org.openhab.binding.zigbee.xbee.handler.XBeeHandler cannot be cast to org.openhab.binding.zigbee.handler.ZigBeeCoordinatorHandler

Note: In the version of openhab 2.3.x there was not that problem with this thing

Resume:
I have OpenHAB 2.4.0 installed, in my raspberry pi. I am directly using a xbee dongle, and I have updated the bundles to version 1.1.10, following the instructions of Cris and 5ever

The dongle communicates perfectly. The problem is when the process of initialization of a thing begins.

the binding reads perfectly the information of the thing to a certain extent.
I suppose that is when the process of discovering the attributes begins.
In the end, it does not link to the channels, even though it recognizes the thing.

Part of the log:

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

2019-05-15 10:17:05.900 [hingStatusInfoChangedEvent] - ‘zigbee:device:stick1:0013a20040769225’ changed from UNINITIALIZED to INITIALIZING

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

2019-05-15 10:17:05.922 [DEBUG] [ng.zigbee.handler.ZigBeeThingHandler] - 0013A20040769225: Initializing ZigBee thing handler zigbee:device:stick1:0013a20040769225

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

2019-05-15 10:17:05.931 [hingStatusInfoChangedEvent] - ‘zigbee:device:stick1:0013a20040769225’ changed from INITIALIZING to UNKNOWN

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

2019-05-15 10:17:05.937 [DEBUG] [ng.zigbee.handler.ZigBeeThingHandler] - 0013A20040769225: Coordinator status changed to ONLINE.

2019-05-15 10:17:05.942 [DEBUG] [ng.zigbee.handler.ZigBeeThingHandler] - 0013A20040769225: Coordinator is ONLINE. Starting device initialisation.

2019-05-15 10:17:05.944 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method ‘ThingHandler.initialize()’ on ‘org.openhab.binding.zigbee.handler.ZigBeeThingHandler@a8e742’: org.openhab.binding.zigbee.xbee.handler.XBeeHandler cannot be cast to org.openhab.binding.zigbee.handler.ZigBeeCoordinatorHandler

java.lang.ClassCastException: org.openhab.binding.zigbee.xbee.handler.XBeeHandler cannot be cast to org.openhab.binding.zigbee.handler.ZigBeeCoordinatorHandler

at org.openhab.binding.zigbee.handler.ZigBeeThingHandler.bridgeStatusChanged(ZigBeeThingHandler.java:168) ~[?:?]

at org.openhab.binding.zigbee.handler.ZigBeeThingHandler.initialize(ZigBeeThingHandler.java:146) ~[?:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]

at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]

at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [102:org.eclipse.smarthome.core:0.10.0.oh240]

at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [102:org.eclipse.smarthome.core:0.10.0.oh240]

at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]

at java.lang.Thread.run(Thread.java:748) [?:?]

2019-05-15 10:17:05.971 [ERROR] [core.thing.internal.ThingManagerImpl] - Exception occurred while initializing handler of thing ‘zigbee:device:stick1:0013a20040769225’: org.openhab.binding.zigbee.xbee.handler.XBeeHandler cannot be cast to org.openhab.binding.zigbee.handler.ZigBeeCoordinatorHandler

java.lang.ClassCastException: org.openhab.binding.zigbee.xbee.handler.XBeeHandler cannot be cast to org.openhab.binding.zigbee.handler.ZigBeeCoordinatorHandler

at org.openhab.binding.zigbee.handler.ZigBeeThingHandler.bridgeStatusChanged(ZigBeeThingHandler.java:168) ~[?:?]

at org.openhab.binding.zigbee.handler.ZigBeeThingHandler.initialize(ZigBeeThingHandler.java:146) ~[?:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]

at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]

at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [102:org.eclipse.smarthome.core:0.10.0.oh240]

at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [102:org.eclipse.smarthome.core:0.10.0.oh240]

at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]

at java.lang.Thread.run(Thread.java:748) [?:?]

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

2019-05-15 10:17:05.973 [hingStatusInfoChangedEvent] - ‘zigbee:device:stick1:0013a20040769225’ changed from UNKNOWN to UNINITIALIZED (HANDLER_INITIALIZING_ERROR): org.openhab.binding.zigbee.xbee.handler.XBeeHandler cannot be cast to org.openhab.binding.zigbee.handler.ZigBeeCoordinatorHandler

2019-05-15 10:17:06.085 [nt.FirmwareStatusInfoEvent] - Firmware status of thing zigbee:device:stick1:0013a20040769225 changed to UNKNOWN.

How i can help to solve this issue??

Thanks!

I too am having problems with the ZigBee binding and an XBee dongle since upgrading to 2.4 from 2.3. I am on a Linux system. In Paper UI the XBee Coordinator is stuck at initializing.

My bundle list:

286 │ Active   │  80 │ 1.1.6                  │ com.zsmartsystems.zigbee.dongle.xbee
287 │ Active   │  80 │ 2.5.0.201905160433     │ openHAB Add-ons :: Bundles :: ZigBee XBee Bridge
288 │ Active   │  80 │ 2.5.0.201905160433     │ openHAB Add-ons :: Bundles :: ZigBee Binding
289 │ Active   │  80 │ 2.5.0.201905160433     │ openHAB Add-ons :: Bundles :: ZigBee Telegesis Bridge
290 │ Active   │  80 │ 2.5.0.201905160433     │ openHAB Add-ons :: Bundles :: ZigBee CC2531 Bridge
291 │ Active   │  80 │ 1.1.6                  │ com.zsmartsystems.zigbee.dongle.telegesis
292 │ Active   │  80 │ 1.1.6                  │ com.zsmartsystems.zigbee.dongle.ember
293 │ Active   │  80 │ 2.5.0.201905160433     │ openHAB Add-ons :: Bundles :: ZigBee Ember Bridge
294 │ Active   │  80 │ 1.1.6                  │ com.zsmartsystems.zigbee
295 │ Active   │  80 │ 1.1.6                  │ com.zsmartsystems.zigbee.dongle.cc2531

After a reboot event log:

2019-05-16 13:04:30.181 [hingStatusInfoChangedEvent] - 'zigbee:coordinator_xbee:3fcde52d' changed from UNINITIALIZED to INITIALIZING

openhab.log

2019-05-16 12:59:13.528 [WARN ] [core.thing.internal.ThingManagerImpl] - Cannot unregister handler. No handler factory for thing 'zigbee:coordinator_xbee:3fcde52d' found.

I know this isn’t a lot of information but hopefully it can be enough to sort out why the Zigbee coordinator is stuck at initializing.

Thanks,
Chris

I rolled back to 2.3 and my Xbee is working again. I should have did my upgrade on a test system. Next time I will plan better.

Chris

I have exactly the same problem as described by ritriago above:

class org.openhab.binding.zigbee.xbee.handler.XBeeHandler cannot be cast to class org.openhab.binding.zigbee.handler.ZigBeeCoordinatorHandler

I am running openhab “2.5.0 M1-1” - this upgrade (from 2.4.0) was necessary to solve the problems with the XBee coordinator. However, when I add any Zigbee device, the status displays this casting error.

Edit: This appears to have been fixed in the current snapshot release.

My guess is that these cast errors are caused by running incompatible bindings. The ZigBee binding is may up of a number of bundles - one main bundle, and another bundle for the dongle. These must be compatible, and if they aren’t then you may well get this error. It won’t occur if you use consistent bundles as they will have been compiled at the same time.