I suspect that you need to update to a newer version of OH as the TP has changed.
@chris, after deleting the coordinator and recreating it with my old settings, Iām having trouble getting it back online. It gets to here and then stopsā¦
2018-09-12 03:31:40.915 [DEBUG] [com.zsmartsystems.zigbee.dongle.ember.EmberNcp] - EzspGetCurrentSecurityStateResponse [status=EMBER_NOT_JOINED, state=EmberCurrentSecurityState [bitmask=[], trustCenterLongAddress=0BCC000000030000]]
2018-09-12 03:31:40.923 [DEBUG] [com.zsmartsystems.zigbee.dongle.ember.EmberNcp] - Error during retrieval of security parameters: EzspGetCurrentSecurityStateResponse [status=EMBER_NOT_JOINED, state=EmberCurrentSecurityState [bitmask=[], trustCenterLongAddress=0BCC000000030000]]
2018-09-12 03:31:40.939 [DEBUG] [com.zsmartsystems.zigbee.dongle.ember.ZigBeeDongleEzsp] - EZSP dongle initialize done: Initialised true
2018-09-12 03:31:40.951 [DEBUG] [org.openhab.binding.zigbee.internal.ZigBeeNetworkStateSerializerImpl] - Loading ZigBee network state: Start.
2018-09-12 03:31:41.058 [DEBUG] [com.zsmartsystems.zigbee.ZigBeeNetworkManager] - 000D6F000AFF6FC8: Node 0 added to the network
2018-09-12 03:31:41.058 [DEBUG] [org.openhab.binding.zigbee.internal.ZigBeeNetworkStateSerializerImpl] - Loading ZigBee network state: Done.
2018-09-12 03:31:41.059 [DEBUG] [com.zsmartsystems.zigbee.internal.ZigBeeNetworkDiscoverer] - Network discovery task starting
Iāve updated the binding and restarted OH. Iām not sure what else to try. Any ideas?
Yes - I think it is related to this -:
I donāt have a suggestion to solve it though until this is merged.
No, sorry, I donāt know what this error is. Hi I me it looks like a low level error - writing to disk, or possibly an issue with writing to some port, but itās clearly a very low level error as the error is in C code.
I downgraded to a binding with 1.0.14 libraries, then upgraded again. Seems to have gotten me running again.
Nice workaround - thanks. The issue is only when the dongle is initialised - once itās initialised, the keys are set again.
Hopefully I can get some of these PRs merged - unfortunately as the DT people are all on holiday, itās a little difficult!
@puzzle-star what are the sensors you have that are reporting as the lumi sensor ht? I have a couple of different Xiaomi devices here, but they donāt seem to report as this. The latest ones I have report as lumi weather and have temp/humidity and pressure, and these devices correctly report their clustersā¦
Iāve created an update mostly based on your suggested change, but would like to test it if possibleā¦
The lumi.weather ones (the square ones) are OK, as you say (I also have some of these). The lumi.sensor_ht I am speaking of are the round ones, and they do not report pressure:
The aqara switches (the battery powered ones) also need this type of hack
Pedro
I was also trying to keep it simple for non-tech users, but the support of ānon-standardā devices in the end may either:
- Not being maintainable in the binding itself (how often and how many devices can be added?)
- If users need to go to Snapshot version, I think it would not be targetting at non-tech users either
- āTechā users may need a way to override things without having to tweak with the binding
I would suggest to add (I can code this if needed, or indeed adapt my already working code), if possible:
- A configuration parameter on the binding (sort of text box) to define such overrides (so that not-too-techie users could just put the definitions found on the forums there, but in the end this is OH,ā¦)
- A configuration parameter on the standard device thing to override endpoints (something like the zigbee_endpoints=ā1:1026,1029ā)
- A configuration parameter on the standard device thing to prevent discovery from the binding (something like the zigbee_discovery=āfalseā)
This does not force to define the things Ć la OH1 style. These configurations parameters work the same in the ā.thingsā files as in the UI config. I am just using the files for convenience
I just think that trying to keep a non-standard device inventory inside the binding may end up not fitting the āone-for-allā purpose, specially once the binding is stable and does not need so much āmaintenanceā
Pedro
Iām not really keen on this. I much prefer to use the standard XML system - it ensures that people can use this without being technical. You refer to people downloading definitions off the forum - but please remember that most users of OH donāt use the forum, and many users of the binding are not using OH even. In my opinion, support should be added to the binding to support new devices.
No matter what, the XML is definitely required as this is a basic principal for this binding - it must be able to be used by people who are completely non-technical, with no configuration.
What is the purpose of this, and what is it meant to actually stop? The binding really needs to do discovery or it doesnāt add devices into the binding
I donāt know what this means? If we add support for a device, then itās clearly available for everyone and no further configuration is required.
Iāve created an initial PR to add this support to the XML. Somewhere I have one of these old Xiaomi temperature sensors, but I canāt find it to test with. If you like, please feel free to test it (it needs to discovery information added to the PR for testing .
Hi @chris,
But is there (or could be) a way for a user to place these xmls out of the jar, so that a device can be supported even if not part of the official distribution?
Now I am lost. Isnāt the binding specific for openhab? (not speaking of the zsmartsystems part, just about the org.openhab.binding.zigbee part)
doNodeInitialization(): (being configStatic below the check on the config parameter)
// Check if discovery is complete and we know all the services the node supports
- if (!node.isDiscovered()) {
+ if (!configStatic && !node.isDiscovered()) {
Some devices (I agree, badly implemented ones, but they do exist anyway), do not respond too well (or at all) to discovery. The result of this is that, as the node.isDiscovered() check returns true only when the endpoints and node descriptor have been initialized, if for some reason this does not work (or does not work on a timely manner), such devices get into the system, but never go futher the isDiscovered check in the binding:
-
Sleepy devices
-
Devices not responding to some commands during discovery. Example: the discovery mecanism puts in a queue the discovery tasks. I have seen in the discovery task list the ROUTE discovery before the NODEDESCRIPTOR one (not sure it should be OK), so for END DEVICES it will stay forever retrying the ROUTE discoveryā¦ Maybe the issue is on the discovery process, and I should look at there instead
-
Devices not responding at all (or hard to make to respond) to NodeDescriptor or EndPoints request (i.e. Aqara battery powered switches) due to being too āsleepyā
It does. I guarrantee (of course, with the hack above)ā¦ Again speaking of the org.openhab.binding.zigbee part, not of the zsmartystems part, and not speaking of disabling the discovery service or something like that: just the check above.
Probably I did not explain it correctly. What I mean is: yes, if support for a device is added, it will work. But how often will you be able to add new devices? With which frequency there is a new release ? And in three years, how often there will be a new release?
I mean, tying the release of newly supported devices that only need an xml to work, to the release cycle of the binding + OH, may not be sustainable over time, and probably some users would like to be able to add a new supported device by just dropping a xml somewhere, if not possible to configure it on the binding itself, without having to go to snapshot version.
Will give it a try
Pedro
This isnāt currently possible in ESH.
There are many (most) users of OH that do not regularly access the forum, and there are other systems that use OH bindings.
As often as is needed. In ZWave, itās normally twice per week, but if someone creates a PR to add a device, it can easily be added.
The same - as often as people add the data to the binding. Itās controlled this way - if youāre getting at the fact that in 3 years no-one will be supporting this, then the binding will likely not work with new devices anyway. I simply donāt think this is an issue. If people arenāt working out the device information and publishing it somewhere, then itās all irrelevant isnāt it?
I donāt understand. Youāve said that there will not be many such devices. I would like to think that in future, more devices will be more compliant. In any case, as I said above, for the past 3 years Iāve personally been doing updates to the ZWave binding a few times a week to add devices - itās exactly the same.
This ensures the data and device support is available for everyone - not just those with the knowledge to work out how to add devices for themselves.
Then I understand why you do not like the idea
Fair enough
Will look anyway deeper into the discovery mechanism in the ZigBeeNode, as clicking the Xiami buttons for 3 minutes twice per second while looking at the logs till it goes through discovery is not very āuser firendlyā¦ā
I think this could be optimized a bit, but will check if I can propose something ācleanā and faster for discovery in general
Thanks - Iām certainly open to ideas, and appreciate your input and thoughts .
I try to to start the binding with eclipse smarthome, windows 10 and CC2531 (COM4). When I set the port to āCOM4ā in PaperUI I get the error message that the port doesnāt exist.
Thatās the log when I launch openHAB_Runtime:
2018-09-14 18:12:21.886 [DEBUG] [b.z.h.ZigBeeCoordinatorHandler:435 ] - ZigBee network starting
2018-09-14 18:12:21.887 [DEBUG] [b.z.h.ZigBeeCoordinatorHandler:331 ] - Initialising ZigBee coordinator
2018-09-14 18:12:21.931 [DEBUG] [b.z.h.ZigBeeCoordinatorHandler:347 ] - Key initialise 5EF585BC0FC6AAB23371C521D6C5F136
2018-09-14 18:12:21.934 [DEBUG] [o.b.z.handler.ZigBeeSerialPort:122 ] - Connecting to serial port [COM4] at 115200 baud, flow control FLOWCONTROL_OUT_RTSCTS.
2018-09-14 18:12:21.961 [ERROR] [o.b.z.handler.ZigBeeSerialPort:151 ] - Serial Error: Port COM4 does not exist.
2018-09-14 18:12:21.962 [ERROR] [z.z.d.c.n.ZigBeeNetworkManager:305 ] - Failed to open the dongle.
2018-09-14 18:12:21.962 [DEBUG] [gBeeNetworkStateSerializerImpl:144 ] - Loading ZigBee network state: Start.
2018-09-14 18:12:21.969 [DEBUG] [gBeeNetworkStateSerializerImpl:182 ] - Loading ZigBee network state: Done.
2018-09-14 18:12:21.979 [INFO ] [ome.event.ThingStatusInfoEvent:53 ] - 'zigbee:coordinator_cc2531:2732c9b9' updated: OFFLINE: Failed to open communications port
2018-09-14 18:12:21.989 [INFO ] [nt.ThingStatusInfoChangedEvent:53 ] - 'zigbee:coordinator_cc2531:2732c9b9' changed from UNKNOWN to OFFLINE: Failed to open communications port
Any ideas what Iām doing wrong?
The 3rd Party Bluetooth binding found a way to support user provided XMLs outside of the binding.
Can you provide a reference or link to how this works? Maybe itās a different XML - ie not the ESH thing files?
It is a different XML.
Coles notes on how it works:
Create a directory and give the binding(OH) the ability to read it.
Create XML files with definition of how to interpret the raw readouts of the device.
Seems like a good compromise between 0 configuration and an option for those who are willing to do a little bit of legwork outside of standard support.
So this is a different system than ESH. We need to stick to standards and IMHO there is no benefit to this and it really makes a nightmare for supportā¦
Letās just do it properly so that things are supported for everyone.