Zigbee binding

You can just put the JAR in the addons, but you will also need to uninstall the existing 1.0.11 JAR. Note though that the latest version should include the latest zigbee libraries - or at least if it’s not available yet, the next version will (it was merged last week).

Here are some more logs after doing as pixledoc recommended

19:41:47.836 [DEBUG] [org.openhab.binding.zigbee.cc2531    ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.id=424, service.bundleid=266, service.scope=bundle, component.name=org.openhab.binding.zigbee.cc2531.internal.CC2531HandlerFactory, component.id=290} - org.openhab.binding.zigbee.cc2531
19:41:47.844 [DEBUG] [org.openhab.binding.zigbee.cc2531    ] - BundleEvent STARTING - org.openhab.binding.zigbee.cc2531
19:41:47.849 [DEBUG] [org.openhab.binding.zigbee.cc2531    ] - BundleEvent STARTED - org.openhab.binding.zigbee.cc2531
19:41:47.881 [DEBUG] [gbee.discovery.ZigBeeDiscoveryService] - Creating ZigBee discovery service for zigbee:coordinator_cc2531:f88421c9
19:41:47.884 [DEBUG] [gbee.discovery.ZigBeeDiscoveryService] - Activating ZigBee discovery service for zigbee:coordinator_cc2531:f88421c9
19:41:47.900 [DEBUG] [org.openhab.binding.zigbee.cc2531    ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=427, service.bundleid=266, service.scope=singleton} - org.openhab.binding.zigbee.cc2531
19:41:47.950 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zigbee:coordinator_cc2531:f88421c9' changed from UNINITIALIZED to INITIALIZING
19:41:47.952 [DEBUG] [g.zigbee.cc2531.handler.CC2531Handler] - Initializing ZigBee CC2531 serial bridge handler.
19:41:47.952 [DEBUG] [gbee.handler.ZigBeeCoordinatorHandler] - Initializing ZigBee network [zigbee:coordinator_cc2531:f88421c9].
19:41:47.953 [DEBUG] [gbee.handler.ZigBeeCoordinatorHandler] - Channel -1
19:41:47.953 [DEBUG] [gbee.handler.ZigBeeCoordinatorHandler] - PANID *edited*
19:41:47.953 [DEBUG] [gbee.handler.ZigBeeCoordinatorHandler] - EPANID *edited*
19:41:47.954 [DEBUG] [gbee.handler.ZigBeeCoordinatorHandler] - Key 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
19:41:47.955 [DEBUG] [gbee.handler.ZigBeeCoordinatorHandler] - Key String 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
19:41:47.957 [DEBUG] [gbee.handler.ZigBeeCoordinatorHandler] - Key initialised 7E3D10A3DB30AA7CB838F319D87CBF43
19:41:47.960 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'chromecast:chromecast:2ffc1dff132b09a32720372e56f97a86' changed from UNINITIALIZED to INITIALIZING
19:41:47.962 [DEBUG] [gbee.handler.ZigBeeCoordinatorHandler] - Key final array 7E3D10A3DB30AA7CB838F319D87CBF43
19:41:47.997 [DEBUG] [g.zigbee.cc2531.handler.CC2531Handler] - ZigBee CC2531 Coordinator opening Port:'/dev/ttyACM1' PAN:*edited*, EPAN:*edited*, Channel:-1
19:41:48.000 [DEBUG] [gbee.handler.ZigBeeCoordinatorHandler] - Scheduling ZigBee start
19:41:48.001 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zigbee:coordinator_cc2531:f88421c9' changed from INITIALIZING to UNKNOWN
19:41:48.494 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'chromecast:chromecast:2ffc1dff132b09a32720372e56f97a86' changed from INITIALIZING to ONLINE
19:41:48.545 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'chromecast:chromecast:LongDogDOTgov' changed from UNINITIALIZED to INITIALIZING
19:41:48.604 [WARN ] [su.litvak.chromecast.api.v2.Channel  ] - Error while reading
su.litvak.chromecast.api.v2.ChromeCastException: Remote socket closed
	at su.litvak.chromecast.api.v2.Channel.read(Channel.java:417) [268:org.openhab.binding.chromecast:2.4.0.201806241822]
	at su.litvak.chromecast.api.v2.Channel.access$200(Channel.java:50) [268:org.openhab.binding.chromecast:2.4.0.201806241822]
	at su.litvak.chromecast.api.v2.Channel$ReadThread.run(Channel.java:132) [268:org.openhab.binding.chromecast:2.4.0.201806241822]
19:41:48.610 [WARN ] [su.litvak.chromecast.api.v2.Channel  ] -  <--  null payload in message 
19:41:48.617 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'chromecast:chromecast:2ffc1dff132b09a32720372e56f97a86' changed from ONLINE to OFFLINE
19:41:48.666 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'chromecast:chromecast:LongDogDOTgov' changed from INITIALIZING to ONLINE
19:41:48.669 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'chromecast:chromecast:Doxiecast' changed from UNINITIALIZED to INITIALIZING
19:41:48.696 [WARN ] [su.litvak.chromecast.api.v2.Channel  ] - Error while reading
su.litvak.chromecast.api.v2.ChromeCastException: Remote socket closed
	at su.litvak.chromecast.api.v2.Channel.read(Channel.java:417) [268:org.openhab.binding.chromecast:2.4.0.201806241822]
	at su.litvak.chromecast.api.v2.Channel.access$200(Channel.java:50) [268:org.openhab.binding.chromecast:2.4.0.201806241822]
	at su.litvak.chromecast.api.v2.Channel$ReadThread.run(Channel.java:132) [268:org.openhab.binding.chromecast:2.4.0.201806241822]
19:41:48.698 [WARN ] [su.litvak.chromecast.api.v2.Channel  ] -  <--  null payload in message 
19:41:48.706 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'chromecast:chromecast:LongDogDOTgov' changed from ONLINE to OFFLINE
19:41:48.787 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'chromecast:chromecast:Doxiecast' changed from INITIALIZING to ONLINE
19:41:49.004 [DEBUG] [gbee.handler.ZigBeeCoordinatorHandler] - ZigBee network starting
19:41:49.005 [DEBUG] [gbee.handler.ZigBeeCoordinatorHandler] - Initialising ZigBee coordinator
19:41:49.013 [DEBUG] [gbee.handler.ZigBeeCoordinatorHandler] - Key initialise 7E3D10A3DB30AA7CB838F319D87CBF43
19:41:49.016 [DEBUG] [nding.zigbee.handler.ZigBeeSerialPort] - Connecting to serial port [/dev/ttyACM1] at 115200 baud, flow control FLOWCONTROL_OUT_RTSCTS.
19:41:49.019 [ERROR] [nding.zigbee.handler.ZigBeeSerialPort] - Serial Error: Port /dev/ttyACM1 does not exist.
19:41:49.020 [ERROR] [e.cc2531.network.ZigBeeNetworkManager] - Failed to open the dongle.
19:41:49.021 [DEBUG] [rnal.ZigBeeNetworkStateSerializerImpl] - Loading ZigBee network state: Start.
19:41:49.026 [DEBUG] [rnal.ZigBeeNetworkStateSerializerImpl] - Loading ZigBee network state: Done.
19:41:49.031 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zigbee:coordinator_cc2531:f88421c9' changed from UNKNOWN to OFFLINE: Failed to initialize ZigBee transport layer

and the zwave failing while zigbee is enabled

19:42:53.577 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:512:node12' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED)
19:42:53.579 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:512:node22' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED)
19:42:53.582 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:512:node2' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED)
19:42:53.583 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:512:node18' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED)
19:42:53.584 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:512:node19' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED)
19:42:53.585 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:512:node5' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED)
19:42:53.587 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:512:node4' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED)
19:42:53.616 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:serial_zstick:512' changed from UNINITIALIZED to INITIALIZING
19:42:53.620 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:serial_zstick:512' changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline
19:42:53.630 [INFO ] [ding.zwave.handler.ZWaveSerialHandler] - Connecting to serial port '/dev/ttyACM0'
19:42:53.640 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:serial_zstick:512' changed from OFFLINE (BRIDGE_OFFLINE): Controller is offline to OFFLINE (COMMUNICATION_ERROR): Serial Error: Port {0} does not exist
19:42:53.656 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:512:node2' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
19:42:53.656 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:512:node2' changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline
19:42:53.681 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:512:node19' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
19:42:53.681 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:512:node19' changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline
19:42:53.696 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:512:node5' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
19:42:53.697 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:512:node5' changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline
19:42:53.723 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:512:node3' changed from UNINITIALIZED to INITIALIZING
19:42:53.723 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:512:node3' changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline
19:42:53.723 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:512:node18' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
19:42:53.724 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:512:node18' changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline
19:42:53.733 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:512:node12' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
19:42:53.734 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:512:node12' changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline
19:42:53.734 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:512:node22' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
19:42:53.734 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:512:node22' changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline
19:42:53.737 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:512:node23' changed from UNINITIALIZED to INITIALIZING
19:42:53.738 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:512:node23' changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline
19:42:53.745 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:512:node25' changed from UNINITIALIZED to INITIALIZING
19:42:53.745 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:512:node27' changed from UNINITIALIZED to INITIALIZING
19:42:53.746 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:512:node25' changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline
19:42:53.746 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:512:node27' changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline
19:42:53.749 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:512:node26' changed from UNINITIALIZED to INITIALIZING
19:42:53.749 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:512:node26' changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline
19:42:53.749 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:512:node4' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
19:42:53.754 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:512:node4' changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline

Hey Chris,
Do you have any ideas on this, I just changed all the udev rules and all to make the zigbee port /dev/ttyUSB_cc2531 and the errors stay the same and zwave is knocked offline. The only way I can have zwave is if I have no zigbee coordinator in my things?

Not really - the error is that the binding can’t see the port, so it’s likely associated with either permissions (probably the #1 cause of this sort of problem) or udev rules.

Thanks for the hints. Putting the 1.0.13 version in the addons and then stopping the 1.0.11 seems to work. I am on the 2.3 release version, the nightly gave me problems so I rolled back for now.

Back in January, you reported on this thread you were working on the Tradfri motion sensor. According to the read.me, it was tested with the binding. I am now trying to get mine to work. It shows as “online”, shows channels for battery voltage, percent and a switch for motion. However, none of these channels show a value. Before I dive into the logging, is there anything else I can try?

Edit: it is being very flaky; After numerous tries of removing and readding, it mostly ends up as Offline-has not completed discovery or Offline-not found on network. Right now, I managed to get it online again, and it is even showing battery level (37%?). However, there is only a switch channel which does nothing and not a motion channel, so I don’t get motion sensing.

It is lying right next to the Ember module.

Hi @gundark2,
your issue sounds quite similiar to some odd behaviour I’ve seen with Zigbee vs. Bluetooth binding. If I start both bindings in the right order (in my case: first Zigbee, let it open it’s serial port and then the Bluetooth binding to open it’s serial port(s)) both are working otherwise the Zigbee is failing here.

See full post:

So - If I start just one of two bindings using serial ports at the time (or both in the right order as described above), all is fine. So we can exclude the common serial port permission issues - right?

Could you check the same on your side? So, just start zigbee, verify it’s working and then stop zigbee and start just zwave to check if your udev rules and permissions are correct.

@vkolotov suspected the nrjavaserial port discovery probably causing the issue:

@chris: could you provide a version of the binding which requires excplicite serial port setting (as in pre 2.3 versions of the binding) without depending on the serial port discovery just to rule out this possible cause?
Or does it make no sense at all?

The current binding should work fine with explicit port settings…

But…

Unfortunately, this is not so easy to remove. I do wonder if it’s possible to simply uninstall (or stop) the bundle that performs the USB discovery. I think it’s probably registered as a service, and this service is only installed on Linux computers. It should therefore be possible to stop this, and it should kill off this function.

Get a list of all the running bundles and grep for “usb” to see what shows up.

Are you referring to the

210 │ Active   │  80 │ 2.3.0                  │ ZigBee Binding

or some snapshot version? The above version just let me select some serial port from the drop-down list in the paperUI. If the port is not listed there, I’m not able to manually enter it.

Indeed: If I stop the two bundles related to USB serial port discovery:

openhab> bundle:list | grep USB
205 │ Resolved │  80 │ 0.10.0.oh230           │ Eclipse SmartHome Configuration USB-Serial Discovery
206 │ Resolved │  80 │ 0.10.0.oh230           │ Eclipse SmartHome Configuration USB-Serial Discovery Linux sysf Scan
openhab>

… then both (Zigbee and Bluetooth) are starting together without the need of manually start one after the other.

But: The drop-down list in the coordinator’s configuration is still not showing the Zigbee serial port and I can not manually add it …

I don´t know if it´s useable in your case. But here is something about how to set up Raspbian (Rpi) at least if you use a shield. I suspect it´s something simular with a USB dongle.

https://elelabs.com/downloads/EZBPIS_UG_4_OpenHab.pdf

What happens if you uninstall the second one? I expect that on Windows, and Mac etc (ie not Linux) where there is no USB detection, that this is just absent. I expect that removing this should revert the binding to work without the USB detection (I might be wrong though).

I’m a bit surprised that you can’t add your own text and you can only select what is available. That said, this is not even related to this USB detection - the USB detection checks to see if a port might be a coordinator, but the list of available ports actually comes from somewhere else completely (but I don’t know exactly where).

Thanks @Kim_Andersen!

Probably not :wink:
The system I’m dealing with currently is a VM inside a ESXi running stock Debian none RPi.

Okay, was just wondering if you could use some of the trouble shooting mentioned in the doc.

Sure. I do really aprecciate any help offered :wink:

I’ve had a quick read through the doc and the serial port troubleshooting chapter is quite helpful for any openHAB user having serial port issues (permissions, Java settings etc.). The issue we’re looking here seems not be related to the quite common serial port permission issues on Linux…

So again: Many thanks for the heads-up!

If I just stop the second bundle:

openhab> bundle:list | grep USB
205 │ Waiting  │  80 │ 0.10.0.oh230           │ Eclipse SmartHome Configuration USB-Serial Discovery
206 │ Resolved │  80 │ 0.10.0.oh230           │ Eclipse SmartHome Configuration USB-Serial Discovery Linux sysf Scan
openhab> 

… then the Zigbee binding again is not able opening the coordinators serial port:

2018-07-31 14:39:48.791 [ERROR] [ding.zigbee.handler.ZigBeeSerialPort] - Serial Error: Port /dev/ttyUSB99 does not exist.
2018-07-31 14:39:48.791 [ERROR] [.cc2531.network.ZigBeeNetworkManager] - Failed to open the dongle.

When both USB bundles are stopped:

openhab> bundle:list | grep USB
205 │ Resolved │  80 │ 0.10.0.oh230           │ Eclipse SmartHome Configuration USB-Serial Discovery
206 │ Resolved │  80 │ 0.10.0.oh230           │ Eclipse SmartHome Configuration USB-Serial Discovery Linux sysf Scan
openhab>

… then Zigbee (and the Bluetooth) dongles can be opened:

2018-07-31 14:50:26.137 [hingStatusInfoChangedEvent] - 'zigbee:coordinator_cc2531:xxxxxx' changed from UNKNOWN to ONLINE

If this will not break something else, I would leave it that way for the time being.

Sure: I’d love to see how to manually set zigbee serial port without fiddling. But honestly - I can really live with it as it is now :wink:

Thanks again @chris for all your work and assistance!

@Kim_Andersen can you tell me what firmware version your device is running please? You should see this in PaperUI.

Nope, firmware is not visible in either PaperUI or Habmin.

These are the settings and info available:

Do you see the firmware if you back up a step? Or under Attributes in Habmin?

Nope, neither:

I´m using Elelabs Rpi Shield, and zigbee binding 2.3.0 stable.

1 Like

I tried to install another Tradfri motion sensor, and exactly the same problem. I had openhab on zigbee discovery when I inserted the batteries, and it showed up straight away. But again no channel for occupancy. Log a bug on Github?

I’m not sure why it’s not showing the properties. Can you enable debug logging and restart the binding - it will be one of the first packets that is sent when the binding starts (note you need to enable debug logging on com.zsmartsystems.zigbee).

I’m assuming it’s 6.x, but I’d like to know exactly if possible.