Zigbee binding

Is there a way to test and debug this without fiddling with an openhab setup - Running it from an IDE or something? I have a conbee 2 stick and a metering plug for testing here.

Sure - you can develop directly with the Z-Smart Systems libraries.

Hi Chris - hope you have been well. I just wanted to pass two things by you .

  1. I have noticed my devices(mains powered ones) will consistently ā€˜fall offā€™ and turn offline for a bit. Generally they will eventually come back to online without any intervention at some point but I can also hasten the process by disabling and re-enabling the thing. is there some sort of setting that I can enable that will help prevent this from happening? Everything works just fine while they show as online. I have only noticed this since moving to a new home and as such my network size did increase - Iā€™ve got at least 30 or so devices now. I was thinking maybe there is some setting that I may need to adjust to work better with this network? Iā€™ve attached a subset of logs that hopefully can helpā€¦ I dont know that it includes one falling off to offline but I did include re-enabling the thing where it instantly comes back online. I also wasnā€™t sure if it was maybe just a java issue or something with the thread locking up.

  2. Is there still any discussion about the binding and the ā€˜UNDEFā€™ logic between the ColorColor item and the CT item? I"ve attempted to use this as an ā€˜indicatorā€™ of color/CT status but iā€™ve found it to not be reliable - Iā€™ve been forced to use a manual independent switch to track it myself. Iā€™ve also noticed that this UNDEF logic causes me to constantly lose status on if the light is online / brightness. Iā€™ve linked a dimmer and a switch to the ColorColor item but when I initially send a CT and change its status these loose their info until I manually edit the switch or brightness. Once I do that Iā€™m able to see the status as well as adjust the CT temp.

I do understand some of this may be improved in the latest libraries release - if you think that is the case let me know / let me know of a snapshot version youā€™ve been running that seems ok and I can give that a try. Iā€™ve been with the understanding the latest snapshots have been a mess so Iā€™ve stuck on the M release for now but I can change that. Thanks for all of your help!

openhab.log (581.3 KB)

If it is systematic, then there are a few reasons I guess. Firstly, there could be issues in the network that are causing this, and if so, this is going to be hard to spot as all we will see in the logs is, well, nothing other than the timeout.

It could of course be a bug in the binding with the detection of the OFFLINE device. This uses a timer that expects to receive data from the device at least once in a certain period. This period is a little more than twice the minimum of the polling period, or the reporting period. If the device doesnā€™t report as itā€™s configured by the binding, then this could cause this.

Now we know that some devices (ie the Xiaomi devices) donā€™t respect the configuration, so itā€™s quite possible that this would happen in this case, but most devices that are really ZigBee should respect the configuration of reporting period.

The only way to be sure here is with a log. Unfortunately Iā€™m not sure what the log youā€™ve provided is trying to show. I donā€™t see any nodes going offline, and the log is very short (just a few minutes) so we canā€™t build up a picture of what is happening from this.

Not that Iā€™m aware of. Personally I donā€™t really like the way this is implemented, but this is what was agreed to provide the same functionality across bindings.

I donā€™t think the new libraries will change much in relation to these issues.

That is crazy - so no way to tell if a bulb is online or not when in CT mode. I canā€™t imagine why other bindings are that way as well. Is there any way Iā€™m missing to get an on/off status that works 100% now? Iā€™ve had a switch item linked with the color channel but it goes haywire once the color channel goes undef because of CT mode and I canā€™t link a switch item to a colortemperature channel.

Iā€™d like to have something on my sitemap/habpanels that truly represents the state of the light.

Disregard the previous edit of this post - i was able to get things happy by flipping some bulbs on and off. seems they got into an odd state. I have linked to a folder of logs, however, that should include data on a bulb thing going offline and then coming back online. A number of them just came online right before I pulled the log - the things came online as a command was sent to the channels. Sorry the files are big- i had edited it down to 10 meg rollover but apparently an update reset that. I still wish I could find good advice on splitting out the zigbee /zsmart logs into their own file but still working on that. Thanks for all of your help!

Regards,
Jared

@chris is it possible to configure the polling interval of a channel through HABmin/PaperUI? If not, how can it be configured?

I want to say ā€œyesā€, but at the moment I canā€™t work out how to get this working under PaperUI. It may not be available for all channels, but for some channels at least there should be channel level configuration options available, and polling should be one of the settings (along with other reporting configuration).

This is available for the dimmer and switch channels at least (I just checked the source), but at the moment I canā€™t see where to configure this in PaperUI. I thought that it was an option in the channels list, but Iā€™m not seeing that in my test system here (which Iā€™m still struggling with given all the changes to the build environment).

HABmin should show this, but Iā€™ve not got it configured in my dev system as Iā€™m trying to run a simple system so we can work out what is wrong with the IDE. Iā€™ll see if I can add HABmin into the IDE and hope the development environmentl doesnā€™t break :unamused:

Thanks @chris! I noticed that my OH version (2.5M1) is probably too old. It looks like it was released before the relevant PR was merged. Iā€™ll try to update to a recent snapshot. I was a bit hesitant to do so because of the recent stability issuesā€¦

The transition time setting isnā€™t available in PaperUI either, so maybe HABmin is required for polling as well?

Were other channel configuration options available? The binding attempts to work out what is supported by different devices, and will only provide configuration options if the appropriate configuration attribute is supported.

As mentioned, it seems like my OH version is too old to support other configuration options than ā€œDefault Transition Timeā€, but even that is only available in HABmin.
I only have things with ā€œDimmerā€ and ā€œSwitchā€ channels, but none of those channels show any configuration options in PaperUI.

I forgot about the bulbs, they have ā€œDefault Transition Timeā€, ā€œOn/Off Transition Timeā€ and ā€œOn Levelā€ configuration options in HABmin, none in PaperUI.

Thanks for the info - so it looks like PaperUI has lost its channel configuration options. Iā€™m sure it was in the same place as the profile configuration is now when editing channels :frowning:

Oh - and I do have your USB stick here - my Mrs put it in a safe place when it arrived and I only found it on Thursday. Iā€™ll try and get that back in the post on Monday.

Thanks Chris, whenever you have time is fine.

Iā€™ll report back about the polling configuration once Iā€™ve updated OH to a recent snapshot.

1 Like

@chris Iā€™ve updated to 2.5.0~S1645-1 and the reporting/polling configuration options are now available in HABmin (still nothing in PaperUI).

Iā€™ve set ā€œPolling Periodā€ to 15 seconds and itā€™s working as expected. Out of curiosity Iā€™ve also tried to set the ā€œMaximum Reporting Periodā€ to 15 seconds, but that didnā€™t work. That was expected though, the relay channel(s) never honoured the reporting configuration (thatā€™s why I wanted to configure polling in the first place).

So thanks a lot, finally the UI gets updated in a timely manner when the wall-mounted switches are used to change state :+1:

1 Like

I think that I am doing the same thing that weakfl is doing in habmin by adding

, zigbee_reporting_polling="15"]

to my thing in the .things file, correct? Or is zigbee_reporting_polling something else than "polling period"in habmin?

To be honest, Iā€™m not 100% sure, but I donā€™t think it is correct.

This configuration is on the CHANNEL, not the THING, so my guess is that it will not work if this is added to the thing, but Iā€™m not sure where to set channel configuration so I could be wrong.

1 Like

Hi @chris
Just a curious question.
I have just installed an fresh openhab 2.5M1 on an Odroid C2. My old setup was running an Rpi with the Elabs Zigbee hat for Rpi, also using the Zigbee binding 2.5M1.

With the Odroid C2, I use the EM357 Long Range USB dongle I had for sniffing, cause the Elabs cant go into the GPIO because there is an battery extension sitting there.

Anyway - I have noticed a huge difference in the two zigbee coordinators, which I dont quite understand.
When adding the Philips Hue motion sensor to the Elabs coordinator, it only frequently reports the lumiance state (several minutes interval). But now, using the EM357 coordinator on the Odroid, it reports the lumiance state alot more, like this:

2019-07-28 12:51:23.713 [vent.ItemStateChangedEvent] - HUE_illumiance changed from 246.33 to 246.43
2019-07-28 12:51:28.722 [vent.ItemStateChangedEvent] - HUE_illumiance changed from 246.43 to 245.68
2019-07-28 12:51:33.646 [vent.ItemStateChangedEvent] - HUE_illumiance changed from 245.68 to 245.91
2019-07-28 12:51:38.721 [vent.ItemStateChangedEvent] - HUE_illumiance changed from 245.91 to 246.00
2019-07-28 12:51:42.846 [vent.ItemStateChangedEvent] - HUE_illumiance changed from 246.00 to 246.54
2019-07-28 12:52:46.598 [vent.ItemStateChangedEvent] - HUE_illumiance changed from 246.54 to 244.90

How is it possible that one coordinator act in another way than another coordinator on this matter? Is there anywhere I can change this to less frequent reporting? I believe this would affect the battery, right?

The change in coordinator will not make any difference here - only the binding, or the device can impact this.

The binding might have the ability to configure the reporting for this channel - Iā€™m not sure, so you would need to check.

Which is why I askedā€¦ Cause I havnĀ“t changed anything, except the coordinator (and ofcouse the server hardware).

It doesnt seem to be an option.