275 Commits

Author SHA1 Message Date
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
Jenkins nymea
02ebb4fdc5 Merge PR #31: Cleaner .gitignore 2022-03-10 12:33:36 +01:00
Jenkins nymea
f792fed631 Merge PR #30: Remove 1 from lib name 2022-03-10 12:33:35 +01:00
Jenkins nymea
78b8caf53c Merge PR #29: Exclude docs and firmware binaries from dpkg source package 2022-03-10 12:33:34 +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
Michael Zanetti
45eb4de576 deConz: Remove unused/redundant firmware version string member variable and functions 2022-01-30 14:06:22 +01:00
Michael Zanetti
daae851767 Fix debug print for ZigbeeNetwork errors 2022-01-30 14:03:11 +01:00
Michael Zanetti
14895fc559 Allow removing uninitialized nodes 2022-01-30 14:01:38 +01:00
Michael Zanetti
df0b7e9c63 Rafactor handling of TSNs in ZCL to allow the application using it.
This patch separates the transactionSequenceNumber used for sending from the
one received. According to the specification, the transactionSequenceNumber is
not meant to equally increase on both ends, but instead really just be a "random"
number which allows to match a reply to a request. Syncing them on both ends
has the outcome to increase the likelyhood of collisions if a device sends
a notification at the same time we send a request and thus even may wrongly
interpret that incoming command as a reply to the request. In fact, ideally TSNs for
outgoing messages would stay away as far as possible from incoming ones.

The old code additionally had the problem that it would re-use the last received
TSN for outgoing requests, given it used a post-increment when reading
m_transactionSequenceNumber after setting it to the last received TSN.

The new code will use a single static upcounting TSN for all outgoing requests
but will still allow overriding it with a custom TSN of for some reason a certain
device requires a specific TSN (apparently those exist).
It will not do anything with incoming TSNs but forward them now to the application
layer which may decide to use it match its own transactions or to deduplicate packets.

This allows fixing the issue in nymea that remote controls sometimes produce duplicate
pressed events (seen most often with the Tradfri Symfonisk) by discarding commands that
didn't increase the TSN.
2022-01-22 13:51:21 +01:00
Michael Zanetti
d248cab047 Cleaner .gitignore 2022-01-10 00:38:02 +01:00
Michael Zanetti
daa462863b Remove 1 from lib name 2022-01-10 00:35:51 +01:00
Michael Zanetti
0ee7221da4 Exclude docs and firmware binaries from dpkg source package 2022-01-10 00:33:32 +01:00
Jenkins nymea
bfb1ab56f2 Jenkins release build 0.1.4 2021-12-11 00:30:29 +01:00
Jenkins nymea
09f4f5ef80 Merge PR #26: More work on OnOff, LevelControl and ScenesCluster 2021-12-11 00:30:27 +01:00
Jenkins nymea
6e912af594 Merge PR #25: Remove a duplicate debug print and fix some typos 2021-12-11 00:30:26 +01:00
Jenkins nymea
4c44f314b8 Merge PR #24: Print node manufacturer code 2021-12-11 00:30:25 +01:00
Jenkins nymea
d7db4f235d Merge PR #23: Add a clear method to channel mask 2021-12-11 00:30:23 +01:00
Jenkins nymea
ec8c13ad33 Merge PR #22: Add support for IAS Zone enrollment 2021-12-11 00:30:22 +01:00
Jenkins nymea
bcfa0d4acb Merge PR #19: Add manufacturer specific Philips cluster 2021-12-11 00:30:21 +01:00
Michael Zanetti
a22fdcedde Add manufacturer specific philips cluster 2021-12-07 20:36:24 +01:00
Michael Zanetti
6afc214202 More work on OnOff, LevelControl and ScenesCluster
This alignes the OnOff cluster with the LevelControl cluster in terms
of signal behavior: Previously, the OnOff cluster would fire a generic
commandSent() signal for some commands and specific signals for others.
Effectively forcing the user to connect multiple signals even if only
the command would be of interest.

The LevelControl cluster instead always fired a generic commandSent()
signal and *additionally* more specific signals for parsed parameters.

This changes the OnOff cluster to be in line with the LevelCluster
as and making the API a bit simpler to use when parameters are not of
interest.

Also it completes the specific parsing for all 3 clusters.
2021-12-07 10:14:02 +01:00
Michael Zanetti
9782ad5eac Remove a duplicate debug print and fix some typos 2021-11-06 15:47:29 +01:00
Michael Zanetti
5582b6c599 Print the manufacturer code in the node debug prints 2021-10-22 00:32:37 +02:00
Michael Zanetti
b6301ab9c9 Add a clear method to channel mask 2021-10-21 18:47:22 +02:00
Michael Zanetti
e7d533b9e8 Add support for IAS Zone enrollment 2021-10-15 17:01:14 +02:00
Jenkins nymea
c5d9b119af Jenkins release build 0.1.3 2021-06-30 12:42:40 +02:00
Jenkins nymea
db4961f2af Merge PR #17: Improve node removed behavior 2021-06-30 12:42:39 +02:00
Jenkins nymea
0a63e2f101 Merge PR #15: Add develco profile and manufacturer and manufacturer specific cluster methods 2021-06-30 12:42:38 +02:00
Simon Stürz
2f8af57d4e Add invalid measurment filtering for measurement clusters 2021-05-21 08:54:49 +02:00
Jenkins nymea
7d68176fba Jenkins release build 0.1.2 2021-05-19 18:24:49 +02:00
Jenkins nymea
2c700c30cd Merge PR #16: Drop qt5-default dependency 2021-05-19 18:24:48 +02:00
Michael Zanetti
f5271313e6 Drop qt5-default dependency 2021-05-12 14:36:24 +02:00
Simon Stürz
76d43fc99e Improve node removed behavior 2021-05-11 09:00:13 +02:00
Simon Stürz
5072ad7c1e Add develco profile and manufacturer, implement manufacturer specific cluster methods, improve binary input cluster 2021-04-28 13:39:07 +02:00
Jenkins nymea
977938c49f Jenkins release build 0.1.1 2021-02-14 23:00:19 +01:00
Jenkins nymea
ca57f0a720 Merge PR #14: deCONZ backend: fix reconnect mechanism and make latest firmware version work 2021-02-14 23:00:18 +01:00
Simon Stürz
d2f2f8c727 Implement missing deconz firmware parameters and fix configuration. Factory reset works now properly 2021-01-27 14:40:44 +01:00
Simon Stürz
1da025e0fb Add latest deCONZ serial protocol documentation 2021-01-27 12:49:48 +01:00
Simon Stürz
a75bf9c18a Rework init process and fix firmware version request to make it work on newest firmware revisions.
Fix firmware version read request
2021-01-25 16:28:23 +01:00
Jenkins nymea
90eb824018 Jenkins release build 0.1.0 2020-12-21 18:00:12 +01:00
Jenkins nymea
75d7d6db03 Merge PR #10: Prepare stack for being integrated into nymea core 2020-12-21 18:00:10 +01:00
Simon Stürz
16d4bfa0e0 Add serialnumber member to network class and extend deconz backend rectry range 2020-12-18 15:35:32 +01:00
Simon Stürz
3ba1c9b958 Bump debian package version to 0.1.0 2020-12-16 13:16:55 +01:00