Zigbee binding

Hi @chris ,

Will apply these changes between today and tomorrow, so if you could way for your changes for these two days it would make it easier for me.

I respond to some of your comments on the review itself.

BTW, as I am not quite used to github, do I have to revert the commit (how), or do I just push a new one with the new changes?

Thanks - Iā€™ll take a look shortly.

Just create a new commit in the same branch and push it to Github - it will update the same PR. I can then merge them together when itā€™s merged into master.

Thanks

Hi @chris,

Changes done and commits pushed!

BTW, there are two new commits instead of one, as it looks like the first commit did not contain all changesā€¦ Eclipse is trickier than I thought :slight_smile:

Ok, thanks. The number of commits isnā€™t too big of an issue - they will be squashed to on when it mergesā€¦

Iā€™ll try and take a look at this tonight - it would be good to get this merged, then I can try and resolve the issues with the next PR :wink:

Sorry for the delay with this - I spent some time looking at some zwave issues so didnā€™t test this until this morning. All looks good - thanks - so itā€™s now merged.

Today Iā€™ll merge an update with the following changes -:

  • Adds channel configuration. This adds a configuration class that is cluster specific to allow re-use between converters which are channel specific. Note that this isnā€™t fully working at the moment as it likely requires some changes in ESHā€¦
  • Adds polling. The binding detects if bind/reporting fails and sets the polling period to a higher rate (currently 10 seconds, and not user configurable right now).
  • Channel consolidation is now performed to remove channels that are not required (eg removing switch if level is supported, switch and dimmer if color is supportedā€¦).
  • Thing definition is only changed if the channels have changed from the definition at startup. This might speed up initialisation, but also prevents any configuration in channels getting lost if the channels donā€™t change!
  • Battery percent converter is added (untested at the moment as my devices donā€™t seem to support this - it might need some updates if I find a better cluster).
  • Some improvements to logging.
  • ZigBee library is bumped to 1.0.3-SNAPSHOT. This fixes some issues with ZDO message addressing (eg bind/unbind).
1 Like

Hi,
I plan to use bitron magnetic contacts and Salus TRV10RFM heating control devices with openhab in the future.
I know, that heating is currently not supported by the binding, but at least I hope to have some success with the bitron magnetic contacts.
I have a ConBee dongle and a RaspBee available.
Whatā€™s the status regarding support of this dongle by the binding?
My current understanding is, that the dongle driver is coming from zsmartsystems repository and it seems a dongle driver is available there for the ConBee/RaspBee.
Whatā€™s the reason it was not merged to the binding?
Sorry if it is a stupid question and if it was already informed.
Thanks, Markus.

Currently itā€™s not implemented in the binding. The driver is mostly written, but there were some issues when I came to incorporate it into the binding and Iā€™ve not had the chance to finalise itā€¦

With 2.3.0.201801012213, my Centralite/ST outlet comes up, but the GE Link bulbs are not. I do see transition time though! The logs look like they are looping and I get these, for what looks like each of the bulbsā€¦

2018-01-02 01:50:15.224 [ERROR] [.openhab.binding.zigbee.handler.ZigBeeThingHandler] - 7C25240000161884: Exception creating channels
java.lang.ClassCastException: com.zsmartsystems.zigbee.zcl.clusters.ZclLevelControlCluster cannot be cast to com.zsmartsystems.zigbee.zcl.clusters.ZclOnOffCluster
        at org.openhab.binding.zigbee.converter.ZigBeeConverterSwitchLevel.initializeConverter(ZigBeeConverterSwitchLevel.java:51) [16:org.openhab.binding.zigbee:2.3.0.201801012213]
        at org.openhab.binding.zigbee.handler.ZigBeeThingHandler.doNodeInitialisation(ZigBeeThingHandler.java:229) [16:org.openhab.binding.zigbee:2.3.0.201801012213]
        at org.openhab.binding.zigbee.handler.ZigBeeThingHandler.access$0(ZigBeeThingHandler.java:171) [16:org.openhab.binding.zigbee:2.3.0.201801012213]
        at org.openhab.binding.zigbee.handler.ZigBeeThingHandler$1.call(ZigBeeThingHandler.java:165) [16:org.openhab.binding.zigbee:2.3.0.201801012213]
        at org.openhab.binding.zigbee.handler.ZigBeeThingHandler$1.call(ZigBeeThingHandler.java:1) [16:org.openhab.binding.zigbee:2.3.0.201801012213]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:?]
        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) [?:?]
2018-01-02 01:50:15.501 [ERROR] [.openhab.binding.zigbee.handler.ZigBeeThingHandler] - 7CE52400001261EF: Exception creating channels
java.lang.ClassCastException: com.zsmartsystems.zigbee.zcl.clusters.ZclLevelControlCluster cannot be cast to com.zsmartsystems.zigbee.zcl.clusters.ZclOnOffCluster
        at org.openhab.binding.zigbee.converter.ZigBeeConverterSwitchLevel.initializeConverter(ZigBeeConverterSwitchLevel.java:51) [16:org.openhab.binding.zigbee:2.3.0.201801012213]
        at org.openhab.binding.zigbee.handler.ZigBeeThingHandler.doNodeInitialisation(ZigBeeThingHandler.java:229) [16:org.openhab.binding.zigbee:2.3.0.201801012213]
        at org.openhab.binding.zigbee.handler.ZigBeeThingHandler.access$0(ZigBeeThingHandler.java:171) [16:org.openhab.binding.zigbee:2.3.0.201801012213]
        at org.openhab.binding.zigbee.handler.ZigBeeThingHandler$1.call(ZigBeeThingHandler.java:165) [16:org.openhab.binding.zigbee:2.3.0.201801012213]
        at org.openhab.binding.zigbee.handler.ZigBeeThingHandler$1.call(ZigBeeThingHandler.java:1) [16:org.openhab.binding.zigbee:2.3.0.201801012213]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:?]
        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) [?:?]
2018-01-02 01:56:08.766 [ERROR] [.openhab.binding.zigbee.handler.ZigBeeThingHandler] - 7CE524000013F1F0: Exception creating channels
java.lang.ClassCastException: com.zsmartsystems.zigbee.zcl.clusters.ZclLevelControlCluster cannot be cast to com.zsmartsystems.zigbee.zcl.clusters.ZclOnOffCluster
        at org.openhab.binding.zigbee.converter.ZigBeeConverterSwitchLevel.initializeConverter(ZigBeeConverterSwitchLevel.java:51) [16:org.openhab.binding.zigbee:2.3.0.201801012213]
        at org.openhab.binding.zigbee.handler.ZigBeeThingHandler.doNodeInitialisation(ZigBeeThingHandler.java:229) [16:org.openhab.binding.zigbee:2.3.0.201801012213]
        at org.openhab.binding.zigbee.handler.ZigBeeThingHandler.access$0(ZigBeeThingHandler.java:171) [16:org.openhab.binding.zigbee:2.3.0.201801012213]
        at org.openhab.binding.zigbee.handler.ZigBeeThingHandler$1.call(ZigBeeThingHandler.java:165) [16:org.openhab.binding.zigbee:2.3.0.201801012213]
        at org.openhab.binding.zigbee.handler.ZigBeeThingHandler$1.call(ZigBeeThingHandler.java:1) [16:org.openhab.binding.zigbee:2.3.0.201801012213]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:?]
        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) [?:?]

Hopefully this is now fixed - thanks.

1 Like

Sorry to just jump to a question butā€¦
Are any Zigbee dongles working with Tradfri lamps?

My gateway has started to die out (it loses connection from OH / android Tradfri App / DHCP) every 30 minutes and never revives without a power cycle.

I lost my receipt - so I doubt that I can get one back, but even if I could - I do not trust it anymore.
So I want a different control method.

Thanks.

Yes - the binding works with Tradfri lamps.

1 Like

Cool, can you give me the conclusion of this long thread?
Which USB Zigbee controller works and am I correct in assuming I can also change the warmth colour of the lamps too?

FYI - I am running OH2 on a Pi3.

Thanks

Currently my recommendation is the Telegesis ETRX3 which is reasonably readily available.

Yes.

Thanks! Where can I get one of them?

I donā€™t know what country youā€™re in so suppliers will vary - element14 / farnell have them available in most countries that I looked at a while ago but try a web search.

Yeah, I noticed you are in Manchester - so Element 14 or Farnell is fine for me too).

No - Iā€™m in Surrey (not that it makes too much difference - Farnell ship to the whole UK :wink: ).

Does the binding also support the Tradfri motion sensor?

Is this a USB thing or just a chip?
http://de.farnell.com/silicon-labs/etrx3dvka357/development-kit-zigbee/dp/1854238?ost=Telegesis+ETRX3&iscrfnonsku=false&ddkey=http%3Ade-DE%2FElement14_Germany%2Fsearch