217 Commits

Author SHA1 Message Date
Michael Zanetti
e16e04d79e queue requests that are sent before the stack is ready 2022-10-12 12:16:10 +02:00
jenkins
32316dd43c Merge PR #63: Fix permit joining in deconz backend 2022-09-23 16:33:18 +02:00
Michael Zanetti
23f53f38ee Fix permit joining in deconz backend
The router broadcast address 0xFFFC is not a group addres, but a
"regular" address. Setting the destinationAddressMode to GroupAddress
caused the message to not be broadcastet and permit joining was only
enabled on the coordinator.

This caused mainly the issue that joining a network would not work
if the coordinator is out of reach.
In addition to that, there are quite a bit of end devices out there
which behave badly in finding new parents and will stick to the node
they joined in the first place forever, causing them to have bad
signal if further away from the coordinator, even though there
would be routers with much better LQI.

Additionally it fixes a permit joining issue in the TI backend which would
prevent a call to setPermitJoining(0) to explicitly allow joining
only on the coordinator.

The change of radius from 10 to 30 probably isn't needed for 99% of the
networks, however, it may still help for that one percent that does
indeed have a network depth of > 10. Looking at other implementations
out there, 30 seems to be the common sense.
2022-09-10 20:12:17 +02:00
Michael Zanetti
ea73d28213 Fix node type parsing
Parsing of NodeTypeEndDevice and NodeTypeRouter were swapped.
2022-08-30 22:48:19 +02:00
jenkins
b9ff17ace8 Merge PR #59: NXP backend: Fix release file parsing and allow multiple release files as list 2022-08-19 15:41:04 +02:00
Simon Stürz
7acb35d11c Fix release file parsing and allow multiple release files as list 2022-08-09 14:25:45 +02:00
Michael Zanetti
ebf004af01 Implement Electricalmeasurement server command handling 2022-07-04 14:08:44 +02:00
jenkins
a5d49d7b64 Merge PR #57: Implement commands for metering cluster 2022-06-30 15:04:00 +02:00
jenkins
50e329b1ce Merge PR #56: Add Time cluster implementation 2022-06-30 15:03:58 +02:00
jenkins
2883080413 Merge PR #55: Fix a crash if the controller takes too long to start 2022-06-30 15:03:57 +02:00
Michael Zanetti
92cdc4bc84 Implement commands for metering cluster
Main reasoning behind this is actually that Tuya devices seem
to send a CancelMessage command every other minute and are currently
spamming the log with unhandled ZCL indication warnings.

Instead of just silencing the warning (which is very useful most of the times)
I decided to complete the implementation of the metering cluster and
actually make it a handled ZCL indication.
2022-06-20 23:30:18 +02:00
Michael Zanetti
725272e1fa Add Time cluster implementation 2022-06-20 00:03:50 +02:00
Michael Zanetti
e9d594ee5b Fix a crash if the controller takes too long to start
This may happen on very rare occations after a nymea restart
if the controller is taking too long to initialize but still succeeds
in the end. Also increases the timeout for the procedure.
2022-06-08 23:30:05 +02:00
jenkins
3bd8787e41 Merge PR #54: Make NXP update provider independent from the chip module type 2022-06-07 23:06:20 +02:00
jenkins
0b92eb4968 Merge PR #53: Explicitly stop the ZCL timeout timer 2022-06-07 23:06:19 +02:00
jenkins
d8c74fd52e Merge PR #52: Fix a debug message 2022-06-07 23:06:17 +02:00
jenkins
59025c0c2e Merge PR #50: Fix a typo in the illuminancemeasurement cluster 2022-06-07 23:06:16 +02:00
jenkins
19d262b459 Merge PR #49: Add IAS WD cluster 2022-06-07 23:06:15 +02:00
Simon Stürz
874c55f809 Make NXP update provider independent from the chip module type 2022-05-17 14:55:34 +02:00
Michael Zanetti
c90ed3ab09 Fix a typo in the illuminancemeasurement cluster 2022-05-13 11:22:07 +02:00
Michael Zanetti
365386ea71 Add IAS WD cluster 2022-05-13 11:21:20 +02:00
Michael Zanetti
d210d696e0 Add Battery Alarm State support to PowerConfiguration cluster 2022-05-13 11:20:49 +02:00
Michael Zanetti
fd12d0518b Explicitly stop the ZCL timeout timer
Also don't use a QueuedConnection, as it's not guaranteed the
sender will still live on by the time slot is called.
2022-05-12 17:33:35 +02:00
Michael Zanetti
e0bf02b115 Fix a debug message 2022-05-12 17:11:51 +02:00
jenkins
53bd313766 Merge PR #47: Timeout ZCL replies 2022-04-25 23:53:22 +02:00
jenkins
ed87b53d50 Merge PR #46: Fix permit joining duration/remaining signals 2022-04-25 23:53:20 +02:00
jenkins
6de3c8318d Merge PR #45: Fix a crash when ZDO responses come in after the ZDO request timed out 2022-04-25 23:53:19 +02:00
jenkins
07f25a749b Merge PR #44: Add electrical measurement and metering clusters 2022-04-25 23:53:18 +02:00
Michael Zanetti
b96f9fa98f Timeout ZCL replies
This is basically the same as #41 does with ZDO replies but for ZCL replies.

Working with a z-stack dongle and a Gewiss binary input device a lot of
timeouts happen during the device interview. While basic device interview
timeouts are caught by the ZDO timeouts, later interview steps like
cluster attribute reading run into the same issue with this device and
the interview process never finishes.
2022-04-25 14:31:10 +02:00
Michael Zanetti
4f63ae01c0 Fix permit joining duration/remaining signals
* Prevent resetting the duration repeatedly by not calling setPermitJoiningState
in the timer any more
* Added signal emissions for when remaining changes in an unexpected manner.
2022-04-23 23:32:35 +02:00
Michael Zanetti
c20d14b793 Fix a crash when ZDO requests time out 2022-04-23 12:07:20 +02:00
Jenkins nymea
2af5d1a759 Merge PR #43: Consolidate permit joining timer 2022-03-10 12:33:48 +01:00
Jenkins nymea
8cffe484f6 Merge PR #41: Timeout ZDO replies 2022-03-10 12:33:47 +01:00
Jenkins nymea
9d8efd4317 Merge PR #40: More work on the thermostat cluster 2022-03-10 12:33:46 +01:00
Jenkins nymea
38ee4c97ba Merge PR #39: Simplify cluster inheritance 2022-03-10 12:33:45 +01:00
Jenkins nymea
fd5449688d Merge PR #38: Add helpers for mandatory attributes in AnalogInput cluster 2022-03-10 12:33:44 +01:00
Jenkins nymea
1013feaa57 Merge PR #37: Add support for floating point attribute parsing 2022-03-10 12:33:43 +01:00
Jenkins nymea
5ccf077941 Merge PR #36: deConz: Remove unused/redundant firmware version string members 2022-03-10 12:33:42 +01:00
Jenkins nymea
edfe29775a Merge PR #35: Fix debug print for ZigbeeNetwork errors 2022-03-10 12:33:41 +01:00
Jenkins nymea
cbc25b2949 Merge PR #34: Allow removing uninitialized nodes 2022-03-10 12:33:40 +01:00
Jenkins nymea
ea2e1cbf0a Merge PR #33: Add support for TI z-Stack based adapters 2022-03-10 12:33:38 +01:00
Jenkins nymea
728be6ad55 Merge PR #32: Refactor handling of TSNs in ZCL to allow the application using it. 2022-03-10 12:33:37 +01:00
Michael Zanetti
9abcdfcf3d Add electrical measurement and metering clusters
Renamed the SimpleMetering enum to Metering as that's what it is in the Zigbee
Alliance Spec. SimpleMetering seems to come from a NXP document which
isn't complete though and the upstream spec is what matters in the end.
Also adds some cluster ids which are in the Zigbee spec but missing in
the NXP document.
2022-03-08 01:21:52 +01:00
Michael Zanetti
806065ff5c Timeout ZDO replies
I've been observing devices that won't reply to ZDO node descriptor requests,
at least not on the first attempt as well as out-of-spec devices which claim
to have an endpoint x but then won't reply on getting the endpoint descriptor.

I have a Lumi (lumi.sensor_switch.aq2) button here which allows to reproduce
both of those. It will never reply on the first attemt.

Anyhow, it happens that the ZDO, waiting on the data indication never finishes
because there does not seem to be a timeout connected to it and it fails initialisation.
Adding a timeout, the code retries and it seems to succeed on the second attempt.
2022-03-07 12:07:40 +01:00
Michael Zanetti
961008027d Consolidate permit joining timer
Starting/stopping the permit joining duration timer is not something
each backend should do on it's own. So making the timer a private
member of ZigbeeNetwork and taking control over it internally.

Also reduce some logic about the remaining duration by merging the
related methods into one and hiding the "remaining" duration from
backend implementations completely.
2022-03-07 11:22:59 +01:00
Michael Zanetti
b84f37e7d8 Add support for TI z-Stack based adapters 2022-03-07 11:22:05 +01:00
Michael Zanetti
88920274da More work on the Thermostat cluster 2022-02-17 01:15:10 +01:00
Michael Zanetti
a38e8be190 Simplify ZigbeeCluster inheritance
Instead of having 2 methods (setAttribute and addOrUpdateAttribute)
to allow specific cluster implementations to override behavior,
merge them into one, setAttribute, and use standard C++ syntax for
calling a base class implementation.
2022-02-14 11:23:36 +01:00
Michael Zanetti
7ccbfc3a6d Add helpers for mandatory attributes in AnalogInput cluster 2022-02-14 11:21:55 +01:00
Michael Zanetti
977e31f2ba Add support for floating point attribute parsing 2022-02-14 11:21:41 +01:00